Jump to content
  • Advertisement
Sign in to follow this  
PumpkinPieman

Vertices to a pre-transformed look.

This topic is 4834 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

I really haven't done a lot of work on the vertex side (I guess you could call it) of Direct X, I've mainly worked with interfaces like the sprite interface so I've completely avoided creating transform matrices. Now, what I'm trying to do is jump back in and expand my 2D adventures making vertices look like pre-transformed vertices. So far I'm kind of grasping the concept of the world, projection, and view matrices and all seems well however. What I want to do is achieve the same "screen space effect" without having to scale vertices when using the identity matrix for view and projection. Say if I wanted my screen to represent 800x600, could I somehow build a view matrix that will allow me to use vertices from X(0 ~ 800), Y(0 ~ 600) instead of being confined to the limitations of X&Y(-1 ~ 1) using an identity matrix? and also, if I could then what would this matrix represent? The view matrix? Thanks. :)

Share this post


Link to post
Share on other sites
Advertisement
If you're not using camera or world transformations at all, you could look into the use of D3DFVF_XYZRHW (a pre-transformed vertex). HTH.

Share this post


Link to post
Share on other sites
Quote:
Original post by tjsmith
If you're not using camera or world transformations at all, you could look into the use of D3DFVF_XYZRHW (a pre-transformed vertex). HTH.


I could, except I'm trying to diverge from their use right now. Currently I'm working with DX9's Sprite and Line interface which use pre-transformed vertices by default. They also have a lot of limitations that I would be thankful to remove.

Quote:
Original post by njpaul
Orthogonic matrix could be what you're looking for.

I ended up finding D3DXMatrixOrthoOffCenterLH, which seems to work a lot better if not the same as the sprite and line interface. :) Thanks.

[Edited by - PumpkinPieman on August 22, 2005 1:52:42 PM]

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!