22 info(
"Texture Compression Test Scene");
28 SLint min = GL_LINEAR_MIPMAP_LINEAR;
29 SLint mag = GL_LINEAR;
38 "earth2048_C_Q90.jpg",
43 "earth2048_C_Q40.jpg",
58 "earth2048_C_bcmp_Q255.ktx2",
63 "earth2048_C_bcmp_Q128.ktx2",
68 "earth2048_C_bcmp_Q001.ktx2",
73 "earth2048_C_uastc4.ktx2",
78 "earth2048_C_uastc2.ktx2",
83 "earth2048_C_uastc0.ktx2",
98 light1->
name(
"light node");
113 SLVec2f pMin(-.5f, -.5f), pMax(.5f, .5f);
114 SLVec2f tMin(.47f, .69f), tMax(.56f, .81f);
131 rectNodePng->
translate(-1.05f, 1.05f, 0);
165 rectNodeJpgQ40->
translate(1.05f, 1.05f, 0);
178 "rectMeshKtxBcmp255",
180 SLNode* rectNodeKtxBcmp255 =
new SLNode(rectMeshKtxBcmp255,
181 "rectNodeKtxBcmp255");
182 rectNodeKtxBcmp255->
translate(-1.05f, 0, 0);
183 scene->
addChild(rectNodeKtxBcmp255);
195 "rectMeshKtxBcmp128",
197 SLNode* rectNodeKtxBcmp128 =
new SLNode(rectMeshKtxBcmp128,
198 "rectNodeKtxBcmp128");
200 scene->
addChild(rectNodeKtxBcmp128);
212 "rectMeshKtxBcmp001",
214 SLNode* rectNodeKtxBcmp001 =
new SLNode(rectMeshKtxBcmp001,
215 "rectNodeKtxBcmp001");
216 rectNodeKtxBcmp001->
translate(1.05f, 0, 0);
217 scene->
addChild(rectNodeKtxBcmp001);
231 SLNode* rectNodeKtxUastc4 =
new SLNode(rectMeshKtxUastc4,
232 "rectNodeKtxUastc4");
233 rectNodeKtxUastc4->
translate(1.05f, -1.05f, 0);
248 SLNode* rectNodeKtxUastc2 =
new SLNode(rectMeshKtxUastc2,
249 "rectNodeKtxUastc2");
250 rectNodeKtxUastc2->
translate(0, -1.05f, 0);
265 SLNode* rectNodeKtxUastc0 =
new SLNode(rectMeshKtxUastc0,
266 "rectNodeKtxUastc0");
267 rectNodeKtxUastc0->
translate(-1.05f, -1.05f, 0);
The AppCommon class holds the top-level instances of the app-demo.
Class declaration for an SLScene inherited class.
SLVec4< SLfloat > SLCol4f
static SLstring texturePath
Path to texture images.
void registerAssetsToLoad(SLAssetLoader &al) override
All scene specific assets have to be registered for async loading in here.
SLGLTexture * _texKtxUastc0
SLGLTexture * _texKtxBcmp001
SLGLTexture * _texKtxBcmp255
SLGLTexture * _texKtxUastc4
AppDemoSceneTextureCompression()
SLGLTexture * _texKtxBcmp128
SLGLTexture * _texKtxUastc2
void assemble(SLAssetManager *am, SLSceneView *sv) override
After parallel loading of the assets the scene gets assembled in here.
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 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 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)
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)