KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
nehe26.c File Reference
#include <kos.h>
#include <stdlib.h>
#include <stdbool.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glkos.h>

Macros

#define SCREEN_WIDTH   640
 
#define SCREEN_HEIGHT   400
 
#define MORPHS   4
 
#define NOT_LAST   !(state->buttons & last)
 

Functions

bool objallocate (object *k, size_t n)
 
void objfree (object *k)
 
void Quit (void)
 
bool objload (char *name, object *k)
 
vertex calculate (int i)
 
bool initGL (GLvoid)
 
void draw_gl (void)
 
int main (int argc, char **argv)
 

Variables

GLfloat xrot
 
GLfloat yrot
 
GLfloat zrot
 
GLfloat cx
 
GLfloat cy
 
GLfloat cz = -15
 
GLfloat xspeed
 
GLfloat yspeed
 
GLfloat zspeed
 
int key = 1
 
int step = 0
 
int steps = 200
 
bool morph = false
 
size_t maxver
 
object morph1
 
object morph2
 
object morph3
 
object morph4
 
object helper
 
object * sour
 
object * dest
 

Macro Definition Documentation

◆ MORPHS

#define MORPHS   4

◆ NOT_LAST

#define NOT_LAST   !(state->buttons & last)

Referenced by main().

◆ SCREEN_HEIGHT

#define SCREEN_HEIGHT   400

Referenced by initGL().

◆ SCREEN_WIDTH

#define SCREEN_WIDTH   640

Referenced by initGL().

Function Documentation

◆ calculate()

vertex calculate ( int i)

References dest, sour, and steps.

Referenced by draw_gl().

◆ draw_gl()

void draw_gl ( void )

References calculate(), cx, cy, cz, dest, helper, morph, morph1, sour, step, steps, xrot, xspeed, yrot, yspeed, zrot, and zspeed.

Referenced by main().

◆ initGL()

bool initGL ( GLvoid )

◆ main()

◆ objallocate()

bool objallocate ( object * k,
size_t n )

References calloc(), and k.

Referenced by initGL(), and objload().

◆ objfree()

void objfree ( object * k)

References free(), and k.

Referenced by Quit(), and Quit().

◆ objload()

bool objload ( char * name,
object * k )

References k, maxver, objallocate(), printf, and rx.

Referenced by initGL().

◆ Quit()

void Quit ( void )

References helper, morph1, morph2, morph3, morph4, and objfree().

Referenced by main().

Variable Documentation

◆ cx

GLfloat cx

Referenced by draw_gl().

◆ cy

GLfloat cy

Referenced by draw_gl().

◆ cz

GLfloat cz = -15

Referenced by draw_gl().

◆ dest

◆ helper

object helper

Referenced by draw_gl(), initGL(), Quit(), and Quit().

◆ key

int key = 1

◆ maxver

size_t maxver

Referenced by initGL(), and objload().

◆ morph

bool morph = false

Referenced by draw_gl(), and main().

◆ morph1

object morph1

Referenced by draw_gl(), initGL(), main(), Quit(), and Quit().

◆ morph2

object morph2

Referenced by initGL(), main(), Quit(), and Quit().

◆ morph3

object morph3

Referenced by initGL(), main(), Quit(), and Quit().

◆ morph4

object morph4

Referenced by initGL(), main(), Quit(), and Quit().

◆ sour

object * sour

Referenced by calculate(), draw_gl(), and initGL().

◆ step

int step = 0

Referenced by draw_gl().

◆ steps

int steps = 200

Referenced by calculate(), and draw_gl().

◆ xrot

GLfloat xrot

Referenced by draw_gl(), and main().

◆ xspeed

GLfloat xspeed

Referenced by draw_gl(), and main().

◆ yrot

GLfloat yrot

Referenced by draw_gl(), and main().

◆ yspeed

GLfloat yspeed

Referenced by draw_gl(), and main().

◆ zrot

GLfloat zrot

Referenced by draw_gl(), and main().

◆ zspeed

GLfloat zspeed

Referenced by draw_gl(), and main().