Author Topic: can framebuffer be smaller than sceen?  (Read 406 times)

Offline MichaelJPCT

  • long
  • ***
  • Posts: 136
    • View Profile
can framebuffer be smaller than sceen?
« on: September 03, 2016, 06:16:01 pm »
i have an idea that i want to keep the game window's aspect ratio, for example 16:9, while the screen of device is usually not accurately 16:9.
can i have a framebuffer smaller than the screen and keep some black margins around the framebuffer?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
Re: can framebuffer be smaller than sceen?
« Reply #1 on: September 03, 2016, 09:09:44 pm »
I think it can, but I'm not sure that would be displayed. It might be a better idea to render into a NPOT-texture and blit that instead.

Offline MichaelJPCT

  • long
  • ***
  • Posts: 136
    • View Profile
Re: can framebuffer be smaller than sceen?
« Reply #2 on: September 04, 2016, 02:01:51 am »
i tried creating a smaller framebuffer , the app just couldn't start.
so your suggested way may be the only way.