PDA

View Full Version : filling polygons or simple shapes with bitmap pattern



09-20-2002, 02:35 AM
I am quite the newbie, in the beginning of a computer graphics course that teaches mostly srgp and builds the course around that standard. However, my group is doing OpenGL and are not really able to find out how to do some basic stuff.

How would I go about drawing polygons in the window that had a predetermined fill style such as a bitmap, as opposed to a stipple or solid fill? I thought I ran across a command that may allow me to do it, but I don't even know how exactly to define a bitmap pattern in C either. Can anyone help me with these two small issues?

Robbo
09-20-2002, 02:51 AM
Erm, Texture Mapping?

09-20-2002, 02:54 AM
I was a little afraid of that... texture mapping is well towards the end of my book, and I had readily assumed it to be defined only for 3d images. I will try to get that working

Robbo
09-20-2002, 09:25 AM
Nope - will work for 2d polygons as well (in OpenGL, there is no difference really, 2d is an orthographic project, 3d is a perspective projection - all the same under the hood).