Blender V4.5
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_TimerTaskHandle sTestTimer
static GHOST_TimerTaskHandle sGearsTimer

Macro Definition Documentation

◆ FALSE

#define FALSE   0

Function Documentation

◆ drawGearGL()

void drawGearGL ( int id)
static

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

References gearGL(), and pos.

Referenced by drawGL().

◆ drawGL()

void drawGL ( void )
static

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

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

Referenced by processEvent().

◆ gearGL()

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

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

References angle(), cos, i, len, sin, sqrt, and v.

Referenced by drawGearGL().

◆ gearsTimerProc()

void gearsTimerProc ( GHOST_TimerTaskHandle task,
uint64_t time )
static

◆ main()

◆ processEvent()

◆ setViewPortGL()

void setViewPortGL ( GHOST_WindowHandle hWindow)
static

◆ testTimerProc()

void testTimerProc ( GHOST_TimerTaskHandle task,
uint64_t time )
static

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

References printf.

Referenced by processEvent().

Variable Documentation

◆ fAngle

◆ 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().

◆ sGearsTimer

GHOST_TimerTaskHandle sGearsTimer
static

Definition at line 45 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 44 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(), and RenderCamera().

◆ view_roty

GLfloat view_roty = 30.0
static

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

Referenced by drawGL(), gearsTimerProc(), gearsTimerProc(), and RenderCamera().

◆ view_rotz

GLfloat view_rotz = 0.0
static

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

Referenced by drawGL(), processEvent(), and RenderCamera().