26 lines
505 B
C++
26 lines
505 B
C++
#ifndef GLSHADER_H
|
|
#define GLSHADER_H
|
|
|
|
#include "Ref.h"
|
|
#include "Path.h"
|
|
#include "gl3w.h"
|
|
|
|
namespace jes
|
|
{
|
|
class GLShader
|
|
{
|
|
public:
|
|
GLShader() { m_id = 0u; }
|
|
~GLShader();
|
|
bool create(GLenum shader_type, const char *source, size_t size);
|
|
bool create(GLenum shader_type, PathRef path);
|
|
GLuint get_id() { return m_id; }
|
|
bool valid() { return m_id > 0; }
|
|
protected:
|
|
GLuint m_id;
|
|
};
|
|
typedef Ref<GLShader> GLShaderRef;
|
|
}
|
|
|
|
#endif
|