bullen
Posts: 283
Joined: Sun Apr 28, 2013 2:52 pm

OpenGL

Sat Feb 28, 2015 10:50 pm

So I like the direct rendering mode better than ES vertex buffer style 3D programming.

Does the GPU on the Pi allow for OpenGL 1.0 begin/end drawing of triangles directly?
https://github.com/tinspin/rupy - A tiny Java async HTTP application server.

User avatar
Paeryn
Posts: 2747
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: OpenGL

Sun Mar 01, 2015 10:31 am

Not natively. There's nothing stopping you from creating your own functions to emulate the original GL method of glBegin/glEnd, but it's a long depreciated method of working. It's okay for small scale work, but not in bigger project.
If you are wanting true direct rendering (where each triangle is actually drawn to the screen on a glEnd command) then you'd also have to call glFlush or glFinish each time and that will likely murder your frame rate.
She who travels light — forgot something.

mimi123
Posts: 583
Joined: Thu Aug 22, 2013 3:32 pm

Re: OpenGL

Sun Mar 01, 2015 11:11 am

bullen wrote:So I like the direct rendering mode better than ES vertex buffer style 3D programming.

Does the GPU on the Pi allow for OpenGL 1.0 begin/end drawing of triangles directly?
If you use Mesa3D[full OpenGL 2.1 support including all old things].

Mark_T
Posts: 149
Joined: Sat Dec 27, 2014 10:54 am

Re: OpenGL

Sun Mar 01, 2015 6:47 pm

As I understand it this is crucial to efficiency on some GPUs in embedded systems where
transfering data programmatically to the GPU every frame is orders of magnitude slower than preloading
a buffer and letting it fly with the data local to the GPU (I presume the Pi is no exception).

Having said that I've just rattled up a bit of graphics code in OpenGL (not on Pi) using direct
approach because I just want a quick visualization of something I'm modelling, and I don't care about
framerate and I only have a few dozen polygons... A compatibility layer would be nice.

bullen
Posts: 283
Joined: Sun Apr 28, 2013 2:52 pm

Re: OpenGL

Sun Mar 01, 2015 11:21 pm

Ok, sounds like I'm not the only one who likes old school rendering (btw finish and flush are only called every frame and is not a problem, at least if you use lists <- this is buffering on the GPU) It's really sad how the high-poly, content heavy, boring game-play, brainwashed industry, managed to eliminate direct rendering backwards compatibility, making the process towards original game ideas slower.

So basically, the GPU has the routines since mesa can access them? Or is it some kind of horribly slow emulation. I mean linear algebra is linear algebra so somewhere deep down the routines to draw a triangle are on the GPU, my question is did the industrial complex (khronos.org) manage to erase the access to them?
https://github.com/tinspin/rupy - A tiny Java async HTTP application server.

Return to “General discussion”