Remove program definitions from global namespace
This commit is contained in:
parent
3fc1e576e1
commit
b1708451d8
28
src/gl.hpp
28
src/gl.hpp
|
@ -4,32 +4,4 @@
|
|||
#include <GL/glew.h>
|
||||
#include <GL/glfw.h>
|
||||
|
||||
enum Attrib : GLuint
|
||||
{
|
||||
position,
|
||||
normal,
|
||||
tex_coord,
|
||||
|
||||
__attrib_count
|
||||
};
|
||||
|
||||
static const GLchar *const attribs[] = {
|
||||
"position",
|
||||
"normal",
|
||||
"tex_coord",
|
||||
};
|
||||
|
||||
enum Uniform : unsigned
|
||||
{
|
||||
mvp,
|
||||
local_modelview,
|
||||
|
||||
__uniform_count
|
||||
};
|
||||
|
||||
static const GLchar *const uniforms[] = {
|
||||
"mvp",
|
||||
"local_modelview",
|
||||
};
|
||||
|
||||
#endif // _GL_HPP_
|
||||
|
|
|
@ -9,6 +9,17 @@
|
|||
|
||||
using namespace Models;
|
||||
|
||||
const GLchar *const Raw::attribs[] = {
|
||||
"position",
|
||||
"normal",
|
||||
"tex_coord",
|
||||
};
|
||||
|
||||
const GLchar *const Raw::uniforms[] = {
|
||||
"mvp",
|
||||
"local_modelview",
|
||||
};
|
||||
|
||||
const std::string Raw::filename(const std::string &name)
|
||||
{
|
||||
return "/data/models/" + name;
|
||||
|
|
|
@ -23,6 +23,26 @@ namespace Models
|
|||
GLuint id;
|
||||
|
||||
const Executable *exe;
|
||||
|
||||
enum Attrib : GLuint
|
||||
{
|
||||
position,
|
||||
normal,
|
||||
tex_coord,
|
||||
|
||||
__attrib_count
|
||||
};
|
||||
|
||||
enum Uniform : unsigned
|
||||
{
|
||||
mvp,
|
||||
local_modelview,
|
||||
|
||||
__uniform_count
|
||||
};
|
||||
|
||||
static const GLchar *const attribs[];
|
||||
static const GLchar *const uniforms[];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -12,6 +12,17 @@
|
|||
|
||||
using namespace Models;
|
||||
|
||||
const GLchar *const Static::attribs[] = {
|
||||
"position",
|
||||
"normal",
|
||||
"tex_coord",
|
||||
};
|
||||
|
||||
const GLchar *const Static::uniforms[] = {
|
||||
"mvp",
|
||||
"local_modelview",
|
||||
};
|
||||
|
||||
const std::string Static::filename(const std::string &name)
|
||||
{
|
||||
return "/data/models/" + name;
|
||||
|
|
|
@ -27,6 +27,26 @@ namespace Models
|
|||
const Material *_material;
|
||||
|
||||
const Executable *exe;
|
||||
|
||||
enum Attrib : GLuint
|
||||
{
|
||||
position,
|
||||
normal,
|
||||
tex_coord,
|
||||
|
||||
__attrib_count
|
||||
};
|
||||
|
||||
enum Uniform : unsigned
|
||||
{
|
||||
mvp,
|
||||
local_modelview,
|
||||
|
||||
__uniform_count
|
||||
};
|
||||
|
||||
static const GLchar *const attribs[];
|
||||
static const GLchar *const uniforms[];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Reference in New Issue