glteximage2d

How can I use a dynamically sized texture array with glTexImage2D?

Currently, I'm able to load in a static sized texture which I have created. In this case it's 512 x 512. This code is from the header: #define TEXTURE_WIDTH 512 #define TEXTURE_HEIGHT 512 GLubyte textureArray[TEXTURE_HEIGHT][TEXTURE_WIDTH][4]; Here's the usage of glTexImage2D: glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, TEXTURE_WIDT...

What happens to pixels after passing them into glTexImage2D()?

If for example I create an array of pixels, like so: int *getPixels() { int *pixels = new int[10]; pixels[0] = 1; pixels[1] = 0; pixels[1] = 1; // etc... } glTexImage2D(..., getPixels()); Does glTexImage2D use that reference or copy the pixels into it's own memory? If the answer is the former, then should I do th...

glTexImage2D

What is the border value of glTexImage2D? It's either 0 or 1. It referencies that if this texture will just have border or not? Where is the borders values set? ...

OpenGL glGetTexImage2d type parameter?

Hi, reading the docs i see that the glGetTexImage2d() function has a 'type' parameter. The docs say that the type parameter "specifies the data type of the pixel data" and gives some examples of types such as GL_INT, GL_BYTE, etc. but what does it mean precisely when the image format is GL_RGBA and GL_INT ? is it an int for each channe...

Difference between glTexSubImage and glTexImage function in OpenGL

What is the difference between the two functions? Any performance difference? Thanks.. ...

Fastest 2D frame rate possible with android NDK, my try included, better options available?

Fastest 2D frame rate possible with android NDK, my try included, better options available? I used the NDK and OpenGL ES 2.0 to display a frame as a texture on a GL_TRIANGLE_STRIP. This was done on a HTC Desire, same hardware as Nexus One. I tried to load multiple GL_RGBA textures and switch between the textures, because the normal fill...