Compile quadmark on PC
This commit is contained in:
parent
b480c0a01f
commit
8977fbf6e2
|
@ -143,8 +143,8 @@ gen_sample(zclip_triangle samples/zclip_triangle/main.c)
|
||||||
gen_sample(zclip_trianglestrip samples/zclip_trianglestrip/main.c)
|
gen_sample(zclip_trianglestrip samples/zclip_trianglestrip/main.c)
|
||||||
gen_sample(scissor samples/scissor/main.c)
|
gen_sample(scissor samples/scissor/main.c)
|
||||||
gen_sample(polymark samples/polymark/main.c)
|
gen_sample(polymark samples/polymark/main.c)
|
||||||
|
gen_sample(quadmark samples/quadmark/main.c)
|
||||||
|
|
||||||
if(PLATFORM_DREAMCAST)
|
if(PLATFORM_DREAMCAST)
|
||||||
gen_sample(quadmark samples/quadmark/main.c)
|
|
||||||
gen_sample(trimark samples/trimark/main.c)
|
gen_sample(trimark samples/trimark/main.c)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -7,12 +7,15 @@
|
||||||
(c)2002 Dan Potter, Paul Boese
|
(c)2002 Dan Potter, Paul Boese
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef __DREAMCAST__
|
||||||
#include <kos.h>
|
#include <kos.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glkos.h>
|
#include <GL/glkos.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
enum { PHASE_HALVE, PHASE_INCR, PHASE_DECR, PHASE_FINAL };
|
enum { PHASE_HALVE, PHASE_INCR, PHASE_DECR, PHASE_FINAL };
|
||||||
|
@ -22,6 +25,7 @@ int phase = PHASE_HALVE;
|
||||||
float avgfps = -1;
|
float avgfps = -1;
|
||||||
|
|
||||||
void running_stats() {
|
void running_stats() {
|
||||||
|
#ifdef __DREAMCAST__
|
||||||
pvr_stats_t stats;
|
pvr_stats_t stats;
|
||||||
pvr_get_stats(&stats);
|
pvr_get_stats(&stats);
|
||||||
|
|
||||||
|
@ -29,18 +33,22 @@ void running_stats() {
|
||||||
avgfps = stats.frame_rate;
|
avgfps = stats.frame_rate;
|
||||||
else
|
else
|
||||||
avgfps = (avgfps + stats.frame_rate) / 2.0f;
|
avgfps = (avgfps + stats.frame_rate) / 2.0f;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void stats() {
|
void stats() {
|
||||||
|
#ifdef __DREAMCAST__
|
||||||
pvr_stats_t stats;
|
pvr_stats_t stats;
|
||||||
|
|
||||||
pvr_get_stats(&stats);
|
pvr_get_stats(&stats);
|
||||||
dbglog(DBG_DEBUG, "3D Stats: %d VBLs, frame rate ~%f fps\n",
|
dbglog(DBG_DEBUG, "3D Stats: %d VBLs, frame rate ~%f fps\n",
|
||||||
stats.vbl_count, stats.frame_rate);
|
stats.vbl_count, stats.frame_rate);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int check_start() {
|
int check_start() {
|
||||||
|
#ifdef __DREAMCAST__
|
||||||
maple_device_t *cont;
|
maple_device_t *cont;
|
||||||
cont_state_t *state;
|
cont_state_t *state;
|
||||||
|
|
||||||
|
@ -52,12 +60,11 @@ int check_start() {
|
||||||
if(state)
|
if(state)
|
||||||
return state->buttons & CONT_START;
|
return state->buttons & CONT_START;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
pvr_poly_hdr_t hdr;
|
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
glKosInit();
|
glKosInit();
|
||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user