jozzan
Posts: 15
Joined: Fri Dec 27, 2013 9:12 am

Graphic drivers

Fri Jul 11, 2014 4:01 pm

Hi all,
I'm about to compile my own image for the raspberry pi. But actually to get the program running as I intended to do I need to have access to hardware acceleration (opengl) as well as the opportunity to expose a framebuffer to render directly to the display.

Now my question is are the raspberry pi's opengl as well as device drivers open source? And if so where can I get the source of them from?

Thanks!

riklaunim
Posts: 265
Joined: Tue Apr 22, 2014 7:34 pm

Re: Graphic drivers

Fri Jul 11, 2014 8:20 pm

There is no OpenGL support. You have OpenGL ES. There is a binary blob and open source drivers. Broadcom did release open source code that eventually will replace the binary blob but it's not there yet. Now - do you really have to interface it at a low level. Maybe one of GUI/display libraries would be enough?

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6183
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Graphic drivers

Fri Jul 11, 2014 8:24 pm

The proof of concept driver is here: https://github.com/simonjhall/challenge

Anholt has been hired by Broadcom to develop a proper driver and you can follow his progress here http://anholt.livejournal.com/
https://github.com/anholt/linux/tree/vc4

jozzan
Posts: 15
Joined: Fri Dec 27, 2013 9:12 am

Re: Graphic drivers

Fri Jul 11, 2014 9:39 pm

Okay thanks but isnt even the binary blob capable oft exposing a Prosper framebuffer that i might render to?

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6183
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Graphic drivers

Fri Jul 11, 2014 9:43 pm

Yup, nothing special needed for the framebuffer.

jozzan
Posts: 15
Joined: Fri Dec 27, 2013 9:12 am

Re: Graphic drivers

Fri Jul 11, 2014 9:43 pm

And as long as the OpenGL ES Pipeline is functional i can do so even Hardware accelerated?

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6183
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Graphic drivers

Fri Jul 11, 2014 9:59 pm

What are you planning to do exactly? Why do you have the requirement that it has to be open source? There is an open opengl es library which is fully functional and works great, but most of the hard work actually happens in the closed firmware (the library just communicates with it).

jozzan
Posts: 15
Joined: Fri Dec 27, 2013 9:12 am

Re: Graphic drivers

Fri Jul 11, 2014 10:07 pm

I'm ging to Compiler a custom image that is intended to Boot directly into a dedicated app but as it should have some nice visuals it absolutely needs to have graphics acceleration without using some kind oft display server

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6183
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Graphic drivers

Fri Jul 11, 2014 10:11 pm

Sounds like the existing opengl es driver will work just fine for you.

jozzan
Posts: 15
Joined: Fri Dec 27, 2013 9:12 am

Re: Graphic drivers

Fri Jul 11, 2014 10:32 pm

Okay, i just thought it would be nice to keep things open due to the flexibility it brings to the table

Shadow_7
Posts: 52
Joined: Sat Jul 12, 2014 5:50 am

Re: Graphic drivers

Mon Jul 14, 2014 5:45 pm

I went with debian / jessie (armel) so I could have OpenGL support. As in glxgears and glxinfo does stuff beyond outputting text messages. But it's not accelerated, purely software rendered which is about 11 fps (windowed) for glxgears on a good day.

The fbturbo xorg driver gives framebuffer accelerated support. Formerly sunxi? I really haven't had a pi for very long. It basically allows you to drag windows around and not have them lag behind the mouse or skew graphically while they're being moved. The xserver-xorg-video-fbturbo package isn't in debian, so it's something that you have to compile from sources if you go that route. It should be in raspbian and other official pi distros.

Then there's the dispmanx option which replaces the SDL libs, but using it is what breaks the OpenGL compatibility, but may provide opengl es via the GPU aka accelerated? The dispmanx is supposed to give hardware scaling acceleration. So you can play games full screen and not take much of a hit performance wise on a larger screen. With a caveat of the game not trying to use the new resolution natively. I'm not yet using this option. But it's nice to know of it's existence.

I didn't set my pi up for gaming or media consumption, but rather for media content creation. So I can free up the primary desktop for other things. And not bear the brunt of a system that uses a lot of power and outputs a lot of heat under load. Running debian jessie gives me easier access to available video codecs for encoding. And it's familiar ground so compiling povray v3.7 from sources was less annoying. Although not as easy as it should have been. Yeah it takes 10x's to 30x's longer to render povray scenes or encode videos on a pi, but it does so quietly and without heating up my room.

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: Graphic drivers

Wed Jul 16, 2014 3:19 am

jozzan wrote:I'm ging to Compiler a custom image that is intended to Boot directly into a dedicated app but as it should have some nice visuals it absolutely needs to have graphics acceleration without using some kind oft display server
Maybe have a look at NOOBS? It uses a "custom image" (built using buildroot) and runs a "dedicated app" written using QT Embedded (with no Xserver). It even includes an embedded web-browser 8-)

jozzan
Posts: 15
Joined: Fri Dec 27, 2013 9:12 am

Re: Graphic drivers

Tue Sep 09, 2014 12:40 pm

Srry for beeing that late. Just wanted to inform you that I will be using Qt embedded for my drawings in combination with its eglfs plugin (and by that of course EGL).

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

Re: Graphic drivers

Wed Sep 10, 2014 11:13 am

Shadow_7 wrote:I went with debian / jessie (armel) so I could have OpenGL support. As in glxgears and glxinfo does stuff beyond outputting text messages. But it's not accelerated, purely software rendered which is about 11 fps (windowed) for glxgears on a good day.

The fbturbo xorg driver gives framebuffer accelerated support. Formerly sunxi? I really haven't had a pi for very long. It basically allows you to drag windows around and not have them lag behind the mouse or skew graphically while they're being moved. The xserver-xorg-video-fbturbo package isn't in debian, so it's something that you have to compile from sources if you go that route. It should be in raspbian and other official pi distros.

Then there's the dispmanx option which replaces the SDL libs, but using it is what breaks the OpenGL compatibility, but may provide opengl es via the GPU aka accelerated? The dispmanx is supposed to give hardware scaling acceleration. So you can play games full screen and not take much of a hit performance wise on a larger screen. With a caveat of the game not trying to use the new resolution natively. I'm not yet using this option. But it's nice to know of it's existence.

I didn't set my pi up for gaming or media consumption, but rather for media content creation. So I can free up the primary desktop for other things. And not bear the brunt of a system that uses a lot of power and outputs a lot of heat under load. Running debian jessie gives me easier access to available video codecs for encoding. And it's familiar ground so compiling povray v3.7 from sources was less annoying. Although not as easy as it should have been. Yeah it takes 10x's to 30x's longer to render povray scenes or encode videos on a pi, but it does so quietly and without heating up my room.
Eric Anholt's work. It uses Glamor (alpha-state OpenGL 2,1)

Return to “Advanced users”