Archived

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

SonicWave

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

Recommended Posts

SonicWave    122
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
Guest Anonymous Poster   
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
SonicWave    122
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
Guest Anonymous Poster   
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
SonicWave    122
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