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

Started by
8 comments, last by SonicWave 22 years, 5 months ago
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
Advertisement
ya can use LoadBMP() and so!
but i would suppose you to use Glut32

See ya later
alligator
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).
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
This is just a guess, but try putting
  #include <windows.h>  

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

Anthracks
Good day !

I include windows.h but the same problem exists.

I wonder why ?

Sonic Wave
OMG!
:p
try rereading the tuturals :p
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.
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
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

This topic is closed to new replies.

Advertisement