Commit | Line | Data |
---|---|---|
973c2be1 | 1 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e | 2 | // |
973c2be1 | 3 | // This file is part of Open CASCADE Technology software library. |
b311480e | 4 | // |
d5f74e42 | 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 | |
973c2be1 | 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. | |
b311480e | 10 | // |
973c2be1 | 11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. | |
b311480e | 13 | |
7fd59977 | 14 | #ifndef _Aspect_GraphicCallbackProc_HeaderFile |
15 | #define _Aspect_GraphicCallbackProc_HeaderFile | |
5e27df78 | 16 | |
ff8178ef | 17 | // To manage client post display |
18 | ||
7fd59977 | 19 | #include <Aspect_Display.hxx> |
20 | #include <Aspect_Drawable.hxx> | |
21 | #include <Aspect_RenderingContext.hxx> | |
cb389a77 | 22 | #include <Standard_Transient.hxx> |
7fd59977 | 23 | |
b299a91c A |
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 | |
7fd59977 | 33 | #define OCC_PRE_OVERLAY 0x8000 |
34 | ||
b299a91c A |
35 | // mask for all additional callbacks that invoked in process of redrawing |
36 | #define OCC_REDRAW_ADDITIONAL_CALLBACKS ( OCC_PRE_REDRAW | OCC_PRE_OVERLAY ) | |
37 | ||
5e27df78 | 38 | typedef struct |
39 | { | |
40 | int reason; | |
41 | int wsID; | |
42 | int viewID; | |
4e1523ef | 43 | bool IsCoreProfile; |
5e27df78 | 44 | Handle(Standard_Transient) glContext; |
45 | } Aspect_GraphicCallbackStruct; | |
7fd59977 | 46 | |
5e27df78 | 47 | // Prototype for callback function to perform custom drawing within the same window and GL context. |
48 | typedef int (*Aspect_GraphicCallbackProc) (Aspect_Drawable theWindowID, | |
49 | void* theUserData, | |
50 | Aspect_GraphicCallbackStruct* theCallData); | |
7fd59977 | 51 | |
7fd59977 | 52 | #endif /* _Aspect_GraphicCallbackProc_HeaderFile */ |