Commit f2c82961 authored by Sam Lantinga's avatar Sam Lantinga

Implemented multi-window OpenGL program with test framework.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401960
parent 3b997f23
......@@ -60,6 +60,8 @@ SDL_SendWindowEvent(SDL_WindowID windowID, Uint8 windowevent, int data1,
if (data1 == window->x && data2 == window->y) {
return 0;
}
window->x = data1;
window->y = data2;
break;
case SDL_WINDOWEVENT_RESIZED:
if (window->flags & SDL_WINDOW_FULLSCREEN) {
......@@ -68,6 +70,8 @@ SDL_SendWindowEvent(SDL_WindowID windowID, Uint8 windowevent, int data1,
if (data1 == window->w && data2 == window->h) {
return 0;
}
window->w = data1;
window->h = data2;
break;
case SDL_WINDOWEVENT_MINIMIZED:
if (window->flags & SDL_WINDOW_MINIMIZED) {
......
......@@ -53,8 +53,8 @@ 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@
testgl2$(EXE): $(srcdir)/testgl2.c $(srcdir)/common.c
$(CC) -o $@ $(srcdir)/testgl2.c $(srcdir)/common.c $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@
testhread$(EXE): $(srcdir)/testhread.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)
......
This diff is collapsed.
......@@ -134,14 +134,14 @@ main(int argc, char *argv[])
int consumed;
consumed = CommonArg(state, i);
if (consumed < 0) {
fprintf(stderr, "Usage: %s %s", argv[0], CommonUsage(state));
quit(1);
}
if (consumed == 0) {
num_sprites = SDL_atoi(argv[i]);
consumed = 1;
}
if (consumed < 0) {
fprintf(stderr, "Usage: %s %s", argv[0], CommonUsage(state));
quit(1);
}
i += consumed;
}
if (!CommonInit(state)) {
......@@ -184,7 +184,7 @@ main(int argc, char *argv[])
}
}
/* Loop, blitting sprites and waiting for a keystroke */
/* Main render loop */
frames = 0;
then = SDL_GetTicks();
done = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment