22 info(
"The reason for this depth fighting is that the camera's near clipping distance "
23 "is almost zero and the far clipping distance is too large. The depth buffer only "
24 "has 32-bit precision, which leads to this fighting effect when the distance "
25 "between the near and far clipping planes is too large. You can adjust these "
26 "values over the menu Camera > Projection");
59 light1->
name(
"light node");
70 SLNode* rectNodeR =
new SLNode(rectMeshR,
"Rect Node Red");
80 SLNode* rectNodeG =
new SLNode(rectMeshG,
"Rect Node Green");
81 rectNodeG->
rotate(2.0f, 1, 1, 0);
The AppCommon class holds the top-level instances of the app-demo.
Class declaration for an SLScene inherited class.
SLVec2< SLfloat > SLVec2f
SLVec4< SLfloat > SLCol4f
void registerAssetsToLoad(SLAssetLoader &al) override
All scene specific assets have to be registered for async loading in here.
void assemble(SLAssetManager *am, SLSceneView *sv) override
After parallel loading of the assets the scene gets assembled in here.
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 clipFar(const SLfloat cFar)
void clipNear(const SLfloat cNear)
void focalDist(const SLfloat f)
SLBackground & background()
SLLightSpot class for a spot light source.
Defines a standard CG material with textures and a shader program.
An SLMesh object is a triangulated mesh, drawn with one draw call.
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)
void lookAt(SLfloat targetX, SLfloat targetY, SLfloat targetZ, SLfloat upX=0, SLfloat upY=1, SLfloat upZ=0, SLTransformSpace relativeTo=TS_world)
void name(const SLstring &Name)
SLRectangle creates a rectangular mesh with a certain resolution.
The SLScene class represents the top level instance holding the scene structure.
SceneView class represents a dynamic real time 3D view onto the scene.
void camera(SLCamera *camera)
void doWaitOnIdle(SLbool doWI)