Jump to content

  • Log In with Google      Sign In   
  • Create Account

Rendering Larger Viewport


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
1 reply to this topic

#1 BLaBZ   Members   -  Reputation: 110

Like
0Likes
Like

Posted 28 December 2012 - 02:15 PM

I'm attempting to anti alias by rendering to a larger texture then scaling down the texture. My code looks like this 

 

glViewPort(0,0,GraphicsWidth()*2,GraphicsHeight()*2)

glFrustum(0,Graphicswidth()*2,0,GraphicsHeight()*2,1,1000)

glDrawElements()

glViewPort(0,0,GraphicsWidth(),GraphicsHeight())

glFrustum(0,GraphicsWidth(),0,GraphicsHeight(),1,1000)

 

For some reason it's only rendering the bottom left corner of the FBO.


Edited by funnyben123, 28 December 2012 - 02:16 PM.


Sponsor:

#2 Maus   Members   -  Reputation: 666

Like
0Likes
Like

Posted 28 December 2012 - 03:22 PM

http://www.opengl.org/sdk/docs/man2/xhtml/glFrustum.xml
glFrustum — multiply the current matrix by a perspective matrix

Before applying the frustum-matrix you have to reset the matrix first (glLoadIdentity), push and pop it (glPushMatrix, glPopMatrix) or use some other method (e.g. glLoadMatrix)

Edit: Or more likely you are using glFrustum wrong. The docs say void glFrustum(left, right, bottom, top, nearVal, farVal) - in your example code you are not in the center with your matrix.

- Martin

Edited by MausGames, 28 December 2012 - 03:56 PM.





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