Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Added a test program framework for easy initialization.

Started work on multi-window OpenGL demo
  • Loading branch information
slouken committed Jul 18, 2006
1 parent ebcb7b7 commit 7a885aaf22ccbdb36976ea6c15bf430fe5f37cb5
Showing with 1,801 additions and 98 deletions.
  1. +13 −13 include/SDL_events.h
  2. +10 −4 test/Makefile.in
  3. +927 −0 test/common.c
  4. +47 −0 test/common.h
  5. +770 −0 test/testgl2.c
  6. +34 −81 test/testsprite2.c
@@ -119,7 +119,7 @@ typedef enum
/**
* \struct SDL_WindowEvent
*
* \brief Window state change event data
* \brief Window state change event data (event.window.*)
*/
typedef struct SDL_WindowEvent
{
@@ -133,7 +133,7 @@ typedef struct SDL_WindowEvent
/**
* \struct SDL_KeyboardEvent
*
* \brief Keyboard button event structure
* \brief Keyboard button event structure (event.key.*)
*/
typedef struct SDL_KeyboardEvent
{
@@ -147,7 +147,7 @@ typedef struct SDL_KeyboardEvent
/**
* \struct SDL_TextInputEvent
*
* \brief Keyboard text input event structure
* \brief Keyboard text input event structure (event.text.*)
*/
typedef struct SDL_TextInputEvent
{
@@ -160,7 +160,7 @@ typedef struct SDL_TextInputEvent
/**
* \struct SDL_MouseMotionEvent
*
* \brief Mouse motion event structure
* \brief Mouse motion event structure (event.motion.*)
*/
typedef struct SDL_MouseMotionEvent
{
@@ -177,7 +177,7 @@ typedef struct SDL_MouseMotionEvent
/**
* \struct SDL_MouseButtonEvent
*
* \brief Mouse button event structure
* \brief Mouse button event structure (event.button.*)
*/
typedef struct SDL_MouseButtonEvent
{
@@ -193,20 +193,20 @@ typedef struct SDL_MouseButtonEvent
/**
* \struct SDL_MouseWheelEvent
*
* \brief Mouse wheel event structure
* \brief Mouse wheel event structure (event.wheel.*)
*/
typedef struct SDL_MouseWheelEvent
{
Uint8 type; /**< SDL_MOUSEWHEEL */
Uint8 which; /**< The mouse device index */
int motion; /**< The direction and distance scrolled */
int motion; /**< The direction and distance scrolled */
SDL_WindowID windowID; /**< The window with mouse focus, if any */
} SDL_MouseWheelEvent;

/**
* \struct SDL_JoyAxisEvent
*
* \brief Joystick axis motion event structure
* \brief Joystick axis motion event structure (event.jaxis.*)
*/
typedef struct SDL_JoyAxisEvent
{
@@ -219,7 +219,7 @@ typedef struct SDL_JoyAxisEvent
/**
* \struct SDL_JoyBallEvent
*
* \brief Joystick trackball motion event structure
* \brief Joystick trackball motion event structure (event.jball.*)
*/
typedef struct SDL_JoyBallEvent
{
@@ -233,7 +233,7 @@ typedef struct SDL_JoyBallEvent
/**
* \struct SDL_JoyHatEvent
*
* \brief Joystick hat position change event structure
* \brief Joystick hat position change event structure (event.jhat.*)
*/
typedef struct SDL_JoyHatEvent
{
@@ -251,7 +251,7 @@ typedef struct SDL_JoyHatEvent
/**
* \struct SDL_JoyButtonEvent
*
* \brief Joystick button event structure
* \brief Joystick button event structure (event.jbutton.*)
*/
typedef struct SDL_JoyButtonEvent
{
@@ -274,7 +274,7 @@ typedef struct SDL_QuitEvent
/**
* \struct SDL_UserEvent
*
* \brief A user-defined event type
* \brief A user-defined event type (event.user.*)
*/
typedef struct SDL_UserEvent
{
@@ -287,7 +287,7 @@ typedef struct SDL_UserEvent
/**
* \struct SDL_SysWMEvent
*
* \brief A video driver dependent system event
* \brief A video driver dependent system event (event.syswm.*)
*
* \note If you want to use this event, you should include SDL_syswm.h
*/
@@ -7,9 +7,12 @@ EXE = @EXE@
CFLAGS = @CFLAGS@
LIBS = @LIBS@

TARGETS = checkkeys$(EXE) graywin$(EXE) loopwave$(EXE) testalpha$(EXE) testbitmap$(EXE) testblitspeed$(EXE) testcdrom$(EXE) testcursor$(EXE) testdyngl$(EXE) testerror$(EXE) testfile$(EXE) testgamma$(EXE) testgl$(EXE) testhread$(EXE) testiconv$(EXE) testjoystick$(EXE) testkeys$(EXE) testlock$(EXE) testoverlay2$(EXE) testoverlay$(EXE) testpalette$(EXE) testplatform$(EXE) testsem$(EXE) testsprite$(EXE) testsprite2$(EXE) testtimer$(EXE) testver$(EXE) testvidinfo$(EXE) testwin$(EXE) testwm$(EXE) testwm2$(EXE) threadwin$(EXE) torturethread$(EXE)
TARGETS = checkkeys$(EXE) graywin$(EXE) loopwave$(EXE) testalpha$(EXE) testbitmap$(EXE) testblitspeed$(EXE) testcdrom$(EXE) testcursor$(EXE) testdyngl$(EXE) testerror$(EXE) testfile$(EXE) testgamma$(EXE) testgl$(EXE) testgl2$(EXE) testhread$(EXE) testiconv$(EXE) testjoystick$(EXE) testkeys$(EXE) testlock$(EXE) testoverlay2$(EXE) testoverlay$(EXE) testpalette$(EXE) testplatform$(EXE) testsem$(EXE) testsprite$(EXE) testsprite2$(EXE) testtimer$(EXE) testver$(EXE) testvidinfo$(EXE) testwin$(EXE) testwm$(EXE) testwm2$(EXE) threadwin$(EXE) torturethread$(EXE)

all: $(TARGETS)
all: Makefile $(TARGETS)

Makefile: $(srcdir)/Makefile.in
$(SHELL) config.status $@

checkkeys$(EXE): $(srcdir)/checkkeys.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)
@@ -50,6 +53,9 @@ testgamma$(EXE): $(srcdir)/testgamma.c
testgl$(EXE): $(srcdir)/testgl.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@

testgl2$(EXE): $(srcdir)/testgl2.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@

testhread$(EXE): $(srcdir)/testhread.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

@@ -83,8 +89,8 @@ testsem$(EXE): $(srcdir)/testsem.c
testsprite$(EXE): $(srcdir)/testsprite.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS) @MATHLIB@

testsprite2$(EXE): $(srcdir)/testsprite2.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS) @MATHLIB@
testsprite2$(EXE): $(srcdir)/testsprite2.c $(srcdir)/common.c
$(CC) -o $@ $(srcdir)/testsprite2.c $(srcdir)/common.c $(CFLAGS) $(LIBS) @MATHLIB@

testtimer$(EXE): $(srcdir)/testtimer.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

0 comments on commit 7a885aa

Please sign in to comment.