48 "SLSkybox: asset manager is currently mandatory for sky-boxes! "
49 "Alternatively the live-time of the box has to be managed in the sky-box!");
74 shaderPath +
"SkyBox.vert",
75 shaderPath +
"SkyBox.frag");
126 shaderPath +
"PBR_SkyboxHDR.vert",
127 shaderPath +
"PBR_SkyboxHDR.frag");
147 GL_LINEAR_MIPMAP_LINEAR);
155 GL_TEXTURE_CUBE_MAP);
163 GL_TEXTURE_CUBE_MAP);
176 envMaterial->
program(backgroundShader);
177 envMaterial->
skybox(
this);
206 assert(
sv &&
"No SceneView passed to SLSkybox::drawAroundCamera");
Toplevel holder of the assets meshes, materials, textures and shaders.
Generic Shader Program class inherited from SLGLProgram.
Encapsulation of an OpenGL shader program object.
Singleton class holding all OpenGL states.
SLMat4f modelMatrix
Init all states.
void depthMask(SLbool state)
static SLGLState * instance()
Public static instance getter for singleton pattern.
void depthFunc(SLenum func)
Texture object for OpenGL texturing.
virtual void build(SLint texUnit)
SLCol4f getTexelf(SLfloat u, SLfloat v, SLuint imgIndex=0)
SLGLTexture::getTexelf returns a pixel color from u & v texture coordinates.
Texture object generated in run time from another texture.
Defines a standard CG material with textures and a shader program.
void skybox(SLSkybox *sb)
void addTexture(SLGLTexture *texture)
Adds the passed texture to the equivalent texture type vector.
SLVGLTexture & textures(SLTextureType type)
void program(SLGLProgram *sp)
SLNode represents a node in a hierarchical scene graph.
virtual void drawMesh(SLSceneView *sv)
Draws the single mesh.
void translation(const SLVec3f &pos, SLTransformSpace relativeTo=TS_parent)
const SLMat4f & updateAndGetWM() const
virtual void addMesh(SLMesh *mesh)
SLMesh * _mesh
pointer to a single mesh
SceneView class represents a dynamic real time 3D view onto the scene.
void camera(SLCamera *camera)
SLGLTexture * _environmentCubemap
SLGLTexture * _hdrTexture
void build()
Builds all texture for HDR image based lighting.
SLCol4f colorAtDir(const SLVec3f &dir)
Returns the color in the skybox at the the specified direction dir.
SLGLTexture * _irradianceCubemap
SLbool _isHDR
flag for HDR skyboxes
SLSkybox(SLAssetManager *assetMgr, SLstring shaderPath, SLstring cubeMapXPos, SLstring cubeMapXNeg, SLstring cubeMapYPos, SLstring cubeMapYNeg, SLstring cubeMapZPos, SLstring cubeMapZNeg, SLstring name="Default Skybox")
Construct a new SLSkybox::SLSkybox object with 6 images for all sides.
void drawAroundCamera(SLSceneView *sv)
Draw the skybox with a cube map with the camera in its center.
SLGLTexture * _roughnessCubemap
SLGLTexture * _brdfLutTexture
SLbool _isBuilt
flag for late HDR skybox building