• Create Account

Need scary sound effects or creepy audio loops for your next horror-themed game? Check out Highscore Vol.3 - The Horror Edition in our marketplace. 50 sounds and 10 loops for only \$9.99!

### #Actualgnomgrol

Posted 11 July 2012 - 06:38 AM

Hy,

Im loading a bitmap from a file as unsigned char array. Then I convert it to floats, do some math with it, and then put it back into another bitmap.
Im using Visual C++ 2010 express, and when Im running the programm in Debugmode it works fine. But as soon as I put it into Releasemode, the output is only a completly black bitmap.
Does anyone have a clue what could cause this? I dont get any warnings at all (with high warninglevel).

That should be everything that is important:
struct f3{
float r,g,b;
};

k=0;
for(int z = 0; z<mapWidth; z++){
for(int x = 0; x<mapWidth; x++){
k+=3;
}
}

SomeMathFunctionThatNeedsFloats();

k=0;
for(int z = 0; z<mapWidth; z++){
for(int x = 0; x<mapWidth; x++){
k+=3;
}
}

SaveToFile();


Thanks

### #3gnomgrol

Posted 11 July 2012 - 06:37 AM

Hy,

Im loading a bitmap from a file as unsigned char array. Then I convert it to floats, do some math with it, and then put it back into another bitmap.
Im using Visual C++ 2010 express, and when Im running the programm in Debugmode it works fine. But as soon as I put it into Releasemode, the output is only a completly black bitmap.
Does anyone have a clue what could cause this? I dont get any warnings at all (with high warninglevel).

That should be everything that is important:
struct f3{
float r,g,b;
};

k=0;
for(int z = 0; z<mapWidth; z++){
for(int x = 0; x<mapWidth; x++){
k+=3;
}
}

SomeMathFunction();

k=0;
for(int z = 0; z<mapWidth; z++){
for(int x = 0; x<mapWidth; x++){
k+=3;
}
}

SaveToFile();


Thanks

### #2gnomgrol

Posted 11 July 2012 - 05:28 AM

Hy,

Im loading a bitmap from a file as unsigned char array. Then I convert it to floats, do some math with it, and then put it back into another bitmap.
Im using Visual C++ 2010 express, and when Im running the programm in Debugmode it works fine. But as soon as I put it into Releasemode, the output is only a completly black bitmap.
Does anyone have a clue what could cause this? I dont get any warnings at all (with high warninglevel).

Thanks

### #1gnomgrol

Posted 11 July 2012 - 05:28 AM

Hy,

Im loading a bitmap from a file as unsigned char array. Then I convert it to floats, do some math with it, and then put ir back into another bitmap.
Im using Visual C++ 2010 express, and when Im running the programm in Debugmode it works fine. But as soon as I put it into Releasemode, the output is only a completly black bitmap.
Does anyone have a clue what could cause this? I dont get any warnings at all (with high warninglevel).

Thanks

PARTNERS