Skip to content

Instantly share code, notes, and snippets.

View ankitpriyarup's full-sized avatar
🎯
Focusing

Ankit Priyarup ankitpriyarup

🎯
Focusing
View GitHub Profile
#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
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
struct ShaderProgramSource
{
std::string VertexShader;
#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
#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())
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <iostream>
int main1(void)
{
GLFWwindow* window;
/* Initialize the library */
if (!glfwInit())