update
This commit is contained in:
parent
748e09a7c2
commit
cf91c1a687
@ -1,12 +1,19 @@
|
|||||||
|
// Writing a shader in opengl
|
||||||
|
|
||||||
#include <glpy.h>
|
#include <glpy.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <GL/glew.h>
|
#include <GL/glew.h>
|
||||||
#include <GLFW/glfw3.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){
|
static int CreateShader(const std::string& vertexShader, const std::string& fragmentShader){
|
||||||
unsigned int program = glCreateProgram();
|
auto program = glCreateProgram();
|
||||||
unsigned int vs = glCreateShader(GL_VERTEX_SHADER);
|
auto vs = CompileShader(GL_VERTEX_SHADER,vertexShader);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int tests::glfw_shader(unsigned width,unsigned height, std::string title)
|
int tests::glfw_shader(unsigned width,unsigned height, std::string title)
|
||||||
|
Loading…
Reference in New Issue
Block a user