Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Reducing the Drawbuffer res in Pi4

Wed Jul 03, 2019 4:26 pm

There was a really nice trick on the broadcom VC IV Pi's which allowed me to have a full screen display, but reduce the resolution of the render buffers by halving or quartering the src_rect and using a viewpoint that size.

Code: Select all

	dest_rect.width = width; // it needs to know our window size
	dest_rect.height = height; //

	src_rect.x = 0;
	src_rect.y = 0;
	src_rect.width = (FBResX) << 16; // FBRRes is 1/4 width/heigh for zero, 1/3 for 1A, and  2/3 for 2 and 3B and 3B+
	src_rect.height = (FBResY) << 16;

This was handy for rendering to the Zero/1 which are much lower power than the 2/3's which I usually set to half size, the Pi4 despite a bit more oomph, is not quite capable of rendering my demo's at 60hz at 1080p so I'd like to try and half the size again.

But I don't know how to do that on an X11 window setup, since it does not expose the same values, is it possible to set a renderbuffer to half size but have Xwindow scale to full size?
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
Wrote some book about coding Pi's and SBC's, it's out now...go get it!

Return to “OpenGLES”