Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/opengl/gl_batch.hh
| Show All 25 Lines | |||||
| #pragma once | #pragma once | ||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #include "gpu_batch_private.hh" | #include "gpu_batch_private.hh" | ||||
| #include "gl_index_buffer.hh" | #include "gl_index_buffer.hh" | ||||
| #include "gl_vertex_buffer.hh" | |||||
| #include "glew-mx.h" | #include "glew-mx.h" | ||||
| namespace blender { | namespace blender { | ||||
| namespace gpu { | namespace gpu { | ||||
| class GLContext; | class GLContext; | ||||
| class GLShaderInterface; | class GLShaderInterface; | ||||
| ▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | |||||
| public: | public: | ||||
| GLBatch(); | GLBatch(); | ||||
| ~GLBatch(); | ~GLBatch(); | ||||
| void draw(int v_first, int v_count, int i_first, int i_count) override; | void draw(int v_first, int v_count, int i_first, int i_count) override; | ||||
| void bind(int i_first); | void bind(int i_first); | ||||
| /* Convenience getters. */ | /* Convenience getters. */ | ||||
| GLIndexBuf *gl_elem(void) | GLIndexBuf *elem_(void) const | ||||
| { | { | ||||
| return static_cast<GLIndexBuf *>(unwrap(elem)); | return static_cast<GLIndexBuf *>(unwrap(elem)); | ||||
| } | } | ||||
| GLVertBuf *verts_(const int index) const | |||||
| { | |||||
| return static_cast<GLVertBuf *>(unwrap(verts[index])); | |||||
| } | |||||
| GLVertBuf *inst_(const int index) const | |||||
| { | |||||
| return static_cast<GLVertBuf *>(unwrap(inst[index])); | |||||
| } | |||||
| MEM_CXX_CLASS_ALLOC_FUNCS("GLBatch"); | MEM_CXX_CLASS_ALLOC_FUNCS("GLBatch"); | ||||
| }; | }; | ||||
| } // namespace gpu | } // namespace gpu | ||||
| } // namespace blender | } // namespace blender | ||||