Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

NaliXL

Texture not showing up...

This topic is 6202 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

Hi there! I''m trying to re-write the Delphi-conversion by Marc Aarts of some of the tutors. He uses MFC code quite a lot, and I like to work with standard borland code a lot, plus that this way I''ll get a good understanding of the basics of OpenGL. Anyway, I''ve come to the part of texture-mapping. For afaik I''ve copied all code concerning texure-mapping. I''ve looked it over and over and over again, but I can''t find my problem. The cube is and stays white, no errors reported from within the program. Can anyone help me with this one by downloading it and checking out what''s wrong? Thanks a lot. Here''s some info that might be handy... 1. There are 2 units, the one that loads at program-startup is only a menu to select resolution, quality etc. The other one contains the OpenGL code. 2. The comments are still very poor and will most times not be correct (anymore). 3. The InitializeOpenGl procedure inits all options, the Drawingcode procedure contains the code that defines the cube that should be textured, FPStimerTimer contains the main loop that updates the viewport. The LoadGLTextures procedure is the last procedure in the code. The glBindTexture and glGenTextures procedures are almost on top of the program. 4. Please remind that this is work-in-progress by a OpenGL newbie and an Delphi-intermediate.... 5. It all can be downloaded at http://home.hetnet.nl/~babipanghang/glframe.zip Thanks a big lot! JP

Share this post


Link to post
Share on other sites
Advertisement
I dont have delphi so I cant compile your code but I believe it has something to do with the way you load the texture try:

1) use a boolean to check auxDIBImageLoad is returing something and build in some error checking to see if its generating any internal errors (these will not be easy to pick up on if your not looking for them, compiler wont do it)
2) enable gl_texture_2d inside your drawing code (possible this might work)

of far as I can I see your code should be working however I am not familar with some of semantics delphi uses for opengl, try using C semantics for loading textures (see lesson 5)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Thanks for your reply. I haven''t got time to try it right away, but as soon as I''ve tried, I''ll tell ya what it does.

You said you don''t have delphi. If you''re interrested : the Personal Edition, which is fairly complete, is available for free download at borland.com. The only thing they ask in return is that you register it. If you''re using Linux, you can try Kylix Personal Edition, also free.

Thanks again for your reply,

NaliXL.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!