mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-05-13 14:07:08 +03:00
41 lines
1,006 B
C++
41 lines
1,006 B
C++
![]() |
#pragma once
|
||
|
|
||
|
#include "Object.hpp"
|
||
|
#include "Shader.hpp"
|
||
|
#include "gl_core_3_3.h"
|
||
|
|
||
|
#include <map>
|
||
|
|
||
|
namespace glrage {
|
||
|
namespace gl {
|
||
|
|
||
|
class Program : public Object
|
||
|
{
|
||
|
public:
|
||
|
Program();
|
||
|
~Program();
|
||
|
void bind();
|
||
|
void attach(Shader& shader);
|
||
|
void detach(Shader& shader);
|
||
|
void link();
|
||
|
void fragmentData(const std::string& name);
|
||
|
GLint attributeLocation(const std::string& name);
|
||
|
GLint uniformLocation(const std::string& name);
|
||
|
|
||
|
void uniform3f(const std::string& name, GLfloat v0, GLfloat v1, GLfloat v2);
|
||
|
void uniform4f(const std::string& name, GLfloat v0, GLfloat v1, GLfloat v2,
|
||
|
GLfloat v3);
|
||
|
void uniform1i(const std::string& name, GLint v0);
|
||
|
void uniformMatrix4fv(const std::string& name, GLsizei count,
|
||
|
GLboolean transpose, const GLfloat* value);
|
||
|
|
||
|
std::string infoLog();
|
||
|
|
||
|
private:
|
||
|
std::map<std::string, GLint> m_attributeLocations;
|
||
|
std::map<std::string, GLint> m_uniformLocations;
|
||
|
};
|
||
|
|
||
|
} // namespace gl
|
||
|
} // namespace glrage
|