remove GLEW from MeshData.hpp & format Mesh.inl
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "commons.hpp"
|
||||
#include "ImageData.hpp"
|
||||
#include "MeshData.hpp"
|
||||
|
||||
#include <GL/glew.h>
|
||||
|
||||
@@ -23,4 +24,24 @@ namespace gl {
|
||||
};
|
||||
return primitives[static_cast<int>(primitive)];
|
||||
}
|
||||
|
||||
inline GLenum to_glenum(VertexAttribute::Type type) {
|
||||
using Type = VertexAttribute::Type;
|
||||
switch (type) {
|
||||
case Type::FLOAT:
|
||||
return GL_FLOAT;
|
||||
case Type::UNSIGNED_INT:
|
||||
return GL_UNSIGNED_INT;
|
||||
case Type::INT:
|
||||
return GL_INT;
|
||||
case Type::UNSIGNED_SHORT:
|
||||
return GL_UNSIGNED_SHORT;
|
||||
case Type::SHORT:
|
||||
return GL_SHORT;
|
||||
case Type::UNSIGNED_BYTE:
|
||||
return GL_UNSIGNED_BYTE;
|
||||
case Type::BYTE:
|
||||
return GL_BYTE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user