Adafruit Industries, Essential service and business: NYC – Executive Order 202.6 - Read more.
0

PITFT OpenGL Explanation
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

PITFT OpenGL Explanation

by MrMonotone on Fri Jul 25, 2014 4:55 pm

Hello:

After reading your interesting article on the Game Girl, I was inspired to learn more about it. Specifically I was thinking about building my own or a variation of it. The recent launch of the B+ helped as well. After doing some research regarding the different part in the build I started reading up on your PITFT Screens. They looked like great value and an easy addition to use. However, after a while I came across some forum posts about the screens not having drivers/support for OpenGL. This is really upsetting because I was hoping to be able to play all my favorite systems on it. After learning that the screen did not have support for OpenGL I wondered why that was and could not find a post explaining what it was not supported or what limitations prevented it from being supported. I did however find the Github page about the driver by the user notro and found out that it the screen worked by copying the framebuffer. However this has a large performance decrease because it does not support DMA. The DMA was released in the latest beta which was in February. Is there anymore process on this? I guess now I should probably get to my questions.

1. Why does the PITFT not support OpenGL?
2. Are there technical limitations that prevent the screen from supporting OpenGL?
3. Will OpenGL be supported in future versions of hardware/firmware?
4. Is there some documentation that I can read to better understand how this product works / get involved in development?

Not really relevant to the project but would love to know:

5. Why do no emulators support OpenGL ES?
6. How does OpenGL compare to OpenGL ES?

Would love to hear back.
Thanks
MM
MrMonotone
 
Posts: 2
Joined: Fri Jul 25, 2014 4:35 pm

Re: PITFT OpenGL Explanation

by pburgess on Fri Jul 25, 2014 8:05 pm

1. Why does the PITFT not support OpenGL?
2. Are there technical limitations that prevent the screen from supporting OpenGL?


Because it's not directly interfaced to the video circuitry; it's a "dumb" framebuffer connected via the SPI bus on the GPIO header, and only runs so fast. GL requires a high speed interface between the GPU and display, which we don't have here.

3. Will OpenGL be supported in future versions of hardware/firmware?


Not the PiTFT. If you're patient though, at some point the Raspberry Pi Foundation will release their own display that connects via the LVDS header. In theory anyway, they've talked about it. Perhaps if it's well-documented others can offer displays in other sizes and form-factors, but I have no idea if that aspect will be open and I'm really talking out my rear at this point.

Another alternative is to use either the HDMI or composite interfaces to connect a small external display, driven by the video circuitry and thus GL compatible. Before the PiTFT I'd seen some other emulation projects using such displays...the wiring isn't as tidy and the composite displays won't be razor-sharp due to interpolation...but there you go.

Also also, there are utilities that continually copy the main framebuffer (under GPU control) to the secondary buffer used by the PiTFT. The performance is really quite underwhelming though, and this is why we didn't use that approach for the Cupcade project.

5. Why do no emulators support OpenGL ES?
6. How does OpenGL compare to OpenGL ES?


Not a clue! Sorry.

This is really upsetting because I was hoping to be able to play all my favorite systems on it.


I know, right? I was totally hoping for a pony!

pburgess
 
Posts: 4049
Joined: Sun Oct 26, 2008 2:29 am

Re: PITFT OpenGL Explanation

by MrMonotone on Sat Jul 26, 2014 3:01 pm

pburgess wrote:
1. Why does the PITFT not support OpenGL?
2. Are there technical limitations that prevent the screen from supporting OpenGL?


Because it's not directly interfaced to the video circuitry; it's a "dumb" framebuffer connected via the SPI bus on the GPIO header, and only runs so fast. GL requires a high speed interface between the GPU and display, which we don't have here.

3. Will OpenGL be supported in future versions of hardware/firmware?


Not the PiTFT. If you're patient though, at some point the Raspberry Pi Foundation will release their own display that connects via the LVDS header. In theory anyway, they've talked about it. Perhaps if it's well-documented others can offer displays in other sizes and form-factors, but I have no idea if that aspect will be open and I'm really talking out my rear at this point.

Another alternative is to use either the HDMI or composite interfaces to connect a small external display, driven by the video circuitry and thus GL compatible. Before the PiTFT I'd seen some other emulation projects using such displays...the wiring isn't as tidy and the composite displays won't be razor-sharp due to interpolation...but there you go.

Also also, there are utilities that continually copy the main framebuffer (under GPU control) to the secondary buffer used by the PiTFT. The performance is really quite underwhelming though, and this is why we didn't use that approach for the Cupcade project.

5. Why do no emulators support OpenGL ES?
6. How does OpenGL compare to OpenGL ES?


Not a clue! Sorry.

This is really upsetting because I was hoping to be able to play all my favorite systems on it.


I know, right? I was totally hoping for a pony!


Thank you for the very fast response and detailed one. I found an article regarding a prototype screen from the raspberry foundation supposedly coming out soontm. http://raspi.tv/2014/raspberry-pi-offic ... pe-preview . Is this something that you were referring to? Sadly I guess I will wait and see. You have been very helpful thanks again!

Edit: OpenGL ES emulators are working fine correct and is there anymore info on the DMA. I heard that it is in beta but increases performance drastically.
MrMonotone
 
Posts: 2
Joined: Fri Jul 25, 2014 4:35 pm

Re: PITFT OpenGL Explanation

by pburgess on Thu Jul 31, 2014 2:32 am

That's the screen, yep. No idea if/when it might be available, or if it'll open doors to making screens in other sizes. Would be nice.

The DMA driver for the PiTFT works great. We're using it in the Cupcade project and this made all the difference between chunky frame-skipped screen updates and buttery smooth emulation.

pburgess
 
Posts: 4049
Joined: Sun Oct 26, 2008 2:29 am

Re: PITFT OpenGL Explanation

by rdswords on Thu Sep 04, 2014 3:45 pm

pburgess wrote:That's the screen, yep. No idea if/when it might be available, or if it'll open doors to making screens in other sizes. Would be nice.

The DMA driver for the PiTFT works great. We're using it in the Cupcade project and this made all the difference between chunky frame-skipped screen updates and buttery smooth emulation.


Has anyone managed an HDMI converter to interface the PiTFT with the HDMI port on the Raspberry Pi (so that you still get the compact display, but also the graphical performance improvements)?

rdswords
 
Posts: 5
Joined: Thu Sep 04, 2014 12:19 am

Please be positive and constructive with your questions and comments.