Jump to content
  • Advertisement
Sign in to follow this  
george7378

A few questions about viewports

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

Hi!

 

I just have a few basic questions about how viewports in Direct3D work. A viewport consists of a width/height along with x/y coordinates in pixels (along with depth values, but I don't think they are really important for what I'm asking). Anyway:

 

- Am I right in thinking that the world/view/projection matrix combination will map everything into a 2D space where the coordinates range from 0->1 in the x/y directions, and then the active viewport actually translates this into pixel values on-screen? i.e. if I set a 512x512 texture as my render target along with a 512x512 viewport, does that mean that I will have exactly the same end result just squashed into a smaller area? (i.e. my field of view/scene won't change, it will just not fill the screen)?

 

- Does changing the render target change the viewport dimensions?

 

Thanks a lot!

Share this post


Link to post
Share on other sites
Advertisement

Thanks for the correction :) Yeah, I noticed that it changes the viewport automatically - it's actually more useful for me that way!

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!