mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 06:21:50 +00:00
fix graphics settings & reduce extra GL calls
This commit is contained in:
parent
25ce4a5077
commit
5b868ae857
7 changed files with 22 additions and 16 deletions
|
|
@ -47,12 +47,15 @@ public:
|
|||
void reload(
|
||||
const VertexStructure* vertexBuffer,
|
||||
size_t vertexCount,
|
||||
const std::vector<IndexBufferData>& indices
|
||||
const std::vector<IndexBufferData>& indices,
|
||||
bool streaming
|
||||
);
|
||||
|
||||
void reload(const VertexStructure* vertexBuffer, size_t vertexCount) {
|
||||
void reload(
|
||||
const VertexStructure* vertexBuffer, size_t vertexCount, bool streaming
|
||||
) {
|
||||
static const std::vector<IndexBufferData> indices {};
|
||||
reload(vertexBuffer, vertexCount, indices);
|
||||
reload(vertexBuffer, vertexCount, indices, streaming);
|
||||
}
|
||||
|
||||
/// @brief Draw mesh with specified primitives type
|
||||
|
|
@ -61,6 +64,8 @@ public:
|
|||
|
||||
/// @brief Draw mesh as triangles
|
||||
void draw() const;
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#include "graphics/core/Mesh.inl"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue