Jump to content
  • Advertisement
Sign in to follow this  
Thaumaturge

OpenGL A lack of GL_TEXTURE_3D?

This topic is 4164 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

In my current project I have a (pretty simple) 3D terrain, and want to texture it using a fairly simple 3D Perlin Noise function to provide a texture that varies by height. My OpenGL book (which is, admittedly, a couple of years old now) mentions the availablity of 3D textures via the glTexImage3D method and the GL_TEXTURE_3D identifier. However, when I came to enable GL_TEXTURE_3D, my compiler produced the error "'GL_TEXTURE_3D' : undeclared identifier" - and indeed, when I attempted to search for it in my OpenGL header files, I found GL_TEXTURE_2D (and, I think, GL_TEXTURE_1D) defined, but not GL_TEXTURE_3D. I'm guessing that either I simply don't have it for some reason (which seems odd to me...) or that GL_TEXTURE_3D has been superceded since my book was written... A search on this site did not turn anything useful up (although, being a little tired as I type this, I may have missed something). Does anyone have any advice or suggestions? My thanks for any help offered.

Share this post


Link to post
Share on other sites
Advertisement
GL_TEXTURE_3D is not available in opengl 1.1. I think it was added in 1.2 or something. You'll need to import it as an extension with GLEW or do it manually.

Share this post


Link to post
Share on other sites
If you have the glext.h header, you can use GL_TEXTURE_3D_EXT
It is the same constant define as GL_TEXTURE_3D (which only exists in the revised opengl headers which don't come with visual studio)

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!