OpenGL Oddities (1.34)

BlitzMax Forums/BlitzMax Programming/OpenGL Oddities (1.34)

Tachyon(Posted 2009) [#1]
I hate to throw these complaints out here without sample code, but I can't reproduce it and I am hoping others may have seen what I am seeing:

After the 1.34 update, I've noticed that OpenGL (on Windows) occasionally causes some images to be drawn pure white. A common occurrence I've been seeing is that my main menu, which is has a couple levels of parallax images, will occasionally display the back-most image pure white. This happens only under OpenGL. This started after the 1.34 update. This has been seen on Vista and XP, under two different kinds of video cards.

I have been unable to reproduce this in sample code. Anyone else seen anything like this? Does anyone know of changes to OpenGL under 1.34 that might be causing this?


plash(Posted 2009) [#2]
Does anyone know of changes to OpenGL under 1.34 that might be causing this?
Is it possible that you're running out of video memory?

Have you tried the same code under 1.33 and under 1.34?


Tachyon(Posted 2009) [#3]
Is it possible that you're running out of video memory?

I've thought about that, but I doubt it. I am very conscientious about video RAM usage, and this oddity never shows up under DirectX.

I have never seen it using 1.33. I've only noticed it in the last few weeks after updated to 1.34.

And, I just verified that the exact same problem shows up on my MacBook Pro! It must be related to OpenGL.


Tachyon(Posted 2009) [#4]
One more thing- since I have been heavily testing it this morning, I've noticed the problem seems to be more common (perhaps even exclusive) to running the game in debug mode. If this is the case, then I am not worried about it. I'll will certainly report back if I can confirm this shows up in release mode.


TaskMaster(Posted 2009) [#5]
That will also happen sometimes if you attempt to draw an image that didn't actually load for some reason.

Are you making sure your images actually loaded?

Or, I guess there is the possibility that you have a SetColor() command somewhere that is being called and leaving the color set so it makes the image appear all white...


plash(Posted 2009) [#6]
That will also happen sometimes if you attempt to draw an image that didn't actually load for some reason.
Indeed. You could check each frame of each image after loading to see if the name field is non-zero.
But since you get this seemingly randomly, I'm going to assume that this is not the case.


Tachyon(Posted 2009) [#7]
I've just seen this happen on a MacBook Pro (OSX 10.6) in Release Mode.

This is officially a problem. :(


Tachyon(Posted 2009) [#8]
It's always the *first* thing to be drawn that shows up white.

The main menu of my game is normally drawn with the background sky first, then a ground layer. The sky is being drawn white ~70% of the time and the ground is always perfect. If I switch the draw order, then the ground is being drawn white ~70% of the time and the sky is always perfect.


Brucey(Posted 2009) [#9]
It's always the *first* thing to be drawn that shows up white.

I'd say that was a VRAM problem - in that you've run out for some reason.


JoshK(Posted 2009) [#10]
Add this in your rendering routine:
?
local error:Int = glGetError()
if error RunTimeError(error,1)
?


Tachyon(Posted 2009) [#11]
@Leadwerks: that didn't do anything. Apparently no error is being generated?

Well, I am going to assume Brucey and others are right and that I must simply be overloading VRAM or something. I'll dismantle the code little by little until I can find why it is doing this.