Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Scaling sprite to be the same size as the screen size


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 Medo3337   Members   -  Reputation: 673

Like
0Likes
Like

Posted 10 June 2012 - 08:28 PM

I have a sprite, rendering it like the following:

D3DXVECTOR2 scale(1.0f, 1.0f);
D3DXMATRIX mat;


D3DXMatrixTransformation2D(&mat, NULL, 0.0f, &scale, NULL, NULL, NULL);
sprite->SetTransform(&mat);
sprite->Draw(sprite_texture, NULL, NULL, NULL, sprite_color);
sprite->End();

I need to set the scale to make the sprite size the same as the screen width and height.

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS