Aparently the wiereness in Linux was beacause of two things,
in the gl render canvas I was using this method to do realt time update
- Code: Select all
void RenderCanvas::OnIdle(wxIdleEvent &event)
{
// this method is recommended by the WxWidegt doc, but it is very buggy and it appears to mess with the timer.
// send a paint update for viewing the next frame
wxPaintEvent paintEvent;
GetEventHandler()->ProcessEvent(paintEvent);
/ make sure we send a request for the next update
event.RequestMore ();
}
it work fine in windows but in Linux it appears to send event messages before the last update finish, I do not know why but it was wierd.
I changed to this
- Code: Select all
void RenderCanvas::OnIdle(wxIdleEvent &event)
{
// this is much elegant and it works on all platform
Refresh(false);
}
and now is fine.
the secund problem was the it appears that OGL initilization in windowes set double buffer by deffault, but i Linux it does not, so I have to add this to the creation code
- Code: Select all
// Note: In Linux the default gl_canvas window does not uses GL_DOUBLEBUFFER,
// this results int a terrible flicker when rendering in real time
// the solution is to explicitly force DL_DOUBLEBUFFER on all platform
int attributes [] = {WX_GL_DOUBLEBUFFER, WX_GL_RGBA, 0};
// add the render window
m_canvas = new RenderCanvas(this, wxID_ANY, wxDefaultPosition, wxSize(300, 300), wxSUNKEN_BORDER, attributes);
}
now the flicker is gone.
Now I am moving to the Mac to try to bring every thing to the same level, but I am seen big problem already,
it looks like COLLADA xcode project does not build for MAC OS 10.4.
so I will try later 10.5 only and if some one want to make the 10.4 they are free to do it,
but keeping backward compatibility is taking too much of my time in stuff that I simple hate to do.
so I will only use xcode 3.0 and forget abput xcode 2.5 because Collada and wxwidget projects are simple to big to recreate.
in addition there are like another half a dozen dependencies libraries I have not even tried to build yet.