mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0025213: Visualization, TKOpenGl - do not use deprecated built-ins in GLSL shaders
Inherit NCollection_Buffer from Standard_Transient, do not use incomplete NCollection_Handle. OpenGl_Context, add methods ActiveProgram(),BindProgram() to manage currently active GLSL program. Add method ::ToUseVbo(). OpenGl_ShaderProgram, setup locations of pre-defined vertex attributes occVertex, occNormal, occTexCoord, occColor before linkage. Remove methods OpenGl_ShaderProgram::Bind(), ::BindWithVariables() and ::Unbind() - OpenGl_Context::BindProgram() should be used instead. Introduce class OpenGl_VertexBufferCompat, which emulates VBO behavior on systems without VBO (compatibility with broken OpenGL drivers on Windows). OpenGl_PrimitiveArray - use OpenGl_VertexBufferCompat when VBO is unavailable, remove duplicated code. Use OpenGl_VertexBuffer::HasNormalAttribute() method to activate lighting. OpenGl_Text - use OpenGl_VertexBufferCompat, eliminate duplicated code. Changes in OpenGl_VertexBuffer, drop methods BindFixed()/UnbindFixed(). Superseded by new methods BindAllAttributes()/UnbindAllAttributes() which handle active GLSL program, when it is set.
This commit is contained in:
@@ -21,6 +21,9 @@
|
||||
IMPLEMENT_STANDARD_HANDLE (Image_PixMap, Standard_Transient)
|
||||
IMPLEMENT_STANDARD_RTTIEXT(Image_PixMap, Standard_Transient)
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (Image_PixMapData, NCollection_Buffer)
|
||||
IMPLEMENT_STANDARD_RTTIEXT(Image_PixMapData, NCollection_Buffer)
|
||||
|
||||
// =======================================================================
|
||||
// function : Image_PixMap
|
||||
// purpose :
|
||||
|
@@ -124,8 +124,13 @@ public:
|
||||
Standard_Size SizeRowBytes; //!< number of bytes per line (in most cases equal to 3 * sizeX)
|
||||
Standard_Size TopToDown; //!< image scanlines direction in memory from Top to the Down
|
||||
|
||||
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_RTTI(Image_PixMapData) // Type definition
|
||||
|
||||
};
|
||||
|
||||
typedef NCollection_Handle<Image_PixMapData> Handle(Image_PixMapData);
|
||||
DEFINE_STANDARD_HANDLE(Image_PixMapData, NCollection_Buffer)
|
||||
|
||||
#endif // _Image_PixMapData_H__
|
||||
|
Reference in New Issue
Block a user