Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » binding or texture mapping

This thread is locked; no one can reply to it. rss feed Print
binding or texture mapping
William Labbett
Member #4,486
March 2004
avatar

Hi,
when you just want to draw a bitmap onto a rectangular polygon is this called texture mapping or is it something else (binding perhaps) ?
Can someone point me to a tutorial for this kind of thing ?

will

orz
Member #565
August 2000

For Allegro, see
allegro/examples/ex3d.c
For OpenGL, see
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=06
(and earlier lessons, to make sense out of that)

William Labbett
Member #4,486
March 2004
avatar

I have checked ex3D but it doesn't explain very much.

What if the bitmap to draw is a different size to the polygon.
What if the polygon's not a rectangle e.g a pentagon or a triangle ?

These are the things I'm wondering about.

orz
Member #565
August 2000

Perhaps you should try looking up the relevant functions in the Allegro manual under "Polygon rendering". The portion of the texture bitmap that appears on the polygon is probably controlled by a set of texture coordinates.

William Labbett
Member #4,486
March 2004
avatar

Okay, thanks for the help orz.

[edit]

I was reading ex3d.c and was confused as to why there's a typedef VTX. Couldn't the V3D type have been used ?

Go to: