• Advertisement
Sign in to follow this  

Glaux replacement

This topic is 4464 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
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
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
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
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
I'm using Dev-C++ and I get an Initialization failed message too. What needs to be done to fix it?

Share this post


Link to post
Share on other sites
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
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
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
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
Sign in to follow this  

  • Advertisement