23 info(
"Texture minification filters: "
24 "Bottom: nearest, left: linear, top: linear mipmap, right: anisotropic. "
25 "The center sphere uses a 3D texture with linear filtering.");
44 GL_LINEAR_MIPMAP_LINEAR,
54 "Wave_radial10_256C.jpg");
95 VB.push_back(
SLVec3f(-0.5f, -0.5f, 1.0f));
96 VB.push_back(
SLVec3f(0.5f, -0.5f, 1.0f));
97 VB.push_back(
SLVec3f(0.5f, -0.5f, -2.0f));
98 VB.push_back(
SLVec3f(-0.5f, -0.5f, -2.0f));
100 T.push_back(
SLVec2f(0.0f, 2.0f));
101 T.push_back(
SLVec2f(0.0f, 0.0f));
102 T.push_back(
SLVec2f(6.0f, 0.0f));
103 T.push_back(
SLVec2f(6.0f, 2.0f));
107 VL.push_back(
SLVec3f(-0.5f, 0.5f, 1.0f));
108 VL.push_back(
SLVec3f(-0.5f, -0.5f, 1.0f));
109 VL.push_back(
SLVec3f(-0.5f, -0.5f, -2.0f));
110 VL.push_back(
SLVec3f(-0.5f, 0.5f, -2.0f));
114 VT.push_back(
SLVec3f(0.5f, 0.5f, 1.0f));
115 VT.push_back(
SLVec3f(-0.5f, 0.5f, 1.0f));
116 VT.push_back(
SLVec3f(-0.5f, 0.5f, -2.0f));
117 VT.push_back(
SLVec3f(0.5f, 0.5f, -2.0f));
121 VR.push_back(
SLVec3f(0.5f, -0.5f, 1.0f));
122 VR.push_back(
SLVec3f(0.5f, 0.5f, 1.0f));
123 VR.push_back(
SLVec3f(0.5f, 0.5f, -2.0f));
124 VR.push_back(
SLVec3f(0.5f, -0.5f, -2.0f));
139 pyramid->
P = {{-1, -1, 1},
144 pyramid->
I16 = {0, 3, 1, 1, 3, 2, 4, 0, 1, 4, 1, 2, 4, 2, 3, 4, 3, 0};
146 pyramidNode->
scale(0.2f);
The AppCommon class holds the top-level instances of the app-demo.
Class declaration for an SLScene inherited class.
#define SL_ANISOTROPY_MAX
vector< SLVec2f > SLVVec2f
SLVec2< SLfloat > SLVec2f
vector< SLVec3f > SLVVec3f
SLVec3< SLfloat > SLVec3f
SLVec4< SLfloat > SLCol4f
static SLDeviceRotation devRot
Mobile device rotation from IMU.
static SLDeviceLocation devLoc
Mobile device location from GPS.
static SLstring texturePath
Path to texture images.
static SLstring shaderPath
Path to GLSL shader programs.
AppDemoSceneTextureFilter()
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.
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 devRotLoc(SLDeviceRotation *devRot, SLDeviceLocation *devLoc)
void focalDist(const SLfloat f)
SLBackground & background()
static SLGLProgramGeneric * get(SLStdShaderProg id)
Get program reference for given id.
Defines a standard CG material with textures and a shader program.
An SLMesh object is a triangulated mesh, drawn with one draw call.
SLVushort I16
Vector of vertex indices 16 bit.
SLVVec3f P
Vector for vertex positions layout (location = 0)
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)
SLPolygon creates a convex polyon mesh.
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)
SLSphere creates a sphere mesh based on SLSpheric w. 180 deg polar angle.