Tag Info

Hot answers tagged

6

No, you don't. All current-generation commodity GPUs use (and have used for some time) triangle-based rasterization methods exclusively. Even though older version of OpenGL support the GL_QUADS rendering mode, these were converted to triangles by commodity GPUs. It's likely that GL_QUADS only resulted in actual quadrilaterial-based rasterization on esoteric ...


5

If you're using a rendering API, then you only need to worry about what that API tells you to worry about. OpenGL doesn't say anything about quad-based or triangle-based rendering systems. So you don't need to concern yourself with it. In any case, all consumer-grade GPUs use triangles, not quads.


4

Yes, it's typical to convert into triangles. When reading the mesh in, it's simple to convert a quad into a triangle. It will depend on the format you're exporting to. For example, the format I use, Blender will export all the vertices, then it will export index information for triangles and quads. So it's a simple matter of arranging the indices to take a ...


3

Keep in mind that the order you insert your vertices into your array matters too. Additionally, it looks like you're drawing a PrimitiveType.TriangleStrip, not quads. It looks like XNA doesn't have a primitive type for quads. You can index them yourself though, as seen in this tutorial.. If you're using triangles (or quads) to draw lines like your image ...


1

Take a look at this tutorial: http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series1/Terrain_basics.php . It is about terrains but you should be able to figure out how to combine "quads" (xna doesn't have quads, it is just 2 triangles) in one draw call.


1

In your export script, you can ask for tessellated data so that you only have to deal with triangles and quads. Turning a quad into two triangles is trivial (as Byte56 has already answered). ob = bpy.context.active_object me = ob.data me.calc_tessface() for v in me.vertices: print("v", v.co.x, v.co.y, v.co.z) for f in me.tessfaces: if ...


1

The quad's center is the position (0, 0, 0) in local space. Local space is the space in which you define your vertex positions. For instance, if you draw your quad using the opengl glvertex* commands, you should specify each vertex relative to (0, 0, 0): glBegin(GL_QUADS); // Draw A Quad glVertex3f(-1.0f, 1.0f, 0.0f); // Top Left ...



Only top voted, non community-wiki answers of a minimum length are eligible