• Advertisement

Archived

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

Urgent ! How To Load A JPEG/ Bitmap Images For Texture Mapping ?

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

Good day ! How can I load a image as textures so that I can mapped it on my polygon ? Let say I have drawn a quad and I wish to have a bitmap attached to it. What should I do? I have read through the Tutorial 6 but it is just for programming in Win32 environment (which we can use LoadBMP straight away). If I am developing a Win32 Console application (as stated in Microsoft Visual studio), what code should I use ? LoadBMP isn''t a valid command, isn''t it ? Thanks a lot ! Sonic Wave

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
quote:
Original post by SonicWave
I have read through the Tutorial 6 but it is just for programming in Win32 environment (which we can use LoadBMP straight away).

If I am developing a Win32 Console application (as stated in Microsoft Visual studio), what code should I use ?

LoadBMP isn''t a valid command, isn''t it ?


Notice the "Win32" in "Win32 Console Application"
A win32 console application is run in the exact same environment as any other win32 application. The only difference is that a console application has an automatically allocated console (meaning you don''t have to open one yourself).

Share this post


Link to post
Share on other sites
Gooo day again !

I tried to use LoadBMP but the compiler return an error message (cannot resolve symbol). Do I need to define the function myself ? I thought the LoadBMP () is built-in inside a library.

Is there any similiar functions in GLUT ? I read through the spec in GLUT but I can''t find any.

Thanks a lot !

Sonic Wave

Share this post


Link to post
Share on other sites
This is just a guess, but try putting
  
#include <windows.h>

at the top of your program, and see if that helps.

Anthracks

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
LoadBMP function is defined in the same CPP file as the rest of the prog - it is not part of the Win32 API.

If ye look inside the definition, ye''ll see that actual loading is performed through a GLAux function.

Therefore, make sure you include - or whatever the filename is for ya.

Share this post


Link to post
Share on other sites
so what makes this so urget ?

"I pity the fool, thug, or soul who tries to take over the world, then goes home crying to his momma."
- Mr. T

Share this post


Link to post
Share on other sites
Good day !

I will tried to re-read the whole tutorial again and see. May be I am in a rush and that''s why I face so many problems now.

Actually, I have an OpenGL assignment to pass up and basically I have finished mine but I am looking forward to add some texture on the model.

Thanks a lot

Sonic Wave

Share this post


Link to post
Share on other sites

  • Advertisement