22 :
SLScene(
"Per vertex wave shader")
25 info(
"Vertex Shader with wave displacement. "
26 "Use F2-Key to increment (decrement w. shift) the wave height.");
81 wave->
rotate(90, -1, 0, 0);
The AppCommon class holds the top-level instances of the app-demo.
Class declaration for an SLScene inherited class.
@ UT_incDec
never ending loop from min to max and max to min
@ UT_inc
never ending increment
SLKey
Keyboard key codes enumeration.
SLVec2< SLfloat > SLVec2f
SLVec4< SLfloat > SLCol4f
static SLDeviceRotation devRot
Mobile device rotation from IMU.
static SLDeviceLocation devLoc
Mobile device location from GPS.
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.
void registerAssetsToLoad(SLAssetLoader &al) override
All scene specific assets have to be registered for async loading in here.
void addProgramToLoad(SLGLProgram *&program, const SLstring &vertShaderFile, const SLstring &fragShaderFile)
Add generic GLSL program with shader files to load.
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 devRotLoc(SLDeviceRotation *devRot, SLDeviceLocation *devLoc)
void focalDist(const SLfloat f)
SLBackground & background()
void addUniform1f(SLGLUniform1f *u)
add float uniform
void ambiDiffPowers(SLfloat ambiPow, SLfloat diffPow, const SLCol4f &ambiDiffCol=SLCol4f::WHITE)
Sets the ambient and diffuse powers with the same color.
void attenuation(const SLfloat kConstant, const SLfloat kLinear, const SLfloat kQuadratic)
SLLightSpot class for a spot light source.
Defines a standard CG material with textures and a shader program.
void program(SLGLProgram *sp)
SLNode represents a node in a hierarchical scene graph.
void addChild(SLNode *child)
void translation(const SLVec3f &pos, SLTransformSpace relativeTo=TS_parent)
void rotate(const SLQuat4f &rot, SLTransformSpace relativeTo=TS_object)
SLVec3f translationOS() const
void lookAt(SLfloat targetX, SLfloat targetY, SLfloat targetZ, SLfloat upX=0, SLfloat upY=1, SLfloat upZ=0, SLTransformSpace relativeTo=TS_world)
void translate(const SLVec3f &vec, SLTransformSpace relativeTo=TS_object)
SLRectangle creates a rectangular mesh with a certain resolution.
The SLScene class represents the top level instance holding the scene structure.
SLVEventHandler & eventHandlers()
SceneView class represents a dynamic real time 3D view onto the scene.
void camera(SLCamera *camera)
void doWaitOnIdle(SLbool doWI)
SLSphere creates a sphere mesh based on SLSpheric w. 180 deg polar angle.