Blender
V3.3
|
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "GHOST_C-api.h"
#include <GL/gl.h>
Go to the source code of this file.
Macros | |
#define | FALSE 0 |
Functions | |
static void | gearsTimerProc (GHOST_TimerTaskHandle task, uint64_t time) |
bool | processEvent (GHOST_EventHandle hEvent, GHOST_TUserDataPtr userData) |
static void | testTimerProc (GHOST_TimerTaskHandle task, uint64_t time) |
static void | gearGL (GLfloat inner_radius, GLfloat outer_radius, GLfloat width, GLint teeth, GLfloat tooth_depth) |
static void | drawGearGL (int id) |
static void | drawGL (void) |
static void | setViewPortGL (GHOST_WindowHandle hWindow) |
int | main (int argc, char **argv) |
Variables | |
static GLfloat | view_rotx = 20.0 |
static GLfloat | view_roty = 30.0 |
static GLfloat | view_rotz = 0.0 |
static GLfloat | fAngle = 0.0 |
static int | sExitRequested = 0 |
static GHOST_SystemHandle | shSystem = NULL |
static GHOST_WindowHandle | sMainWindow = NULL |
static GHOST_WindowHandle | sSecondaryWindow = NULL |
static GHOST_TStandardCursor | sCursor = GHOST_kStandardCursorFirstCursor |
static GHOST_WindowHandle | sFullScreenWindow = NULL |
static GHOST_TimerTaskHandle | sTestTimer |
static GHOST_TimerTaskHandle | sGearsTimer |
#define FALSE 0 |
Copyright (C) 2001 NaN Technologies B.V.
Simple test file for the GHOST library. The OpenGL gear code is taken from the Qt sample code which, in turn, is probably taken from somewhere as well.
Definition at line 17 of file GHOST_C-Test.c.
|
static |
Definition at line 181 of file GHOST_C-Test.c.
References gearGL(), glEnable, glLightfv, glMaterialfv, and pos.
Referenced by drawGL().
Definition at line 213 of file GHOST_C-Test.c.
References drawGearGL(), fAngle, glPopMatrix, glPushMatrix, glRotatef, glTranslatef, view_rotx, view_roty, and view_rotz.
Referenced by processEvent().
|
static |
Definition at line 52 of file GHOST_C-Test.c.
References angle(), KDL::cos(), float(), glBegin, glEnd, glNormal3f, glShadeModel, glVertex3f, len, KDL::sin(), sqrt(), v, and width.
Referenced by drawGearGL().
Definition at line 488 of file GHOST_C-Test.c.
References fAngle, GHOST_GetFullScreen(), GHOST_GetTimerTaskUserData(), GHOST_InvalidateWindow(), GHOST_ValidWindow(), NULL, sFullScreenWindow, shSystem, and view_roty.
Referenced by main().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 413 of file GHOST_C-Test.c.
References gearsTimerProc(), GHOST_AddEventConsumer(), GHOST_CreateEventConsumer(), GHOST_CreateSystem(), GHOST_CreateWindow(), GHOST_DispatchEvents(), GHOST_DisposeSystem(), GHOST_DisposeWindow(), GHOST_InstallTimer(), GHOST_kDrawingContextTypeOpenGL, GHOST_kWindowStateNormal, GHOST_ProcessEvents(), GHOST_ValidWindow(), NULL, processEvent(), sExitRequested, sGearsTimer, shSystem, sMainWindow, and sSecondaryWindow.
bool processEvent | ( | GHOST_EventHandle | hEvent, |
GHOST_TUserDataPtr | userData | ||
) |
Definition at line 272 of file GHOST_C-Test.c.
References GHOST_DisplaySetting::bpp, drawGL(), FALSE, free(), GHOST_DisplaySetting::frequency, GHOST_BeginFullScreen(), GHOST_DisposeWindow(), GHOST_EndFullScreen(), GHOST_GetCursorVisibility(), GHOST_GetEventData(), GHOST_GetEventType(), GHOST_GetEventWindow(), GHOST_GetFullScreen(), GHOST_GetTitle(), GHOST_InstallTimer(), GHOST_kEventCursorMove, GHOST_kEventKeyDown, GHOST_kEventKeyUp, GHOST_kEventUnknown, GHOST_kEventWheel, GHOST_kEventWindowActivate, GHOST_kEventWindowClose, GHOST_kEventWindowDeactivate, GHOST_kEventWindowUpdate, GHOST_kKeyC, GHOST_kKeyF, GHOST_kKeyH, GHOST_kKeyQ, GHOST_kKeyT, GHOST_kKeyW, GHOST_kStandardCursorFirstCursor, GHOST_kStandardCursorNumCursors, GHOST_RemoveTimer(), GHOST_SetCursorShape(), GHOST_SetCursorVisibility(), GHOST_SetTitle(), GHOST_SwapWindowBuffers(), GHOST_ValidWindow(), GHOST_TEventKeyData::key, NULL, sCursor, setViewPortGL(), sExitRequested, sFullScreenWindow, sGearsTimer, shSystem, sMainWindow, sTestTimer, testTimerProc(), view_rotz, GHOST_DisplaySetting::xPixels, GHOST_DisplaySetting::yPixels, and GHOST_TEventWheelData::z.
Referenced by main().
|
static |
Definition at line 245 of file GHOST_C-Test.c.
References float(), GHOST_ActivateWindowDrawingContext(), GHOST_DisposeRectangle(), GHOST_GetClientBounds(), GHOST_GetHeightRectangle(), GHOST_GetWidthRectangle(), glFrustum, glLoadIdentity, glMatrixMode, glTranslatef, NULL, and w().
Referenced by processEvent().
|
static |
Definition at line 37 of file GHOST_C-Test.c.
Referenced by drawGL(), EvalTspace(), gearsTimerProc(), and btTransformUtil::integrateTransform().
|
static |
Definition at line 42 of file GHOST_C-Test.c.
Referenced by processEvent().
|
static |
Definition at line 38 of file GHOST_C-Test.c.
Referenced by main(), and processEvent().
|
static |
Definition at line 43 of file GHOST_C-Test.c.
Referenced by gearsTimerProc(), and processEvent().
|
static |
Definition at line 45 of file GHOST_C-Test.c.
Referenced by main(), and processEvent().
|
static |
Definition at line 39 of file GHOST_C-Test.c.
Referenced by gearsTimerProc(), main(), and processEvent().
|
static |
Definition at line 40 of file GHOST_C-Test.c.
Referenced by main(), and processEvent().
|
static |
Definition at line 41 of file GHOST_C-Test.c.
Referenced by main().
|
static |
Definition at line 44 of file GHOST_C-Test.c.
Referenced by processEvent().
|
static |
Definition at line 36 of file GHOST_C-Test.c.
Referenced by drawGL().
|
static |
Definition at line 36 of file GHOST_C-Test.c.
Referenced by drawGL(), and gearsTimerProc().
|
static |
Definition at line 36 of file GHOST_C-Test.c.
Referenced by drawGL(), and processEvent().