]> git.cworth.org Git - fips/blobdiff - metrics.c
Push final collection of CFLAGS/LDFLAGS from Makefile.config to Makefile.local
[fips] / metrics.c
index b6dbbd098b38672bdebb887ac58abf159baa1db6..84fc23f6b20b02a2a15ece51ee9b63447d4e5466 100644 (file)
--- a/metrics.c
+++ b/metrics.c
@@ -24,8 +24,7 @@
 
 #include <sys/time.h>
 
-#define GL_GLEXT_PROTOTYPES
-#include <GL/gl.h>
+#include "fips-dispatch-gl.h"
 
 #include "metrics.h"
 
@@ -59,7 +58,7 @@ typedef struct context
 context_t current_context;
 
 unsigned
-metrics_add_counter (void)
+metrics_counter_new (void)
 {
        counter_t *counter;
 
@@ -85,6 +84,18 @@ metrics_add_counter (void)
        return counter->id;
 }
 
+void
+metrics_counter_start (unsigned counter)
+{
+       glBeginQuery (GL_TIME_ELAPSED, counter);
+}
+
+void
+metrics_counter_stop (void)
+{
+       glEndQuery (GL_TIME_ELAPSED);
+}
+
 void
 metrics_set_current_program (unsigned program)
 {