1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-07-10 12:25:50 +03:00

0023715: Generated cmake files should link against Cocoa on Mac OS X

Replace inclusion of GL/glu.h header with OpenGl_GlCore11.hxx wrapper
GL/glu.h doesn't exists on Mac OS X without XQuartz 3rd-party library
This commit is contained in:
kgv 2013-01-22 11:42:43 +04:00
parent dac04bfa38
commit cfd5fa01e8
14 changed files with 72 additions and 100 deletions

View File

@ -21,10 +21,7 @@
#include <NIS_Drawer.hxx> #include <NIS_Drawer.hxx>
#include <NIS_View.hxx> #include <NIS_View.hxx>
#ifdef WNT #include <OpenGl_GlCore11.hxx>
#include <windows.h>
#endif
#include <GL/gl.h>
//======================================================================= //=======================================================================
//function : NIS_DrawList() //function : NIS_DrawList()
@ -75,7 +72,7 @@ NIS_DrawList::NIS_DrawList (const Handle_NIS_View& theView)
//======================================================================= //=======================================================================
//function : ~NIS_DrawList //function : ~NIS_DrawList
//purpose : //purpose :
//======================================================================= //=======================================================================
NIS_DrawList::~NIS_DrawList () NIS_DrawList::~NIS_DrawList ()
@ -145,7 +142,7 @@ void NIS_DrawList::ClearListID (const Handle_NIS_View& theView)
//======================================================================= //=======================================================================
//function : BeginPrepare //function : BeginPrepare
//purpose : //purpose :
//======================================================================= //=======================================================================
void NIS_DrawList::BeginPrepare (const Standard_Integer theType) void NIS_DrawList::BeginPrepare (const Standard_Integer theType)
@ -162,7 +159,7 @@ void NIS_DrawList::BeginPrepare (const Standard_Integer theType)
//======================================================================= //=======================================================================
//function : EndPrepare //function : EndPrepare
//purpose : //purpose :
//======================================================================= //=======================================================================
void NIS_DrawList::EndPrepare (const Standard_Integer theType) void NIS_DrawList::EndPrepare (const Standard_Integer theType)
@ -173,7 +170,7 @@ void NIS_DrawList::EndPrepare (const Standard_Integer theType)
//======================================================================= //=======================================================================
//function : Call //function : Call
//purpose : //purpose :
//======================================================================= //=======================================================================
void NIS_DrawList::Call (const Standard_Integer theType) void NIS_DrawList::Call (const Standard_Integer theType)
@ -183,7 +180,7 @@ void NIS_DrawList::Call (const Standard_Integer theType)
//======================================================================= //=======================================================================
//function : SetDynHilighted //function : SetDynHilighted
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Boolean NIS_DrawList::SetDynHilighted Standard_Boolean NIS_DrawList::SetDynHilighted
@ -212,12 +209,12 @@ Standard_Boolean NIS_DrawList::SetDynHilighted
//======================================================================= //=======================================================================
//function : SetUpdated //function : SetUpdated
//purpose : //purpose :
//======================================================================= //=======================================================================
void NIS_DrawList::SetUpdated (const Standard_Integer theType, void NIS_DrawList::SetUpdated (const Standard_Integer theType,
const Standard_Boolean theFlag) const Standard_Boolean theFlag)
{ {
if (theFlag) if (theFlag)
SetUpdated(theType); SetUpdated(theType);
else else
@ -226,7 +223,7 @@ void NIS_DrawList::SetUpdated (const Standard_Integer theType,
//======================================================================= //=======================================================================
//function : SetUpdated //function : SetUpdated
//purpose : //purpose :
//======================================================================= //=======================================================================
void NIS_DrawList::SetUpdated (const Standard_Integer theType) void NIS_DrawList::SetUpdated (const Standard_Integer theType)

View File

@ -23,10 +23,7 @@
#include <NIS_InteractiveObject.hxx> #include <NIS_InteractiveObject.hxx>
#include <Standard_ProgramError.hxx> #include <Standard_ProgramError.hxx>
#ifdef WNT #include <OpenGl_GlCore11.hxx>
#include <windows.h>
#endif
#include <GL/gl.h>
static void setColor(GLenum theFace, static void setColor(GLenum theFace,
Quantity_Parameter * theAmbient, Quantity_Parameter * theAmbient,
@ -58,7 +55,7 @@ NIS_SurfaceDrawer::NIS_SurfaceDrawer
//======================================================================= //=======================================================================
//function : SetColor //function : SetColor
//purpose : //purpose :
//======================================================================= //=======================================================================
void NIS_SurfaceDrawer::SetColor(const Quantity_Color &theColor) void NIS_SurfaceDrawer::SetColor(const Quantity_Color &theColor)
@ -70,7 +67,7 @@ void NIS_SurfaceDrawer::SetColor(const Quantity_Color &theColor)
//======================================================================= //=======================================================================
//function : Assign //function : Assign
//purpose : //purpose :
//======================================================================= //=======================================================================
void NIS_SurfaceDrawer::Assign (const Handle_NIS_Drawer& theOther) void NIS_SurfaceDrawer::Assign (const Handle_NIS_Drawer& theOther)
@ -128,7 +125,7 @@ Standard_Boolean NIS_SurfaceDrawer::IsEqual
//======================================================================= //=======================================================================
//function : redraw //function : redraw
//purpose : //purpose :
//======================================================================= //=======================================================================
void NIS_SurfaceDrawer::redraw (const DrawType theType, void NIS_SurfaceDrawer::redraw (const DrawType theType,
@ -153,7 +150,7 @@ void NIS_SurfaceDrawer::redraw (const DrawType theType,
//======================================================================= //=======================================================================
//function : BeforeDraw //function : BeforeDraw
//purpose : //purpose :
//======================================================================= //=======================================================================
void NIS_SurfaceDrawer::BeforeDraw (const DrawType theType, void NIS_SurfaceDrawer::BeforeDraw (const DrawType theType,
@ -221,7 +218,7 @@ void NIS_SurfaceDrawer::BeforeDraw (const DrawType theType,
//======================================================================= //=======================================================================
//function : AfterDraw //function : AfterDraw
//purpose : //purpose :
//======================================================================= //=======================================================================
void NIS_SurfaceDrawer::AfterDraw (const DrawType theType, void NIS_SurfaceDrawer::AfterDraw (const DrawType theType,
@ -246,7 +243,7 @@ void NIS_SurfaceDrawer::AfterDraw (const DrawType theType,
//======================================================================= //=======================================================================
//function : Draw //function : Draw
//purpose : //purpose :
//======================================================================= //=======================================================================
void NIS_SurfaceDrawer::Draw (const Handle_NIS_InteractiveObject& theObj, void NIS_SurfaceDrawer::Draw (const Handle_NIS_InteractiveObject& theObj,
@ -263,7 +260,7 @@ void NIS_SurfaceDrawer::Draw (const Handle_NIS_InteractiveObject& theObj,
static_cast <const NIS_Surface *> (theObj.operator->()); static_cast <const NIS_Surface *> (theObj.operator->());
glVertexPointer (3, GL_FLOAT, 0, pObject->Node(0)); glVertexPointer (3, GL_FLOAT, 0, pObject->Node(0));
// In Highlited mode the shape must be shown as wireframe // In Highlited mode the shape must be shown as wireframe
Standard_Boolean isWireframe(myIsWireframe); Standard_Boolean isWireframe(myIsWireframe);
if (isWireframe == Standard_False && theType == Draw_DynHilighted) if (isWireframe == Standard_False && theType == Draw_DynHilighted)
if (pObject->NEdges() > 0) if (pObject->NEdges() > 0)
@ -287,7 +284,7 @@ void NIS_SurfaceDrawer::Draw (const Handle_NIS_InteractiveObject& theObj,
//======================================================================= //=======================================================================
//function : setColor //function : setColor
//purpose : //purpose :
//======================================================================= //=======================================================================
void setColor(GLenum theFace, void setColor(GLenum theFace,

View File

@ -24,10 +24,8 @@
#ifdef _DEBUG #ifdef _DEBUG
#include <Standard_ProgramError.hxx> #include <Standard_ProgramError.hxx>
#endif #endif
#ifdef WNT
#include <windows.h> #include <OpenGl_GlCore11.hxx>
#endif
#include <GL/gl.h>
// Comment this line if you see no hilighting of triangulations due to negative // Comment this line if you see no hilighting of triangulations due to negative
// polygon offsets. Disabling this macro means that all offsets will be created // polygon offsets. Disabling this macro means that all offsets will be created
@ -35,7 +33,7 @@
// But before changing this macro please play with your OpenGL video card // But before changing this macro please play with your OpenGL video card
// settings in the direction of performance improvement. Particularly, I had a // settings in the direction of performance improvement. Particularly, I had a
// good result after checking "Enable write combining" option in NVIDIA 6600. // good result after checking "Enable write combining" option in NVIDIA 6600.
#define NEGATIVE_POFFSET #define NEGATIVE_POFFSET
@ -65,7 +63,7 @@ NIS_TriangulatedDrawer::NIS_TriangulatedDrawer
//======================================================================= //=======================================================================
//function : Assign //function : Assign
//purpose : //purpose :
//======================================================================= //=======================================================================
void NIS_TriangulatedDrawer::Assign (const Handle_NIS_Drawer& theOther) void NIS_TriangulatedDrawer::Assign (const Handle_NIS_Drawer& theOther)
@ -115,7 +113,7 @@ Standard_Boolean NIS_TriangulatedDrawer::IsEqual
//======================================================================= //=======================================================================
//function : BeforeDraw //function : BeforeDraw
//purpose : //purpose :
//======================================================================= //=======================================================================
void NIS_TriangulatedDrawer::BeforeDraw (const DrawType theType, void NIS_TriangulatedDrawer::BeforeDraw (const DrawType theType,
@ -195,7 +193,7 @@ void NIS_TriangulatedDrawer::BeforeDraw (const DrawType theType,
//======================================================================= //=======================================================================
//function : AfterDraw //function : AfterDraw
//purpose : //purpose :
//======================================================================= //=======================================================================
void NIS_TriangulatedDrawer::AfterDraw (const DrawType theType, void NIS_TriangulatedDrawer::AfterDraw (const DrawType theType,
@ -230,7 +228,7 @@ void NIS_TriangulatedDrawer::AfterDraw (const DrawType theType,
//======================================================================= //=======================================================================
//function : Draw //function : Draw
//purpose : //purpose :
//======================================================================= //=======================================================================
void NIS_TriangulatedDrawer::Draw (const Handle_NIS_InteractiveObject& theObj, void NIS_TriangulatedDrawer::Draw (const Handle_NIS_InteractiveObject& theObj,

View File

@ -25,10 +25,8 @@
#include <Visual3d_View.hxx> #include <Visual3d_View.hxx>
#include <Bnd_B2f.hxx> #include <Bnd_B2f.hxx>
#include <TColStd_MapIteratorOfPackedMapOfInteger.hxx> #include <TColStd_MapIteratorOfPackedMapOfInteger.hxx>
#ifdef WNT
#include <Windows.h> #include <OpenGl_GlCore11.hxx>
#endif
#include <GL/gl.h>
IMPLEMENT_STANDARD_HANDLE (NIS_View, V3d_OrthographicView) IMPLEMENT_STANDARD_HANDLE (NIS_View, V3d_OrthographicView)
IMPLEMENT_STANDARD_RTTIEXT (NIS_View, V3d_OrthographicView) IMPLEMENT_STANDARD_RTTIEXT (NIS_View, V3d_OrthographicView)
@ -40,7 +38,7 @@ IMPLEMENT_STANDARD_RTTIEXT (NIS_View, V3d_OrthographicView)
NIS_View::NIS_View (const Handle(V3d_Viewer)& theViewer, NIS_View::NIS_View (const Handle(V3d_Viewer)& theViewer,
const Handle(Aspect_Window)& theWindow) const Handle(Aspect_Window)& theWindow)
: V3d_OrthographicView (theViewer), : V3d_OrthographicView (theViewer),
myIsTopHilight(Standard_False), myIsTopHilight(Standard_False),
myDoHilightSelected(Standard_True) myDoHilightSelected(Standard_True)
{ {
@ -50,7 +48,7 @@ NIS_View::NIS_View (const Handle(V3d_Viewer)& theViewer,
//======================================================================= //=======================================================================
//function : SetWindow //function : SetWindow
//purpose : //purpose :
//======================================================================= //=======================================================================
void NIS_View::SetWindow(const Handle(Aspect_Window) &theWindow) void NIS_View::SetWindow(const Handle(Aspect_Window) &theWindow)
@ -69,7 +67,7 @@ void NIS_View::SetWindow(const Handle(Aspect_Window) &theWindow)
//======================================================================= //=======================================================================
//function : AddContext //function : AddContext
//purpose : //purpose :
//======================================================================= //=======================================================================
void NIS_View::AddContext (NIS_InteractiveContext * theCtx) void NIS_View::AddContext (NIS_InteractiveContext * theCtx)
@ -85,7 +83,7 @@ void NIS_View::AddContext (NIS_InteractiveContext * theCtx)
//======================================================================= //=======================================================================
//function : RemoveContext //function : RemoveContext
//purpose : //purpose :
//======================================================================= //=======================================================================
void NIS_View::RemoveContext (NIS_InteractiveContext * theCtx) void NIS_View::RemoveContext (NIS_InteractiveContext * theCtx)
@ -108,7 +106,7 @@ void NIS_View::RemoveContext (NIS_InteractiveContext * theCtx)
//======================================================================= //=======================================================================
//function : FitAll3d //function : FitAll3d
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Boolean NIS_View::FitAll3d (const Quantity_Coefficient theCoef) Standard_Boolean NIS_View::FitAll3d (const Quantity_Coefficient theCoef)
@ -194,7 +192,7 @@ Standard_Boolean NIS_View::FitAll3d (const Quantity_Coefficient theCoef)
//======================================================================= //=======================================================================
//function : GetBndBox //function : GetBndBox
//purpose : //purpose :
//======================================================================= //=======================================================================
Bnd_B3f NIS_View::GetBndBox() const Bnd_B3f NIS_View::GetBndBox() const
@ -226,13 +224,13 @@ Bnd_B3f NIS_View::GetBndBox() const
//======================================================================= //=======================================================================
//function : GetBndBox //function : GetBndBox
//purpose : //purpose :
//======================================================================= //=======================================================================
void NIS_View::GetBndBox( Standard_Integer& theXMin, Standard_Integer& theXMax, void NIS_View::GetBndBox( Standard_Integer& theXMin, Standard_Integer& theXMax,
Standard_Integer& theYMin, Standard_Integer& theYMax ) const Standard_Integer& theYMin, Standard_Integer& theYMax ) const
{ {
theXMin = theYMin = 0; theXMin = theYMin = 0;
theXMax = theYMax = -1; theXMax = theYMax = -1;
Bnd_B3f aBox = GetBndBox(); Bnd_B3f aBox = GetBndBox();
@ -260,23 +258,23 @@ void NIS_View::GetBndBox( Standard_Integer& theXMin, Standard_Integer& theXMax,
if (aLimp[0] < aLimp[1] && aLimp[2] < aLimp[3]) if (aLimp[0] < aLimp[1] && aLimp[2] < aLimp[3])
{ {
// Scale the view // Scale the view
// WindowFit (aLimp[0], aLimp[2], aLimp[1], aLimp[3]); // WindowFit (aLimp[0], aLimp[2], aLimp[1], aLimp[3]);
theXMin = aLimp[0]; theXMin = aLimp[0];
theXMax = aLimp[1]; theXMax = aLimp[1];
theYMin = aLimp[2]; theYMin = aLimp[2];
theYMax = aLimp[3]; theYMax = aLimp[3];
} }
} }
} }
//======================================================================= //=======================================================================
//function : MyCallback //function : MyCallback
//purpose : //purpose :
//======================================================================= //=======================================================================
int NIS_View::MyCallback (Aspect_Drawable /* Window ID */, int NIS_View::MyCallback (Aspect_Drawable /* Window ID */,
void* ptrData, void* ptrData,
Aspect_GraphicCallbackStruct* callData /* call data */) Aspect_GraphicCallbackStruct* callData /* call data */)
{ {
// Avoid multiple rendering of the scene ( accordingly with update of // Avoid multiple rendering of the scene ( accordingly with update of
@ -286,7 +284,7 @@ int NIS_View::MyCallback (Aspect_Drawable /* Window ID */,
// see comments to OCC_REDRAW_ADDITIONAL_CALLBACKS definition ) // see comments to OCC_REDRAW_ADDITIONAL_CALLBACKS definition )
if (callData->reason & OCC_REDRAW_ADDITIONAL_CALLBACKS) if (callData->reason & OCC_REDRAW_ADDITIONAL_CALLBACKS)
return 0; return 0;
const Handle(NIS_View) thisView (static_cast<NIS_View *> (ptrData)); const Handle(NIS_View) thisView (static_cast<NIS_View *> (ptrData));
NCollection_List<NIS_InteractiveContext *>::Iterator anIter; NCollection_List<NIS_InteractiveContext *>::Iterator anIter;
#ifdef CLIP #ifdef CLIP
@ -387,7 +385,7 @@ int NIS_View::MyCallback (Aspect_Drawable /* Window ID */,
//======================================================================= //=======================================================================
//function : DynamicHilight //function : DynamicHilight
//purpose : //purpose :
//======================================================================= //=======================================================================
void NIS_View::DynamicHilight (const Standard_Integer theX, void NIS_View::DynamicHilight (const Standard_Integer theX,
@ -396,7 +394,7 @@ void NIS_View::DynamicHilight (const Standard_Integer theX,
myDetected.Clear(); myDetected.Clear();
const Handle(NIS_InteractiveObject) aSelected = Pick (theX, theY); const Handle(NIS_InteractiveObject) aSelected = Pick (theX, theY);
// ASV: if at least one Context returns IsSelectable()==False, // ASV: if at least one Context returns IsSelectable()==False,
// hilight is canceled, this method returns // hilight is canceled, this method returns
if (aSelected.IsNull() == Standard_False) { if (aSelected.IsNull() == Standard_False) {
if (aSelected->IsSelectable() == Standard_False) if (aSelected->IsSelectable() == Standard_False)
@ -411,7 +409,7 @@ void NIS_View::DynamicHilight (const Standard_Integer theX,
// 30.07.10 - NKV - synchronize behaviour with AIS interactive context (if need) // 30.07.10 - NKV - synchronize behaviour with AIS interactive context (if need)
if (aSelected.IsNull() || if (aSelected.IsNull() ||
(myDoHilightSelected == Standard_False && (myDoHilightSelected == Standard_False &&
aSelected->GetDrawer()->GetContext()->IsSelected(aSelected))) aSelected->GetDrawer()->GetContext()->IsSelected(aSelected)))
{ {
myDynHilighted.Nullify(); myDynHilighted.Nullify();
@ -427,7 +425,7 @@ void NIS_View::DynamicHilight (const Standard_Integer theX,
//======================================================================= //=======================================================================
//function : DynamicUnhilight //function : DynamicUnhilight
//purpose : //purpose :
//======================================================================= //=======================================================================
void NIS_View::DynamicUnhilight(const Handle_NIS_InteractiveObject& theObj) void NIS_View::DynamicUnhilight(const Handle_NIS_InteractiveObject& theObj)
@ -594,7 +592,7 @@ void NIS_View::Select (const NCollection_List<gp_XY> &thePolygon,
//======================================================================= //=======================================================================
//function : Pick //function : Pick
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle_NIS_InteractiveObject NIS_View::Pick (const Standard_Integer theX, Handle_NIS_InteractiveObject NIS_View::Pick (const Standard_Integer theX,
@ -616,7 +614,7 @@ Handle_NIS_InteractiveObject NIS_View::Pick (const Standard_Integer theX,
//======================================================================= //=======================================================================
//function : Pick //function : Pick
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle_NIS_InteractiveObject NIS_View::Pick Handle_NIS_InteractiveObject NIS_View::Pick

View File

@ -29,8 +29,6 @@
#include <InterfaceGraphic_Aspect.hxx> #include <InterfaceGraphic_Aspect.hxx>
#include <InterfaceGraphic_Visual3d.hxx> #include <InterfaceGraphic_Visual3d.hxx>
#include <GL/glu.h> // gluUnProject()
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
#endif #endif
@ -52,7 +50,7 @@ const OpenGl_AspectLine myDefaultAspectLine;
float xmin = 0.0f, ymin = 0.0f, zmin = 0.0f, xmax = 100.0f, ymax = 100.0f, zmax = 100.0f; float xmin = 0.0f, ymin = 0.0f, zmin = 0.0f, xmax = 100.0f, ymax = 100.0f, zmax = 100.0f;
/* Normal of the view (not normalized!) */ /* Normal of the view (not normalized!) */
static float getNormal(float* normal) static float getNormal(float* normal)
{ {
GLint viewport[4]; GLint viewport[4];
GLdouble model_matrix[16], proj_matrix[16]; GLdouble model_matrix[16], proj_matrix[16];
@ -87,47 +85,47 @@ static float getDistance2Corner(float* normal, float* center, float x, float y,
return normal[0] * (x - center[0]) + normal[1] * (y - center[1]) + normal[2] * (z - center[2]); return normal[0] * (x - center[0]) + normal[1] * (y - center[1]) + normal[2] * (z - center[2]);
} }
static char getFarestCorner(float d000, float d100, float d010, float d001, static char getFarestCorner(float d000, float d100, float d010, float d001,
float d110, float d101, float d011, float d111) float d110, float d101, float d011, float d111)
{ {
if (d000 > 0.0f && if (d000 > 0.0f &&
d000 > d100 && d000 > d010 && d000 > d001 && d000 > d110 && d000 > d100 && d000 > d010 && d000 > d001 && d000 > d110 &&
d000 > d101 && d000 > d011 && d000 > d111) d000 > d101 && d000 > d011 && d000 > d111)
{ {
return 1; return 1;
} }
else if (d100 > 0.0f && else if (d100 > 0.0f &&
d100 > d000 && d100 > d010 && d100 > d001 && d100 > d110 && d100 > d000 && d100 > d010 && d100 > d001 && d100 > d110 &&
d100 > d101 && d100 > d011 && d100 > d111) d100 > d101 && d100 > d011 && d100 > d111)
{ {
return 2; return 2;
} }
else if (d010 > 0.0f && else if (d010 > 0.0f &&
d010 > d000 && d010 > d100 && d010 > d001 && d010 > d110 && d010 > d000 && d010 > d100 && d010 > d001 && d010 > d110 &&
d010 > d101 && d010 > d011 && d010 > d111) d010 > d101 && d010 > d011 && d010 > d111)
{ {
return 3; return 3;
} }
else if (d001 > 0.0f && else if (d001 > 0.0f &&
d001 > d000 && d001 > d100 && d001 > d010 && d001 > d110 && d001 > d000 && d001 > d100 && d001 > d010 && d001 > d110 &&
d001 > d101 && d001 > d011 && d001 > d111) d001 > d101 && d001 > d011 && d001 > d111)
{ {
return 4; return 4;
} }
else if (d110 > 0.0f && else if (d110 > 0.0f &&
d110 > d000 && d110 > d100 && d110 > d010 && d110 > d001 && d110 > d000 && d110 > d100 && d110 > d010 && d110 > d001 &&
d110 > d101 && d110 > d011 && d110 > d111) d110 > d101 && d110 > d011 && d110 > d111)
{ {
return 5; return 5;
} }
else if (d101 > 0.0f && else if (d101 > 0.0f &&
d101 > d000 && d101 > d100 && d101 > d010 && d101 > d001 && d101 > d000 && d101 > d100 && d101 > d010 && d101 > d001 &&
d101 > d110 && d101 > d011 && d101 > d111) d101 > d110 && d101 > d011 && d101 > d111)
{ {
return 6; return 6;
} }
else if (d011 > 0.0f && else if (d011 > 0.0f &&
d011 > d000 && d011 > d100 && d011 > d010 && d011 > d001 && d011 > d000 && d011 > d100 && d011 > d010 && d011 > d001 &&
d011 > d110 && d011 > d101 && d011 > d111) d011 > d110 && d011 > d101 && d011 > d111)
{ {
return 7; return 7;
@ -157,7 +155,7 @@ static void drawText(const Handle(OpenGl_Workspace) &AWorkspace, const wchar_t*
*/ */
} }
static void drawArrow(float x1, float y1, float z1, static void drawArrow(float x1, float y1, float z1,
float x2, float y2, float z2, float x2, float y2, float z2,
float xn, float yn, float zn) float xn, float yn, float zn)
{ {
@ -809,7 +807,7 @@ void OpenGl_GraduatedTrihedron::Render (const Handle(OpenGl_Workspace) &AWorkspa
{ {
glColor3fv(myXNameColor); glColor3fv(myXNameColor);
offset = myXAxisOffset + myXTickmarkLength; offset = myXAxisOffset + myXTickmarkLength;
drawText(AWorkspace, myXName, myFontOfNames, myStyleOfNames, mySizeOfNames, drawText(AWorkspace, myXName, myFontOfNames, myStyleOfNames, mySizeOfNames,
m1[0], m1[1] + offset * m2[1], m1[2] + offset * m2[2]); m1[0], m1[1] + offset * m2[1], m1[2] + offset * m2[2]);
} }
@ -825,7 +823,7 @@ void OpenGl_GraduatedTrihedron::Render (const Handle(OpenGl_Workspace) &AWorkspa
{ {
sprintf(textValue, "%g", LX1[0] + i * step); sprintf(textValue, "%g", LX1[0] + i * step);
j = 0; while (wtextValue[j] = textValue[j]) j++; j = 0; while (wtextValue[j] = textValue[j]) j++;
drawText(AWorkspace, wtextValue, myFontOfValues, myStyleOfValues, mySizeOfValues, drawText(AWorkspace, wtextValue, myFontOfValues, myStyleOfValues, mySizeOfValues,
LX1[0] + i * step, m1[1] + offset * m2[1], m1[2] + offset * m2[2]); LX1[0] + i * step, m1[1] + offset * m2[1], m1[2] + offset * m2[2]);
i++; i++;
} }
@ -881,7 +879,7 @@ void OpenGl_GraduatedTrihedron::Render (const Handle(OpenGl_Workspace) &AWorkspa
{ {
glColor3fv(myYNameColor); glColor3fv(myYNameColor);
offset = myYAxisOffset + myYTickmarkLength; offset = myYAxisOffset + myYTickmarkLength;
drawText(AWorkspace, myYName, myFontOfNames, myStyleOfNames, mySizeOfNames, drawText(AWorkspace, myYName, myFontOfNames, myStyleOfNames, mySizeOfNames,
m1[0] + offset * m2[0], m1[1], m1[2] + offset * m2[2]); m1[0] + offset * m2[0], m1[1], m1[2] + offset * m2[2]);
} }
@ -897,7 +895,7 @@ void OpenGl_GraduatedTrihedron::Render (const Handle(OpenGl_Workspace) &AWorkspa
{ {
sprintf(textValue, "%g", LY1[1] + i * step); sprintf(textValue, "%g", LY1[1] + i * step);
j = 0; while (wtextValue[j] = textValue[j]) j++; j = 0; while (wtextValue[j] = textValue[j]) j++;
drawText(AWorkspace, wtextValue, myFontOfValues, myStyleOfValues, mySizeOfValues, drawText(AWorkspace, wtextValue, myFontOfValues, myStyleOfValues, mySizeOfValues,
m1[0] + offset * m2[0], LY1[1] + i * step, m1[2] + offset * m2[2]); m1[0] + offset * m2[0], LY1[1] + i * step, m1[2] + offset * m2[2]);
i++; i++;
} }
@ -953,7 +951,7 @@ void OpenGl_GraduatedTrihedron::Render (const Handle(OpenGl_Workspace) &AWorkspa
{ {
glColor3fv(myZNameColor); glColor3fv(myZNameColor);
offset = myZAxisOffset + myZTickmarkLength; offset = myZAxisOffset + myZTickmarkLength;
drawText(AWorkspace, myZName, myFontOfNames, myStyleOfNames, mySizeOfNames, drawText(AWorkspace, myZName, myFontOfNames, myStyleOfNames, mySizeOfNames,
m1[0] + offset * m2[0], m1[1] + offset * m2[1], m1[2]); m1[0] + offset * m2[0], m1[1] + offset * m2[1], m1[2]);
} }
@ -969,7 +967,7 @@ void OpenGl_GraduatedTrihedron::Render (const Handle(OpenGl_Workspace) &AWorkspa
{ {
sprintf(textValue, "%g", LZ1[2] + i * step); sprintf(textValue, "%g", LZ1[2] + i * step);
j = 0; while (wtextValue[j] = textValue[j]) j++; j = 0; while (wtextValue[j] = textValue[j]) j++;
drawText(AWorkspace, wtextValue, myFontOfValues, myStyleOfValues, mySizeOfValues, drawText(AWorkspace, wtextValue, myFontOfValues, myStyleOfValues, mySizeOfValues,
m1[0] + offset * m2[0], m1[1] + offset * m2[1], LZ1[2] + i * step); m1[0] + offset * m2[0], m1[1] + offset * m2[1], LZ1[2] + i * step);
i++; i++;
} }

View File

@ -28,8 +28,6 @@
#include <OpenGl_AspectText.hxx> #include <OpenGl_AspectText.hxx>
#include <OpenGl_TextParam.hxx> #include <OpenGl_TextParam.hxx>
#include <GL/glu.h>
/*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/
struct OpenGl_LAYER_PROP struct OpenGl_LAYER_PROP
@ -263,7 +261,7 @@ void OpenGl_GraphicDriver::SetTextAttributes (const Standard_CString Font, const
// update if there are any modifications // update if there are any modifications
if (strcmp (TheLayerProp.AspectText.Font(), Font) != 0 || if (strcmp (TheLayerProp.AspectText.Font(), Font) != 0 ||
(int)TheLayerProp.AspectText.DisplayType() != AType || (int)TheLayerProp.AspectText.DisplayType() != AType ||
aSubColor.rgb[0] != (float)R || aSubColor.rgb[0] != (float)R ||
aSubColor.rgb[1] != (float)G || aSubColor.rgb[1] != (float)G ||
aSubColor.rgb[2] != (float)B) aSubColor.rgb[2] != (float)B)
{ {
@ -319,7 +317,7 @@ void OpenGl_GraphicDriver::Text (const Standard_CString AText, const Standard_Sh
glLogicOp(GL_XOR); glLogicOp(GL_XOR);
} }
break; break;
// subtitle type // subtitle type
case Aspect_TODT_SUBTITLE: case Aspect_TODT_SUBTITLE:
{ {
@ -345,7 +343,7 @@ void OpenGl_GraphicDriver::Text (const Standard_CString AText, const Standard_Sh
gluUnProject (aWinX, aWinY + aDescent, aWinZ, aModelMatrix, gluUnProject (aWinX, aWinY + aDescent, aWinZ, aModelMatrix,
aProjMatrix, aViewport, &aCoordX[0], &aCoordY[0], &aCoordZ[0]); aProjMatrix, aViewport, &aCoordX[0], &aCoordY[0], &aCoordZ[0]);
// right bottom corner // right bottom corner
gluUnProject (aWinX + aWidth, aWinY + aDescent, aWinZ, aModelMatrix, gluUnProject (aWinX + aWidth, aWinY + aDescent, aWinZ, aModelMatrix,
aProjMatrix, aViewport, &aCoordX[1], &aCoordY[1], &aCoordZ[1]); aProjMatrix, aViewport, &aCoordX[1], &aCoordY[1], &aCoordZ[1]);
@ -354,7 +352,7 @@ void OpenGl_GraphicDriver::Text (const Standard_CString AText, const Standard_Sh
aProjMatrix, aViewport, &aCoordX[2], &aCoordY[2], &aCoordZ[2]); aProjMatrix, aViewport, &aCoordX[2], &aCoordY[2], &aCoordZ[2]);
// left top corner // left top corner
gluUnProject (aWinX, aWinY + anAscent, aWinZ, aModelMatrix, gluUnProject (aWinX, aWinY + anAscent, aWinZ, aModelMatrix,
aProjMatrix, aViewport, &aCoordX[3], &aCoordY[3], &aCoordZ[3]); aProjMatrix, aViewport, &aCoordX[3], &aCoordY[3], &aCoordZ[3]);
// draw colored plane and reset the color // draw colored plane and reset the color
@ -394,13 +392,13 @@ void OpenGl_GraphicDriver::Text (const Standard_CString AText, const Standard_Sh
gluUnProject (aWinX, aWinY, aWinZ, aModelMatrix, aProjMatrix, gluUnProject (aWinX, aWinY, aWinZ, aModelMatrix, aProjMatrix,
aViewport, &aProjX, &aProjY, &aProjZ); aViewport, &aProjX, &aProjY, &aProjZ);
gluUnProject (aWinX - 1, aWinY - 1, aWinZ, aModelMatrix, aProjMatrix, gluUnProject (aWinX - 1, aWinY - 1, aWinZ, aModelMatrix, aProjMatrix,
aViewport, &aProjX, &aProjY, &aProjZ); aViewport, &aProjX, &aProjY, &aProjZ);
openglDisplay->RenderText(aWChStr, 1, (float)aProjX, (float)aProjY, openglDisplay->RenderText(aWChStr, 1, (float)aProjX, (float)aProjY,
(float)aProjZ, &TheLayerProp.AspectText, &TheLayerProp.TextParam); (float)aProjZ, &TheLayerProp.AspectText, &TheLayerProp.TextParam);
gluUnProject (aWinX - 1, aWinY + 1, aWinZ, aModelMatrix, aProjMatrix, gluUnProject (aWinX - 1, aWinY + 1, aWinZ, aModelMatrix, aProjMatrix,
aViewport, &aProjX, &aProjY, &aProjZ); aViewport, &aProjX, &aProjY, &aProjZ);
openglDisplay->RenderText(aWChStr, 1, (float)aProjX, (float)aProjY, openglDisplay->RenderText(aWChStr, 1, (float)aProjX, (float)aProjY,

View File

@ -27,8 +27,6 @@
#include <OpenGl_Structure.hxx> #include <OpenGl_Structure.hxx>
#include <OpenGl_Workspace.hxx> #include <OpenGl_Workspace.hxx>
#include <GL/glu.h>
#if (defined(_WIN32) || defined(__WIN32__)) #if (defined(_WIN32) || defined(__WIN32__))
#define STATIC #define STATIC
#else #else

View File

@ -23,8 +23,6 @@
#include <OpenGl_Structure.hxx> #include <OpenGl_Structure.hxx>
#include <OpenGl_Workspace.hxx> #include <OpenGl_Workspace.hxx>
#include <GL/glu.h> // gluUnProject()
/*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/
OpenGl_Text::OpenGl_Text (const TCollection_ExtendedString& AText, OpenGl_Text::OpenGl_Text (const TCollection_ExtendedString& AText,

View File

@ -34,8 +34,6 @@
#include <OpenGl_View.hxx> #include <OpenGl_View.hxx>
#include <OpenGl_Trihedron.hxx> #include <OpenGl_Trihedron.hxx>
#include <GL/glu.h> // gluNewQuadric()
IMPLEMENT_STANDARD_HANDLE(OpenGl_Trihedron,MMgt_TShared) IMPLEMENT_STANDARD_HANDLE(OpenGl_Trihedron,MMgt_TShared)
IMPLEMENT_STANDARD_RTTIEXT(OpenGl_Trihedron,MMgt_TShared) IMPLEMENT_STANDARD_RTTIEXT(OpenGl_Trihedron,MMgt_TShared)

View File

@ -32,8 +32,6 @@
#include <Graphic3d_TextureEnv.hxx> #include <Graphic3d_TextureEnv.hxx>
#include <GL/glu.h> // gluUnProject()
IMPLEMENT_STANDARD_HANDLE(OpenGl_View,MMgt_TShared) IMPLEMENT_STANDARD_HANDLE(OpenGl_View,MMgt_TShared)
IMPLEMENT_STANDARD_RTTIEXT(OpenGl_View,MMgt_TShared) IMPLEMENT_STANDARD_RTTIEXT(OpenGl_View,MMgt_TShared)

View File

@ -28,8 +28,6 @@
#include <OpenGl_PrinterContext.hxx> #include <OpenGl_PrinterContext.hxx>
#include <OpenGl_Workspace.hxx> #include <OpenGl_Workspace.hxx>
#include <GL/glu.h> // gluProject(), gluUnProject()
/*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/
//TelProjectionRaster in OpenGl_telem_util.cxx //TelProjectionRaster in OpenGl_telem_util.cxx

View File

@ -35,8 +35,6 @@
#include <OpenGl_PrinterContext.hxx> #include <OpenGl_PrinterContext.hxx>
#include <OpenGl_Structure.hxx> #include <OpenGl_Structure.hxx>
#include <GL/glu.h> // gluBuild2DMipmaps()
#define EPSI 0.0001 #define EPSI 0.0001
static const GLfloat default_amb[4] = { 0.F, 0.F, 0.F, 1.F }; static const GLfloat default_amb[4] = { 0.F, 0.F, 0.F, 1.F };

View File

@ -17,6 +17,8 @@
// purpose or non-infringement. Please see the License for the specific terms // purpose or non-infringement. Please see the License for the specific terms
// and conditions governing the rights and limitations under the License. // and conditions governing the rights and limitations under the License.
#include <OpenGl_GlCore11.hxx>
#include <InterfaceGraphic.hxx> #include <InterfaceGraphic.hxx>
#include <OpenGl_Window.hxx> #include <OpenGl_Window.hxx>
@ -27,8 +29,6 @@
#include <Aspect_GraphicDeviceDefinitionError.hxx> #include <Aspect_GraphicDeviceDefinitionError.hxx>
#include <TCollection_AsciiString.hxx> #include <TCollection_AsciiString.hxx>
#include <GL/glu.h> // gluOrtho2D()
IMPLEMENT_STANDARD_HANDLE(OpenGl_Window,MMgt_TShared) IMPLEMENT_STANDARD_HANDLE(OpenGl_Window,MMgt_TShared)
IMPLEMENT_STANDARD_RTTIEXT(OpenGl_Window,MMgt_TShared) IMPLEMENT_STANDARD_RTTIEXT(OpenGl_Window,MMgt_TShared)

View File

@ -43,8 +43,6 @@
#include <OpenGl_View.hxx> #include <OpenGl_View.hxx>
#include <OpenGl_Display.hxx> #include <OpenGl_Display.hxx>
#include <GL/glu.h> // gluOrtho2D()
//10-05-96 : CAL ; Ajout d'un nouveau delta dans les copies de pixels (voir CALL_DEF_DELTA) //10-05-96 : CAL ; Ajout d'un nouveau delta dans les copies de pixels (voir CALL_DEF_DELTA)
#define CALL_DEF_DELTA 10 #define CALL_DEF_DELTA 10