Posts: 1
Joined: Thu Jul 15, 2021 7:07 pm

3D rendering is broken, only renders part of the scene

Thu Jul 15, 2021 7:24 pm

A couple of months ago I decided to buy a Pi, model 3 B+ to be exact. I haven't used it much since then, I've compiled a couple things when messing about with the visual studio remote compiler but that's about it.

A couple of days ago I thought why not give using the Pi a go, so I installed some games
I first saw this problem happening in PrBoom-Plus, on the openGL rendering setting (this happens on both fake and full kms). software rendering works perfectly fine but when trying to play with hardware rendering, there's major rendering issues going on that straight up prevent me from playing. Video attached below:

I wanted to make sure this wasn't just a game specific issue, so I went looking for more games and tried Sauerbraten with hardware rendering. Same issue, although the skybox seems to render fine so there's no framebuffer jitter. Again, video:

I was wondering if I've set up something wrong or if the Pi i received is deceptive or something.
I've got 256mb allocated to the GPU and this issue happens both with fake and full KMS on the gl driver option. I'm running the default 32bit raspberry pi OS, card formatted using the imager

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

Re: 3D rendering is broken, only renders part of the scene

Sun Jul 18, 2021 11:03 am

There are a few issues using projects not specifially written for the Pi3,
First there's which OpenGL do you use.. you should always try to use OpenGLES2.0 as its the native version, that requires you set the Gl drivers to default. If the software supports it, that should work fine.
2nd is the amount of memory, 256 is enough for a lot of things but it might not be, best to go up to the max, around 384

Now OpenGL options regardless of fake or full are still basically emulatjng some content and not enteirly complete, so you are at the mercy of what the software wants to do and what the drivers are able to do, its not always a match made in heaven. Thats why your software rendering is fine.

OpenGL on the Pi3 is an amazing bit of work but it only produced a version of opengl2 with some aspects of 3. So its always a bit hit an miss unless you write and test the code yourself to see what does and does not work.
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.

Return to “Graphics programming”