Blender  V3.3
GHOST_C-Test.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2001-2002 NaN Holding BV. All rights reserved. */
3 
12 #include <math.h>
13 #include <stdio.h>
14 #include <stdlib.h>
15 #include <string.h>
16 
17 #define FALSE 0
18 
19 #include "GHOST_C-api.h"
20 
21 #if defined(WIN32) || defined(__APPLE__)
22 # ifdef WIN32
23 # include <GL/gl.h>
24 # include <windows.h>
25 # else /* WIN32 */
26 /* __APPLE__ is defined */
27 # include <AGL/gl.h>
28 # endif /* WIN32 */
29 #else /* defined(WIN32) || defined(__APPLE__) */
30 # include <GL/gl.h>
31 #endif /* defined(WIN32) || defined(__APPLE__) */
32 
33 static void gearsTimerProc(GHOST_TimerTaskHandle task, uint64_t time);
34 bool processEvent(GHOST_EventHandle hEvent, GHOST_TUserDataPtr userData);
35 
36 static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0;
37 static GLfloat fAngle = 0.0;
38 static int sExitRequested = 0;
39 static GHOST_SystemHandle shSystem = NULL;
40 static GHOST_WindowHandle sMainWindow = NULL;
41 static GHOST_WindowHandle sSecondaryWindow = NULL;
43 static GHOST_WindowHandle sFullScreenWindow = NULL;
44 static GHOST_TimerTaskHandle sTestTimer;
45 static GHOST_TimerTaskHandle sGearsTimer;
46 
47 static void testTimerProc(GHOST_TimerTaskHandle task, uint64_t time)
48 {
49  printf("timer1, time=%d\n", (int)time);
50 }
51 
52 static void gearGL(
53  GLfloat inner_radius, GLfloat outer_radius, GLfloat width, GLint teeth, GLfloat tooth_depth)
54 {
55  GLint i;
56  GLfloat r0, r1, r2;
57  GLfloat angle, da;
58  GLfloat u, v, len;
59  const double pi = 3.14159264;
60 
61  r0 = inner_radius;
62  r1 = (float)(outer_radius - tooth_depth / 2.0);
63  r2 = (float)(outer_radius + tooth_depth / 2.0);
64 
65  da = (float)(2.0 * pi / teeth / 4.0);
66 
67  glShadeModel(GL_FLAT);
68  glNormal3f(0.0, 0.0, 1.0);
69 
70  /* draw front face */
71  glBegin(GL_QUAD_STRIP);
72  for (i = 0; i <= teeth; i++) {
73  angle = (float)(i * 2.0 * pi / teeth);
74  glVertex3f((float)(r0 * cos(angle)), (float)(r0 * sin(angle)), (float)(width * 0.5));
75  glVertex3f((float)(r1 * cos(angle)), (float)(r1 * sin(angle)), (float)(width * 0.5));
76  glVertex3f((float)(r0 * cos(angle)), (float)(r0 * sin(angle)), (float)(width * 0.5));
77  glVertex3f((float)(r1 * cos(angle + 3 * da)),
78  (float)(r1 * sin(angle + 3 * da)),
79  (float)(width * 0.5));
80  }
81  glEnd();
82 
83  /* draw front sides of teeth */
84  glBegin(GL_QUADS);
85  da = (float)(2.0 * pi / teeth / 4.0);
86  for (i = 0; i < teeth; i++) {
87  angle = (float)(i * 2.0 * pi / teeth);
88  glVertex3f((float)(r1 * cos(angle)), (float)(r1 * sin(angle)), (float)(width * 0.5));
89  glVertex3f((float)(r2 * cos(angle + da)), (float)(r2 * sin(angle + da)), (float)(width * 0.5));
90  glVertex3f((float)(r2 * cos(angle + 2 * da)),
91  (float)(r2 * sin(angle + 2 * da)),
92  (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  glNormal3f(0.0, 0.0, -1.0);
100 
101  /* draw back face */
102  glBegin(GL_QUAD_STRIP);
103  for (i = 0; i <= teeth; i++) {
104  angle = (float)(i * 2.0 * pi / teeth);
105  glVertex3f((float)(r1 * cos(angle)), (float)(r1 * sin(angle)), (float)(-width * 0.5));
106  glVertex3f((float)(r0 * cos(angle)), (float)(r0 * sin(angle)), (float)(-width * 0.5));
107  glVertex3f((float)(r1 * cos(angle + 3 * da)),
108  (float)(r1 * sin(angle + 3 * da)),
109  (float)(-width * 0.5));
110  glVertex3f((float)(r0 * cos(angle)), (float)(r0 * sin(angle)), (float)(-width * 0.5));
111  }
112  glEnd();
113 
114  /* draw back sides of teeth */
115  glBegin(GL_QUADS);
116  da = (float)(2.0 * pi / teeth / 4.0);
117  for (i = 0; i < teeth; i++) {
118  angle = (float)(i * 2.0 * pi / teeth);
119  glVertex3f((float)(r1 * cos(angle + 3 * da)),
120  (float)(r1 * sin(angle + 3 * da)),
121  (float)(-width * 0.5));
122  glVertex3f((float)(r2 * cos(angle + 2 * da)),
123  (float)(r2 * sin(angle + 2 * da)),
124  (float)(-width * 0.5));
125  glVertex3f(
126  (float)(r2 * cos(angle + da)), (float)(r2 * sin(angle + da)), (float)(-width * 0.5));
127  glVertex3f((float)(r1 * cos(angle)), (float)(r1 * sin(angle)), (float)(-width * 0.5));
128  }
129  glEnd();
130 
131  /* draw outward faces of teeth */
132  glBegin(GL_QUAD_STRIP);
133  for (i = 0; i < teeth; i++) {
134  angle = (float)(i * 2.0 * pi / teeth);
135  glVertex3f((float)(r1 * cos(angle)), (float)(r1 * sin(angle)), (float)(width * 0.5));
136  glVertex3f((float)(r1 * cos(angle)), (float)(r1 * sin(angle)), (float)(-width * 0.5));
137  u = (float)(r2 * cos(angle + da) - r1 * cos(angle));
138  v = (float)(r2 * sin(angle + da) - r1 * sin(angle));
139  len = (float)(sqrt(u * u + v * v));
140  u /= len;
141  v /= len;
142  glNormal3f(v, -u, 0.0);
143  glVertex3f((float)(r2 * cos(angle + da)), (float)(r2 * sin(angle + da)), (float)(width * 0.5));
144  glVertex3f(
145  (float)(r2 * cos(angle + da)), (float)(r2 * sin(angle + da)), (float)(-width * 0.5));
146  glNormal3f((float)(cos(angle)), (float)(sin(angle)), 0.0);
147  glVertex3f((float)(r2 * cos(angle + 2 * da)),
148  (float)(r2 * sin(angle + 2 * da)),
149  (float)(width * 0.5));
150  glVertex3f((float)(r2 * cos(angle + 2 * da)),
151  (float)(r2 * sin(angle + 2 * da)),
152  (float)(-width * 0.5));
153  u = (float)(r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da));
154  v = (float)(r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da));
155  glNormal3f(v, -u, 0.0);
156  glVertex3f((float)(r1 * cos(angle + 3 * da)),
157  (float)(r1 * sin(angle + 3 * da)),
158  (float)(width * 0.5));
159  glVertex3f((float)(r1 * cos(angle + 3 * da)),
160  (float)(r1 * sin(angle + 3 * da)),
161  (float)(-width * 0.5));
162  glNormal3f((float)(cos(angle)), (float)(sin(angle)), 0.0);
163  }
164  glVertex3f((float)(r1 * cos(0.0)), (float)(r1 * sin(0.0)), (float)(width * 0.5));
165  glVertex3f((float)(r1 * cos(0.0)), (float)(r1 * sin(0.0)), (float)(-width * 0.5));
166  glEnd();
167 
168  glShadeModel(GL_SMOOTH);
169 
170  /* draw inside radius cylinder */
171  glBegin(GL_QUAD_STRIP);
172  for (i = 0; i <= teeth; i++) {
173  angle = (float)(i * 2.0 * pi / teeth);
174  glNormal3f((float)(-cos(angle)), (float)(-sin(angle)), 0.0);
175  glVertex3f((float)(r0 * cos(angle)), (float)(r0 * sin(angle)), (float)(-width * 0.5));
176  glVertex3f((float)(r0 * cos(angle)), (float)(r0 * sin(angle)), (float)(width * 0.5));
177  }
178  glEnd();
179 }
180 
181 static void drawGearGL(int id)
182 {
183  static GLfloat pos[4] = {5.0f, 5.0f, 10.0f, 1.0f};
184  static GLfloat ared[4] = {0.8f, 0.1f, 0.0f, 1.0f};
185  static GLfloat agreen[4] = {0.0f, 0.8f, 0.2f, 1.0f};
186  static GLfloat ablue[4] = {0.2f, 0.2f, 1.0f, 1.0f};
187 
188  glLightfv(GL_LIGHT0, GL_POSITION, pos);
189  glEnable(GL_CULL_FACE);
190  glEnable(GL_LIGHTING);
191  glEnable(GL_LIGHT0);
192  glEnable(GL_DEPTH_TEST);
193 
194  switch (id) {
195  case 1:
196  glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, ared);
197  gearGL(1.0f, 4.0f, 1.0f, 20, 0.7f);
198  break;
199  case 2:
200  glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, agreen);
201  gearGL(0.5f, 2.0f, 2.0f, 10, 0.7f);
202  break;
203  case 3:
204  glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, ablue);
205  gearGL(1.3f, 2.0f, 0.5f, 10, 0.7f);
206  break;
207  default:
208  break;
209  }
210  glEnable(GL_NORMALIZE);
211 }
212 
213 static void drawGL(void)
214 {
215  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
216 
217  glPushMatrix();
218 
219  glRotatef(view_rotx, 1.0, 0.0, 0.0);
220  glRotatef(view_roty, 0.0, 1.0, 0.0);
221  glRotatef(view_rotz, 0.0, 0.0, 1.0);
222 
223  glPushMatrix();
224  glTranslatef(-3.0, -2.0, 0.0);
225  glRotatef(fAngle, 0.0, 0.0, 1.0);
226  drawGearGL(1);
227  glPopMatrix();
228 
229  glPushMatrix();
230  glTranslatef(3.1f, -2.0f, 0.0f);
231  glRotatef((float)(-2.0 * fAngle - 9.0), 0.0, 0.0, 1.0);
232  drawGearGL(2);
233  glPopMatrix();
234 
235  glPushMatrix();
236  glTranslatef(-3.1f, 2.2f, -1.8f);
237  glRotatef(90.0f, 1.0f, 0.0f, 0.0f);
238  glRotatef((float)(2.0 * fAngle - 2.0), 0.0, 0.0, 1.0);
239  drawGearGL(3);
240  glPopMatrix();
241 
242  glPopMatrix();
243 }
244 
245 static void setViewPortGL(GHOST_WindowHandle hWindow)
246 {
247  GHOST_RectangleHandle hRect = NULL;
248  GLfloat w, h;
249 
251  hRect = GHOST_GetClientBounds(hWindow);
252 
254  h = 1.0;
255 
256  glViewport(0, 0, GHOST_GetWidthRectangle(hRect), GHOST_GetHeightRectangle(hRect));
257 
258  glMatrixMode(GL_PROJECTION);
259  glLoadIdentity();
260  glFrustum(-w, w, -h, h, 5.0, 60.0);
261  // glOrtho(0, bnds.getWidth(), 0, bnds.getHeight(), -10, 10);
262  glMatrixMode(GL_MODELVIEW);
263  glLoadIdentity();
264  glTranslatef(0.0, 0.0, -40.0);
265 
266  glClearColor(.2f, 0.0f, 0.0f, 0.0f);
267  glClear(GL_COLOR_BUFFER_BIT);
268 
269  GHOST_DisposeRectangle(hRect);
270 }
271 
272 bool processEvent(GHOST_EventHandle hEvent, GHOST_TUserDataPtr userData)
273 {
274  bool handled = true;
275  int cursor;
276  int visibility;
277  GHOST_TEventKeyData *keyData = NULL;
278  GHOST_TEventWheelData *wheelData = NULL;
279  GHOST_DisplaySetting setting;
280  GHOST_WindowHandle window = GHOST_GetEventWindow(hEvent);
281 
282  switch (GHOST_GetEventType(hEvent)) {
283 #if 0
284  case GHOST_kEventUnknown:
285  break;
286  case GHOST_kEventCursorButton:
287  break;
289  break;
290 #endif
291  case GHOST_kEventWheel: {
292  wheelData = (GHOST_TEventWheelData *)GHOST_GetEventData(hEvent);
293  if (wheelData->z > 0) {
294  view_rotz += 5.f;
295  }
296  else {
297  view_rotz -= 5.f;
298  }
299  } break;
300 
301  case GHOST_kEventKeyUp:
302  break;
303 
304  case GHOST_kEventKeyDown: {
305  keyData = (GHOST_TEventKeyData *)GHOST_GetEventData(hEvent);
306  switch (keyData->key) {
307  case GHOST_kKeyC: {
308  cursor = sCursor;
309  cursor++;
310  if (cursor >= GHOST_kStandardCursorNumCursors) {
312  }
313  sCursor = (GHOST_TStandardCursor)cursor;
314  GHOST_SetCursorShape(window, sCursor);
315  } break;
316  case GHOST_kKeyF:
318  /* Begin fullscreen mode */
319  setting.bpp = 24;
320  setting.frequency = 85;
321  setting.xPixels = 640;
322  setting.yPixels = 480;
323 
324  /*
325  * setting.bpp = 16;
326  * setting.frequency = 75;
327  * setting.xPixels = 640;
328  * setting.yPixels = 480;
329  */
330 
332  &setting,
333 
334  FALSE /* stereo flag */);
335  }
336  else {
338  sFullScreenWindow = 0;
339  }
340  break;
341  case GHOST_kKeyH: {
342  visibility = GHOST_GetCursorVisibility(window);
343  GHOST_SetCursorVisibility(window, !visibility);
344  } break;
345  case GHOST_kKeyQ:
348  sFullScreenWindow = 0;
349  }
350  sExitRequested = 1;
351  case GHOST_kKeyT:
352  if (!sTestTimer) {
354  }
355  else {
357  sTestTimer = 0;
358  }
359  break;
360  case GHOST_kKeyW: {
361  if (sMainWindow) {
362  char *title = GHOST_GetTitle(sMainWindow);
363  char *ntitle = malloc(strlen(title) + 2);
364 
365  sprintf(ntitle, "%s-", title);
366  GHOST_SetTitle(sMainWindow, ntitle);
367 
368  free(ntitle);
369  free(title);
370  }
371  } break;
372  default:
373  break;
374  }
375  } break;
376 
378  GHOST_WindowHandle window2 = GHOST_GetEventWindow(hEvent);
379  if (window2 == sMainWindow) {
380  sExitRequested = 1;
381  }
382  else {
383  if (sGearsTimer) {
385  sGearsTimer = 0;
386  }
387  GHOST_DisposeWindow(shSystem, window2);
388  }
389  } break;
390 
392  handled = false;
393  break;
395  handled = false;
396  break;
398  GHOST_WindowHandle window2 = GHOST_GetEventWindow(hEvent);
399  if (!GHOST_ValidWindow(shSystem, window2))
400  break;
401  setViewPortGL(window2);
402  drawGL();
403  GHOST_SwapWindowBuffers(window2);
404  } break;
405 
406  default:
407  handled = false;
408  break;
409  }
410  return handled;
411 }
412 
413 int main(int argc, char **argv)
414 {
415  GHOST_GLSettings glSettings = {0};
416  char *title1 = "gears - main window";
417  char *title2 = "gears - secondary window";
418  GHOST_EventConsumerHandle consumer = GHOST_CreateEventConsumer(processEvent, NULL);
419 
420  /* Create the system */
422  GHOST_AddEventConsumer(shSystem, consumer);
423 
424  if (shSystem) {
425  /* Create the main window */
427  NULL,
428  title1,
429  10,
430  64,
431  320,
432  200,
434  false,
436  glSettings);
437  if (!sMainWindow) {
438  printf("could not create main window\n");
439  exit(-1);
440  }
441 
442  /* Create a secondary window */
444  NULL,
445  title2,
446  340,
447  64,
448  320,
449  200,
451  false,
453  glSettings);
454  if (!sSecondaryWindow) {
455  printf("could not create secondary window\n");
456  exit(-1);
457  }
458 
459  /* Install a timer to have the gears running */
461 
462  /* Enter main loop */
463  while (!sExitRequested) {
464  if (!GHOST_ProcessEvents(shSystem, false)) {
465 #ifdef WIN32
466  /* If there were no events, be nice to other applications */
467  Sleep(10);
468 #endif
469  }
471  }
472  }
473 
474  /* Dispose windows */
477  }
480  }
481 
482  /* Dispose the system */
484 
485  return 0;
486 }
487 
488 static void gearsTimerProc(GHOST_TimerTaskHandle hTask, uint64_t time)
489 {
490  GHOST_WindowHandle hWindow = NULL;
491  fAngle += 2.0;
492  view_roty += 1.0;
493  hWindow = (GHOST_WindowHandle)GHOST_GetTimerTaskUserData(hTask);
495  /* Running full screen */
497  }
498  else {
499  if (GHOST_ValidWindow(shSystem, hWindow)) {
500  GHOST_InvalidateWindow(hWindow);
501  }
502  }
503 }
typedef float(TangentPoint)[2]
sqrt(x)+1/max(0
void BLI_kdtree_nd_() free(KDTree *tree)
Definition: kdtree_impl.h:102
static GLfloat fAngle
Definition: GHOST_C-Test.c:37
static void gearsTimerProc(GHOST_TimerTaskHandle task, uint64_t time)
Definition: GHOST_C-Test.c:488
static GHOST_WindowHandle sFullScreenWindow
Definition: GHOST_C-Test.c:43
static GHOST_SystemHandle shSystem
Definition: GHOST_C-Test.c:39
int main(int argc, char **argv)
Definition: GHOST_C-Test.c:413
static GHOST_WindowHandle sMainWindow
Definition: GHOST_C-Test.c:40
static GLfloat view_roty
Definition: GHOST_C-Test.c:36
static GLfloat view_rotz
Definition: GHOST_C-Test.c:36
static void gearGL(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, GLint teeth, GLfloat tooth_depth)
Definition: GHOST_C-Test.c:52
static void setViewPortGL(GHOST_WindowHandle hWindow)
Definition: GHOST_C-Test.c:245
static GHOST_TimerTaskHandle sTestTimer
Definition: GHOST_C-Test.c:44
static void testTimerProc(GHOST_TimerTaskHandle task, uint64_t time)
Definition: GHOST_C-Test.c:47
static void drawGL(void)
Definition: GHOST_C-Test.c:213
#define FALSE
Definition: GHOST_C-Test.c:17
static GHOST_TimerTaskHandle sGearsTimer
Definition: GHOST_C-Test.c:45
static int sExitRequested
Definition: GHOST_C-Test.c:38
static GLfloat view_rotx
Definition: GHOST_C-Test.c:36
static void drawGearGL(int id)
Definition: GHOST_C-Test.c:181
static GHOST_TStandardCursor sCursor
Definition: GHOST_C-Test.c:42
static GHOST_WindowHandle sSecondaryWindow
Definition: GHOST_C-Test.c:41
bool processEvent(GHOST_EventHandle hEvent, GHOST_TUserDataPtr userData)
Definition: GHOST_C-Test.c:272
GHOST C-API function and type declarations.
char * GHOST_GetTitle(GHOST_WindowHandle windowhandle)
int32_t GHOST_GetWidthRectangle(GHOST_RectangleHandle rectanglehandle)
bool GHOST_GetFullScreen(GHOST_SystemHandle systemhandle)
GHOST_WindowHandle GHOST_BeginFullScreen(GHOST_SystemHandle systemhandle, GHOST_DisplaySetting *setting, const bool stereoVisual)
GHOST_SystemHandle GHOST_CreateSystem(void)
Definition: GHOST_C-api.cpp:25
GHOST_TSuccess GHOST_AddEventConsumer(GHOST_SystemHandle systemhandle, GHOST_EventConsumerHandle consumerhandle)
void GHOST_DisposeRectangle(GHOST_RectangleHandle rectanglehandle)
bool GHOST_ProcessEvents(GHOST_SystemHandle systemhandle, bool waitForEvent)
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)
Definition: GHOST_C-api.cpp:89
int32_t GHOST_GetHeightRectangle(GHOST_RectangleHandle rectanglehandle)
GHOST_TimerTaskHandle GHOST_InstallTimer(GHOST_SystemHandle systemhandle, uint64_t delay, uint64_t interval, GHOST_TimerProcPtr timerProc, GHOST_TUserDataPtr userData)
Definition: GHOST_C-api.cpp:78
GHOST_TSuccess GHOST_SwapWindowBuffers(GHOST_WindowHandle windowhandle)
GHOST_TEventDataPtr GHOST_GetEventData(GHOST_EventHandle eventhandle)
bool GHOST_GetCursorVisibility(GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_SetCursorVisibility(GHOST_WindowHandle windowhandle, bool visible)
GHOST_TSuccess GHOST_ActivateWindowDrawingContext(GHOST_WindowHandle windowhandle)
bool GHOST_ValidWindow(GHOST_SystemHandle systemhandle, GHOST_WindowHandle windowhandle)
GHOST_TEventType GHOST_GetEventType(GHOST_EventHandle eventhandle)
GHOST_WindowHandle GHOST_GetEventWindow(GHOST_EventHandle eventhandle)
void GHOST_DispatchEvents(GHOST_SystemHandle systemhandle)
GHOST_WindowHandle GHOST_CreateWindow(GHOST_SystemHandle systemhandle, GHOST_WindowHandle parent_windowhandle, const char *title, int32_t left, int32_t top, uint32_t width, uint32_t height, GHOST_TWindowState state, bool is_dialog, GHOST_TDrawingContextType type, GHOST_GLSettings glSettings)
GHOST_EventConsumerHandle GHOST_CreateEventConsumer(GHOST_EventCallbackProcPtr eventCallback, GHOST_TUserDataPtr userdata)
Definition: GHOST_C-api.cpp:59
GHOST_RectangleHandle GHOST_GetClientBounds(GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_DisposeSystem(GHOST_SystemHandle systemhandle)
Definition: GHOST_C-api.cpp:40
@ GHOST_kWindowStateNormal
Definition: GHOST_Types.h:130
void * GHOST_TUserDataPtr
Definition: GHOST_Types.h:72
GHOST_TStandardCursor
Definition: GHOST_Types.h:214
@ GHOST_kStandardCursorFirstCursor
Definition: GHOST_Types.h:215
@ GHOST_kStandardCursorNumCursors
Definition: GHOST_Types.h:256
@ GHOST_kEventWindowClose
Definition: GHOST_Types.h:189
@ GHOST_kEventWheel
Definition: GHOST_Types.h:175
@ GHOST_kEventCursorMove
Definition: GHOST_Types.h:172
@ GHOST_kEventWindowActivate
Definition: GHOST_Types.h:190
@ GHOST_kEventWindowUpdate
Definition: GHOST_Types.h:192
@ GHOST_kEventWindowDeactivate
Definition: GHOST_Types.h:191
@ GHOST_kEventKeyDown
Definition: GHOST_Types.h:183
@ GHOST_kEventUnknown
Definition: GHOST_Types.h:170
@ GHOST_kEventKeyUp
Definition: GHOST_Types.h:184
@ GHOST_kKeyT
Definition: GHOST_Types.h:311
@ GHOST_kKeyW
Definition: GHOST_Types.h:314
@ GHOST_kKeyC
Definition: GHOST_Types.h:294
@ GHOST_kKeyQ
Definition: GHOST_Types.h:308
@ GHOST_kKeyF
Definition: GHOST_Types.h:297
@ GHOST_kKeyH
Definition: GHOST_Types.h:299
@ GHOST_kDrawingContextTypeOpenGL
Definition: GHOST_Types.h:150
#define glEnable
_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
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
int len
Definition: draw_manager.c:108
#define glBegin
Definition: gl-deprecated.h:18
#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::@179::@181 task
unsigned __int64 uint64_t
Definition: stdint.h:90