Sign in to follow this  
Followers 0
gd_sequoia

Setting GL_UNPACK_ALIGNMENT to 1

1 post in this topic

I've been uploading a texture (glTexSubImage2D) and getting skewed results for upload-buffer sizes that are not a multiple of 4 (I think). Setting GL_UNPACK_ALIGNMENT to 1 fixes that, but is it a good idea? Likely to get me bad performance on certain hw?
0

Share this post


Link to post
Share on other sites
Using a buffer size that isn't a multiple of 4 is liable to get you bad performance on quite a lot of hardware. I have one OpenGL application where the performance *doubles* when I add a dummy alpha-channel to pad my textures to 4 bytes/component...
0

Share this post


Link to post
Share on other sites

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  
Followers 0