From: ljsebald <ljs...@us...> - 2023-12-15 23:10:33
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 42e36042a63aec317c38dacb7683db4f28c4b802 (commit) from 92ef58e0127d75b08ee8cde28166c4c71460cb72 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 42e36042a63aec317c38dacb7683db4f28c4b802 Author: darcagn <da...@pr...> Date: Fri Dec 15 17:09:59 2023 -0600 Replace KallistiGL examples with GLdc (#353) * Remove -lGL from Parallax Bubbles demo Makefile as it does not use GL * Modify kgl examples to link against "libKGL" in preparation for deprecation * Add initial working GLdc examples ----------------------------------------------------------------------- Summary of changes: examples/dreamcast/cpp/gltest/Makefile | 2 +- examples/dreamcast/cpp/gltest/gltest.cpp | 13 +++++++------ examples/dreamcast/{kgl => gldc}/Makefile | 9 +++------ examples/dreamcast/{kgl => gldc}/basic/Makefile | 6 +++--- examples/dreamcast/{kgl => gldc}/basic/vq/Makefile | 8 ++++---- examples/dreamcast/{kgl => gldc}/basic/vq/fruit.jpg | Bin .../dreamcast/{kgl => gldc}/basic/vq/vq-example.c | 9 +++++---- examples/dreamcast/{kgl => gldc}/benchmarks/Makefile | 0 .../{kgl => gldc}/benchmarks/quadmark/Makefile | 2 +- .../{kgl => gldc}/benchmarks/quadmark/quadmark.c | 8 ++++---- .../{kgl => gldc}/benchmarks/trimark/Makefile | 2 +- .../{kgl => gldc}/benchmarks/trimark/trimark.c | 11 ++++------- .../{kgl => gldc}/benchmarks/tristripmark/Makefile | 2 +- .../benchmarks/tristripmark/tristripmark.c | 8 ++++---- examples/dreamcast/{kgl => gldc}/nehe/Makefile | 4 ++-- .../dreamcast/{kgl => gldc}/nehe/nehe02/Makefile | 0 .../dreamcast/{kgl => gldc}/nehe/nehe02/nehe02.c | 4 ++-- .../dreamcast/{kgl => gldc}/nehe/nehe05/Makefile | 0 .../dreamcast/{kgl => gldc}/nehe/nehe05/nehe05.c | 4 ++-- .../dreamcast/{kgl => gldc}/nehe/nehe26/Makefile | 0 .../{kgl => gldc}/nehe/nehe26/data/Makefile | 0 .../{kgl => gldc}/nehe/nehe26/data/sphere.txt | 0 .../{kgl => gldc}/nehe/nehe26/data/torus.txt | 0 .../{kgl => gldc}/nehe/nehe26/data/tube.txt | 0 .../{kgl => gldc}/nehe/nehe26/data/txt2bin.c | 0 .../dreamcast/{kgl => gldc}/nehe/nehe26/nehe26.c | 19 +++++++++++++++---- .../{kgl => gldc}/nehe/nehe26/romdisk/sphere.bin | Bin .../{kgl => gldc}/nehe/nehe26/romdisk/torus.bin | Bin .../{kgl => gldc}/nehe/nehe26/romdisk/tube.bin | Bin examples/dreamcast/kgl/basic/elements/Makefile | 2 +- examples/dreamcast/kgl/basic/elements/gl-elements.c | 6 +++--- examples/dreamcast/kgl/basic/elements/pvr-texture.c | 4 ++-- examples/dreamcast/kgl/basic/gl/Makefile | 2 +- examples/dreamcast/kgl/basic/gl/gltest.c | 6 +++--- examples/dreamcast/kgl/basic/gl/pvr-texture.c | 4 ++-- examples/dreamcast/kgl/basic/scissor/Makefile | 2 +- examples/dreamcast/kgl/basic/scissor/pvr-texture.c | 4 ++-- examples/dreamcast/kgl/basic/scissor/scissor.c | 6 +++--- examples/dreamcast/kgl/basic/txrenv/Makefile | 2 +- examples/dreamcast/kgl/basic/txrenv/gltest.c | 6 +++--- examples/dreamcast/kgl/basic/txrenv/pvr-texture.c | 4 ++-- examples/dreamcast/kgl/basic/vq/Makefile | 2 +- examples/dreamcast/kgl/basic/vq/vq-example.c | 6 +++--- examples/dreamcast/kgl/basic/zclip_arrays/Makefile | 2 +- .../dreamcast/kgl/basic/zclip_arrays/gl-arrays.c | 6 +++--- .../dreamcast/kgl/basic/zclip_arrays/pvr-texture.c | 4 ++-- examples/dreamcast/kgl/benchmarks/quadmark/Makefile | 2 +- .../dreamcast/kgl/benchmarks/quadmark/quadmark.c | 4 ++-- examples/dreamcast/kgl/benchmarks/trimark/Makefile | 2 +- examples/dreamcast/kgl/benchmarks/trimark/trimark.c | 4 ++-- .../dreamcast/kgl/benchmarks/tristripmark/Makefile | 2 +- .../kgl/benchmarks/tristripmark/tristripmark.c | 4 ++-- examples/dreamcast/kgl/demos/blur/Makefile | 2 +- examples/dreamcast/kgl/demos/blur/pvr-texture.c | 4 ++-- examples/dreamcast/kgl/demos/blur/radial_blur.c | 8 ++++---- examples/dreamcast/kgl/demos/mipmap/Makefile | 2 +- examples/dreamcast/kgl/demos/mipmap/gl-mipmap.c | 6 +++--- examples/dreamcast/kgl/demos/mipmap/pvr-texture.c | 4 ++-- .../dreamcast/kgl/demos/multitexture-arrays/Makefile | 2 +- .../demos/multitexture-arrays/gl-multitex-arrays.c | 8 ++++---- .../kgl/demos/multitexture-arrays/pvr-texture.c | 4 ++-- .../kgl/demos/multitexture-elements/Makefile | 2 +- .../multitexture-elements/gl-multitex-elements.c | 8 ++++---- .../kgl/demos/multitexture-elements/pvr-texture.c | 4 ++-- examples/dreamcast/kgl/demos/specular/Makefile | 2 +- examples/dreamcast/kgl/demos/specular/font.c | 2 +- examples/dreamcast/kgl/demos/specular/pvr-texture.c | 4 ++-- examples/dreamcast/kgl/demos/specular/specular.c | 6 +++--- examples/dreamcast/kgl/demos/specular/texture.h | 2 +- examples/dreamcast/kgl/demos/specular/vector.h | 2 +- examples/dreamcast/kgl/nehe/nehe02/Makefile | 2 +- examples/dreamcast/kgl/nehe/nehe02/nehe02.c | 6 +++--- examples/dreamcast/kgl/nehe/nehe05/Makefile | 2 +- examples/dreamcast/kgl/nehe/nehe05/nehe05.c | 6 +++--- examples/dreamcast/kgl/nehe/nehe06/Makefile | 2 +- examples/dreamcast/kgl/nehe/nehe06/nehe06.c | 6 +++--- examples/dreamcast/kgl/nehe/nehe06/pvr-texture.c | 4 ++-- examples/dreamcast/kgl/nehe/nehe08/Makefile | 2 +- examples/dreamcast/kgl/nehe/nehe08/nehe08.c | 6 +++--- examples/dreamcast/kgl/nehe/nehe08/pvr-texture.c | 4 ++-- examples/dreamcast/kgl/nehe/nehe09/Makefile | 2 +- examples/dreamcast/kgl/nehe/nehe09/nehe09.c | 6 +++--- examples/dreamcast/kgl/nehe/nehe09/pvr-texture.c | 4 ++-- examples/dreamcast/kgl/nehe/nehe16/Makefile | 2 +- examples/dreamcast/kgl/nehe/nehe16/nehe16.c | 6 +++--- examples/dreamcast/kgl/nehe/nehe16/pvr-texture.c | 4 ++-- examples/dreamcast/kgl/nehe/nehe26/Makefile | 2 +- examples/dreamcast/kgl/nehe/nehe26/nehe26.c | 6 +++--- examples/dreamcast/parallax/bubbles/bubbles.c | 2 +- 89 files changed, 175 insertions(+), 168 deletions(-) copy examples/dreamcast/{kgl => gldc}/Makefile (68%) copy examples/dreamcast/{kgl => gldc}/basic/Makefile (85%) copy examples/dreamcast/{kgl => gldc}/basic/vq/Makefile (84%) copy examples/dreamcast/{kgl => gldc}/basic/vq/fruit.jpg (100%) copy examples/dreamcast/{kgl => gldc}/basic/vq/vq-example.c (96%) copy examples/dreamcast/{kgl => gldc}/benchmarks/Makefile (100%) copy examples/dreamcast/{kgl => gldc}/benchmarks/quadmark/Makefile (92%) copy examples/dreamcast/{kgl => gldc}/benchmarks/quadmark/quadmark.c (94%) copy examples/dreamcast/{kgl => gldc}/benchmarks/trimark/Makefile (91%) copy examples/dreamcast/{kgl => gldc}/benchmarks/trimark/trimark.c (94%) copy examples/dreamcast/{kgl => gldc}/benchmarks/tristripmark/Makefile (92%) copy examples/dreamcast/{kgl => gldc}/benchmarks/tristripmark/tristripmark.c (94%) copy examples/dreamcast/{kgl => gldc}/nehe/Makefile (90%) copy examples/dreamcast/{kgl => gldc}/nehe/nehe02/Makefile (100%) copy examples/dreamcast/{kgl => gldc}/nehe/nehe02/nehe02.c (97%) copy examples/dreamcast/{kgl => gldc}/nehe/nehe05/Makefile (100%) copy examples/dreamcast/{kgl => gldc}/nehe/nehe05/nehe05.c (98%) copy examples/dreamcast/{kgl => gldc}/nehe/nehe26/Makefile (100%) copy examples/dreamcast/{kgl => gldc}/nehe/nehe26/data/Makefile (100%) copy examples/dreamcast/{kgl => gldc}/nehe/nehe26/data/sphere.txt (100%) copy examples/dreamcast/{kgl => gldc}/nehe/nehe26/data/torus.txt (100%) copy examples/dreamcast/{kgl => gldc}/nehe/nehe26/data/tube.txt (100%) copy examples/dreamcast/{kgl => gldc}/nehe/nehe26/data/txt2bin.c (100%) copy examples/dreamcast/{kgl => gldc}/nehe/nehe26/nehe26.c (95%) copy examples/dreamcast/{kgl => gldc}/nehe/nehe26/romdisk/sphere.bin (100%) copy examples/dreamcast/{kgl => gldc}/nehe/nehe26/romdisk/torus.bin (100%) copy examples/dreamcast/{kgl => gldc}/nehe/nehe26/romdisk/tube.bin (100%) diff --git a/examples/dreamcast/cpp/gltest/Makefile b/examples/dreamcast/cpp/gltest/Makefile index 03c50d3..7815633 100644 --- a/examples/dreamcast/cpp/gltest/Makefile +++ b/examples/dreamcast/cpp/gltest/Makefile @@ -18,7 +18,7 @@ rm-elf: -rm -f $(TARGET) romdisk.* $(TARGET): $(OBJS) - kos-c++ -o $(TARGET) $(OBJS) -lGL -lkosutils + kos-c++ -o $(TARGET) $(OBJS) -lGL -lm -lkosutils run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/cpp/gltest/gltest.cpp b/examples/dreamcast/cpp/gltest/gltest.cpp index 01dd49d..fd82462 100644 --- a/examples/dreamcast/cpp/gltest/gltest.cpp +++ b/examples/dreamcast/cpp/gltest/gltest.cpp @@ -8,7 +8,8 @@ #include <kos.h> #include <GL/gl.h> #include <GL/glu.h> -#include <GL/glut.h> +#include <GL/glext.h> +#include <GL/glkos.h> /* @@ -267,7 +268,7 @@ void loadtxr(const char *fname, GLuint *txr) { 0, GL_RGB, texFormat | texColor, - texBuf); + texBuf); } int main(int argc, char **argv) { @@ -300,9 +301,9 @@ int main(int argc, char **argv) { /* Load a texture and make it look nice */ loadtxr("/rd/glass.pvr", &texture); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_FILTER, GL_FILTER_BILINEAR); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATEALPHA); - + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); printf("texture is %08x\n", texture); @@ -394,7 +395,7 @@ int main(int argc, char **argv) { cubes[3]->draw(); /* Finish the frame */ - glutSwapBuffers(); + glKosSwapBuffers(); } for(int i = 0; i < 4; i++) { diff --git a/examples/dreamcast/kgl/Makefile b/examples/dreamcast/gldc/Makefile similarity index 68% copy from examples/dreamcast/kgl/Makefile copy to examples/dreamcast/gldc/Makefile index cbda21e..be486d7 100644 --- a/examples/dreamcast/kgl/Makefile +++ b/examples/dreamcast/gldc/Makefile @@ -1,25 +1,22 @@ # KallistiOS ##version## # -# examples/dreamcast/kgl/Makefile -# (c)2002 Megan Potter +# examples/dreamcast/gldc/Makefile +# (c)2002 Megan Potter # all: $(KOS_MAKE) -C basic $(KOS_MAKE) -C benchmarks - $(KOS_MAKE) -C demos $(KOS_MAKE) -C nehe clean: $(KOS_MAKE) -C basic clean $(KOS_MAKE) -C benchmarks clean - $(KOS_MAKE) -C demos clean $(KOS_MAKE) -C nehe clean - + dist: $(KOS_MAKE) -C basic dist $(KOS_MAKE) -C benchmarks dist - $(KOS_MAKE) -C demos dist $(KOS_MAKE) -C nehe dist diff --git a/examples/dreamcast/kgl/basic/Makefile b/examples/dreamcast/gldc/basic/Makefile similarity index 85% copy from examples/dreamcast/kgl/basic/Makefile copy to examples/dreamcast/gldc/basic/Makefile index 50bd83b..5e6a058 100644 --- a/examples/dreamcast/kgl/basic/Makefile +++ b/examples/dreamcast/gldc/basic/Makefile @@ -1,14 +1,14 @@ # KallistiOS ##version## # -# examples/dreamcast/kgl/basic/Makefile -# +# examples/dreamcast/gldc/basic/Makefile +# # (c)2014 Josh Pearson # (c)2002 Paul Boese # # This will make all the examples, leaving only the elf files. # If you want to clean everything, use 'clean'. -SUBDIRS = elements gl scissor txrenv vq zclip_arrays +SUBDIRS = vq all: $(patsubst %, _dir_%, $(SUBDIRS)) diff --git a/examples/dreamcast/kgl/basic/vq/Makefile b/examples/dreamcast/gldc/basic/vq/Makefile similarity index 84% copy from examples/dreamcast/kgl/basic/vq/Makefile copy to examples/dreamcast/gldc/basic/vq/Makefile index 4baa290..1069bd3 100644 --- a/examples/dreamcast/kgl/basic/vq/Makefile +++ b/examples/dreamcast/gldc/basic/vq/Makefile @@ -1,7 +1,7 @@ # OpenGL (c)2013-2014 Josh PH3NOM Pearson TARGET = vq-example.elf -OBJS = vq-example.o fruit.o +OBJS = vq-example.o fruit.o all: rm-elf $(TARGET) @@ -11,9 +11,9 @@ clean: rm-elf -rm -f $(OBJS) fruit.vq rm-elf: - -rm -f $(TARGET) + -rm -f $(TARGET) -$(TARGET): $(OBJS) +$(TARGET): $(OBJS) kos-cc -o $(TARGET) $(OBJS) -L$(KOS_BASE)/lib -lGL -lm fruit.o: fruit.vq @@ -26,6 +26,6 @@ run: $(TARGET) $(KOS_LOADER) $(TARGET) dist: $(TARGET) - -rm -f $(OBJS) + -rm -f $(OBJS) $(KOS_STRIP) $(TARGET) diff --git a/examples/dreamcast/kgl/basic/vq/fruit.jpg b/examples/dreamcast/gldc/basic/vq/fruit.jpg similarity index 100% copy from examples/dreamcast/kgl/basic/vq/fruit.jpg copy to examples/dreamcast/gldc/basic/vq/fruit.jpg diff --git a/examples/dreamcast/kgl/basic/vq/vq-example.c b/examples/dreamcast/gldc/basic/vq/vq-example.c similarity index 96% copy from examples/dreamcast/kgl/basic/vq/vq-example.c copy to examples/dreamcast/gldc/basic/vq/vq-example.c index 238613a..86b95ad 100644 --- a/examples/dreamcast/kgl/basic/vq/vq-example.c +++ b/examples/dreamcast/gldc/basic/vq/vq-example.c @@ -1,4 +1,4 @@ -/* +/* KallistiOS 2.0.0 vq-example.c @@ -17,7 +17,8 @@ #include <GL/gl.h> #include <GL/glu.h> -#include <GL/glut.h> +#include <GL/glext.h> +#include <GL/glkos.h> GLfloat xrot; /* X Rotation */ GLfloat yrot; /* Y Rotation */ @@ -37,7 +38,7 @@ static int loadtxr(void) { glCompressedTexImage2D(GL_TEXTURE_2D, /* This must be GL_TEXTURE_2D */ 0, /* 0 = Texture does not contain Mip-Maps */ - GL_UNSIGNED_SHORT_5_6_5_VQ_TWID, /* GL Compressed Color Format */ + GL_COMPRESSED_RGB_565_VQ_TWID_KOS, /* GL Compressed Color Format */ 512, /* Texture Width */ 512, /* Texture Height */ 0, /* This bit must be set to 0 */ @@ -190,7 +191,7 @@ int main(int argc, char **argv) { draw_gl(); /* Finish the frame */ - glutSwapBuffers(); + glKosSwapBuffers(); } glDeleteTextures(1, texture); diff --git a/examples/dreamcast/kgl/benchmarks/Makefile b/examples/dreamcast/gldc/benchmarks/Makefile similarity index 100% copy from examples/dreamcast/kgl/benchmarks/Makefile copy to examples/dreamcast/gldc/benchmarks/Makefile diff --git a/examples/dreamcast/kgl/benchmarks/quadmark/Makefile b/examples/dreamcast/gldc/benchmarks/quadmark/Makefile similarity index 92% copy from examples/dreamcast/kgl/benchmarks/quadmark/Makefile copy to examples/dreamcast/gldc/benchmarks/quadmark/Makefile index ad4f9fb..951b2f8 100644 --- a/examples/dreamcast/kgl/benchmarks/quadmark/Makefile +++ b/examples/dreamcast/gldc/benchmarks/quadmark/Makefile @@ -19,7 +19,7 @@ rm-elf: -rm -f $(TARGET) $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -lGL + kos-cc -o $(TARGET) $(OBJS) -lGL -lm run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/kgl/benchmarks/quadmark/quadmark.c b/examples/dreamcast/gldc/benchmarks/quadmark/quadmark.c similarity index 94% copy from examples/dreamcast/kgl/benchmarks/quadmark/quadmark.c copy to examples/dreamcast/gldc/benchmarks/quadmark/quadmark.c index 0a6e380..e695aac 100644 --- a/examples/dreamcast/kgl/benchmarks/quadmark/quadmark.c +++ b/examples/dreamcast/gldc/benchmarks/quadmark/quadmark.c @@ -9,7 +9,7 @@ #include <kos.h> #include <GL/gl.h> -#include <GL/glut.h> +#include <GL/glkos.h> #include <stdlib.h> #include <time.h> @@ -40,7 +40,7 @@ void stats(void) { pvr_get_stats(&stats); dbglog(DBG_DEBUG, "3D Stats: %ld VBLs, frame rate ~%f fps\n", - stats.vbl_count, (double)stats.frame_rate); + stats.vbl_count, stats.frame_rate); } @@ -95,7 +95,7 @@ void do_frame(void) { glEnd(); - glutSwapBuffers(); + glKosSwapBuffers(); } time_t begin; @@ -113,7 +113,7 @@ void check_switch(void) { if(now >= (begin + 5)) { begin = time(NULL); - printf(" Average Frame Rate: ~%f fps (%d pps)\n", (double)avgfps, (int)(polycnt * avgfps * 2)); + printf(" Average Frame Rate: ~%f fps (%d pps)\n", avgfps, (int)(polycnt * avgfps * 2)); switch(phase) { case PHASE_HALVE: diff --git a/examples/dreamcast/kgl/benchmarks/trimark/Makefile b/examples/dreamcast/gldc/benchmarks/trimark/Makefile similarity index 91% copy from examples/dreamcast/kgl/benchmarks/trimark/Makefile copy to examples/dreamcast/gldc/benchmarks/trimark/Makefile index 397b065..4c14f6a 100644 --- a/examples/dreamcast/kgl/benchmarks/trimark/Makefile +++ b/examples/dreamcast/gldc/benchmarks/trimark/Makefile @@ -18,7 +18,7 @@ rm-elf: -rm -f $(TARGET) $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -lGL + kos-cc -o $(TARGET) $(OBJS) -lGL -lm run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/kgl/benchmarks/trimark/trimark.c b/examples/dreamcast/gldc/benchmarks/trimark/trimark.c similarity index 94% copy from examples/dreamcast/kgl/benchmarks/trimark/trimark.c copy to examples/dreamcast/gldc/benchmarks/trimark/trimark.c index 38866c4..a6e874e 100644 --- a/examples/dreamcast/kgl/benchmarks/trimark/trimark.c +++ b/examples/dreamcast/gldc/benchmarks/trimark/trimark.c @@ -9,7 +9,7 @@ #include <kos.h> #include <GL/gl.h> -#include <GL/glut.h> +#include <GL/glkos.h> #include <stdlib.h> #include <time.h> @@ -40,7 +40,7 @@ void stats(void) { pvr_get_stats(&stats); dbglog(DBG_DEBUG, "3D Stats: %ld VBLs, frame rate ~%f fps\n", - stats.vbl_count, (double)stats.frame_rate); + stats.vbl_count, stats.frame_rate); } @@ -94,7 +94,7 @@ void do_frame(void) { glEnd(); - glutSwapBuffers(); + glKosSwapBuffers(); } time_t begin; @@ -112,7 +112,7 @@ void check_switch(void) { if(now >= (begin + 5)) { begin = time(NULL); - printf(" Average Frame Rate: ~%f fps (%d pps)\n", (double)avgfps, (int)(polycnt * avgfps * 2)); + printf(" Average Frame Rate: ~%f fps (%d pps)\n", avgfps, (int)(polycnt * avgfps * 2)); switch(phase) { case PHASE_HALVE: @@ -175,6 +175,3 @@ int main(int argc, char **argv) { return 0; } - - - diff --git a/examples/dreamcast/kgl/benchmarks/tristripmark/Makefile b/examples/dreamcast/gldc/benchmarks/tristripmark/Makefile similarity index 92% copy from examples/dreamcast/kgl/benchmarks/tristripmark/Makefile copy to examples/dreamcast/gldc/benchmarks/tristripmark/Makefile index f6c4074..2a9592c 100644 --- a/examples/dreamcast/kgl/benchmarks/tristripmark/Makefile +++ b/examples/dreamcast/gldc/benchmarks/tristripmark/Makefile @@ -19,7 +19,7 @@ rm-elf: -rm -f $(TARGET) $(TARGET): $(OBJS) - kos-cc -o $(TARGET) $(OBJS) -lGL + kos-cc -o $(TARGET) $(OBJS) -lGL -lm run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/kgl/benchmarks/tristripmark/tristripmark.c b/examples/dreamcast/gldc/benchmarks/tristripmark/tristripmark.c similarity index 94% copy from examples/dreamcast/kgl/benchmarks/tristripmark/tristripmark.c copy to examples/dreamcast/gldc/benchmarks/tristripmark/tristripmark.c index 8cb6735..12f2690 100644 --- a/examples/dreamcast/kgl/benchmarks/tristripmark/tristripmark.c +++ b/examples/dreamcast/gldc/benchmarks/tristripmark/tristripmark.c @@ -9,7 +9,7 @@ #include <kos.h> #include <GL/gl.h> -#include <GL/glut.h> +#include <GL/glkos.h> #include <stdlib.h> #include <time.h> @@ -40,7 +40,7 @@ void stats(void) { pvr_get_stats(&stats); dbglog(DBG_DEBUG, "3D Stats: %ld VBLs, frame rate ~%f fps\n", - stats.vbl_count, (double)stats.frame_rate); + stats.vbl_count, stats.frame_rate); } @@ -97,7 +97,7 @@ void do_frame(void) { - glutSwapBuffers(); + glKosSwapBuffers(); } time_t begin; @@ -115,7 +115,7 @@ void check_switch(void) { if(now >= (begin + 5)) { begin = time(NULL); - printf(" Average Frame Rate: ~%f fps (%d pps)\n", (double)avgfps, (int)(polycnt * avgfps * 2)); + printf(" Average Frame Rate: ~%f fps (%d pps)\n", avgfps, (int)(polycnt * avgfps * 2)); switch(phase) { case PHASE_HALVE: diff --git a/examples/dreamcast/kgl/nehe/Makefile b/examples/dreamcast/gldc/nehe/Makefile similarity index 90% copy from examples/dreamcast/kgl/nehe/Makefile copy to examples/dreamcast/gldc/nehe/Makefile index ffd485a..0f339ab 100644 --- a/examples/dreamcast/kgl/nehe/Makefile ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |