Fixed current view not being updated when window is resized (bug introduced with the latest modifications on view handling)
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1344 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
7b83fbc544
commit
7ad6c64358
@ -72,6 +72,9 @@ void RenderTarget::Draw(const Drawable& object)
|
||||
// Setup the shader
|
||||
myRenderQueue.SetShader(NULL);
|
||||
|
||||
// Setup the viewport
|
||||
myRenderQueue.SetViewport(GetViewport(myCurrentView));
|
||||
|
||||
// Let the object draw itself
|
||||
object.Draw(*this, myRenderQueue);
|
||||
|
||||
@ -91,6 +94,9 @@ void RenderTarget::Draw(const Drawable& object, const Shader& shader)
|
||||
// Setup the shader
|
||||
myRenderQueue.SetShader(&shader);
|
||||
|
||||
// Setup the viewport
|
||||
myRenderQueue.SetViewport(GetViewport(myCurrentView));
|
||||
|
||||
// Let the object draw itself
|
||||
object.Draw(*this, myRenderQueue);
|
||||
|
||||
@ -122,8 +128,7 @@ void RenderTarget::SetView(const View& view)
|
||||
// Save it
|
||||
myCurrentView = view;
|
||||
|
||||
// Send the view's viewport and projection matrix to the render queue
|
||||
myRenderQueue.SetViewport(GetViewport(view));
|
||||
// Send the projection matrix to the render queue
|
||||
myRenderQueue.SetProjection(view.GetMatrix());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user