mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
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.
This commit is contained in:
@@ -332,7 +332,7 @@ public:
|
||||
const Handle(OpenGl_Window) GlWindow() const { return myWindow; }
|
||||
|
||||
//! Returns OpenGL environment map.
|
||||
const Handle(OpenGl_Texture)& GlTextureEnv() const { return myTextureEnv; }
|
||||
const Handle(OpenGl_TextureSet)& GlTextureEnv() const { return myTextureEnv; }
|
||||
|
||||
//! Returns selector for BVH tree, providing a possibility to store information
|
||||
//! about current view volume and to detect which objects are overlapping it.
|
||||
@@ -503,7 +503,7 @@ protected:
|
||||
|
||||
OpenGl_GraduatedTrihedron myGraduatedTrihedron;
|
||||
|
||||
Handle(OpenGl_Texture) myTextureEnv;
|
||||
Handle(OpenGl_TextureSet) myTextureEnv;
|
||||
|
||||
//! Framebuffers for OpenGL output.
|
||||
Handle(OpenGl_FrameBuffer) myOpenGlFBO;
|
||||
@@ -614,30 +614,6 @@ protected: //! @name data types related to ray-tracing
|
||||
OpenGl_RT_NbVariables // special field
|
||||
};
|
||||
|
||||
//! Defines OpenGL texture samplers.
|
||||
enum ShaderSamplerNames
|
||||
{
|
||||
OpenGl_RT_EnvironmentMapTexture = 0,
|
||||
|
||||
OpenGl_RT_SceneNodeInfoTexture = 1,
|
||||
OpenGl_RT_SceneMinPointTexture = 2,
|
||||
OpenGl_RT_SceneMaxPointTexture = 3,
|
||||
OpenGl_RT_SceneTransformTexture = 4,
|
||||
|
||||
OpenGl_RT_GeometryVertexTexture = 5,
|
||||
OpenGl_RT_GeometryNormalTexture = 6,
|
||||
OpenGl_RT_GeometryTexCrdTexture = 7,
|
||||
OpenGl_RT_GeometryTriangTexture = 8,
|
||||
|
||||
OpenGl_RT_RaytraceMaterialTexture = 9,
|
||||
OpenGl_RT_RaytraceLightSrcTexture = 10,
|
||||
|
||||
OpenGl_RT_FsaaInputTexture = 11,
|
||||
OpenGl_RT_PrevAccumTexture = 12,
|
||||
|
||||
OpenGl_RT_RaytraceDepthTexture = 13
|
||||
};
|
||||
|
||||
//! Defines OpenGL image samplers.
|
||||
enum ShaderImageNames
|
||||
{
|
||||
|
Reference in New Issue
Block a user