Jump to content
  • Advertisement
Sign in to follow this  
transcendent_one

OpenGL glVertex4f in D3D

This topic is 3980 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement

Hi,

you'll need to use the D3DFVF_XYZRHW to specify the 4d-vector containing the w-component.

Good luck!

Share this post


Link to post
Share on other sites
If you're using FVF codes (rather than shaders), you can use D3DFVF_XYZW. If you're using shaders, you just put a 4D vector in your vertex declaration.

What are you trying to do, exactly?

Share this post


Link to post
Share on other sites
Thanks for replies.

I require to render some rational surfaces, that require that fourth element in vertex description. So D3DFVF_XYZRHW or D3DFVF_XYZW is what I'm looking for?
I'm not sure I understand the documentation in MSDN about this stuff.. :/

Share this post


Link to post
Share on other sites
I'm not sure what you mean by "rational surfaces", but if you're not using a vertex shader, D3DFVF_XYZW is the only way to pass 4D vectors to D3D. D3DFVF_XYZRHW means a point in post-transform space, which is probably not what you want.

Share this post


Link to post
Share on other sites
Quote:
Original post by Evil Steve
I didn't think D3D supported NURBS?
I forget the exact algorithm, but D3D did introduce support for HOS hardware in Direct3D 8 I think. Unfortunately stencil shadowing pretty much killed it.

Jack

Share this post


Link to post
Share on other sites
Quote:
Original post by Evil Steve
Going a little off topic here; I didn't think D3D supported NURBS? You're not doing this in a shader are you?


Actually I'm working on rational Bezier patches, I just gave the example of rational surface.
My project is more like scientific application, trying to use D3D instead of OpenGL (I guess thats a bit madness, because DX is more for gaming stuff). And yes, no shaders here :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!