#include <sys/time.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/gl.h>
+#include "fips-dispatch-gl.h"
#include "metrics.h"
context_t current_context;
unsigned
-metrics_add_counter (void)
+metrics_counter_new (void)
{
counter_t *counter;
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)
{