mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-28 11:08:36 +02:00
+ | Basic shader
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: ycontre <ycontre@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/10/13 18:10:10 by TheRed #+# #+# */
|
||||
/* Updated: 2024/10/13 20:57:49 by ycontre ### ########.fr */
|
||||
/* Updated: 2024/10/14 19:51:46 by ycontre ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -26,18 +26,25 @@ class Shader
|
||||
|
||||
// void compile(const char *vertexSource, const char *fragmentSource);
|
||||
void attach(void);
|
||||
void setupVertexBuffer(const RT::Vec2f* vertices, size_t size);
|
||||
void drawTriangles(void);
|
||||
|
||||
|
||||
|
||||
// void setBool(const std::string &name, bool value) const;
|
||||
// void setInt(const std::string &name, int value) const;
|
||||
// void setFloat(const std::string &name, float value) const;
|
||||
// void setVec2(const std::string &name, const RT::Vec2f &value) const;
|
||||
void setVec2f(const std::string &name, const RT::Vec2f &value) const;
|
||||
// void setVec3(const std::string &name, const RT::Vec3f &value) const;
|
||||
// void setVec4(const std::string &name, const RT::Vec4f &value) const;
|
||||
// void setMat4(const std::string &name, const RT::Mat4f &value) const;
|
||||
|
||||
GLuint getProgram(void) const;
|
||||
|
||||
|
||||
private:
|
||||
GLuint _screen_VAO, _screen_VBO;
|
||||
|
||||
GLuint _program;
|
||||
|
||||
GLuint _vertex;
|
||||
|
Reference in New Issue
Block a user