PDA

View Full Version : Rendering problems with release configuration [C++] [VS2010] [GLFW]



Silverlan
12-04-2012, 04:06 AM
I'm using GLFW and everything has been working fine, as long as I'm using the debug configuration in VS2010.
When switching to release, everything's still fine in the debugger. However, when I try to run the program directly using the executable I'm suddenly getting some weird rendering issues.

This is what it's supposed to look like:
http://puu.sh/1x0tM

This is what it looks like running the .exe from the release configuration (Debug is fine):
http://puu.sh/1x0u0

The rendering issues are the same every time I run the program.
It's not an issue with the textures, as it's doing the same if I use the same texture for everything.

Does anyone have an idea what could be causing this? It only happens with the release configuration and even then only when running the .exe directly.
I'd post some code, but I really don't know what could be relevant here. It's an awfully specific problem.
I've never encountered a problem like this before.

Dark Photon
12-04-2012, 06:07 AM
Looks like shadow acne. Doing shadow mapping? Add some bias.

Silverlan
12-04-2012, 01:26 PM
Well, that's embarrassing...
I found the source, it was due to a uninitialized variable.
Thread can be closed.

noizex
12-04-2012, 02:13 PM
Well, that's embarrassing...
I found the source, it was due to a uninitialized variable.
Thread can be closed.

Yeah, I found the hard way that when results of GL app differ when you launch app in Release/Debug under MSVC and then standalone executable, its often some garbage in memory that causes it, uninitialized value being the most common reason ;)