3 #include "SDL_opengl.h"
10 static bool debug_output_done = false;
11 if (!debug_output_done)
13 m_document.DebugDumpObjects();
14 debug_output_done = true;
17 glClearColor(1.f,1.f,1.f,1.f);
18 glClear(GL_COLOR_BUFFER_BIT);
20 glMatrixMode(GL_PROJECTION);
22 glOrtho(m_bounds.x, m_bounds.x+m_bounds.w, m_bounds.y + m_bounds.h, m_bounds.y, -1.f, 1.f);
23 glMatrixMode(GL_MODELVIEW);
26 glColor4f(0.f,0.f,0.f,1.f);
28 for (unsigned id = 0; id < m_document.ObjectCount(); ++id)
30 Rect obj_bounds = m_document.m_objects.bounds[id];
31 glVertex2f(obj_bounds.x, obj_bounds.y);
32 glVertex2f(obj_bounds.x + obj_bounds.w, obj_bounds.y);
33 glVertex2f(obj_bounds.x + obj_bounds.w, obj_bounds.y + obj_bounds.h);
34 glVertex2f(obj_bounds.x, obj_bounds.y + obj_bounds.h);