mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0027811: Configuration - allow building TKOpenGl with OpenGL ES on Windows
OpenGl_ShaderManager::prepareStdProgramFboBlit() now tries using extension GL_EXT_frag_depth within OpenGL ES 2.0 when OpenGL ES 3.0 is not available. OpenGl_View::blitBuffers() now disables Depth test when copying depth values is not supported by OpenGL ES 2.0 hardware. Fixed building for UWP with SDK 10.0.10240.0 Fixed building TKService, TKV3d and TKOpenGl for UWP. OSD_Environment now defines global environment map for emulating desktop behavior on UWP.
This commit is contained in:
@@ -165,6 +165,7 @@ void VUserDrawObj::Render(const Handle(OpenGl_Workspace)& theWorkspace) const
|
||||
aTA->Aspect()->Font();
|
||||
OpenGl_Vec4 aColor = theWorkspace->LineColor();
|
||||
|
||||
#if !defined(GL_ES_VERSION_2_0)
|
||||
// Finally draw something to make sure UserDraw really works
|
||||
glPushAttrib(GL_ENABLE_BIT);
|
||||
glDisable(GL_LIGHTING);
|
||||
@@ -176,6 +177,7 @@ void VUserDrawObj::Render(const Handle(OpenGl_Workspace)& theWorkspace) const
|
||||
glVertex3f(myCoords[0], myCoords[1], myCoords[5]);
|
||||
glEnd();
|
||||
glPopAttrib();
|
||||
#endif
|
||||
}
|
||||
|
||||
} // end of anonymous namespace
|
||||
@@ -222,6 +224,7 @@ static int VFeedback (Draw_Interpretor& theDI,
|
||||
Standard_Integer /*theArgNb*/,
|
||||
const char** /*theArgVec*/)
|
||||
{
|
||||
#if !defined(GL_ES_VERSION_2_0)
|
||||
// get the active view
|
||||
Handle(V3d_View) aView = ViewerTest::CurrentView();
|
||||
if (aView.IsNull())
|
||||
@@ -363,6 +366,11 @@ static int VFeedback (Draw_Interpretor& theDI,
|
||||
<< "Buffer size GL_3D_COLOR: " << aLen3D_rgba * double(sizeof(GLfloat)) / double(1024 * 1024) << " MiB\n";
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
(void )theDI;
|
||||
std::cout << "Command is unsupported on current platform.\n";
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
Reference in New Issue
Block a user