1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #ifndef _Aspect_GraphicCallbackProc_HeaderFile
15 #define _Aspect_GraphicCallbackProc_HeaderFile
17 // To manage client post display
19 #include <Aspect_Display.hxx>
20 #include <Aspect_Drawable.hxx>
21 #include <Aspect_RenderingContext.hxx>
22 #include <Standard_Transient.hxx>
24 // The flags below provide additional information to define the moment when
25 // callback was invoked in redraw procedure. These flags are bitwise OR'ed
26 // with the "reason" value of callback:
27 // 1) OCC_PRE_REDRAW - callback was invoked before redrawing underlayer
28 // ( at the beginning of redraw procedure );
29 // 2) OCC_PRE_OVERLAY - callback was invoked before redrawing overlayer;
30 // Otherwise, if no flags added to the "reason" value, the callback was
31 // invoked at the end of redraw ( after the overlayer is redrawn )
32 #define OCC_PRE_REDRAW 0x4000
33 #define OCC_PRE_OVERLAY 0x8000
35 // mask for all additional callbacks that invoked in process of redrawing
36 #define OCC_REDRAW_ADDITIONAL_CALLBACKS ( OCC_PRE_REDRAW | OCC_PRE_OVERLAY )
43 Handle(Standard_Transient) glContext;
44 } Aspect_GraphicCallbackStruct;
46 // Prototype for callback function to perform custom drawing within the same window and GL context.
47 typedef int (*Aspect_GraphicCallbackProc) (Aspect_Drawable theWindowID,
49 Aspect_GraphicCallbackStruct* theCallData);
51 #endif /* _Aspect_GraphicCallbackProc_HeaderFile */