Size of Virtual Frambuffer (BouncingBoxes Demo)

Anything and everything about programming graphics with Ultibo
olaf
Posts: 1
Joined: Fri Oct 21, 2016 4:02 pm

Size of Virtual Frambuffer (BouncingBoxes Demo)

Postby olaf » Wed Mar 08, 2017 10:39 pm

Hello

I try to change the virtual Framebuffer size from 2 frames to 4 frames (1920*1080) in BouncingBoxes Demo.

Code: Select all

   // Original code Bouncingboxes
   FramebufferProperties.Depth:=8;
   FramebufferProperties.VirtualWidth:=FramebufferProperties.PhysicalWidth ;
   FramebufferProperties.VirtualHeight:=FramebufferProperties.PhysicalHeight * 2;       

  // Change to 32 bit , works
   FramebufferProperties.Depth:=32;
   FramebufferProperties.VirtualWidth:=FramebufferProperties.PhysicalWidth ;
   FramebufferProperties.VirtualHeight:=FramebufferProperties.PhysicalHeight * 2;       

   // Change to 4 Frames height, don't work.Monitor shows the full virtual Framebuffer resize to fit to screen   
   FramebufferProperties.Depth:=8; // or 32
   FramebufferProperties.VirtualWidth:=FramebufferProperties.PhysicalWidth ;
   FramebufferProperties.VirtualHeight:=FramebufferProperties.PhysicalHeight * 4;       



Is there a limit for the virtual Framebuffer ?

I want to change fast between 4 Fullscreen pictures.
User avatar
Ultibo
Site Admin
Posts: 1549
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: Size of Virtual Frambuffer (BouncingBoxes Demo)

Postby Ultibo » Thu Mar 09, 2017 10:31 am

Hello olaf,

olaf wrote:Is there a limit for the virtual Framebuffer ?

There does seem to be a limit imposed by the Raspberry Pi firmware for what size can be requested for a framebuffer, I cannot find anything that actually says what the limit is so that might mean it varies depending on how much memory is allocated to the GPU.

I haven't tested it but you could try changing the gpu_mem setting in your config.txt to see if the results change. The default value for gpu_mem is 64 so maybe starting with gpu_mem=128 would be a good value to try.

You can find all of the info about the config.txt settings in the Raspberry Pi documentation.
Ultibo.org | Make something amazing
https://ultibo.org

Return to “Graphics”

Who is online

Users browsing this forum: No registered users and 1 guest