Blender V4.3
GHOST_C-Test.c File Reference
#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
 

Macro Definition Documentation

◆ FALSE

#define FALSE   0

Function Documentation

◆ drawGearGL()

static void drawGearGL ( int id)
static

Definition at line 182 of file GHOST_C-Test.c.

References gearGL(), and pos.

Referenced by drawGL().

◆ drawGL()

static void drawGL ( void )
static

Definition at line 214 of file GHOST_C-Test.c.

References drawGearGL(), fAngle, view_rotx, view_roty, and view_rotz.

Referenced by processEvent().

◆ gearGL()

static void gearGL ( GLfloat inner_radius,
GLfloat outer_radius,
GLfloat width,
GLint teeth,
GLfloat tooth_depth )
static

Definition at line 53 of file GHOST_C-Test.c.

References angle(), cos(), float, len, sqrt(), and v.

Referenced by drawGearGL().

◆ gearsTimerProc()

static void gearsTimerProc ( GHOST_TimerTaskHandle task,
uint64_t time )
static

◆ main()

◆ processEvent()

◆ setViewPortGL()

static void setViewPortGL ( GHOST_WindowHandle hWindow)
static

◆ testTimerProc()

static void testTimerProc ( GHOST_TimerTaskHandle task,
uint64_t time )
static

Definition at line 48 of file GHOST_C-Test.c.

References printf.

Referenced by processEvent().

Variable Documentation

◆ fAngle

GLfloat fAngle = 0.0
static

◆ sCursor

Definition at line 43 of file GHOST_C-Test.c.

Referenced by processEvent().

◆ sExitRequested

int sExitRequested = 0
static

Definition at line 39 of file GHOST_C-Test.c.

Referenced by main(), and processEvent().

◆ sFullScreenWindow

GHOST_WindowHandle sFullScreenWindow = NULL
static

Definition at line 44 of file GHOST_C-Test.c.

Referenced by gearsTimerProc(), and processEvent().

◆ sGearsTimer

GHOST_TimerTaskHandle sGearsTimer
static

Definition at line 46 of file GHOST_C-Test.c.

Referenced by main(), and processEvent().

◆ shSystem

GHOST_SystemHandle shSystem = NULL
static

Definition at line 40 of file GHOST_C-Test.c.

Referenced by gearsTimerProc(), main(), and processEvent().

◆ sMainWindow

GHOST_WindowHandle sMainWindow = NULL
static

Definition at line 41 of file GHOST_C-Test.c.

Referenced by main(), and processEvent().

◆ sSecondaryWindow

GHOST_WindowHandle sSecondaryWindow = NULL
static

Definition at line 42 of file GHOST_C-Test.c.

Referenced by main().

◆ sTestTimer

GHOST_TimerTaskHandle sTestTimer
static

Definition at line 45 of file GHOST_C-Test.c.

Referenced by processEvent().

◆ view_rotx

GLfloat view_rotx = 20.0
static

Definition at line 37 of file GHOST_C-Test.c.

Referenced by drawGL().

◆ view_roty

GLfloat view_roty = 30.0
static

Definition at line 37 of file GHOST_C-Test.c.

Referenced by drawGL(), and gearsTimerProc().

◆ view_rotz

GLfloat view_rotz = 0.0
static

Definition at line 37 of file GHOST_C-Test.c.

Referenced by drawGL(), and processEvent().