Skip to content

Instantly share code, notes, and snippets.

@lalitshankarchowdhury
lalitshankarchowdhury / Main.cpp
Last active January 17, 2024 04:42
OpenGL triangle code
#include <spdlog/spdlog.h>
#include <glad/glad.h>
#include <GLFW/glfw3.h>
const char* vertShaderSource = "#version 330 core\n"
"layout(location = 0) in vec3 aPos;\n"
"void main() {\n"
" gl_Position = vec4(aPos, 1.0);\n"
"}\0";
@lalitshankarchowdhury
lalitshankarchowdhury / Main.cpp
Created January 19, 2024 05:28
OpenGL triangle interpolated colors code
#include <spdlog/spdlog.h>
#include <glad/glad.h>
#include <GLFW/glfw3.h>
const char* vertShaderSource = R"(
#version 330 core
layout(location = 0) in vec3 aPos;
layout(location = 1) in vec3 aColor;
out vec3 vertexColor;
void main() {