Compiling errors
Re: Compiling errors
Can you show a screenshot? I really didn't expect that many problems when running code on a RPi...
Use the source, Luke!
Re: Compiling errors
Yes! I updated my previous post, try to take a look!
Re: Compiling errors
Seems like OpenGL on the RPi does not support RGB data for this or requires additional initialization. Unfortunately this is the point, where it doesn't make sense for me to experiment myself without having access to the device. It'll just be endless trial and error.
I have to give up here
I have to give up here
Use the source, Luke!
Re: Compiling errors
Hi,
Did you try to build one of the opengl samples provided with wxWiedgets and run it on RPI?
Thank you.
Did you try to build one of the opengl samples provided with wxWiedgets and run it on RPI?
Thank you.
Re: Compiling errors
@doublemax: thank you very much for all your support!
no I didn't try cause I cannot find where the examples should be
no I didn't try cause I cannot find where the examples should be
Re: Compiling errors
Can you try the small image viewer app again with an image that has a width that is a multiple of 4? It won't look right, but maybe it gives a better impression about what's wrong with the pixel format.
Use the source, Luke!
Re: Compiling errors
Ok, new try, as i also found a bug in my code
If this works, but is still slow, can you tell the camera to return RGBA data? Then you also have to change the pixelformat and bytes_per_row parameters to the SetBitmapData() call. OpenGL might prefer that.
If this works, but is still slow, can you tell the camera to return RGBA data? Then you also have to change the pixelformat and bytes_per_row parameters to the SetBitmapData() call. OpenGL might prefer that.
Use the source, Luke!
Re: Compiling errors
Update: After another test under Linux, it seems that GTK does not like it to call Refresh() from a worker thread. And as CallAfter didn't compile for you, another workaround was needed.
- Attachments
-
- minimal.cpp
- minimal test application using gl_bitmap_panel.h. It generates dynamic image data in a worker thread.
- (2.86 KiB) Downloaded 74 times
-
- gl_bitmap_panel.h
- (3.96 KiB) Downloaded 87 times
Use the source, Luke!
Re: Compiling errors
Exuse me but I cannot understand how should I integrate minimal.cpp in my project,
In any case I get this compiling error:
In any case I get this compiling error:
/usr/include/wx-3.0/wx/app.h|832|error: invalid static_cast from type ‘wxAppConsole*’ to type ‘CameraGUIForm*’|
/home/pi/Desktop/Prova/CameraGUI_OpenGL/main.cpp|4|error: cannot convert ‘CameraGUIForm*’ to ‘wxAppConsole*’ in return|
/home/pi/Desktop/Prova/CameraGUI_OpenGL/main.cpp|6|error: no ‘bool CameraGUIForm::OnInit()’ member function declared in class ‘CameraGUIForm’|
Re: Compiling errors
You don't have to. That's just my test program which displayed a static image before. Now it generates a dynamic image in a worker thread, so it's closer to the image grabbing procedure.
Use the source, Luke!
Re: Compiling errors
I just have to update gl_bitmap_panel.h?
Re: Compiling errors
Yes.NonoNano wrote:I just have to update gl_bitmap_panel.h?
But try the little test program first. If that doesn't work properly, the "real" one can't work either.
Use the source, Luke!
Re: Compiling errors
It works in the same way as before
Re: Compiling errors
That's very unexpected. Did you change the gl_bitmap_panel.h in the folder with the test program, too?NonoNano wrote:It works in the same way as before
What do you see? Do you see the color pattern? Does it move?
Use the source, Luke!