操作系统:Win10
工具:VS2019
环境:GLFW 3.3.0.1、GLEW 1.9.0.1
测试结果
测试代码
#include <iostream>
#include <GL/glew.h>
#include <GLFW/glfw3.h>
using namespace std;
void framebuffer_size_callback(GLFWwindow* window, int width, int height);
void processInput(GLFWwindow* window);
// settings
const unsigned int SCR_WIDTH = 800;
const unsigned int SCR_HEIGHT = 600;
//vertex fragment 着色器编译代码
const char* vertexShaderSource = "#version 330 core\n"
"layout(location = 0) in vec3 Pos;\n"
"layout(location = 1) in vec3 Color;\n "
"out vec3 outColor;\n"
"void main()\n"
"{\n"
" gl_Position = vec4(Pos, 1.0);\n"
" outColor = Color;\n "
"}\n\0";
const char* fragmentShaderSource = "#version 330 core\n"
"out vec4 fragColor;\n"
"in vec3