]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/commands.cpp
Disconnect the PrimitiveType enum from OpenGL constants
[libs/gl.git] / source / core / commands.cpp
index 72b5a939f7194bb95280c9c4e3fbad9fd1b5caf8..563c4a83d549175a34d61f65339a19e98fa9816b 100644 (file)
@@ -32,7 +32,7 @@ void Commands::draw(const Batch &batch)
 {
        pipeline_state->apply();
        void *data_ptr = reinterpret_cast<void *>(batch.get_offset());
-       glDrawElements(batch.get_type(), batch.size(), batch.get_gl_index_type(), data_ptr);
+       glDrawElements(batch.get_gl_primitive_type(), batch.size(), batch.get_gl_index_type(), data_ptr);
 }
 
 void Commands::draw_instanced(const Batch &batch, unsigned count)
@@ -41,7 +41,7 @@ void Commands::draw_instanced(const Batch &batch, unsigned count)
 
        pipeline_state->apply();
        void *data_ptr = reinterpret_cast<void *>(batch.get_offset());
-       glDrawElementsInstanced(batch.get_type(), batch.size(), batch.get_gl_index_type(), data_ptr, count);
+       glDrawElementsInstanced(batch.get_gl_primitive_type(), batch.size(), batch.get_gl_index_type(), data_ptr, count);
 }
 
 void Commands::resolve_multisample(Framebuffer &target, BufferBits buffers)