I want to draw my polygons with texture, but I also want to see the
wireframe, lines on the polygons, which displayed in high light color. That
is like modeling in 3DMax, you can see textures and the wireframe.
Thanks
=?Utf-8?B?c2VzaW1l?= <ses...@discussions.microsoft.com> spake the secret code
<67554F60-7199-4109...@microsoft.com> thusly:
>How to draw polygons with texture but in wireframe mode
Just set the fill mode to D3DFILL_WIREFRAME.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://www.xmission.com/~legalize/book/download/index.html>
Legalize Adulthood! <http://blogs.xmission.com/legalize/>
It's a bit more complicated than that.
Probably, the OP will want to draw his objects filled first, then disable
the z-buffer (optional [? -- maybe not]), and THEN draw them in wireframe.
The wireframe also copies the textures, so he'll have to disable these and
draw them with a solid color. Perhaps lighting should be off as well.
[Jongware]
"[Jongware]" <sorry@no_spam.plz> spake the secret code
<4628ca15$0$329$e4fe...@news.xs4all.nl> thusly:
>"Richard [Microsoft Direct3D MVP]" <legaliz...@mail.xmission.com> wrote
>in message news:%23HUauz0...@TK2MSFTNGP04.phx.gbl...
>> [Please do not mail me a copy of your followup]
>>
>> =?Utf-8?B?c2VzaW1l?= <ses...@discussions.microsoft.com> spake the secret
>> code
>> <67554F60-7199-4109...@microsoft.com> thusly:
>>
>>>How to draw polygons with texture but in wireframe mode
>>
>> Just set the fill mode to D3DFILL_WIREFRAME.
>
>It's a bit more complicated than that.
Oh, I see. I thought he just wanted the wireframe but I see after
looking more closely he wants to draw the lines on top of the
polygons. So yeah, what you recommend is probably the least that will
be required.
Regards,
Ron Francis
www.RonaldFrancis.com
"[Jongware]" <sorry@no_spam.plz> wrote in message
news:4628ca15$0$329$e4fe...@news.xs4all.nl...
You have to disable the z-buffer -- that'll take care of that!
Free tip 1: You also have the option of showing only 'forward' triangles (normal
culling), just the 'invisible' ones (reverse your backface culling the other way
around), or all (no culling).
Free tip 2: A nice way to highlight certain triangles is to draw them again (not
in wireframe), with the z-buffer disabled, and with a 50% transparent color.
[Jw]
>> That is how I managed to do it.
>> The main problem I had was the lines fighting with the geometry in the same
>> way two co-planar surfaces fight.
> You have to disable the z-buffer -- that'll take care of that!
But this also draws hidden lines.
Gruss
Jan Bruns
Thanks for the tips. Free is always good value.
Regarding the z-buffer, ... I wait to see how you respond to Jan's post.
I would love to use D3DCULL_NONE for things like the interior of bowls
etc.when they don't have any thickness, but there is one major drawback.
If I create a simple scene with a light source and a triangle, and use
D3DCULL_NONE, the lighting is reversed for the backface of the triangle.
That is, the backface of the triangle is most lit when it is facing away
from the light source.
Unless there is something peculiarly odd with my app, it's is the nature of
how DX calculates the light against the triangle's normals and I can't see
an easy way to get around this.
Any ideas?
Free tip 2:
Yours is an interesting way to do it.
The way I do it is to increase the emissive property of the highlighted
triangles.
In this way you don't double up on drawing your primitives
Regards,
Ron Francis
www.RonaldFrancis.com
"[Jongware]" <IdontW...@hotmail.com> wrote in message
news:6f11$462aa2b9$3ec3d632$66...@news.chello.nl...
Its called DirectXViewer now and the source (C++ only) is still in the SDK I
have installed (April 2007)
Regards,
Ron Francis
www.RonaldFrancis.com
"ZMan" <zm...@thezbuffer.com> wrote in message
news:%23SYmaju...@TK2MSFTNGP06.phx.gbl...
"Ron Francis" <rfra...@senet.com.au> spake the secret code
<Ot7lJ5Zi...@TK2MSFTNGP03.phx.gbl> thusly:
>Not sure of my SDK's release date, but it is 9.0 and doesn't contain the
>source code.
Where are you looking for it?
In the April 2007 SDK its in Utilities\Source\DxViewer.
Regards,
Ron Francis
www.RonaldFrancis.com
"Richard [Microsoft Direct3D MVP]" <legaliz...@mail.xmission.com> wrote
in message news:OU0dM2ri...@TK2MSFTNGP04.phx.gbl...
"Ron Francis" <rfra...@senet.com.au> spake the secret code
<e31meK$iHHA...@TK2MSFTNGP03.phx.gbl> thusly:
>I can't find any reference to the release date in my SDK, but it is 9.0b
>"dx90bsdk.exe" and it didn't come with any source for the DxViewer.
9.0b is quite old. I recommend you install a newer SDK as the current
runtime is version 9.0c.
>There was an extras download for v8.1 so I'm wondering if I missed one for
>v9.0b?
This is long ago enough that it might have been in the "SDK extras",
which was a separate download. At any rate I suggest you use at least
a 9.0c SDK, particularly if you use D3DX. Lots of D3DX bug fixes have
come in over the past few years.
Regards,
Ron Francis
www.RonaldFrancis.com
"Richard [Microsoft Direct3D MVP]" <legaliz...@mail.xmission.com> wrote
in message news:%23F8gEUA...@TK2MSFTNGP04.phx.gbl...