Compiling errors
Re: Compiling errors
I replaced "gl_bitmap_panel.h" in the folder of the test app, opened C:B and recompiled. I see the image of the lion still in black and white. The file I'm using now has a size of 4KiB
Re: Compiling errors
I get this error at compile time when I try to use minimal.cpp a the test program
/home/pi/Desktop/Prova/MyApp/CameraGUIForm.cpp|47|error: ‘GLBitmapPanel::PixelFormat’ is not a class or namespace|
Re: Compiling errors
You do understand that the minimal.cpp is a standalone test and has nothing to do with your CameraGUIForm.cpp?
Leave CameraGUIForm alone until the test app works.
Try GLBitmapPanel::RGBA8 instead of GLBitmapPanel::PixelFormat::RGBA8.
BTW: What gcc version is on that machine? (gcc -v)
Leave CameraGUIForm alone until the test app works.
Try GLBitmapPanel::RGBA8 instead of GLBitmapPanel::PixelFormat::RGBA8.
BTW: What gcc version is on that machine? (gcc -v)
Use the source, Luke!
Re: Compiling errors
Yes I understood that, I've just renamed what you called "MyApp" in "CameraGUIForm" bacause it was easier for me to build it..but the rest of the code is the same as "MyApp".
this:
this:
did the trick and application is now compiling/running. It is an animaeted panel divided in 6 parts. Each part has red at top-right corner and turns into green on the bottom left. The six panels are scrolling from right to leftTry GLBitmapPanel::RGBA8 instead of GLBitmapPanel::PixelFormat::RGBA8.
Re: Compiling errors
Good. It's important that you enable the OpenGL driver with hardware acceleration (I linked the description in the other thread), otherwise the OpenGL method will be painfully slow. I actually had a chance to test this on a real RPi over the weekend. With the standard video driver i get 350% Cpu load in that demo, with hardware acceleration around 45-50% which is hopefully fast enough.
Use the source, Luke!
Re: Compiling errors
Therefore the next step is to integrate this new ""gl_bitmap_panel.h"" in the main project right? I will try it now
Re: Compiling errors
Cannot understand why but I get these errors:
/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|
- Attachments
-
- main.cpp
- (250 Bytes) Downloaded 98 times
-
- CameraGUIForm.h
- (1.45 KiB) Downloaded 88 times
-
- CameraGUIForm.cpp
- (6.05 KiB) Downloaded 100 times
Re: Compiling errors
Is the main.cpp new? Didn't you already have a working application? Then you don't need it.
Use the source, Luke!
Re: Compiling errors
I have removed main.cpp/main.h, moved OnInit implementation in CameraGUIForm.cpp, moved IMPLEMENT_APP(CameraGUIForm) at the beginnning of CameraGUIForm.cpp and still I get the two errors from above
Re: Compiling errors
Now i'm confused. Whatever you used when it last compiled, just replace gl_bitmap_panel.h. Nothing else.
Use the source, Luke!
Re: Compiling errors
Code: Select all
IMPLEMENT_APP(CameraGUIForm)
bool CameraGUIForm::OnInit()
Use the source, Luke!
Re: Compiling errors
Now it works!!! And it has run for 30 minutes without slowing down and this is a good sign!!! I have to thank you a lot again!!!
Do you think that I can implement it with the events instead of with the critical sections? Do you think it is worth to do? Thank you a lot!
By the way I have to solve the problem of the blinking buttons
Do you think that I can implement it with the events instead of with the critical sections? Do you think it is worth to do? Thank you a lot!
By the way I have to solve the problem of the blinking buttons
Re: Compiling errors
I don't see any advantage in that. The nice thing about the GLBitmapPanel class is that it handles everything for you, so from the calling side you don't have to deal with the critical sections.Do you think that I can implement it with the events instead of with the critical sections? Do you think it is worth to do?
Can you show a screenshot of the whole window? If the buttons overlap the image area, you just have to change the coordinates of the image panel. Or even better, use sizers for the layout.By the way I have to solve the problem of the blinking buttons
Use the source, Luke!