KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
scissor.c File Reference
#include <kos.h>
#include <KGL/gl.h>
#include <KGL/glu.h>
#include <KGL/glut.h>

Macros

#define NUM_DEMOS   5
 

Enumerations

enum  {
  USERCLIP_INSIDE = 0 , USERCLIP_OUTSIDE , USERCLIP_DISABLED , QUAD_SCREEN_UNCLIPPED ,
  QUAD_SCREEN_CLIPPED
}
 

Functions

GLuint glTextureLoadPVR (char *fname, unsigned char isMipMapped, unsigned char glMipMap)
 
void quad (int x, int y)
 
void rect (int x, int y, int width, int height)
 
static void draw_gl (float rot, float x, float y)
 
static void draw_ortho_scene (void)
 
static void draw_perspective_scene (void)
 
int main (int argc, char **argv)
 

Variables

static char demo [NUM_DEMOS][80]
 
static int selected = USERCLIP_INSIDE
 
static GLint x = 0
 
static GLint y = 0
 
static GLfloat rot = 0.0f
 
static GLfloat rtri = 0.0f
 
static GLfloat rquad = 0.0f
 
static GLuint texture
 
pvr_init_params_t params
 

Macro Definition Documentation

◆ NUM_DEMOS

#define NUM_DEMOS   5

Referenced by main().

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
USERCLIP_INSIDE 
USERCLIP_OUTSIDE 
USERCLIP_DISABLED 
QUAD_SCREEN_UNCLIPPED 
QUAD_SCREEN_CLIPPED 

Function Documentation

◆ draw_gl()

static void draw_gl ( float rot,
float x,
float y )
static

References rot, rquad, rtri, x, and y.

◆ draw_ortho_scene()

static void draw_ortho_scene ( void )
static

References rect(), texture, x, and y.

Referenced by main().

◆ draw_perspective_scene()

static void draw_perspective_scene ( void )
static

References draw_gl(), and rot.

Referenced by main().

◆ glTextureLoadPVR()

GLuint glTextureLoadPVR ( char * fname,
unsigned char isMipMapped,
unsigned char glMipMap )
extern

Referenced by main().

◆ main()

◆ quad()

void quad ( int x,
int y )

References x, and y.

◆ rect()

void rect ( int x,
int y,
int width,
int height )

References x, and y.

Referenced by draw_ortho_scene().

Variable Documentation

◆ demo

char demo[NUM_DEMOS][80] ( void )
static
Initial value:
= {
{ "glEnable( GL_SCISSOR_TEST )" },
{ "glEnable( GL_KOS_USERCLIP_OUTSIDE )" },
{ "glDisable( GL_SCISSOR_TEST )" },
{ "Four viewports >>> no clipping <<<" },
{ "Four viewports >>> clipped <<<" }
}

Referenced by main().

◆ params

Initial value:
= {
512 * 1024,
0, 0, 0, 0, 0
}
#define PVR_BINSIZE_16
16-word (64-byte) length
Definition pvr.h:978
#define PVR_BINSIZE_0
0-length (disables the list)
Definition pvr.h:976

◆ rot

GLfloat rot = 0.0f
static

◆ rquad

GLfloat rquad = 0.0f
static

Referenced by draw_gl(), and main().

◆ rtri

GLfloat rtri = 0.0f
static

Referenced by draw_gl(), and main().

◆ selected

int selected = USERCLIP_INSIDE
static

Referenced by main().

◆ texture

GLuint texture
static

Referenced by draw_ortho_scene(), and main().

◆ x

◆ y