From a246887a29229679933864c932125798fd00f965 Mon Sep 17 00:00:00 2001 From: vlj Date: Tue, 23 Sep 2014 19:17:33 +0200 Subject: [PATCH] Simplify #include s --- src/graphics/vaomanager.cpp | 1 + src/graphics/vaomanager.hpp | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/graphics/vaomanager.cpp b/src/graphics/vaomanager.cpp index e7ce1ee31..2f8ea99dd 100644 --- a/src/graphics/vaomanager.cpp +++ b/src/graphics/vaomanager.cpp @@ -1,4 +1,5 @@ #include "vaomanager.hpp" +#include "irr_driver.hpp" #include "stkmesh.hpp" VAOManager::VAOManager() diff --git a/src/graphics/vaomanager.hpp b/src/graphics/vaomanager.hpp index 60249a9e7..8a555b7b8 100644 --- a/src/graphics/vaomanager.hpp +++ b/src/graphics/vaomanager.hpp @@ -3,7 +3,8 @@ #include "gl_headers.hpp" #include "utils/singleton.hpp" -#include "irr_driver.hpp" +#include +#include #include #include #include @@ -144,25 +145,25 @@ class VAOManager : public Singleton void *VBOPtr[VTXTYPE_COUNT], *IBOPtr[VTXTYPE_COUNT]; size_t RealVBOSize[VTXTYPE_COUNT], RealIBOSize[VTXTYPE_COUNT]; size_t last_vertex[VTXTYPE_COUNT], last_index[VTXTYPE_COUNT]; - std::unordered_map mappedBaseVertex[VTXTYPE_COUNT], mappedBaseIndex[VTXTYPE_COUNT]; - std::map, GLuint> InstanceVAO; + std::unordered_map mappedBaseVertex[VTXTYPE_COUNT], mappedBaseIndex[VTXTYPE_COUNT]; + std::map, GLuint> InstanceVAO; void cleanInstanceVAOs(); void regenerateBuffer(enum VTXTYPE, size_t, size_t); void regenerateVAO(enum VTXTYPE); void regenerateInstancedVAO(); size_t getVertexPitch(enum VTXTYPE) const; - VTXTYPE getVTXTYPE(video::E_VERTEX_TYPE type); - void append(scene::IMeshBuffer *, VTXTYPE tp); + VTXTYPE getVTXTYPE(irr::video::E_VERTEX_TYPE type); + void append(irr::scene::IMeshBuffer *, VTXTYPE tp); public: VAOManager(); - std::pair getBase(scene::IMeshBuffer *); + std::pair getBase(irr::scene::IMeshBuffer *); GLuint getInstanceBuffer(InstanceType it) { return instance_vbo[it]; } void *getInstanceBufferPtr(InstanceType it) { return Ptr[it]; } - unsigned getVBO(video::E_VERTEX_TYPE type) { return vbo[getVTXTYPE(type)]; } - void *getVBOPtr(video::E_VERTEX_TYPE type) { return VBOPtr[getVTXTYPE(type)]; } - unsigned getVAO(video::E_VERTEX_TYPE type) { return vao[getVTXTYPE(type)]; } - unsigned getInstanceVAO(video::E_VERTEX_TYPE vt, enum InstanceType it) { return InstanceVAO[std::pair(vt, it)]; } + unsigned getVBO(irr::video::E_VERTEX_TYPE type) { return vbo[getVTXTYPE(type)]; } + void *getVBOPtr(irr::video::E_VERTEX_TYPE type) { return VBOPtr[getVTXTYPE(type)]; } + unsigned getVAO(irr::video::E_VERTEX_TYPE type) { return vao[getVTXTYPE(type)]; } + unsigned getInstanceVAO(irr::video::E_VERTEX_TYPE vt, enum InstanceType it) { return InstanceVAO[std::pair(vt, it)]; } ~VAOManager(); };