diff --git a/lib/graphicsdev/GL.cpp b/lib/graphicsdev/GL.cpp index 40b1a28..13dcc68 100644 --- a/lib/graphicsdev/GL.cpp +++ b/lib/graphicsdev/GL.cpp @@ -228,7 +228,7 @@ public: void bind(size_t idx, int b); }; -static std::vector DepthInitializer; +static std::vector DepthInitializer; class GLTextureR : public ITextureR { @@ -997,13 +997,15 @@ struct GLCommandQueue : IGraphicsCommandQueue glDrawArrays(currentPrim, cmd.start, cmd.count); break; case Command::Op::DrawIndexed: - glDrawElements(currentPrim, cmd.count, GL_UNSIGNED_INT, (void*)cmd.start); + glDrawElements(currentPrim, cmd.count, GL_UNSIGNED_INT, + reinterpret_cast(cmd.start * 4)); break; case Command::Op::DrawInstances: glDrawArraysInstanced(currentPrim, cmd.start, cmd.count, cmd.instCount); break; case Command::Op::DrawInstancesIndexed: - glDrawElementsInstanced(currentPrim, cmd.count, GL_UNSIGNED_INT, (void*)cmd.start, cmd.instCount); + glDrawElementsInstanced(currentPrim, cmd.count, GL_UNSIGNED_INT, + reinterpret_cast(cmd.start * 4), cmd.instCount); break; case Command::Op::ResolveBindTexture: {