Jump to content
  • Advertisement
Sign in to follow this  
svnstrk

error assigning alpha texture to GPU

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

hi,

im trying to assign my alpha value as a separate texture. but got an error that i dont know what it is. here is the code


glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_REPEAT);
glTexImage3D(GL_TEXTURE_3D, 0, GL_ALPHA8, textureWidth, textureHeight,
textureDepth, 0, GL_ALPHA, GL_UNSIGNED_BYTE, index3D);



im pretty sure that the width height and depth already match the data size, and sizeof(one index3D element) is 1 which is i suppose 1 byte, hence its GL_ALPHA8. Did i miss anything from the size?

the error is a runtime error and it pops somewhere in a source named iosfwd. im not sure whats wrong but i dont think its the size.

Share this post


Link to post
Share on other sites
Advertisement
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!