This commit is contained in:
ZtRXR 2024-06-29 17:46:44 +08:00
parent 748e09a7c2
commit cf91c1a687
1 changed files with 9 additions and 2 deletions

View File

@ -1,12 +1,19 @@
// Writing a shader in opengl
#include <glpy.h>
#include <iostream>
#include <GL/glew.h>
#include <GLFW/glfw3.h>
static unsigned int CompileShader(unsigned int fragmentShader,const std::string& source){
auto id = glCreateShader(GL_VERTEX_SHADER);
auto src = source.c_str();
}
static int CreateShader(const std::string& vertexShader, const std::string& fragmentShader){
unsigned int program = glCreateProgram();
unsigned int vs = glCreateShader(GL_VERTEX_SHADER);
auto program = glCreateProgram();
auto vs = CompileShader(GL_VERTEX_SHADER,vertexShader);
}
int tests::glfw_shader(unsigned width,unsigned height, std::string title)