textureCube

… can’t find how to use textureCube … do i have to create an specific texture in my opengl application … or just using texture2d ??

thx

OpenGL Specification V1.051, page 54:

vec4 textureCube (samplerCube sampler, vec3 coord [, float bias] )
vec4 textureCubeLod (samplerCube sampler, vec3 coord, float lod)

… this is what i found … and i’m trying it this way … but … surprisingly it don’t work :slight_smile: … so i’m interested in how it works in detail … normally the access to a cube map is by using a 3d vector … depending on the main axis it’s possible to look up in a normal 2d texture … this is how i understood all the stuff … so what i’m doing in my implementation is loading a normal 2d image of an sliced cube … create a texture object … unit … all the normal gl stuff and set the uniform samplerCube … the question in detail is … to the texCube() gllang funktion really take the 3d vector calculate the coresponding 2d coordinates in an normal texture … or have i to use an cube texture in my opengl code … catchword: EXT_texture_cube_map …

Yes, you need to use a cubemap texture.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.