22 :
SLScene(
"Parallax Bump Mapping Test")
24 info(
"Parallax mapping with a spot. "
25 "Use F2-Key to increment (decrement w. shift) parallax scale."
26 "Use F3-Key to increment (decrement w. shift) parallax offset.\n");
86 light1->
powers(0.1f, 1.0f, 1.0f);
The AppCommon class holds the top-level instances of the app-demo.
Class declaration for an SLScene inherited class.
SLKey
Keyboard key codes enumeration.
SLVec2< SLfloat > SLVec2f
SLVec4< SLfloat > SLCol4f
static SLstring texturePath
Path to texture images.
static SLstring shaderPath
Path to GLSL shader programs.
void assemble(SLAssetManager *am, SLSceneView *sv) override
After parallel loading of the assets the scene gets assembled in here.
AppDemoSceneShaderParallax()
void registerAssetsToLoad(SLAssetLoader &al) override
All scene specific assets have to be registered for async loading in here.
SLAnimation * createNodeAnimation(SLfloat duration)
SLAnimation is the base container for all animation data.
SLNodeAnimTrack * createNodeAnimTrackForEllipse(SLNode *target, SLfloat radiusA, SLAxis axisA, SLfloat radiusB, SLAxis axisB)
void addProgramToLoad(SLGLProgram *&program, const SLstring &vertShaderFile, const SLstring &fragShaderFile)
Add generic GLSL program with shader files to load.
void addTextureToLoad(SLGLTexture *&texture, const SLstring &path, SLint min_filter=GL_LINEAR_MIPMAP_LINEAR, SLint mag_filter=GL_LINEAR, SLTextureType type=TT_unknown, SLint wrapS=GL_REPEAT, SLint wrapT=GL_REPEAT)
Add 2D textures with internal image allocation.
Toplevel holder of the assets meshes, materials, textures and shaders.
void colors(const SLCol4f &uniformColor)
Sets a uniform background color.
Active or visible camera node class.
void focalDist(const SLfloat f)
SLBackground & background()
void addUniform1f(SLGLUniform1f *u)
add float uniform
void attenuation(const SLfloat kConstant, const SLfloat kLinear, const SLfloat kQuadratic)
void powers(SLfloat ambiPow, SLfloat diffPow, SLfloat specPow, const SLCol4f &ambiDiffSpecCol=SLCol4f::WHITE)
Sets the ambient, diffuse and specular powers all with the same color.
SLLightSpot class for a spot light source.
Defines a standard CG material with textures and a shader program.
SLNode represents a node in a hierarchical scene graph.
void addChild(SLNode *child)
void translation(const SLVec3f &pos, SLTransformSpace relativeTo=TS_parent)
SLVec3f translationWS() const
void lookAt(SLfloat targetX, SLfloat targetY, SLfloat targetZ, SLfloat upX=0, SLfloat upY=1, SLfloat upZ=0, SLTransformSpace relativeTo=TS_world)
SLRectangle creates a rectangular mesh with a certain resolution.
The SLScene class represents the top level instance holding the scene structure.
SLVEventHandler & eventHandlers()
SLAnimManager & animManager()
SceneView class represents a dynamic real time 3D view onto the scene.
void camera(SLCamera *camera)
T distance(const SLVec3 &p) const
Calculate the distance to point p.