Jump to content
  • Advertisement
Sign in to follow this  
VanillaSnake21

Software Viewport

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

Some relevant background first. I've written a software rasterizer based on DX10. I just have a polygon locaded in canonical view volume of -1 1 and a texture, which is the render target of my rasterizer.

 

The problem is that I'm trying to limit the world drawing to only the center strip of the screen. That is I'd like to have a UI strip on top and bottom of the screen and the world to be drawn to the center. I'm having some issues on how exactly to get this to work in a more or less efficient manner. Of course I could just draw the world to offscreen surface then blit it back at the right position. But is there any way that I can draw directly to my texture without another surface? 

Share this post


Link to post
Share on other sites
Advertisement

if you're not touching the stride then why not just adjust the height of the coordinate space accordingly and draw lower down?

Share this post


Link to post
Share on other sites

if you're not touching the stride then why not just adjust the height of the coordinate space accordingly and draw lower down?

 

I would like to be able to change the stride of the world region, sorry I didn't mention that. Maybe I'll put some UI on the sides as well, so I'd like to be able to specify a region that doesn't necessarily have the same stride as the screen. I'm currently trying to get it to work, and I seem to be getting there, but it's too cumbersome as I have to keep track of the memory pointer by hand. 

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!