0023544: Texture management in TKOpenGl should be redesigned
authorkgv <kgv@opencascade.com>
Fri, 7 Dec 2012 09:58:30 +0000 (13:58 +0400)
committerkgv <kgv@opencascade.com>
Fri, 7 Dec 2012 09:58:30 +0000 (13:58 +0400)
commitbf75be98674edf9cd074ce92ed73675e79283762
treef3cfc0efc7a3ede55972dd2221f2804f0e9c9c87
parentab8fcacf2854849ee89b30a3d376eea6362c36f8
0023544: Texture management in TKOpenGl should be redesigned

Structures Graphic3d_CView, Graphic3d_CStructure, Graphic3d_CGroup become classes and their definitions moved from InterfaceGraphic to Graphic3d.
Introduced new class OpenGl_Texture as replacement for OpenGl_ResourceTexture class and static functions in OpenGl_TextureBox.
Graphic3d_TextureRoot now no more communicate within Graphic3d_GraphicalDriver.
Instead class returns image through GetImage() method.
OpenGl_AspectFace - avoid possible NULL-dereference
OpenGl_Texture::Init() - check gluBuild2DMipmaps() return value
OpenGl_Texture - check GL_BGRA_EXT for compatibility
OpenGl_Texture - scale NPOT image when required
Added more description to Graphic3d_TextureRoot class
OpenGl_Texture - added missing break statement for ImgBGR32 case
OpenGl_Workspace::setTextureParams() - fixed local variable aFilterMin overrides visibility of early declared variable
OpenGl_Workspace::DisableTexture() - reset texture matrix
FTGL do not reset texture matrix and corrupt text could be rendered if custom texture has not identity texture matrix.
94 files changed:
.gitignore
src/AIS/AIS_TexturedShape.cxx
src/Graphic3d/FILES
src/Graphic3d/Graphic3d.cdl
src/Graphic3d/Graphic3d_CGroup.hxx
src/Graphic3d/Graphic3d_CInitTexture.cxx [deleted file]
src/Graphic3d/Graphic3d_CInitTexture.hxx [deleted file]
src/Graphic3d/Graphic3d_CStructure.hxx
src/Graphic3d/Graphic3d_CTexture.hxx
src/Graphic3d/Graphic3d_CView.hxx
src/Graphic3d/Graphic3d_GraphicDriver.cdl
src/Graphic3d/Graphic3d_Group.cxx
src/Graphic3d/Graphic3d_Group_8.cxx
src/Graphic3d/Graphic3d_Structure.cdl
src/Graphic3d/Graphic3d_Structure.cxx
src/Graphic3d/Graphic3d_Texture1D.cdl
src/Graphic3d/Graphic3d_Texture1D.cxx
src/Graphic3d/Graphic3d_Texture1Dmanual.cdl
src/Graphic3d/Graphic3d_Texture1Dmanual.cxx
src/Graphic3d/Graphic3d_Texture1Dsegment.cdl
src/Graphic3d/Graphic3d_Texture1Dsegment.cxx
src/Graphic3d/Graphic3d_Texture2D.cdl
src/Graphic3d/Graphic3d_Texture2D.cxx
src/Graphic3d/Graphic3d_Texture2Dmanual.cdl
src/Graphic3d/Graphic3d_Texture2Dmanual.cxx
src/Graphic3d/Graphic3d_Texture2Dplane.cdl
src/Graphic3d/Graphic3d_Texture2Dplane.cxx
src/Graphic3d/Graphic3d_TextureEnv.cdl
src/Graphic3d/Graphic3d_TextureEnv.cxx
src/Graphic3d/Graphic3d_TextureMap.cdl
src/Graphic3d/Graphic3d_TextureMap.cxx
src/Graphic3d/Graphic3d_TextureParams.cdl [new file with mode: 0755]
src/Graphic3d/Graphic3d_TextureParams.cxx [new file with mode: 0755]
src/Graphic3d/Graphic3d_TextureRoot.cdl
src/Graphic3d/Graphic3d_TextureRoot.cxx
src/Graphic3d/Graphic3d_Vec2.hxx [new file with mode: 0755]
src/Graphic3d/Graphic3d_Vec3.hxx [new file with mode: 0755]
src/Graphic3d/Graphic3d_Vec4.hxx [new file with mode: 0755]
src/Image/FILES
src/Image/Image_PixMap.hxx
src/Image/Image_PixMap_Handle.hxx [new file with mode: 0644]
src/InterfaceGraphic/InterfaceGraphic_Graphic3d.hxx
src/InterfaceGraphic/InterfaceGraphic_Visual3d.hxx
src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx
src/NCollection/NCollection_Vec2.hxx
src/NCollection/NCollection_Vec3.hxx
src/OpenGl/FILES
src/OpenGl/Handle_OpenGl_Texture.hxx [new file with mode: 0644]
src/OpenGl/OpenGl_AspectFace.cxx
src/OpenGl/OpenGl_AspectFace.hxx
src/OpenGl/OpenGl_AspectLine.cxx
src/OpenGl/OpenGl_AspectLine.hxx
src/OpenGl/OpenGl_AspectMarker.cxx
src/OpenGl/OpenGl_AspectMarker.hxx
src/OpenGl/OpenGl_AspectText.cxx
src/OpenGl/OpenGl_AspectText.hxx
src/OpenGl/OpenGl_Context.cxx
src/OpenGl/OpenGl_Context.hxx
src/OpenGl/OpenGl_Element.hxx
src/OpenGl/OpenGl_GraphicDriver.hxx
src/OpenGl/OpenGl_GraphicDriver_3.cxx
src/OpenGl/OpenGl_GraphicDriver_4.cxx
src/OpenGl/OpenGl_GraphicDriver_7.cxx
src/OpenGl/OpenGl_GraphicDriver_9.cxx
src/OpenGl/OpenGl_Group.cxx
src/OpenGl/OpenGl_Group.hxx
src/OpenGl/OpenGl_Marker.cxx
src/OpenGl/OpenGl_MarkerSet.cxx
src/OpenGl/OpenGl_Polygon.cxx
src/OpenGl/OpenGl_Polyline.cxx
src/OpenGl/OpenGl_PrimitiveArray.cxx
src/OpenGl/OpenGl_PrimitiveArray.hxx
src/OpenGl/OpenGl_ResourceTexture.cxx [deleted file]
src/OpenGl/OpenGl_ResourceTexture.hxx [deleted file]
src/OpenGl/OpenGl_Structure.cxx
src/OpenGl/OpenGl_Structure.hxx
src/OpenGl/OpenGl_Text.cxx
src/OpenGl/OpenGl_Texture.cxx [new file with mode: 0644]
src/OpenGl/OpenGl_Texture.hxx [new file with mode: 0644]
src/OpenGl/OpenGl_TextureBox.cxx [deleted file]
src/OpenGl/OpenGl_TextureBox.hxx [deleted file]
src/OpenGl/OpenGl_Trihedron.cxx
src/OpenGl/OpenGl_View.cxx
src/OpenGl/OpenGl_View.hxx
src/OpenGl/OpenGl_View_2.cxx
src/OpenGl/OpenGl_Workspace.cxx
src/OpenGl/OpenGl_Workspace.hxx
src/OpenGl/OpenGl_Workspace_3.cxx
src/OpenGl/OpenGl_Workspace_5.cxx
src/ViewerTest/ViewerTest.cxx
src/ViewerTest/ViewerTest_OpenGlCommands.cxx
src/Visual3d/Visual3d_TransientManager.cxx
src/Visual3d/Visual3d_View.cxx
src/Visual3d/Visual3d_ViewManager.cxx