Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Set Screen Viewport doesn't change anything

4: Adsense

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
2 replies to this topic

#1 ~Helgon   Members   

361
Like
0Likes
Like

Posted 06 November 2012 - 09:02 AM

Hey.. i think that it's just a very basic question, but i don't find a solution.
doesn't matter which values i use, it stays the same

For example:


mScreenViewport.TopLeftX = 50.0f;
mScreenViewport.TopLeftY = 50.0f;
mScreenViewport.Width    = 200.0f;
mScreenViewport.Height   = 200.0f;
mScreenViewport.MinDepth = 0.0f;
mScreenViewport.MaxDepth = 1.0f;

viewport values like this but its still the same as would i use the real size of my window (800x600)
doesnt matter how i setup the viewport - basicly nothing changes

i hope that someone can give me a hint

regards helgon

from time to time i find time


#2 Erik Rufelt   Members   

5901
Like
1Likes
Like

Posted 06 November 2012 - 09:27 AM

Do you actually draw any triangles that you see end up outside the viewport? (Clearing the background does not care about the viewport)
And of course, do you correctly set the viewport with deviceContext->RSSetViewports?
Try running your app with PIX and verify the viewport settings.

Edited by Erik Rufelt, 06 November 2012 - 09:28 AM.


#3 ~Helgon   Members   

361
Like
0Likes
Like

Posted 06 November 2012 - 09:47 AM

Oh damn, ur right. I totally forgot to call rsssetviewport. im so dumb. well, thank you for the quick help :)

from time to time i find time





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.