Jump to content
  • Advertisement
Sign in to follow this  
ProgrammingNerd

textured quads

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

is it possible to move a textured quad around the screen if the vertex format uses pretransformed coordinants without having to lock/unlock the vertex buffer. my demo program is incredibly slow because of this. please help, programmingnerd

Share this post


Link to post
Share on other sites
Advertisement
this very second I'm wondering about this myself, and, by the sounds of it... really it shouldn't be possible as they have already been transformed to screencoordinates... the only thing I can come to think of is somekind of offset, which I doubt would be available.

But, using untransformed vertices for moving objects would probably be the way to go, and transformed for static objects, perhaps someone has a definite answer to this?

EDIT: a possibilty would be to use two streams, one with the x,y and one with all the other data, actually... but yet I figure if untransformed isn't better.

Share this post


Link to post
Share on other sites
thanks, this seems to be the better way. btw, i was locking the vertex buffer, adding the coordinants i wanted to move to the quads coordinants, unlocking, and then rendering. didn't think that locking was so slow.

thanks again, Syranide

Share this post


Link to post
Share on other sites
If you are interested I'm currently using this to move them around

D3DXMatrixOrthoOffCenterLH(&world, -x, sw-x, sh-y, -y, 0.0f, 1.0f);
m_pDevice->SetTransform(D3DTS_WORLD, &world);

Where sw and sh is screen width and height.
Fast and easy offsetting of the drawn buffer... perhaps it would be better to modify the D3DTS_VIEW instead? But, having it as the identity might prove to be better as we are still modifying a matrix?

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!