Sunday, 2 June 2013

LWJGL Spritesheettexture with VertexBufferObjects

LWJGL Spritesheettexture with VertexBufferObjects

i've started to make a game with Java and LWJGL.. I used Imediatemode for testing and learing LWJGL. Im working on an Engine for my Game and it should be a Voxel-Engine and "MineCraft Styled". Today ive added a few Chunk and got a huge lag. So i said myself today is the day you must change your rendering mode.
I'm done drawing my Qubes and its working fine. But i have a Spritesheet that was loaded into my Game. It cotains multiple rows, each row represents one Block. So each row contains 6 column for each side of the Block.
How can i put these Textures on my Blocks? Every VBO contains 1 Chunk whitch are 16 * 32 * 16 Blocks and the Block have differnt Textures.
Also for increesing my performance i've added a mechanism whitch checks if a Block in a Chunk is visible, do i need this in VBO's?

No comments:

Post a Comment