#include <Aspect_Drawable.hxx>
#include <Aspect_RenderingContext.hxx>
-#define OCC_REDRAW_WINDOW 1
-#define OCC_REDRAW_WINDOWAREA 2
-#define OCC_REDRAW_BITMAP 3
-
// The flags below provide additional information to define the moment when
// callback was invoked in redraw procedure. These flags are bitwise OR'ed
// with the "reason" value of callback:
} CALL_DEF_LAYER;
-typedef struct {
- int width;
- int height;
-#ifdef IMP100701
- int depth;
-#endif
- Aspect_Drawable bitmap;
- Aspect_RenderingContext bitmapContext;
-} CALL_DEF_BITMAP;
-
#endif /* InterfaceGraphic_AspectHeader */
CALL_DEF_WINDOW DefWindow;
- CALL_DEF_BITMAP DefBitmap;
-
void *ptrUnderLayer;
void *ptrOverLayer;
if (aCView)
{
aCView->View->SetClipLimit(ACView);
- if (!AWait && !ACView.DefBitmap.bitmap)
+ if (!AWait)
{
aCView->WS->Resize(ACView.DefWindow);
aCView->WS->Invalidate();
Standard_Integer aWidth = aCView->WS->Width();
Standard_Integer aHeight = aCView->WS->Height();
-
- //if we want project something before to dump it into pixmap
- //For right copution of projection before dumping to pixmap
- if ( ACView.DefBitmap.bitmap )
- {
- aWidth = ACView.DefBitmap.width;
- aHeight = ACView.DefBitmap.height;
- }
-
Standard_ShortReal xr, yr;
if (aCView->View->ProjectObjectToRaster(aWidth, aHeight, AX, AY, AZ, xr, yr))
{
return aCView->View->ProjectRasterToObjectWithRay( aWidth, aHeight, AU, AYM-Aym-AV, Ax, Ay, Az, Dx, Dy, Dz );
}
-void OpenGl_GraphicDriver::RatioWindow (const Graphic3d_CView& ACView)
+void OpenGl_GraphicDriver::RatioWindow (const Graphic3d_CView& theCView)
{
- const OpenGl_CView *aCView = (const OpenGl_CView *)ACView.ptrView;
- if (!aCView)
- if( !ACView.DefBitmap.bitmap )
- aCView->WS->Resize(ACView.DefWindow);
+ const OpenGl_CView* aCView = (const OpenGl_CView* )theCView.ptrView;
+ if (aCView != NULL)
+ aCView->WS->Resize (theCView.DefWindow);
}
void OpenGl_GraphicDriver::Redraw (const Graphic3d_CView& ACView, const Aspect_CLayer2d& ACUnderLayer, const Aspect_CLayer2d& ACOverLayer, const Standard_Integer x, const Standard_Integer y, const Standard_Integer width, const Standard_Integer height)
if (aCView)
{
aCView->View->SetMapping(ACView);
- if (!AWait && !ACView.DefBitmap.bitmap)
+ if (!AWait)
{
aCView->WS->Resize(ACView.DefWindow);
aCView->WS->Invalidate();
if (aCView)
{
aCView->View->SetOrientation(ACView);
- if (!AWait && !ACView.DefBitmap.bitmap)
+ if (!AWait)
{
aCView->WS->Resize(ACView.DefWindow);
aCView->WS->Invalidate();
#define OPENGL_NS_FORBIDSETTEX (1<<14)
#define OPENGL_NS_FLIST (1<<15)
#define OPENGL_NS_WHITEBACK (1<<16)
-#define OPENGL_NS_ISBITMAP (1<<17)
#endif //_OpenGl_NamedStatus_Header
glEnable ( GL_CULL_FACE );
glCullFace ( GL_BACK );
}
- else
+ else
glDisable ( GL_CULL_FACE );
}
/////////////////////////////////////////////////////////////////////////////
// Step 6: Draw overlayer
- // Redrawing to bitmap or window?
- const int amode = (AWorkspace->NamedStatus & OPENGL_NS_ISBITMAP)? OCC_REDRAW_BITMAP : OCC_REDRAW_WINDOW;
-
- AWorkspace->DisplayCallback(ACView,(amode | OCC_PRE_OVERLAY));
+ const int aMode = 0;
+ AWorkspace->DisplayCallback (ACView, (aMode | OCC_PRE_OVERLAY));
RedrawLayer2d(AWorkspace, ACView, ACOverLayer);
- AWorkspace->DisplayCallback(ACView,amode);
+ AWorkspace->DisplayCallback (ACView, aMode);
// Restore clipping planes
for ( ptrPlane = oldPlanes, planeid = GL_CLIP_PLANE0; planeid < lastid; planeid++, ptrPlane++ )
glClipPlane( planeid, ptrPlane->Equation );
if ( ptrPlane->isEnabled )
glEnable( planeid );
- else
+ else
glDisable( planeid );
}
delete[] oldPlanes;
|| ACLayer.ptrLayer == NULL
|| ACLayer.ptrLayer->listIndex == 0) return;
- GLsizei dispWidth, dispHeight;
- if ( ACView.DefBitmap.bitmap ) {
- dispWidth = ACView.DefBitmap.width;
- dispHeight = ACView.DefBitmap.height;
- }
- else {
- dispWidth = (GLsizei) ACLayer.viewport[0];
- dispHeight = (GLsizei) ACLayer.viewport[1];
- }
+ GLsizei dispWidth = (GLsizei )ACLayer.viewport[0];
+ GLsizei dispHeight = (GLsizei )ACLayer.viewport[1];
const GLboolean isl = glIsEnabled(GL_LIGHTING); /*OCC6247*/
if (isl)
bool isDone = true;
// Set up status for printing
- NamedStatus |= OPENGL_NS_ISBITMAP;
if (!showBackground)
NamedStatus |= OPENGL_NS_WHITEBACK;
#endif
// Reset status after printing
- NamedStatus &= ~(OPENGL_NS_WHITEBACK | OPENGL_NS_ISBITMAP);
+ NamedStatus &= ~OPENGL_NS_WHITEBACK;
return (Standard_Boolean) isDone;
MyCView.Backfacing = 0;
#endif // G003
- MyCView.DefBitmap.bitmap = 0;
MyCView.ptrUnderLayer = 0;
MyCView.ptrOverLayer = 0;
MyCView.GContext = 0;
ComputedModeIsActive = Standard_False;
#endif // G003
- MyCView.DefBitmap.bitmap = 0;
MyCView.ptrUnderLayer = 0;
MyCView.ptrOverLayer = 0;
MyCView.GContext = 0;