Sign in to follow this  
LeadBreakfast

OpenGL 2 Open GL questions

Recommended Posts

Hi, I have two totally unrelated questions. Hopefully the people around here can shed some light on one or both. 1) We are using Rectangle and Non-Power-of-2 extensions, and using PBOs as well. When using this particular combination, it seems that some cards (ATI X1300 is what I am using, I've seen it on some nvidia 9000 series as well) will only handle certain memory alignments. i.e. nvidia cards seem to be OK with 16-bit alignment, but ATI seems to want 32-bit alignment. The end result is that right now I must assume 32-bit alignment always or the texture will be distorted with what looks like stride issues. I have tried to set GL_UNPACK_ALIGNMENT, but it simply seems to be ignored. I have also tried to find a way to determine if the memory buffer size has been adjusted from what I requested, but that too is no help, it always reports the size I asked for. Is there some way to set alignment, or at least reliably determine if the buffer has been adjusted for alignment after creating the texture. Right now my only alternative is to assume that everything is always aligned to 32-bit. As a last resort, is 32-bit alignment always a safe assumption or are there cases where it may not work? 2) Vsync. I can't seem to get any. I call glSwapBuffers() and it tears, badly. On high motion it appears like there is no effort made to sync at all. I checked the driver settings to make sure Vsync was not disabled or anything, and I do not think I am making any calls which should be disabling Vsync. isn't Vsync in OpenGL the default? I was always under the impression that unless it was overriden, SwapBuffers would always wait on Vysnc before ever doing an actual on-screen swap.

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