Sign in to follow this  
Tanczos

Glaux replacement

Recommended Posts

Tanczos    122
I'm having trouble using the Glaux replacement code. Do I cut and paste it directly into my cpp? Where exactly does it go, and what do I have to take out? At the moment, I'm getting 13 to 16 compiler errors.

Share this post


Link to post
Share on other sites
relpats_eht    138
its glaux replacement code, which means you take out the code using glaux (the bitmpap loader) and replace it with the replacement code. You will likely have to change a few other things as well though.

Share this post


Link to post
Share on other sites
Tanczos    122
Quote:
Original post by lc_overlord
Check my sig.


Thanks, that's one nice thread! I'm still having problems compiling though. I'm using Dev C++, and I think the problems all stem from this line in bmp.h:

byte *data;

which gives this error:

13 texturescode.cpp
c:\dev-c++\lib\bmp.h:6: syntax error before `*'

Does Dev not use byte like VC++? I get 18 compile errors in all.

[Edited by - Tanczos on October 22, 2005 7:32:35 PM]

Share this post


Link to post
Share on other sites
Tanczos    122
I've tried replacing "byte" with "short" for all the errors. It compiles fine, but when it's run, after the 'fullscreen?' box, it says 'initialization failed'. Do I actually have to enter the texture filename into the code or something?

Share this post


Link to post
Share on other sites
CRACK123    235
Well firstly a byte a char. So you can do the following

1.

typedef unsigned char byte



2. replace byte by unsigned char

Regarding the initialization failed, it looks like the main part of initialing a window context failed.

Share this post


Link to post
Share on other sites
Tanczos    122
I've now changed byte to BYTE . . . My first C++ textbook emphasised cases, and I noticed this while googling. Is there a basic reason why the initialization failed? I am trying to track back through the code, but am finding it hard.

Share this post


Link to post
Share on other sites
jmics    128
I figured it out!! the Initialization error for me was in the LoadGLImage function the actual directory that NeHe.bmp was supposed to be in was "data\Nehe.bmp" when the bmp was really just in the main directory. So I just changed it to "Nehe.bmp" and it compiled and ran fine!! Tell me if this helps

Share this post


Link to post
Share on other sites
Tanczos    122
Quote:
Original post by jmics
I figured it out!! the Initialization error for me was in the LoadGLImage function the actual directory that NeHe.bmp was supposed to be in was "data\Nehe.bmp" when the bmp was really just in the main directory. So I just changed it to "Nehe.bmp" and it compiled and ran fine!! Tell me if this helps


No such luck! I tried variations on that idea, but am still comes up with the initialization failed box

Share this post


Link to post
Share on other sites
CRACK123    235
Run it through a debugger and see where it failed. Also you could modify the initialization failed messages to give much more information.

Share this post


Link to post
Share on other sites
Tanczos    122
Quote:
Original post by CRACK123
Run it through a debugger and see where it failed. Also you could modify the initialization failed messages to give much more information.


The debugger idea is interesting. Does Dev have a debugging tool?

I think modifying would be a bit beyond me. Do you have specific code in mind?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this