Compiling errors

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Compiling errors

Post by doublemax »

Can you show a screenshot? I really didn't expect that many problems when running code on a RPi...
Use the source, Luke!
NonoNano
Experienced Solver
Experienced Solver
Posts: 71
Joined: Sun Mar 25, 2018 6:12 pm

Re: Compiling errors

Post by NonoNano »

Yes! I updated my previous post, try to take a look! :)
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Compiling errors

Post by doublemax »

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 :(
Use the source, Luke!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7477
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Compiling errors

Post by ONEEYEMAN »

Hi,
Did you try to build one of the opengl samples provided with wxWiedgets and run it on RPI?

Thank you.
NonoNano
Experienced Solver
Experienced Solver
Posts: 71
Joined: Sun Mar 25, 2018 6:12 pm

Re: Compiling errors

Post by NonoNano »

@doublemax: thank you very much for all your support!

no I didn't try cause I cannot find where the examples should be
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Compiling errors

Post by doublemax »

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!
NonoNano
Experienced Solver
Experienced Solver
Posts: 71
Joined: Sun Mar 25, 2018 6:12 pm

Re: Compiling errors

Post by NonoNano »

This is looking fine!
Attachments
1.jpg
2018-04-06-201334_800x480_scrot.png
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Compiling errors

Post by doublemax »

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.
Use the source, Luke!
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Compiling errors

Post by doublemax »

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!
NonoNano
Experienced Solver
Experienced Solver
Posts: 71
Joined: Sun Mar 25, 2018 6:12 pm

Re: Compiling errors

Post by NonoNano »

Exuse me but I cannot understand how should I integrate minimal.cpp in my project,

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’|
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Compiling errors

Post by doublemax »

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!
NonoNano
Experienced Solver
Experienced Solver
Posts: 71
Joined: Sun Mar 25, 2018 6:12 pm

Re: Compiling errors

Post by NonoNano »

I just have to update gl_bitmap_panel.h?
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Compiling errors

Post by doublemax »

NonoNano wrote:I just have to update gl_bitmap_panel.h?
Yes.

But try the little test program first. If that doesn't work properly, the "real" one can't work either.
Use the source, Luke!
NonoNano
Experienced Solver
Experienced Solver
Posts: 71
Joined: Sun Mar 25, 2018 6:12 pm

Re: Compiling errors

Post by NonoNano »

It works in the same way as before
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Compiling errors

Post by doublemax »

NonoNano wrote:It works in the same way as before
That's very unexpected. Did you change the gl_bitmap_panel.h in the folder with the test program, too?

What do you see? Do you see the color pattern? Does it move?
Use the source, Luke!
Post Reply