1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-29 14:00:49 +03:00

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.
This commit is contained in:
kgv
2012-12-07 13:58:30 +04:00
parent ab8fcacf28
commit bf75be9867
92 changed files with 3647 additions and 3857 deletions

View File

@@ -16,25 +16,51 @@
// purpose or non-infringement. Please see the License for the specific terms
// and conditions governing the rights and limitations under the License.
/*============================================================================*/
/*==== Titre: Graphic3d_CStructure.hxx */
/*==== Role : The header file of primitive type "CStructure" from Graphic3d */
/*==== */
/*==== Implementation: This is a primitive type implemented with typedef */
/*============================================================================*/
#ifndef _Graphic3d_CStructure_HeaderFile
#define _Graphic3d_CStructure_HeaderFile
#include <InterfaceGraphic_Graphic3d.hxx>
typedef CALL_DEF_STRUCTURE Graphic3d_CStructure;
#include <Graphic3d_CGroup.hxx>
#if defined(__cplusplus) || defined(c_plusplus)
/*==== Definition de Type ====================================================*/
class Graphic3d_CStructure
{
#include <Standard_Type.hxx>
const Handle(Standard_Type)& TYPE(Graphic3d_CStructure) ;
/*============================================================================*/
public:
#endif
#endif /*Graphic3d_CStructure_HeaderFile*/
int Id;
void* ptrStructure;
int Priority;
int PreviousPriority;
int GroupBegin;
int GroupEnd;
CALL_DEF_CONTEXTLINE ContextLine;
CALL_DEF_CONTEXTFILLAREA ContextFillArea;
CALL_DEF_CONTEXTMARKER ContextMarker;
CALL_DEF_CONTEXTTEXT ContextText;
CALL_DEF_BOUNDBOX BoundBox;
float Transformation[4][4];
int Composition;
int ContainsFacet;
unsigned IsDeleted : 1;
unsigned IsOpen : 1;
unsigned IsInfinite : 1;
unsigned stick : 1;
unsigned highlight : 1;
unsigned visible : 1;
unsigned pick : 1;
unsigned HLRValidation : 1;
CALL_DEF_TRANSFORM_PERSISTENCE TransformPersistence;
};
///typedef Graphic3d_CStructure CALL_DEF_STRUCTURE;
const Handle(Standard_Type)& TYPE(Graphic3d_CStructure);
#endif // Graphic3d_CStructure_HeaderFile