Jump to content
  • Advertisement
Sign in to follow this  
pilgrim9684

glTexImage2d parameter #3 significance

This topic is 3645 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can anyone explain the significance of the third parameter for glTexImage2D. When I use a value of GL_RGBA32F_ARB for a render buffer texture I get a memory exception later on that suggests I am hosing the memory of the system and overwriting memory I don't own; I think that is the case. If I use GL_LUMINANCE or GL_RGBA8 for this third parameter, my program executes and I render to a texture of a framebuffer with no memory exception. What is so different about the value GL_RGBA32F_ARB and how it affects glTexImage2D? How about GL_RGBA_FLOAT32_ATI, GL_LUMINANCE_FLOAT32_ATI and GL_RGBA16F_ARB? They too cause a later memory exception. What impact on memory storage and usage would each of these parameters have and in what way?

Share this post


Link to post
Share on other sites
Advertisement
It is the internal format of the texture. It specifies what format it should be in on the graphics card.

Share this post


Link to post
Share on other sites
What's probably happening is that the call to glTexImage2D is failing to create the texture because your video card does not support those texture formats. Since the texture isn't created, you don't own the memory.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!