]> git.tdb.fi Git - libs/gl.git/blob - source/backends/opengl/batch_backend.cpp
Check the flat qualifier from the correct member
[libs/gl.git] / source / backends / opengl / batch_backend.cpp
1 #include <msp/gl/extensions/arb_tessellation_shader.h>
2 #include <msp/gl/extensions/msp_primitive_restart.h>
3 #include "batch_backend.h"
4
5 namespace Msp {
6 namespace GL {
7
8 OpenGLBatch::OpenGLBatch(PrimitiveType t):
9         gl_prim_type(get_gl_primitive_type(t)),
10         gl_index_type(GL_UNSIGNED_SHORT)
11 {
12         if(t==PATCHES)
13                 static Require _req(ARB_tessellation_shader);
14 }
15
16 bool OpenGLBatch::check_restart(bool require)
17 {
18         if(require)
19                 static Require _req(MSP_primitive_restart);
20         return MSP_primitive_restart;
21 }
22
23 void OpenGLBatch::set_index_type(DataType t)
24 {
25         gl_index_type = get_gl_type(t);
26 }
27
28 } // namespace GL
29 } // namespace Msp