View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023544 | Open CASCADE | OCCT:Visualization | public | 2012-11-12 13:08 | 2017-05-12 11:14 |
Reporter | kgv | Assigned To | kgv | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | A | OS | L | ||
Product Version | 6.5.4 | ||||
Target Version | 6.6.0 | Fixed in Version | 6.6.0 | ||
Summary | 0023544: Texture management in TKOpenGl should be redesigned | ||||
Description | There are several issues in current implementation of texture management which should be fixed: - Move OpenGl_TextureBox implementation to the class inherited from OpenGl_Resource. Drop OpenGl_ResourceTexture. - Eliminate global variables and arrays. Textures should be shared between GL contexts within the single OpenGl_GraphicDriver instance. - Perform correct destruction of GL resources when last view destroyed in OpenGl_GraphicDriver. | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
related to | 0023500 | closed | Open CASCADE | MFC texture example is crashed when view closed | |
parent of | 0023630 | closed | kgv | Open CASCADE | Incorrect NULL check in OpenGl_Workspace::EnableTexture() |
parent of | 0023632 | closed | kgv | Open CASCADE | Add support for NPOT mipmap textures in TKOpenGl |
parent of | 0028734 | closed | bugmaster | Open CASCADE | Visualization, OpenGl_Texture - fix initialization of 1D texture |
related to | 0023118 | closed | bugmaster | Open CASCADE | Incomplete face aspect data returned by Graphic3d_Group::GroupPrimitivesAspect() |
related to | 0023813 | closed | bugmaster | Open CASCADE | TKOpenGl, OpenGl_Texture ignores stride image property |
child of | 0023028 | closed | bugmaster | Open CASCADE | Visualization, TKOpenGl - eliminate global static variables |
|
Patch is ready for review in branch CR23544. |
|
Branch CR23544 reviewed with the following remarks: src/OpenGl/OpenGl_Workspace_5.cxx, OpenGl_Workspace::AspectFace (): switch (anIntstyle) { ... case 5: //szvgl - no corresponding enumeration item Aspect_IS_POINT Is it possible to consider adding Aspect_IS_POINT? src/OpenGl/OpenGl_AspectFace.cxx, OpenGl_AspectFace::Init(): Here and in Release(), the texture keys (aNewKey, myTextureId) are checked if they are empty strings, but the meaning of such a special texture key does not seem to be explained anywhere. So at least a comment is needed explaining this. src/OpenGl/OpenGl_AspectFace.cxx, OpenGl_AspectFace::Release(): TextureRes is not nullified if myTextureId.IsEmpty() returns true, though the comment says it should be. Also check similar block in Init(). |
|
Dear san, > case 5: //szvgl - no corresponding enumeration item Aspect_IS_POINT I suggest to do not try fix enumerations mess in AIS / Graphic3d / OpenGl packages unrelated to texture objects within this patch. > src/OpenGl/OpenGl_AspectFace.cxx, OpenGl_AspectFace::Release(): > TextureRes is not nullified if myTextureId.IsEmpty() returns true, > though the comment says it should be. Also check similar block in Init(). Please look deeply in code - TextureRes is always nullify within following code block. > src/OpenGl/OpenGl_AspectFace.cxx, OpenGl_AspectFace::Init(): > Here and in Release(), the texture keys (aNewKey, myTextureId) > are checked if they are empty strings, but the meaning of such a special > texture key does not seem to be explained anywhere. > So at least a comment is needed explaining this. I extended documentation of Graphic3d_TextureRoot class although empty key conception has dubious usefulness... |
|
Branch CR23544 reviewed without remarks, ready for testing. |
|
Dear BugMaster, Branch CR23544 (and products from GIT master) was compiled on Linux and Windows platforms and tested. Regressions: Not detected Improvements: Not detected Testing cases: Not needed |
|
SSP sample was updated in products branch CR23544 (please don't forget to integrate). |
|
Fix of SSP sample has been integrated into occt-products repository |
occt: master bf75be98 2012-12-07 09:58:30 Details Diff |
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. |
Affected Issues 0023544 |
|
mod - .gitignore | Diff File | ||
mod - src/AIS/AIS_TexturedShape.cxx | Diff File | ||
mod - src/Graphic3d/FILES | Diff File | ||
mod - src/Graphic3d/Graphic3d.cdl | Diff File | ||
mod - src/Graphic3d/Graphic3d_CGroup.hxx | Diff File | ||
rm - src/Graphic3d/Graphic3d_CInitTexture.hxx | Diff File | ||
mod - src/Graphic3d/Graphic3d_CStructure.hxx | Diff File | ||
mod - src/Graphic3d/Graphic3d_CTexture.hxx | Diff File | ||
mod - src/Graphic3d/Graphic3d_CView.hxx | Diff File | ||
mod - src/Graphic3d/Graphic3d_GraphicDriver.cdl | Diff File | ||
mod - src/Graphic3d/Graphic3d_Group.cxx | Diff File | ||
mod - src/Graphic3d/Graphic3d_Group_8.cxx | Diff File | ||
mod - src/Graphic3d/Graphic3d_Structure.cdl | Diff File | ||
mod - src/Graphic3d/Graphic3d_Structure.cxx | Diff File | ||
mod - src/Graphic3d/Graphic3d_Texture1D.cdl | Diff File | ||
mod - src/Graphic3d/Graphic3d_Texture1D.cxx | Diff File | ||
mod - src/Graphic3d/Graphic3d_Texture1Dmanual.cdl | Diff File | ||
mod - src/Graphic3d/Graphic3d_Texture1Dmanual.cxx | Diff File | ||
mod - src/Graphic3d/Graphic3d_Texture1Dsegment.cdl | Diff File | ||
mod - src/Graphic3d/Graphic3d_Texture1Dsegment.cxx | Diff File | ||
mod - src/Graphic3d/Graphic3d_Texture2D.cdl | Diff File | ||
mod - src/Graphic3d/Graphic3d_Texture2D.cxx | Diff File | ||
mod - src/Graphic3d/Graphic3d_Texture2Dmanual.cdl | Diff File | ||
mod - src/Graphic3d/Graphic3d_Texture2Dmanual.cxx | Diff File | ||
mod - src/Graphic3d/Graphic3d_Texture2Dplane.cdl | Diff File | ||
mod - src/Graphic3d/Graphic3d_Texture2Dplane.cxx | Diff File | ||
mod - src/Graphic3d/Graphic3d_TextureEnv.cdl | Diff File | ||
mod - src/Graphic3d/Graphic3d_TextureEnv.cxx | Diff File | ||
mod - src/Graphic3d/Graphic3d_TextureMap.cdl | Diff File | ||
mod - src/Graphic3d/Graphic3d_TextureMap.cxx | Diff File | ||
add - src/Graphic3d/Graphic3d_TextureParams.cdl | Diff File | ||
add - src/Graphic3d/Graphic3d_TextureParams.cxx | Diff File | ||
mod - src/Graphic3d/Graphic3d_TextureRoot.cdl | Diff File | ||
mod - src/Graphic3d/Graphic3d_TextureRoot.cxx | Diff File | ||
mod - src/Image/FILES | Diff File | ||
mod - src/Image/Image_PixMap.hxx | Diff File | ||
mod - src/InterfaceGraphic/InterfaceGraphic_Graphic3d.hxx | Diff File | ||
mod - src/InterfaceGraphic/InterfaceGraphic_Visual3d.hxx | Diff File | ||
mod - src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx | Diff File | ||
mod - src/NCollection/NCollection_Vec2.hxx | Diff File | ||
mod - src/NCollection/NCollection_Vec3.hxx | Diff File | ||
mod - src/OpenGl/FILES | Diff File | ||
mod - src/OpenGl/OpenGl_AspectFace.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_AspectFace.hxx | Diff File | ||
mod - src/OpenGl/OpenGl_AspectLine.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_AspectLine.hxx | Diff File | ||
mod - src/OpenGl/OpenGl_AspectMarker.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_AspectMarker.hxx | Diff File | ||
mod - src/OpenGl/OpenGl_AspectText.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_AspectText.hxx | Diff File | ||
mod - src/OpenGl/OpenGl_Context.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_Context.hxx | Diff File | ||
mod - src/OpenGl/OpenGl_Element.hxx | Diff File | ||
mod - src/OpenGl/OpenGl_GraphicDriver.hxx | Diff File | ||
mod - src/OpenGl/OpenGl_GraphicDriver_3.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_GraphicDriver_4.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_GraphicDriver_7.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_GraphicDriver_9.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_Group.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_Group.hxx | Diff File | ||
mod - src/OpenGl/OpenGl_Marker.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_MarkerSet.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_Polygon.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_Polyline.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_PrimitiveArray.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_PrimitiveArray.hxx | Diff File | ||
rm - src/OpenGl/OpenGl_ResourceTexture.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_Structure.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_Structure.hxx | Diff File | ||
mod - src/OpenGl/OpenGl_Text.cxx | Diff File | ||
add - src/OpenGl/OpenGl_Texture.cxx | Diff File | ||
add - src/OpenGl/OpenGl_Texture.hxx | Diff File | ||
rm - src/OpenGl/OpenGl_TextureBox.cxx | Diff File | ||
rm - src/OpenGl/OpenGl_TextureBox.hxx | Diff File | ||
mod - src/OpenGl/OpenGl_Trihedron.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_View.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_View.hxx | Diff File | ||
mod - src/OpenGl/OpenGl_View_2.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_Workspace.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_Workspace.hxx | Diff File | ||
mod - src/OpenGl/OpenGl_Workspace_3.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_Workspace_5.cxx | Diff File | ||
mod - src/ViewerTest/ViewerTest.cxx | Diff File | ||
mod - src/ViewerTest/ViewerTest_OpenGlCommands.cxx | Diff File | ||
mod - src/Visual3d/Visual3d_TransientManager.cxx | Diff File | ||
mod - src/Visual3d/Visual3d_View.cxx | Diff File | ||
mod - src/Visual3d/Visual3d_ViewManager.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-11-12 13:08 | kgv | New Issue | |
2012-11-12 13:08 | kgv | Assigned To | => kgv |
2012-11-12 13:08 | kgv | Relationship added | child of 0023028 |
2012-11-12 13:09 | kgv | Relationship added | related to 0023500 |
2012-12-02 17:10 | kgv | Note Added: 0022497 | |
2012-12-02 17:10 | kgv | Assigned To | kgv => san |
2012-12-02 17:10 | kgv | Status | new => resolved |
2012-12-02 17:12 | kgv | Relationship added | related to 0023118 |
2012-12-04 21:06 |
|
Note Added: 0022553 | |
2012-12-04 21:06 |
|
Assigned To | san => kgv |
2012-12-04 21:06 |
|
Status | resolved => assigned |
2012-12-04 23:11 | kgv | Note Added: 0022554 | |
2012-12-04 23:11 | kgv | Assigned To | kgv => san |
2012-12-04 23:11 | kgv | Status | assigned => resolved |
2012-12-05 11:07 |
|
Note Added: 0022560 | |
2012-12-05 11:07 |
|
Assigned To | san => bugmaster |
2012-12-05 11:07 |
|
Status | resolved => reviewed |
2012-12-05 18:19 |
|
Assigned To | bugmaster => mkv |
2012-12-06 12:15 |
|
Note Added: 0022584 | |
2012-12-06 12:16 |
|
Test case number | => Not needed |
2012-12-06 12:16 |
|
Assigned To | mkv => bugmaster |
2012-12-06 12:16 |
|
Status | reviewed => tested |
2012-12-07 09:20 | kgv | Note Added: 0022603 | |
2012-12-10 17:16 | kgv | Changeset attached | => occt master bf75be98 |
2012-12-10 17:16 | kgv | Assigned To | bugmaster => kgv |
2012-12-10 17:16 | kgv | Status | tested => verified |
2012-12-10 17:16 | kgv | Resolution | open => fixed |
2012-12-11 10:04 | bugmaster | Note Added: 0022644 | |
2012-12-11 18:00 | kgv | Relationship added | parent of 0023630 |
2012-12-12 16:03 | kgv | Relationship added | parent of 0023632 |
2013-03-05 09:22 | kgv | Relationship added | related to 0023813 |
2013-04-23 13:35 |
|
Status | verified => closed |
2013-04-29 15:23 |
|
Fixed in Version | => 6.6.0 |
2017-05-12 11:14 | kgv | Relationship added | parent of 0028734 |