X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fvertexarray.cpp;h=3c17141cfb59a592264505c7c67956cc5a9fd355;hp=c166e98718338c55bcfb175dde856d7c44e41c74;hb=dc1d1159a61f378bda11e5989ad694a86b9a3c77;hpb=16f6f15328b3a6eec87b1b5e5822368966d44a38 diff --git a/source/vertexarray.cpp b/source/vertexarray.cpp index c166e987..3c17141c 100644 --- a/source/vertexarray.cpp +++ b/source/vertexarray.cpp @@ -5,7 +5,9 @@ Copyright © 2007 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ +#include "extension.h" #include "gl.h" +#include "version_1_2.h" #include "vertexarray.h" #include "vertexbuffer.h" @@ -167,5 +169,27 @@ VertexArray::Loader::Loader(VertexArray &a): add("color4", static_cast(&Loader::color)); } + +void array_element(int i) +{ + glArrayElement(i); +} + +void draw_arrays(PrimitiveType mode, int first, sizei count) +{ + glDrawArrays(mode, first, count); +} + +void draw_elements(PrimitiveType mode, sizei count, DataType type, const void *indices) +{ + glDrawElements(mode, count, type, indices); +} + +void draw_range_elements(PrimitiveType mode, uint low, uint high, sizei count, DataType type, const void *indices) +{ + static RequireVersion _ver(1, 2); + glDrawRangeElements(mode, low, high, count, type, indices); +} + } // namespace GL } // namespace Msp