Go to advanced search

by yo1dog
Sun Jun 01, 2014 2:22 am
Forum: Graphics programming
Topic: EGL - How to use fb1?
Replies: 27
Views: 28572

Re: EGL - How to use fb1?

I haven't worked on it in a while, but I tried that approach. I don't remember why I decided to go a different direction. Maybe there was a delay or the framerate was too low. Maybe I just wanted a solution that didn't require an external process. Either way, I hope this helps. Also, it helps if you...
by yo1dog
Fri May 30, 2014 4:32 pm
Forum: Graphics programming
Topic: EGL - How to use fb1?
Replies: 27
Views: 28572

Re: EGL - How to use fb1?

Sorry to dig up an old post, but I figured I should post my solution. Get a file descriptor to fb1. fbfd = open("/dev/fb1", O_RDWR); I then map some memory to that file descriptor. fbp = mmap(0, screen_datasize, PROT_READ | PROT_WRITE, MAP_SHARED, fbfd, 0); Finally I take a snapshot, and c...
by yo1dog
Wed Oct 30, 2013 3:33 pm
Forum: Graphics programming
Topic: EGL - How to use fb1?
Replies: 27
Views: 28572

Re: EGL - How to use fb1?

Thanks! I'll try this tonight.
by yo1dog
Wed Oct 30, 2013 6:19 am
Forum: Graphics programming
Topic: EGL - How to use fb1?
Replies: 27
Views: 28572

Re: EGL - How to use fb1?

Thanks for all the great info and your time. The RPi does support 565, if you ask for it you will see the colour banding. To get it you have to pick the right config. The first config returned by eglChooseConfig() when asking for a 565 will NOT be 565 but 888 as the spec says that the configs are so...
by yo1dog
Tue Oct 29, 2013 9:59 pm
Forum: Graphics programming
Topic: EGL - How to use fb1?
Replies: 27
Views: 28572

Re: EGL - How to use fb1?

Can I use openGL ES to render without using EGL? Will it still take advantage of the GPU? Is there a way to use the GPU to convert the rendered image from openGL ES to RGB 565 or a more efficient way to do it with the CPU that won't kill my framerate?
by yo1dog
Tue Oct 29, 2013 4:49 pm
Forum: Graphics programming
Topic: EGL - How to use fb1?
Replies: 27
Views: 28572

Re: EGL - How to use fb1?

I was able to read the snapshot into memory and then memcpy it to fb1. That worked and I can now see a scaled version of fb0 on fb1. Problem: I don't want to scale, I just want to crop 480x272 pixels (resolution of my LCD) of fb0 and display it in fb1. One solution would be to force fb0 to have the ...
by yo1dog
Fri Oct 25, 2013 3:17 pm
Forum: Graphics programming
Topic: EGL - How to use fb1?
Replies: 27
Views: 28572

Re: EGL - How to use fb1?

I think I tried that with the same results. I can confirm on Sunday.

I assumed the read is failing because it returns -1, but why is it hanging on vc_dispmanx_snapshot?

fbcp seems to work for everyone else, why would it not work on my setup?
by yo1dog
Fri Oct 25, 2013 4:25 am
Forum: Graphics programming
Topic: EGL - How to use fb1?
Replies: 27
Views: 28572

Re: EGL - How to use fb1?

Going off that source I was able to add the following to the hello_triangle example: //... static int screen_width = 480; static int screen_height = 272; static int screen_bitdepth = 2; static int screen_datasize; static DISPMANX_DISPLAY_HANDLE_T display; static DISPMANX_RESOURCE_HANDLE_T screen_res...
by yo1dog
Fri Oct 25, 2013 2:11 am
Forum: Graphics programming
Topic: EGL - How to use fb1?
Replies: 27
Views: 28572

Re: EGL - How to use fb1?

Any idea how I write to fb1?
by yo1dog
Thu Oct 24, 2013 3:48 pm
Forum: Advanced users
Topic: External Display as fb0
Replies: 1
Views: 1447

External Display as fb0

I currently have a USB LCD connected to my rpi and functioning as fb1. Note that I can use fbi to display images on it. I was told in this thread that it is not possible to write an OpenGL ES program and have it use fb1 because egl is codded to only allow the default fb0 framebuffer to be used. Ther...
by yo1dog
Thu Oct 24, 2013 4:21 am
Forum: Graphics programming
Topic: EGL - How to use fb1?
Replies: 27
Views: 28572

Re: EGL - How to use fb1?

Hmm... So you are saying it is impossible for egl to use fb1. I wonder why they would implement that restriction. I won't pretend to remotely understand what goes on at that level. If that is the case. Is there anyway to make the default video output (on-board HDMI/Composite) fb1 and my display fb0 ...
by yo1dog
Wed Oct 23, 2013 3:40 pm
Forum: Graphics programming
Topic: EGL - How to use fb1?
Replies: 27
Views: 28572

Re: EGL - How to use fb1?

I suspect a couple problems: 1. The displays attached to each framebuffer have different resolutions and color bit-depths. Although, I bet I could manually set/override this. 2. How fast does this update? Will it cause lag or tearing? I guess I should just try it but I am at work currently. Thanks f...
by yo1dog
Tue Oct 22, 2013 11:24 pm
Forum: Graphics programming
Topic: EGL - How to use fb1?
Replies: 27
Views: 28572

EGL - How to use fb1?

I posted this question on StackOverflow but with no responses I think this may be a better place to ask. I am trying to modify the hello_triangle example (/opt/vc/src/hello_pi/hello_triangle) on my Raspberry Pi to output to fb1 instead of fb0. I have searched everything I can think of with no answer...

Go to advanced search