Alpha blending only works when debugging (Code Blocks)

Started by
4 comments, last by iMalc 14 years, 8 months ago
I cannot understand this... I have an SDL application, setup for OpenGL. Alpha blending is enabled and I can render a quad in 2D mode with alpha blending as long as I run the debugger through the code. However, If I use "build and run", the image will not display unless alpha blending is off. Totally confused.
Advertisement
The problem is almost certainly down to uninitialized heap data. When run with the debugger Windows will initialize it for you.

Look for variables that are set to values like 0xCDCDCDCD or 0xDDDDDDDD in heap allocated objects.
How can I resolve this?

There are some classes in my code, but they are all initialised to 'new' objects.

Do the constructors for those classes always initialize all of their member variables?
Yep! First thing I checked.
Without more information, all I can say is:

Create a minimal test application that demonstrates the problem.
"In order to understand recursion, you must first understand recursion."
My website dedicated to sorting algorithms

This topic is closed to new replies.

Advertisement