On 25/04/20 4:05 am, Nicky Mac wrote:
I wondered if using GL_TEXTURE_CUBE_MAPĀ  would improve performance compared to rendering the 6 faces each time.

Having studied the lists of CubeMap issues, I could not find any example of such a cube actually being drawn.

I think you may be mistaken about what a cube map is. It's not
a way of drawing cubes; it's a way of mapping points on something
you're drawing to texture coordinates.

One of the things it's useful for is drawing a far-away background
such as a sky. You store an image of the sky as a cube map texture,
and then draw a big cube around your scene. The cube map texture mode
makes it render as though the faces of the cube were infinitely
far away.

The only relevance it has to rendering minecraft blocks is if you
wanted to render reflections of the surroundings in the faces of
the block, or something like that. Then you could use a cube map
texture of the environment as part of the rendering process.

But you still have to render the six faces of the cube as usual.
There's no shortcut for that.

Some more information about cube maps:
https://en.wikipedia.org/wiki/Cube_mapping
https://learnopengl.com/Advanced-OpenGL/Cubemaps

--
Greg

--
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyglet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyglet-users/ec0b9071-a825-e00d-b484-d59c4195f8f4%40canterbury.ac.nz.

Reply via email to