LWJGL Forum

Programming => OpenGL => Topic started by: silent8ch on September 27, 2005, 01:55:41

Title: problems with mapping an image to a quad
Post by: silent8ch on September 27, 2005, 01:55:41
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.
Title: problems with mapping an image to a quad
Post by: Matzon on September 27, 2005, 05:35:08
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).