Binding a 2d Texture to a polygon

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
punt
Posts: 13
Joined: Fri Jul 09, 2004 7:57 pm

Binding a 2d Texture to a polygon

Post by punt »

I have a texture, I want to bind to a polygon. The game is totally 2d, isometric, but with an "altitude adjustment" (like the Ultima Online 2d client).

In native opengl, I would just Bind the texture to my polygon, specifiing the vertexs for the four sides in 2d coordinates. I don't think this is equivilant to the clipping rectangle on the draw2dImage method of the video driver.

UPDATE
Ok, I see I have to use a setMaterial, and then the drawIndexedTriangle

However, I don't see how to get the OpenGL , GL_TRIANGLE_STRIP. I see Fan, and then TriagnleList (which I assume is not a strip, but a list of trigangles, given the triangle count is normally the vertec/3)
Post Reply