occt: master 7d3e64ef

Author Committer Branch Timestamp Parent
kgv bugmaster master 2014-09-17 09:02:32 master 9f33b387
Affected Issues  0025213: Visualization, TKOpenGl - do not use deprecated built-ins in GLSL shaders
Changeset 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.
mod - src/Graphic3d/Graphic3d_ArrayOfPrimitives.cxx Diff File
mod - src/Graphic3d/Graphic3d_BoundBuffer.hxx Diff File
mod - src/Graphic3d/Graphic3d_Buffer.hxx Diff File
mod - src/Graphic3d/Graphic3d_IndexBuffer.hxx Diff File
mod - src/Image/Image_PixMap.cxx Diff File
mod - src/Image/Image_PixMapData.hxx Diff File
mod - src/NCollection/NCollection_AlignedAllocator.cxx Diff File
mod - src/NCollection/NCollection_Buffer.hxx Diff File
mod - src/OpenGl/FILES Diff File
mod - src/OpenGl/OpenGl_Context.cxx Diff File
mod - src/OpenGl/OpenGl_Context.hxx Diff File
mod - src/OpenGl/OpenGl_PrimitiveArray.cxx Diff File
mod - src/OpenGl/OpenGl_PrimitiveArray.hxx Diff File
mod - src/OpenGl/OpenGl_ShaderManager.cxx Diff File
mod - src/OpenGl/OpenGl_ShaderManager.hxx Diff File
mod - src/OpenGl/OpenGl_ShaderProgram.cxx Diff File
mod - src/OpenGl/OpenGl_ShaderProgram.hxx Diff File
mod - src/OpenGl/OpenGl_Text.cxx Diff File
mod - src/OpenGl/OpenGl_Text.hxx Diff File
mod - src/OpenGl/OpenGl_TextFormatter.cxx Diff File
mod - src/OpenGl/OpenGl_TextFormatter.hxx Diff File
mod - src/OpenGl/OpenGl_VertexBuffer.cxx Diff File
mod - src/OpenGl/OpenGl_VertexBuffer.hxx Diff File
add - src/OpenGl/OpenGl_VertexBuffer.lxx Diff File
add - src/OpenGl/OpenGl_VertexBufferCompat.cxx Diff File
add - src/OpenGl/OpenGl_VertexBufferCompat.hxx Diff File
mod - src/OpenGl/OpenGl_View_2.cxx Diff File
mod - src/OpenGl/OpenGl_Workspace_Raytrace.cxx Diff File
mod - src/Shaders/Declarations.glsl Diff File
mod - src/Shaders/RaytraceBase.vs Diff File