Hi Arne,
I have two related questions concerning COpenGLView. The first concerns the changes made in this commit:
When you changed over to using nullptr, you changed
if (state && platformOpenGLView == 0)
{
createPlatformOpenGLView ();
}
to
if (state && platformOpenGLView)
{
createPlatformOpenGLView ();
}
which seems wrong to me, shouldn’t it be
if (state && (platformOpenGLView==nullptr))
?
My second question is a conundrum with using setVisible() as I have the following scenario: There are a couple of views, one of them containing a COpenGLView. When the viewcontainer is initialized, the platformOpenGLView is created, it is then subsequently destroyed by setVisible(false). So far so good, but when I remove the view and later do another addView(), the platformOpenGlView is again created, but in the next call to setVisible(), the value I get from isVisible() is false, so that I skip over destroyPlatformOpenGLView(), which means that my view is visible where I don’t want it.
Am I doing something fundamentally wrong here? And what is the reason behind if (state&&platformOpenGLView) instead of if(state&&(platformOpenGLView==nullptr))?
Best regards,
Andreas