34 #include "misc.h" |
34 #include "misc.h" |
35 #include "history.h" |
35 #include "history.h" |
36 #include "dialogs.h" |
36 #include "dialogs.h" |
37 #include "addObjectDialog.h" |
37 #include "addObjectDialog.h" |
38 #include "messagelog.h" |
38 #include "messagelog.h" |
39 #include "gldata.h" |
39 #include "GLCompiler.h" |
40 #include "primitives.h" |
40 #include "primitives.h" |
41 #include "misc/ringFinder.h" |
41 #include "misc/ringFinder.h" |
42 #include "moc_gldraw.cpp" |
42 #include "moc_gldraw.cpp" |
43 |
43 |
44 static const LDFixedCameraInfo g_FixedCameras[6] = |
44 static const LDFixedCameraInfo g_FixedCameras[6] = |
396 |
396 |
397 // ============================================================================= |
397 // ============================================================================= |
398 // |
398 // |
399 void GLRenderer::drawVAOs (VAOType arrayType, GLenum type) |
399 void GLRenderer::drawVAOs (VAOType arrayType, GLenum type) |
400 { |
400 { |
401 const VertexCompiler::Array* array = g_vertexCompiler.getMergedBuffer (arrayType); |
401 const GLCompiler::Array* array = g_vertexCompiler.getMergedBuffer (arrayType); |
402 glVertexPointer (3, GL_FLOAT, sizeof (VertexCompiler::Vertex), &array->data()[0].x); |
402 glVertexPointer (3, GL_FLOAT, sizeof (GLCompiler::Vertex), &array->data()[0].x); |
403 glColorPointer (4, GL_UNSIGNED_BYTE, sizeof (VertexCompiler::Vertex), &array->data()[0].color); |
403 glColorPointer (4, GL_UNSIGNED_BYTE, sizeof (GLCompiler::Vertex), &array->data()[0].color); |
404 glDrawArrays (type, 0, array->size()); |
404 glDrawArrays (type, 0, array->size()); |
405 } |
405 } |
406 |
406 |
407 // ============================================================================= |
407 // ============================================================================= |
408 // This converts a 2D point on the screen to a 3D point in the model. If 'snap' |
408 // This converts a 2D point on the screen to a 3D point in the model. If 'snap' |