1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00

0025047: Visualization - public methods of OpenGl_AspectFace, OpenGl_AspectLine and OpenGl_AspectMarker classes are not exported

This commit is contained in:
kgv 2014-07-03 11:09:48 +04:00 committed by apn
parent 069eca4f44
commit 595a42a43f
5 changed files with 46 additions and 40 deletions

View File

@ -55,11 +55,11 @@ class OpenGl_AspectFace : public OpenGl_Element
public: public:
OpenGl_AspectFace(); Standard_EXPORT OpenGl_AspectFace();
//! Copy parameters //! Copy parameters
void SetAspect (const CALL_DEF_CONTEXTFILLAREA& theAspect); Standard_EXPORT void SetAspect (const CALL_DEF_CONTEXTFILLAREA& theAspect);
void SetAspect (const Handle(Graphic3d_AspectFillArea3d)& theAspect); Standard_EXPORT void SetAspect (const Handle(Graphic3d_AspectFillArea3d)& theAspect);
//! Set edge aspect. //! Set edge aspect.
void SetAspectEdge (const OpenGl_AspectLine* theAspectEdge) void SetAspectEdge (const OpenGl_AspectLine* theAspectEdge)
@ -211,13 +211,13 @@ public:
return myResources.ShaderProgram; return myResources.ShaderProgram;
} }
virtual void Render (const Handle(OpenGl_Workspace)& theWorkspace) const; Standard_EXPORT virtual void Render (const Handle(OpenGl_Workspace)& theWorkspace) const;
virtual void Release (const Handle(OpenGl_Context)& theContext); Standard_EXPORT virtual void Release (const Handle(OpenGl_Context)& theContext);
protected: protected:
void convertMaterial (const CALL_DEF_MATERIAL& theMat, Standard_EXPORT void convertMaterial (const CALL_DEF_MATERIAL& theMat,
OPENGL_SURF_PROP& theSurf); OPENGL_SURF_PROP& theSurf);
protected: //! @name ordinary aspect properties protected: //! @name ordinary aspect properties
@ -250,11 +250,13 @@ protected:
void ResetTextureReadiness() { myIsTextureReady = Standard_False; } void ResetTextureReadiness() { myIsTextureReady = Standard_False; }
void ResetShaderReadiness () { myIsShaderReady = Standard_False; } void ResetShaderReadiness () { myIsShaderReady = Standard_False; }
void BuildTexture (const Handle(OpenGl_Workspace)& theWS, const Handle(Graphic3d_TextureMap)& theTexture); Standard_EXPORT void BuildTexture (const Handle(OpenGl_Workspace)& theWS,
void BuildShader (const Handle(OpenGl_Workspace)& theWS, const Handle(Graphic3d_ShaderProgram)& theShader); const Handle(Graphic3d_TextureMap)& theTexture);
Standard_EXPORT void BuildShader (const Handle(OpenGl_Workspace)& theWS,
const Handle(Graphic3d_ShaderProgram)& theShader);
Handle(OpenGl_Texture) Texture; Handle(OpenGl_Texture) Texture;
TCollection_AsciiString TextureId; TCollection_AsciiString TextureId;
Handle(OpenGl_ShaderProgram) ShaderProgram; Handle(OpenGl_ShaderProgram) ShaderProgram;
TCollection_AsciiString ShaderProgramId; TCollection_AsciiString ShaderProgramId;

View File

@ -28,12 +28,13 @@
class OpenGl_AspectLine : public OpenGl_Element class OpenGl_AspectLine : public OpenGl_Element
{ {
public: public:
OpenGl_AspectLine (); Standard_EXPORT OpenGl_AspectLine();
OpenGl_AspectLine (const OpenGl_AspectLine &AnOther);
void SetAspect (const CALL_DEF_CONTEXTLINE &theAspect); Standard_EXPORT OpenGl_AspectLine (const OpenGl_AspectLine &AnOther);
Standard_EXPORT void SetAspect (const CALL_DEF_CONTEXTLINE& theAspect);
const TEL_COLOUR & Color() const { return myColor; } const TEL_COLOUR & Color() const { return myColor; }
Aspect_TypeOfLine Type() const { return myType; } Aspect_TypeOfLine Type() const { return myType; }
@ -52,8 +53,8 @@ class OpenGl_AspectLine : public OpenGl_Element
return myResources.ShaderProgram; return myResources.ShaderProgram;
} }
virtual void Render (const Handle(OpenGl_Workspace)& theWorkspace) const; Standard_EXPORT virtual void Render (const Handle(OpenGl_Workspace)& theWorkspace) const;
virtual void Release (const Handle(OpenGl_Context)& theContext); Standard_EXPORT virtual void Release (const Handle(OpenGl_Context)& theContext);
protected: protected:
@ -74,7 +75,7 @@ protected:
void SetShaderReady() { myIsShaderReady = Standard_True; } void SetShaderReady() { myIsShaderReady = Standard_True; }
void ResetShaderReadiness() { myIsShaderReady = Standard_False; } void ResetShaderReadiness() { myIsShaderReady = Standard_False; }
void BuildShader (const Handle(OpenGl_Workspace)& theWS, const Handle(Graphic3d_ShaderProgram)& theShader); Standard_EXPORT void BuildShader (const Handle(OpenGl_Workspace)& theWS, const Handle(Graphic3d_ShaderProgram)& theShader);
Handle(OpenGl_ShaderProgram) ShaderProgram; Handle(OpenGl_ShaderProgram) ShaderProgram;
TCollection_AsciiString ShaderProgramId; TCollection_AsciiString ShaderProgramId;

