0028912: Visualization, TKOpenGl - multi-texture support
authorkgv <kgv@opencascade.com>
Mon, 10 Jul 2017 12:43:25 +0000 (15:43 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 21 Jul 2017 09:10:41 +0000 (12:10 +0300)
commitcc8cbabe5c8928f16926481145bf9bacffd5bcd6
tree9e4da40e19fe1f147d387007fdadd3dc09d06562
parenta6dee93dfae1be5f36a5ff702bd39cc41b850ad9
0028912: Visualization, TKOpenGl - multi-texture support

Graphic3d_AspectFillArea3d now stores array of textures.
Graphic3d_TextureParams stores texture unit for mapping texture.

OpenGl_Context::BindTextures() - context now manages the set of active textures.
Related code has been removed from OpenGl_Workspace.

OpenGl_Sampler has been extended to hold texture parameters structure.
OpenGl_Texture now holds OpenGl_Sampler instance as class field.
OpenGl_Texture inherits new class OpenGl_NamedResource and holds
texture identifier used for sharing resource in OpenGl_Context.

OpenGl_RaytraceGeometry now creates bindless textures taking
Sampler object directly from OpenGl_Texture.
OpenGl_Context::BindTextures() automatically recreates immutable
Sampler Object on texture parameters change.

Declared new structure OpenGl_ArbSamplerObject for platform-neutral
usage of related functionality.
Related functions are now loaded within OpenGL ES 3.0+.

Declarations.glsl - occActiveSampler has been renamed to occSampler0
with aliases occSamplerBaseColor (main) and occActiveSampler (for compatibility).
Additional texture samplers should be declared explicitly
within specific GLSL program as occSampler1, occSampler2, etc.

AIS_Shape and AIS_ColoredShape now computes Shaded presentation
with UV coordinates if texture mapping is enabled in Drawer.

vshaderprog now accepts Shader source code as parameter.
59 files changed:
src/Graphic3d/FILES
src/Graphic3d/Graphic3d_AspectFillArea3d.cxx
src/Graphic3d/Graphic3d_AspectFillArea3d.hxx
src/Graphic3d/Graphic3d_ClipPlane.cxx
src/Graphic3d/Graphic3d_ClipPlane.hxx
src/Graphic3d/Graphic3d_TextureParams.cxx
src/Graphic3d/Graphic3d_TextureParams.hxx
src/Graphic3d/Graphic3d_TextureRoot.hxx
src/Graphic3d/Graphic3d_TextureSet.cxx [new file with mode: 0644]
src/Graphic3d/Graphic3d_TextureSet.hxx [new file with mode: 0644]
src/Graphic3d/Graphic3d_TextureUnit.hxx [new file with mode: 0644]
src/Graphic3d/Graphic3d_TypeOfLimit.hxx
src/OpenGl/FILES
src/OpenGl/OpenGl_ArbSamplerObject.hxx [new file with mode: 0644]
src/OpenGl/OpenGl_AspectFace.cxx
src/OpenGl/OpenGl_AspectFace.hxx
src/OpenGl/OpenGl_AspectMarker.cxx
src/OpenGl/OpenGl_AspectMarker.hxx
src/OpenGl/OpenGl_BackgroundArray.cxx
src/OpenGl/OpenGl_CappingPlaneResource.cxx
src/OpenGl/OpenGl_Context.cxx
src/OpenGl/OpenGl_Context.hxx
src/OpenGl/OpenGl_Font.cxx
src/OpenGl/OpenGl_GlFunctions.hxx
src/OpenGl/OpenGl_GraphicDriver.cxx
src/OpenGl/OpenGl_Layer.cxx
src/OpenGl/OpenGl_LayerList.cxx
src/OpenGl/OpenGl_NamedResource.hxx [new file with mode: 0644]
src/OpenGl/OpenGl_PointSprite.cxx
src/OpenGl/OpenGl_PointSprite.hxx
src/OpenGl/OpenGl_PrimitiveArray.cxx
src/OpenGl/OpenGl_Resource.cxx
src/OpenGl/OpenGl_Sampler.cxx
src/OpenGl/OpenGl_Sampler.hxx
src/OpenGl/OpenGl_SceneGeometry.cxx
src/OpenGl/OpenGl_SceneGeometry.hxx
src/OpenGl/OpenGl_ShaderManager.cxx
src/OpenGl/OpenGl_ShaderManager.hxx
src/OpenGl/OpenGl_ShaderProgram.cxx
src/OpenGl/OpenGl_ShaderProgram.hxx
src/OpenGl/OpenGl_Structure.cxx
src/OpenGl/OpenGl_Text.cxx
src/OpenGl/OpenGl_Texture.cxx
src/OpenGl/OpenGl_Texture.hxx
src/OpenGl/OpenGl_TextureBufferArb.cxx
src/OpenGl/OpenGl_TextureBufferArb.hxx
src/OpenGl/OpenGl_TextureSet.cxx [new file with mode: 0644]
src/OpenGl/OpenGl_TextureSet.hxx [new file with mode: 0644]
src/OpenGl/OpenGl_View.cxx
src/OpenGl/OpenGl_View.hxx
src/OpenGl/OpenGl_View_Raytrace.cxx
src/OpenGl/OpenGl_View_Redraw.cxx
src/OpenGl/OpenGl_Workspace.cxx
src/OpenGl/OpenGl_Workspace.hxx
src/Shaders/Declarations.glsl
src/Shaders/Shaders_Declarations_glsl.pxx
src/ViewerTest/ViewerTest.cxx
src/ViewerTest/ViewerTest_OpenGlCommands.cxx
tests/v3d/glsl/texture_multi1 [new file with mode: 0644]