Sign in to follow this  

black and white texture

This topic is 2662 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,

if i want to save a black and white texture only that require only one byte value (256), instead of RGB(3 byte) or RGBA(4 byte), what should i put instead of RGB in this line?

glTexImage3D(GL_TEXTURE_3D, 0, GL_RGB, textureWidth, textureHeight, textureDepth, 0, GL_RGB, GL_UNSIGNED_BYTE, texture3D);

thanks in advance

Share this post


Link to post
Share on other sites
//GL_DEPTH_COMPONENT should work fine

When I read your post again I discovered that you are using glTexImage3D so it depends on what exactly you want to achieve

First thing check GL_EXT_shadow. If you success you can just use GL_DEPTH_COMPONENT. Use this if you want to store depth.

Otherwise try one of these depending on how you want to process stored texture

use single component like GL_RED/GL_GREEN/GL_BLUE/GL_ALPHA and than recalculate into same values for RGB components or use GL_LUMINANCE or GL_INTENSITY

[Edited by - SaTANO on August 28, 2010 4:12:26 AM]

Share this post


Link to post
Share on other sites

This topic is 2662 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this