Blender  V2.93
GHOST_C-Test.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
17  * All rights reserved.
18  */
19 
28 #include <math.h>
29 #include <stdio.h>
30 #include <stdlib.h>
31 #include <string.h>
32 
33 #define FALSE 0
34 
35 #include "GHOST_C-api.h"
36 
37 #if defined(WIN32) || defined(__APPLE__)
38 # ifdef WIN32
39 # include <GL/gl.h>
40 # include <windows.h>
41 # else /* WIN32 */
42 /* __APPLE__ is defined */
43 # include <AGL/gl.h>
44 # endif /* WIN32 */
45 #else /* defined(WIN32) || defined(__APPLE__) */
46 # include <GL/gl.h>
47 #endif /* defined(WIN32) || defined(__APPLE__) */
48 
49 static void gearsTimerProc(GHOST_TimerTaskHandle task, GHOST_TUns64 time);
50 int processEvent(GHOST_EventHandle hEvent, GHOST_TUserDataPtr userData);
51 
52 static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0;
53 static GLfloat fAngle = 0.0;
54 static int sExitRequested = 0;
55 static GHOST_SystemHandle shSystem = NULL;
56 static GHOST_WindowHandle sMainWindow = NULL;
57 static GHOST_WindowHandle sSecondaryWindow = NULL;
59 static GHOST_WindowHandle sFullScreenWindow = NULL;
60 static GHOST_TimerTaskHandle sTestTimer;
61 static GHOST_TimerTaskHandle sGearsTimer;
62 
63 static void testTimerProc(GHOST_TimerTaskHandle task, GHOST_TUns64 time)
64 {
65  printf("timer1, time=%d\n", (int)time);
66 }
67 
68 static void gearGL(
69  GLfloat inner_radius, GLfloat outer_radius, GLfloat width, GLint teeth, GLfloat tooth_depth)
70 {
71  GLint i;
72  GLfloat r0, r1, r2;
73  GLfloat angle, da;
74  GLfloat u, v, len;
75  const double pi = 3.14159264;
76 
77  r0 = inner_radius;
78  r1 = (float)(outer_radius - tooth_depth / 2.0);
79  r2 = (float)(outer_radius + tooth_depth / 2.0);
80 
81  da = (float)(2.0 * pi / teeth / 4.0);
82 
83  glShadeModel(GL_FLAT);
84  glNormal3f(0.0, 0.0, 1.0);
85 
86  /* draw front face */
87  glBegin(GL_QUAD_STRIP);
88  for (i = 0; i <= teeth; i++) {
89  angle = (float)(i * 2.0 * pi / teeth);
90  glVertex3f((float)(r0 * cos(angle)), (float)(r0 * sin(angle)), (float)(width * 0.5));
91  glVertex3f((float)(r1 * cos(angle)), (float)(r1 * sin(angle)), (float)(width * 0.5));
92  glVertex3f((float)(r0 * cos(angle)), (float)(r0 * sin(angle)), (float)(width * 0.5));
93  glVertex3f((float)(r1 * cos(angle + 3 * da)),
94  (float)(r1 * sin(angle + 3 * da)),
95  (float)(width * 0.5));
96  }
97  glEnd();
98 
99  /* draw front sides of teeth */
100  glBegin(GL_QUADS);
101  da = (float)(2.0 * pi / teeth / 4.0);
102  for (i = 0; i < teeth; i++) {
103  angle = (float)(i * 2.0 * pi / teeth);
104  glVertex3f((float)(r1 * cos(angle)), (float)(r1 * sin(angle)), (float)(width * 0.5));
105  glVertex3f((float)(r2 * cos(angle + da)), (float)(r2 * sin(angle + da)), (float)(width * 0.5));
106  glVertex3f((float)(r2 * cos(angle + 2 * da)),
107  (float)(r2 * sin(angle + 2 * da)),
108  (float)(width * 0.5));
109  glVertex3f((float)(r1 * cos(angle + 3 * da)),
110  (float)(r1 * sin(angle + 3 * da)),
111  (float)(width * 0.5));
112  }
113  glEnd();
114 
115  glNormal3f(0.0, 0.0, -1.0);
116 
117  /* draw back face */
118  glBegin(GL_QUAD_STRIP);
119  for (i = 0; i <= teeth; i++) {
120  angle = (float)(i * 2.0 * pi / teeth);
121  glVertex3f((float)(r1 * cos(angle)), (float)(r1 * sin(angle)), (float)(-width * 0.5));
122  glVertex3f((float)(r0 * cos(angle)), (float)(r0 * sin(angle)), (float)(-width * 0.5));
123  glVertex3f((float)(r1 * cos(angle + 3 * da)),
124  (float)(r1 * sin(angle + 3 * da)),
125  (float)(-width * 0.5));
126  glVertex3f((float)(r0 * cos(angle)), (float)(r0 * sin(angle)), (float)(-width * 0.5));
127  }
128  glEnd();
129 
130  /* draw back sides of teeth */
131  glBegin(GL_QUADS);
132  da = (float)(2.0 * pi / teeth / 4.0);
133  for (i = 0; i < teeth; i++) {
134  angle = (float)(i * 2.0 * pi / teeth);
135  glVertex3f((float)(r1 * cos(angle + 3 * da)),
136  (float)(r1 * sin(angle + 3 * da)),
137  (float)(-width * 0.5));
138  glVertex3f((float)(r2 * cos(angle + 2 * da)),
139  (float)(r2 * sin(angle + 2 * da)),
140  (float)(-width * 0.5));
141  glVertex3f(
142  (float)(r2 * cos(angle + da)), (float)(r2 * sin(angle + da)), (float)(-width * 0.5));
143  glVertex3f((float)(r1 * cos(angle)), (float)(r1 * sin(angle)), (float)(-width * 0.5));
144  }
145  glEnd();
146 
147  /* draw outward faces of teeth */
148  glBegin(GL_QUAD_STRIP);
149  for (i = 0; i < teeth; i++) {
150  angle = (float)(i * 2.0 * pi / teeth);
151  glVertex3f((float)(r1 * cos(angle)), (float)(r1 * sin(angle)), (float)(width * 0.5));
152  glVertex3f((float)(r1 * cos(angle)), (float)(r1 * sin(angle)), (float)(-width * 0.5));
153  u = (float)(r2 * cos(angle + da) - r1 * cos(angle));
154  v = (float)(r2 * sin(angle + da) - r1 * sin(angle));
155  len = (float)(sqrt(u * u + v * v));
156  u /= len;
157  v /= len;
158  glNormal3f(v, -u, 0.0);
159  glVertex3f((float)(r2 * cos(angle + da)), (float)(r2 * sin(angle + da)), (float)(width * 0.5));
160  glVertex3f(
161  (float)(r2 * cos(angle + da)), (float)(r2 * sin(angle + da)), (float)(-width * 0.5));
162  glNormal3f((float)(cos(angle)), (float)(sin(angle)), 0.0);
163  glVertex3f((float)(r2 * cos(angle + 2 * da)),
164  (float)(r2 * sin(angle + 2 * da)),
165  (float)(width * 0.5));
166  glVertex3f((float)(r2 * cos(angle + 2 * da)),
167  (float)(r2 * sin(angle + 2 * da)),
168  (float)(-width * 0.5));
169  u = (float)(r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da));
170  v = (float)(r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da));
171  glNormal3f(v, -u, 0.0);
172  glVertex3f((float)(r1 * cos(angle + 3 * da)),
173  (float)(r1 * sin(angle + 3 * da)),
174  (float)(width * 0.5));
175  glVertex3f((float)(r1 * cos(angle + 3 * da)),
176  (float)(r1 * sin(angle + 3 * da)),
177  (float)(-width * 0.5));
178  glNormal3f((float)(cos(angle)), (float)(sin(angle)), 0.0);
179  }
180  glVertex3f((float)(r1 * cos(0.0)), (float)(r1 * sin(0.0)), (float)(width * 0.5));
181  glVertex3f((float)(r1 * cos(0.0)), (float)(r1 * sin(0.0)), (float)(-width * 0.5));
182  glEnd();
183 
184  glShadeModel(GL_SMOOTH);
185 
186  /* draw inside radius cylinder */
187  glBegin(GL_QUAD_STRIP);
188  for (i = 0; i <= teeth; i++) {
189  angle = (float)(i * 2.0 * pi / teeth);
190  glNormal3f((float)(-cos(angle)), (float)(-sin(angle)), 0.0);
191  glVertex3f((float)(r0 * cos(angle)), (float)(r0 * sin(angle)), (float)(-width * 0.5));
192  glVertex3f((float)(r0 * cos(angle)), (float)(r0 * sin(angle)), (float)(width * 0.5));
193  }
194  glEnd();
195 }
196 
197 static void drawGearGL(int id)
198 {
199  static GLfloat pos[4] = {5.0f, 5.0f, 10.0f, 1.0f};
200  static GLfloat ared[4] = {0.8f, 0.1f, 0.0f, 1.0f};
201  static GLfloat agreen[4] = {0.0f, 0.8f, 0.2f, 1.0f};
202  static GLfloat ablue[4] = {0.2f, 0.2f, 1.0f, 1.0f};
203 
204  glLightfv(GL_LIGHT0, GL_POSITION, pos);
205  glEnable(GL_CULL_FACE);
206  glEnable(GL_LIGHTING);
207  glEnable(GL_LIGHT0);
208  glEnable(GL_DEPTH_TEST);
209 
210  switch (id) {
211  case 1:
212  glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, ared);
213  gearGL(1.0f, 4.0f, 1.0f, 20, 0.7f);
214  break;
215  case 2:
216  glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, agreen);
217  gearGL(0.5f, 2.0f, 2.0f, 10, 0.7f);
218  break;
219  case 3:
220  glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, ablue);
221  gearGL(1.3f, 2.0f, 0.5f, 10, 0.7f);
222  break;
223  default:
224  break;
225  }
226  glEnable(GL_NORMALIZE);
227 }
228 
229 static void drawGL(void)
230 {
231  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
232 
233  glPushMatrix();
234 
235  glRotatef(view_rotx, 1.0, 0.0, 0.0);
236  glRotatef(view_roty, 0.0, 1.0, 0.0);
237  glRotatef(view_rotz, 0.0, 0.0, 1.0);
238 
239  glPushMatrix();
240  glTranslatef(-3.0, -2.0, 0.0);
241  glRotatef(fAngle, 0.0, 0.0, 1.0);
242  drawGearGL(1);
243  glPopMatrix();
244 
245  glPushMatrix();
246  glTranslatef(3.1f, -2.0f, 0.0f);
247  glRotatef((float)(-2.0 * fAngle - 9.0), 0.0, 0.0, 1.0);
248  drawGearGL(2);
249  glPopMatrix();
250 
251  glPushMatrix();
252  glTranslatef(-3.1f, 2.2f, -1.8f);
253  glRotatef(90.0f, 1.0f, 0.0f, 0.0f);
254  glRotatef((float)(2.0 * fAngle - 2.0), 0.0, 0.0, 1.0);
255  drawGearGL(3);
256  glPopMatrix();
257 
258  glPopMatrix();
259 }
260 
261 static void setViewPortGL(GHOST_WindowHandle hWindow)
262 {
263  GHOST_RectangleHandle hRect = NULL;
264  GLfloat w, h;
265 
267  hRect = GHOST_GetClientBounds(hWindow);
268 
270  h = 1.0;
271 
272  glViewport(0, 0, GHOST_GetWidthRectangle(hRect), GHOST_GetHeightRectangle(hRect));
273 
274  glMatrixMode(GL_PROJECTION);
275  glLoadIdentity();
276  glFrustum(-w, w, -h, h, 5.0, 60.0);
277  /* glOrtho(0, bnds.getWidth(), 0, bnds.getHeight(), -10, 10); */
278  glMatrixMode(GL_MODELVIEW);
279  glLoadIdentity();
280  glTranslatef(0.0, 0.0, -40.0);
281 
282  glClearColor(.2f, 0.0f, 0.0f, 0.0f);
283  glClear(GL_COLOR_BUFFER_BIT);
284 
285  GHOST_DisposeRectangle(hRect);
286 }
287 
288 int processEvent(GHOST_EventHandle hEvent, GHOST_TUserDataPtr userData)
289 {
290  int handled = 1;
291  int cursor;
292  int visibility;
293  GHOST_TEventKeyData *keyData = NULL;
294  GHOST_TEventWheelData *wheelData = NULL;
295  GHOST_DisplaySetting setting;
296  GHOST_WindowHandle window = GHOST_GetEventWindow(hEvent);
297 
298  switch (GHOST_GetEventType(hEvent)) {
299 #if 0
300  case GHOST_kEventUnknown:
301  break;
302  case GHOST_kEventCursorButton:
303  break;
305  break;
306 #endif
307  case GHOST_kEventWheel: {
308  wheelData = (GHOST_TEventWheelData *)GHOST_GetEventData(hEvent);
309  if (wheelData->z > 0) {
310  view_rotz += 5.f;
311  }
312  else {
313  view_rotz -= 5.f;
314  }
315  } break;
316 
317  case GHOST_kEventKeyUp:
318  break;
319 
320  case GHOST_kEventKeyDown: {
321  keyData = (GHOST_TEventKeyData *)GHOST_GetEventData(hEvent);
322  switch (keyData->key) {
323  case GHOST_kKeyC: {
324  cursor = sCursor;
325  cursor++;
326  if (cursor >= GHOST_kStandardCursorNumCursors) {
328  }
329  sCursor = (GHOST_TStandardCursor)cursor;
330  GHOST_SetCursorShape(window, sCursor);
331  } break;
332  case GHOST_kKeyF:
334  /* Begin fullscreen mode */
335  setting.bpp = 24;
336  setting.frequency = 85;
337  setting.xPixels = 640;
338  setting.yPixels = 480;
339 
340  /*
341  * setting.bpp = 16;
342  * setting.frequency = 75;
343  * setting.xPixels = 640;
344  * setting.yPixels = 480;
345  */
346 
348  &setting,
349 
350  FALSE /* stereo flag */);
351  }
352  else {
354  sFullScreenWindow = 0;
355  }
356  break;
357  case GHOST_kKeyH: {
358  visibility = GHOST_GetCursorVisibility(window);
359  GHOST_SetCursorVisibility(window, !visibility);
360  } break;
361  case GHOST_kKeyQ:
364  sFullScreenWindow = 0;
365  }
366  sExitRequested = 1;
367  case GHOST_kKeyT:
368  if (!sTestTimer) {
370  }
371  else {
373  sTestTimer = 0;
374  }
375  break;
376  case GHOST_kKeyW: {
377  if (sMainWindow) {
378  char *title = GHOST_GetTitle(sMainWindow);
379  char *ntitle = malloc(strlen(title) + 2);
380 
381  sprintf(ntitle, "%s-", title);
382  GHOST_SetTitle(sMainWindow, ntitle);
383 
384  free(ntitle);
385  free(title);
386  }
387  } break;
388  default:
389  break;
390  }
391  } break;
392 
394  GHOST_WindowHandle window2 = GHOST_GetEventWindow(hEvent);
395  if (window2 == sMainWindow) {
396  sExitRequested = 1;
397  }
398  else {
399  if (sGearsTimer) {
401  sGearsTimer = 0;
402  }
403  GHOST_DisposeWindow(shSystem, window2);
404  }
405  } break;
406 
408  handled = 0;
409  break;
411  handled = 0;
412  break;
414  GHOST_WindowHandle window2 = GHOST_GetEventWindow(hEvent);
415  if (!GHOST_ValidWindow(shSystem, window2))
416  break;
417  setViewPortGL(window2);
418  drawGL();
419  GHOST_SwapWindowBuffers(window2);
420  } break;
421 
422  default:
423  handled = 0;
424  break;
425  }
426  return handled;
427 }
428 
429 int main(int argc, char **argv)
430 {
431  GHOST_GLSettings glSettings = {0};
432  char *title1 = "gears - main window";
433  char *title2 = "gears - secondary window";
434  GHOST_EventConsumerHandle consumer = GHOST_CreateEventConsumer(processEvent, NULL);
435 
436  /* Create the system */
438  GHOST_AddEventConsumer(shSystem, consumer);
439 
440  if (shSystem) {
441  /* Create the main window */
443  NULL,
444  title1,
445  10,
446  64,
447  320,
448  200,
450  false,
452  glSettings);
453  if (!sMainWindow) {
454  printf("could not create main window\n");
455  exit(-1);
456  }
457 
458  /* Create a secondary window */
460  NULL,
461  title2,
462  340,
463  64,
464  320,
465  200,
467  false,
469  glSettings);
470  if (!sSecondaryWindow) {
471  printf("could not create secondary window\n");
472  exit(-1);
473  }
474 
475  /* Install a timer to have the gears running */
477 
478  /* Enter main loop */
479  while (!sExitRequested) {
480  if (!GHOST_ProcessEvents(shSystem, 0)) {
481 #ifdef WIN32
482  /* If there were no events, be nice to other applications */
483  Sleep(10);
484 #endif
485  }
487  }
488  }
489 
490  /* Dispose windows */
493  }
496  }
497 
498  /* Dispose the system */
500 
501  return 0;
502 }
503 
504 static void gearsTimerProc(GHOST_TimerTaskHandle hTask, GHOST_TUns64 time)
505 {
506  GHOST_WindowHandle hWindow = NULL;
507  fAngle += 2.0;
508  view_roty += 1.0;
509  hWindow = (GHOST_WindowHandle)GHOST_GetTimerTaskUserData(hTask);
511  /* Running full screen */
513  }
514  else {
515  if (GHOST_ValidWindow(shSystem, hWindow)) {
516  GHOST_InvalidateWindow(hWindow);
517  }
518  }
519 }
typedef float(TangentPoint)[2]
sqrt(x)+1/max(0
void BLI_kdtree_nd_() free(KDTree *tree)
Definition: kdtree_impl.h:116
static GLfloat fAngle
Definition: GHOST_C-Test.c:53
int processEvent(GHOST_EventHandle hEvent, GHOST_TUserDataPtr userData)
Definition: GHOST_C-Test.c:288
static GHOST_WindowHandle sFullScreenWindow
Definition: GHOST_C-Test.c:59
static void gearsTimerProc(GHOST_TimerTaskHandle task, GHOST_TUns64 time)
Definition: GHOST_C-Test.c:504
static GHOST_SystemHandle shSystem
Definition: GHOST_C-Test.c:55
int main(int argc, char **argv)
Definition: GHOST_C-Test.c:429
static GHOST_WindowHandle sMainWindow
Definition: GHOST_C-Test.c:56
static GLfloat view_roty
Definition: GHOST_C-Test.c:52
static GLfloat view_rotz
Definition: GHOST_C-Test.c:52
static void gearGL(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, GLint teeth, GLfloat tooth_depth)
Definition: GHOST_C-Test.c:68
static void setViewPortGL(GHOST_WindowHandle hWindow)
Definition: GHOST_C-Test.c:261
static GHOST_TimerTaskHandle sTestTimer
Definition: GHOST_C-Test.c:60
static void drawGL(void)
Definition: GHOST_C-Test.c:229
#define FALSE
Definition: GHOST_C-Test.c:33
static GHOST_TimerTaskHandle sGearsTimer
Definition: GHOST_C-Test.c:61
static int sExitRequested
Definition: GHOST_C-Test.c:54
static void testTimerProc(GHOST_TimerTaskHandle task, GHOST_TUns64 time)
Definition: GHOST_C-Test.c:63
static GLfloat view_rotx
Definition: GHOST_C-Test.c:52
static void drawGearGL(int id)
Definition: GHOST_C-Test.c:197
static GHOST_TStandardCursor sCursor
Definition: GHOST_C-Test.c:58
static GHOST_WindowHandle sSecondaryWindow
Definition: GHOST_C-Test.c:57
GHOST C-API function and type declarations.
int GHOST_GetFullScreen(GHOST_SystemHandle systemhandle)
int GHOST_ProcessEvents(GHOST_SystemHandle systemhandle, int waitForEvent)
char * GHOST_GetTitle(GHOST_WindowHandle windowhandle)
GHOST_TInt32 GHOST_GetHeightRectangle(GHOST_RectangleHandle rectanglehandle)
GHOST_SystemHandle GHOST_CreateSystem(void)
Definition: GHOST_C-api.cpp:40
GHOST_TSuccess GHOST_AddEventConsumer(GHOST_SystemHandle systemhandle, GHOST_EventConsumerHandle consumerhandle)
GHOST_TSuccess GHOST_SetCursorVisibility(GHOST_WindowHandle windowhandle, int visible)
GHOST_WindowHandle GHOST_CreateWindow(GHOST_SystemHandle systemhandle, GHOST_WindowHandle parent_windowhandle, const char *title, GHOST_TInt32 left, GHOST_TInt32 top, GHOST_TUns32 width, GHOST_TUns32 height, GHOST_TWindowState state, bool is_dialog, GHOST_TDrawingContextType type, GHOST_GLSettings glSettings)
void GHOST_DisposeRectangle(GHOST_RectangleHandle rectanglehandle)
void GHOST_SetTitle(GHOST_WindowHandle windowhandle, const char *title)
GHOST_TSuccess GHOST_SetCursorShape(GHOST_WindowHandle windowhandle, GHOST_TStandardCursor cursorshape)
GHOST_TUserDataPtr GHOST_GetTimerTaskUserData(GHOST_TimerTaskHandle timertaskhandle)
GHOST_TSuccess GHOST_EndFullScreen(GHOST_SystemHandle systemhandle)
GHOST_TSuccess GHOST_InvalidateWindow(GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_DisposeWindow(GHOST_SystemHandle systemhandle, GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_RemoveTimer(GHOST_SystemHandle systemhandle, GHOST_TimerTaskHandle timertaskhandle)
GHOST_TInt32 GHOST_GetWidthRectangle(GHOST_RectangleHandle rectanglehandle)
GHOST_TSuccess GHOST_SwapWindowBuffers(GHOST_WindowHandle windowhandle)
GHOST_TEventDataPtr GHOST_GetEventData(GHOST_EventHandle eventhandle)
GHOST_WindowHandle GHOST_BeginFullScreen(GHOST_SystemHandle systemhandle, GHOST_DisplaySetting *setting, const int stereoVisual)
GHOST_TSuccess GHOST_ActivateWindowDrawingContext(GHOST_WindowHandle windowhandle)
GHOST_TEventType GHOST_GetEventType(GHOST_EventHandle eventhandle)
GHOST_WindowHandle GHOST_GetEventWindow(GHOST_EventHandle eventhandle)
GHOST_TimerTaskHandle GHOST_InstallTimer(GHOST_SystemHandle systemhandle, GHOST_TUns64 delay, GHOST_TUns64 interval, GHOST_TimerProcPtr timerProc, GHOST_TUserDataPtr userData)
Definition: GHOST_C-api.cpp:93
void GHOST_DispatchEvents(GHOST_SystemHandle systemhandle)
GHOST_EventConsumerHandle GHOST_CreateEventConsumer(GHOST_EventCallbackProcPtr eventCallback, GHOST_TUserDataPtr userdata)
Definition: GHOST_C-api.cpp:74
GHOST_RectangleHandle GHOST_GetClientBounds(GHOST_WindowHandle windowhandle)
int GHOST_GetCursorVisibility(GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_DisposeSystem(GHOST_SystemHandle systemhandle)
Definition: GHOST_C-api.cpp:55
int GHOST_ValidWindow(GHOST_SystemHandle systemhandle, GHOST_WindowHandle windowhandle)
@ GHOST_kWindowStateNormal
Definition: GHOST_Types.h:145
void * GHOST_TUserDataPtr
Definition: GHOST_Types.h:89
GHOST_TStandardCursor
Definition: GHOST_Types.h:222
@ GHOST_kStandardCursorFirstCursor
Definition: GHOST_Types.h:223
@ GHOST_kStandardCursorNumCursors
Definition: GHOST_Types.h:264
unsigned long long GHOST_TUns64
Definition: GHOST_Types.h:86
@ GHOST_kEventWindowClose
Definition: GHOST_Types.h:197
@ GHOST_kEventWheel
Mouse button event.
Definition: GHOST_Types.h:183
@ GHOST_kEventCursorMove
Definition: GHOST_Types.h:180
@ GHOST_kEventWindowActivate
Definition: GHOST_Types.h:198
@ GHOST_kEventWindowUpdate
Definition: GHOST_Types.h:200
@ GHOST_kEventWindowDeactivate
Definition: GHOST_Types.h:199
@ GHOST_kEventKeyDown
Trackpad event.
Definition: GHOST_Types.h:191
@ GHOST_kEventUnknown
Definition: GHOST_Types.h:178
@ GHOST_kEventKeyUp
Definition: GHOST_Types.h:192
@ GHOST_kKeyT
Definition: GHOST_Types.h:319
@ GHOST_kKeyW
Definition: GHOST_Types.h:322
@ GHOST_kKeyC
Definition: GHOST_Types.h:302
@ GHOST_kKeyQ
Definition: GHOST_Types.h:316
@ GHOST_kKeyF
Definition: GHOST_Types.h:305
@ GHOST_kKeyH
Definition: GHOST_Types.h:307
@ GHOST_kDrawingContextTypeOpenGL
Definition: GHOST_Types.h:158
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
#define glEnable
ATTR_WARN_UNUSED_RESULT const BMVert * v
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
Definition: btQuadWord.h:119
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
Definition: btVector3.h:356
double time
#define glBegin
Definition: gl-deprecated.h:34
#define glMaterialfv
#define glTranslatef
#define glPopMatrix
#define glFrustum
#define glVertex3f
#define glMatrixMode
#define glRotatef
#define glPushMatrix
#define glShadeModel
#define glNormal3f
#define glEnd
#define glLightfv
#define glLoadIdentity
uint pos
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
Definition: rall1d.h:319
INLINE Rall1d< T, V, S > sin(const Rall1d< T, V, S > &arg)
Definition: rall1d.h:311
struct blender::compositor::@172::@174 task
GHOST_TUns32 bpp
Definition: GHOST_Types.h:584
GHOST_TUns32 xPixels
Definition: GHOST_Types.h:580
GHOST_TUns32 frequency
Definition: GHOST_Types.h:586
GHOST_TUns32 yPixels
Definition: GHOST_Types.h:582
uint len