Hello Guest

problems with mapping an image to a quad

  • 1 Replies
  • 5881 Views
problems with mapping an image to a quad
« 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.

*

Offline Matzon

  • *****
  • 2242
problems with mapping an image to a quad
« Reply #1 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).