Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualwintertime

Posted 19 January 2013 - 07:31 PM

- You could simply only draw what should be seen, like only half of the circle. That would avoid needless work that gets cut anyway.
- You can ignore what would be outside the screen as it would get cut away anyway(or if easier just not draw part of it).
- You can use the scissor test if you have a rectangular area where you draw in like with the circle.
- You could use the depth buffer for if you for example would draw the half circle first and later the rectangle a bit behind it and avoid overdraw there.
- You can use the stencil buffer, but you need to have one at first and then set some config for it and set it to the needed pattern when needed for each item (like deactivating the test before the triangle), which is more complicated than the other choices.

In the end its probably best to go the easiest way for you first and only optimize if there really is a problem with performance.

#1wintertime

Posted 19 January 2013 - 07:24 PM

- You could simply only draw what should be seen, like only half of the circle. That would avoid needless work that gets cut anyway.

- You can ignore what would be outside the screen as it would get cut away anyway(or if easier just not draw part of it).

- You can use the scissor test if you have a rectangular area where you draw in like with the circle.

- You could use the depth buffer for if you for example would draw the half circle first and later the rectangle a bit behind it and avoid overdraw there.

- You can use the stencil buffer, but you need to have one at first and then set some config for it and set it to the needed pattern when needed, which is more complicated than the other choices.

 

In the end its probably best to go the easiest way for you first and only optimize if there really is a problem with performance.


PARTNERS