1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0032206: Visualization, TKOpenGl - move out OpenGL ES support to dedicated library TKOpenGles

Added TKOpenGles and TKOpenGlesTest toolkits built with HAVE_GLES2 macros.
Added CSF_OpenGlesLibs as alternative to CSF_OpenGlLibs.
This commit is contained in:
kgv
2021-03-17 21:03:04 +03:00
committed by bugmaster
parent e22a91ccc9
commit b8ef513c8f
40 changed files with 233 additions and 95 deletions

View File

@@ -1688,7 +1688,12 @@ TCollection_AsciiString ViewerTest::ViewerInit (const Standard_Integer thePxLeft
aFactory = Graphic3d_GraphicDriverFactory::DefaultDriverFactory();
if (aFactory.IsNull())
{
throw Standard_ProgramError("Error: no graphic driver factory found");
Draw::GetInterpretor().Eval ("pload GLES");
aFactory = Graphic3d_GraphicDriverFactory::DefaultDriverFactory();
if (aFactory.IsNull())
{
throw Standard_ProgramError("Error: no graphic driver factory found");
}
}
}
@@ -2020,6 +2025,12 @@ static int VDriver (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const c
{
aNewActive = "tkopengl";
}
else if (TCollection_AsciiString::IsSameString (aNewActive, "gles", false)
|| TCollection_AsciiString::IsSameString (aNewActive, "opengles", false)
|| TCollection_AsciiString::IsSameString (aNewActive, "tkopengles", false))
{
aNewActive = "tkopengles";
}
else if (TCollection_AsciiString::IsSameString (aNewActive, "d3d", false)
|| TCollection_AsciiString::IsSameString (aNewActive, "d3dhost", false)
|| TCollection_AsciiString::IsSameString (aNewActive, "tkd3dhost", false))
@@ -2033,6 +2044,10 @@ static int VDriver (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const c
{
Draw::GetInterpretor().Eval ("pload OPENGL");
}
else if (aNewActive == "tkopengles")
{
Draw::GetInterpretor().Eval ("pload GLES");
}
else if (aNewActive == "tkd3dhost")
{
Draw::GetInterpretor().Eval ("pload D3DHOST");