Re: Drawing a rectangle
Tech-Archive recommends: Fix windows errors by optimizing your registry
[Please do not mail me a copy of your followup]
=?Utf-8?B?VGFv?= <Tao@xxxxxxxxxxxxxxxxxxxxxxxxx> spake the secret code
<07DBB88A-5456-440B-B018-F0D4C0D8A0D5@xxxxxxxxxxxxx> thusly:
I am quite new in DirectX. After I know that rectangle can only be drawn with
triangles. I try to draw a a rectangle
(0, 0), (0, 100), (100, 100), and (100, 0)
with 2 triangle
triangle 1: (0, 0), (100, 100), (0, 100)
triangle 2: (0, 0), (100, 0), (100, 100)
It turns out triangle 1 shows right color (green), while triangle 2 shows
wrong color (black).
Is anyone know why? thanks.
It sounds like your two triangles are drawn with an inconsistent
winding order for the vertices.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<
http://www.xmission.com/~legalize/book/download/index.html>
Pilgrimage 2006, Saturday September 23rd: <
http://pilgrimage.scene.org>
North America's Longest Running Demoparty
.
Relevant Pages
- Clipping of T&L vertices
... I have some triangles which are T&L vertices. ... D3DPMISCCAPS_CLIPTLVERTS flag set doing this automatically if the ... For testing I tried to do clipping of T&L vertices with software vertex ... Small triangles are not drawn ... (microsoft.public.win32.programmer.directx.graphics) - Enigma 1370 - Pair of quadrilaterals
... drawn from each of its angles to a point ... within it to divide it into four triangles ... The perimeter of Harry's quadrilateral was ... (rec.puzzles) - How to set light on backfacing triangles?
... I disabled cull facing glDisableto prevent 'holes' in a ..3ds mesh. ... Now the 'hole' triangles are drawn, ... Guess it's because normals are still pointing the wrong way. ... (comp.graphics.api.opengl) - Thank you. Problem solved.
... it was a culling problem. ... I arranged my triangles in counter-clock-wise order. ... I didn't know that only triangles with clock-wise arranged vertices are ... gonna be drawn. ... (microsoft.public.win32.programmer.directx.graphics) - Re: Printing the whole whole printable area
... your rectangle are being drawn just outside of the printable area. ... need to inset the right and bottom by a pixel to get the line into the ... But at the very least, you need to understand that if you try to draw a rectangle that is the same exact width and height as what you believe to be the valid area for drawing, the right and bottom edges will not be drawn. ... For the record, the following code, when I use it with the Office Document Image Writer print driver, it prints a frame exactly the way you want: ... (microsoft.public.dotnet.languages.csharp) |
|