creating lightsources

BlitzMax Forums/BlitzMax Programming/creating lightsources

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

You only affect the verts you want. Obviously the BG has it's own verts (however in that shot I think the BG is just a cls color)


...edit...

For those that don't know:

I should clarify: each 2D image in blitzmax is actually 2 triangles joined up. If you join up 2 triangles the right way, you form a square.

The square is texture mapped using 3D hardware to show the resulting image... However at each corner of the square is a vertex (or control point) which you can change.

The position, rotation and color of the control point (vertex) can be changed for a variety of effects. If you move them all apart, the image scales. If you rotate them around the middle, the image rotates... and so on.

So it stands to reason if you manually color verts, the object color will change from that point, gradually to the colors of the other points. So we need to do it all manually point by point...

Since we only affect the next 4 points using SetVertexColor vertnum,r,g,b then it only applies to the next image being drawn (like set rotation etc)...