mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0030571: Visualization, TKOpenGl - mapped texture is ignored while drawing points
OpenGl_AspectsTextureSet now appends Sprite texture to the end of texture set. OpenGl_Context::init() - fixed usage of GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS on too old GL context. Default sampler names occSampler0, occActiveSampler and occSamplerBaseColor are now excluded from header with common declarations for build-in GLSL programs. OpenGl_ShaderObject::LoadAndCompile() and OpenGl_ShaderProgram::Link() now includes program Id within error log. OpenGl_ShaderManager now supports mapping texture onto point primitive within built-in programs (texture transformation is ignored).
This commit is contained in:
@@ -139,9 +139,11 @@ vec4 occBackMaterial_Specular(void); //!< Specular reflection
|
||||
float occBackMaterial_Shininess(void); //!< Specular exponent
|
||||
float occBackMaterial_Transparency(void); //!< Transparency coefficient
|
||||
|
||||
#ifdef THE_HAS_DEFAULT_SAMPLER
|
||||
#define occActiveSampler occSampler0 //!< alias for backward compatibility
|
||||
#define occSamplerBaseColor occSampler0 //!< alias to a base color texture
|
||||
uniform sampler2D occSampler0; //!< current active sampler;
|
||||
#endif
|
||||
//! occSampler1, occSampler2,... should be defined in GLSL program body for multitexturing
|
||||
uniform vec4 occColor; //!< color value (in case of disabled lighting)
|
||||
uniform THE_PREC_ENUM int occDistinguishingMode; //!< Are front and back faces distinguished?
|
||||
|
@@ -142,9 +142,11 @@ static const char Shaders_Declarations_glsl[] =
|
||||
"float occBackMaterial_Shininess(void); //!< Specular exponent\n"
|
||||
"float occBackMaterial_Transparency(void); //!< Transparency coefficient\n"
|
||||
"\n"
|
||||
"#ifdef THE_HAS_DEFAULT_SAMPLER\n"
|
||||
"#define occActiveSampler occSampler0 //!< alias for backward compatibility\n"
|
||||
"#define occSamplerBaseColor occSampler0 //!< alias to a base color texture\n"
|
||||
"uniform sampler2D occSampler0; //!< current active sampler;\n"
|
||||
"#endif\n"
|
||||
" //! occSampler1, occSampler2,... should be defined in GLSL program body for multitexturing\n"
|
||||
"uniform vec4 occColor; //!< color value (in case of disabled lighting)\n"
|
||||
"uniform THE_PREC_ENUM int occDistinguishingMode; //!< Are front and back faces distinguished?\n"
|
||||
|
Reference in New Issue
Block a user