problems with mapping an image to a quad

Started by silent8ch, September 27, 2005, 01:55:41

Previous topic - Next topic

silent8ch

ive tried to do as much as possible on my own, but it seems i have come to a point where i need help (not that its a bad thing).

the turorials ive seen call a function glGenTextures() where it takes two parameters an interger amount of textures to be loaded and an integer array that stores the pointers to the image buffers like (1, textures). this is all fine and dandy, except for the fact that all i see in my lwjgl library is a function that takes only an intBuffer as its parameter
(ex: GL11.glGenTextures(java.nio.IntBuffer textures ) )

there has to be something im missing.

Matzon

the reason is that lwjgl uses the sizes and positions of the buffer.
if you create a fresh intbuffer with 5 elements, that would be like doing: glGenTextures(5, buffer).