Advertisement

debug && realese mode

Started by February 01, 2003 06:22 PM
14 comments, last by venomelektro 22 years ago
Hi, I have a strange problem with some open GL/ visual 6 code I '' m just drawing a quad with a texture , I works fine in debug mode but when I switched to realese , the quad became invisible Is anybody have any idea about how to fix that ?
Of course, figure out what you did wrong.

Post your code.
______________________________________________________________________________________The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ"So. Any n00bs need some pointers? I have a std::vector<n00b*> right here..." - ZahlmanMySite | Forum FAQ | File Formats______________________________________________________________________________________
Advertisement
Ok


you can download it from

http://perso.wanadoo.fr/venomelektro/3mot_26.zip

No executable are included but If you try to compile it ,

you will see that in debug mode the exit quad if fine rendered in level 1 and 2

and in realese mode , when you jump from level 1 to 2 , there is a bug with the exit rendering

Thanx in advance .

it looked exactly the same for me in both release and debug.
Check that your linker options are the same for both debug and release projects in MSVC.
When I compile my program in release mode, I got the follow warning...

LINK : warning LNK4089: all references to "ADVAPI32.dll" discarded by /OPT:REF

How can I solve this problem? Thanks you.
Advertisement
LINK : warning LNK4089: all references to "ADVAPI32.dll" discarded by /OPT:REF

you don''t need to worry about that.


the simple answer to your question is that you have screwed up somewhere.


the more complex answer is that you most likly have a variable somewhere you are using that you havn''t defined before you use it. depending on the OS, in a release build, all new variable memory will either be zero''d, or simply random noise.. In a debug build, I''m not too sure, but I believe that all bits are set alternatly (or a strange pattern to this effect)
what this will mean is that, say, you have a bool called ''drawQuad''
if you don''t set it, in release it may be set to 0 (false) whereas in debug it could be set to something odd like 128.. this would have a different result when running your app.

This is also a common problem when using inheritance, and replacing an init function.. I do this a bit, eg, a while ago, in my d3d renderer, I forgot to set a boolean called ''multiTexturingSupported''... in debug everything was fine... in release, needless to say, it fell back to multi-pass (which is a disaster when you need specific texture unit blend modes like Dot3) and I couldn''t for the life of me work out why...

| - Project-X - my mega project.. big things comming soon - | - adDeath - an ad blocker I made - | - email me - |
Thanks RipTorn. Do u know any method that can find out which variable I haven''t define well before use?
yup. trial and error
either that or step through the code.
possibly turing up the compiler warning level, but thats unlikly.

| - Project-X - my mega project.. big things comming soon - | - adDeath - an ad blocker I made - | - email me - |
Ok,


I know now that something bad happen this the memmory in the realese mode but I didn''t succeed to fix that


All the variables I use in my Render_Exit function seems to be ok : good texture pointer , good sector3 coordianates


And I dont understand why It happens only from level 1 to level 2


This topic is closed to new replies.

Advertisement