#### Archived

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

# 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 on other sites
TipplerP    122
ya can use LoadBMP() and so!
but i would suppose you to use Glut32

See ya later
alligator

##### Share on other sites
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 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 on other sites
Anthracks    122
This is just a guess, but try putting
  #include

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

Anthracks

##### Share on other sites
SonicWave    122
Good day !

I include windows.h but the same problem exists.

I wonder why ?

Sonic Wave

##### Share on other sites
Protricity    122
OMG!
:p

##### 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 on other sites
ncsu121978    1344
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 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