View File

@ -31,10 +31,10 @@ class OpenGl_AspectMarker : public OpenGl_Element
{ {
public: public:
OpenGl_AspectMarker(); Standard_EXPORT OpenGl_AspectMarker();
//! Copy parameters //! Copy parameters
void SetAspect (const CALL_DEF_CONTEXTMARKER& theAspect); Standard_EXPORT void SetAspect (const CALL_DEF_CONTEXTMARKER& theAspect);
//! @return marker color //! @return marker color
const TEL_COLOUR& Color() const const TEL_COLOUR& Color() const
@ -99,8 +99,8 @@ public:
return myResources.ShaderProgram; return myResources.ShaderProgram;
} }
virtual void Render (const Handle(OpenGl_Workspace)& theWorkspace) const; Standard_EXPORT virtual void Render (const Handle(OpenGl_Workspace)& theWorkspace) const;
virtual void Release (const Handle(OpenGl_Context)& theContext); Standard_EXPORT virtual void Release (const Handle(OpenGl_Context)& theContext);
protected: //! @name ordinary aspect properties protected: //! @name ordinary aspect properties
@ -131,21 +131,22 @@ protected: //! @name OpenGl resources
void ResetSpriteReadiness() { myIsSpriteReady = Standard_False; } void ResetSpriteReadiness() { myIsSpriteReady = Standard_False; }
void ResetShaderReadiness() { myIsShaderReady = Standard_False; } void ResetShaderReadiness() { myIsShaderReady = Standard_False; }
void BuildSprites (const Handle(OpenGl_Workspace)& theWS, Standard_EXPORT void BuildSprites (const Handle(OpenGl_Workspace)& theWS,
const Handle(Graphic3d_MarkerImage)& theMarkerImage, const Handle(Graphic3d_MarkerImage)& theMarkerImage,
const Aspect_TypeOfMarker theType, const Aspect_TypeOfMarker theType,
const Standard_ShortReal theScale, const Standard_ShortReal theScale,
const TEL_COLOUR& theColor, const TEL_COLOUR& theColor,
Standard_ShortReal& theMarkerSize); Standard_ShortReal& theMarkerSize);
void BuildShader (const Handle(OpenGl_Workspace)& theWS, const Handle(Graphic3d_ShaderProgram)& theShader); Standard_EXPORT void BuildShader (const Handle(OpenGl_Workspace)& theWS,
const Handle(Graphic3d_ShaderProgram)& theShader);
void SpriteKeys (const Handle(Graphic3d_MarkerImage)& theMarkerImage, Standard_EXPORT void SpriteKeys (const Handle(Graphic3d_MarkerImage)& theMarkerImage,
const Aspect_TypeOfMarker theType, const Aspect_TypeOfMarker theType,
const Standard_ShortReal theScale, const Standard_ShortReal theScale,
const TEL_COLOUR& theColor, const TEL_COLOUR& theColor,
TCollection_AsciiString& theKey, TCollection_AsciiString& theKey,
TCollection_AsciiString& theKeyA); TCollection_AsciiString& theKeyA);
Handle(OpenGl_PointSprite) Sprite; Handle(OpenGl_PointSprite) Sprite;
TCollection_AsciiString SpriteKey; TCollection_AsciiString SpriteKey;

View File

@ -156,7 +156,8 @@ protected:
void SetShaderReady() { myIsShaderReady = Standard_True; } void SetShaderReady() { myIsShaderReady = Standard_True; }
void ResetShaderReadiness() { myIsShaderReady = Standard_False; } void ResetShaderReadiness() { myIsShaderReady = Standard_False; }
void BuildShader (const Handle(OpenGl_Workspace)& theWS, const Handle(Graphic3d_ShaderProgram)& theShader); Standard_EXPORT void BuildShader (const Handle(OpenGl_Workspace)& theWS,
const Handle(Graphic3d_ShaderProgram)& theShader);
Handle(OpenGl_ShaderProgram) ShaderProgram; Handle(OpenGl_ShaderProgram) ShaderProgram;
TCollection_AsciiString ShaderProgramId; TCollection_AsciiString ShaderProgramId;

View File

@ -568,14 +568,15 @@ void OpenGl_ShaderManager::UpdateMaterialStateTo (const Handle(OpenGl_ShaderProg
{ {
if (myMaterialStates.IsBound (theProgram)) if (myMaterialStates.IsBound (theProgram))
{ {
myMaterialStates.ChangeFind (theProgram).Set (theAspect); OpenGl_MaterialState& aState = myMaterialStates.ChangeFind (theProgram);
aState.Set (theAspect);
aState.Update();
} }
else else
{ {
myMaterialStates.Bind (theProgram, OpenGl_MaterialState (theAspect)); myMaterialStates.Bind (theProgram, OpenGl_MaterialState (theAspect));
myMaterialStates.ChangeFind (theProgram).Update();
} }
myMaterialStates.ChangeFind (theProgram).Update();
} }
// ======================================================================= // =======================================================================