This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <GL/glew.h> | |
#include <GLFW/glfw3.h> | |
#include <iostream> | |
#include <fstream> | |
#include <string> | |
#include <sstream> | |
//In the previous square example two coordinates are repeated in positions which means we can optimize it further | |
//In cases where complex model is displayed this minor change plays a big role | |
//Index buffer is used to achieve this result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <GL/glew.h> | |
#include <GLFW/glfw3.h> | |
#include <iostream> | |
#include <fstream> | |
#include <string> | |
#include <sstream> | |
struct ShaderProgramSource | |
{ | |
std::string VertexShader; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <GL/glew.h> | |
#include <GLFW/glfw3.h> | |
#include <iostream> | |
#include <fstream> | |
#include <string> | |
#include <sstream> | |
//We need a shader to see what's drawn | |
//Two major type of shader - Vertex shader & Frament or Pixel Shader other types also | |
//Vertex shader task is to specify positioning based on the rendering screen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <GL/glew.h> | |
#include <GLFW/glfw3.h> | |
#include <iostream> | |
//Instead of specifying through OpenGL that it's a triangle we can specify it more flexibly | |
int main(void) | |
{ | |
GLFWwindow* window; | |
if (!glfwInit()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <GL/glew.h> | |
#include <GLFW/glfw3.h> | |
#include <iostream> | |
int main1(void) | |
{ | |
GLFWwindow* window; | |
/* Initialize the library */ | |
if (!glfwInit()) |
NewerOlder