#include
#define GLEW_STATIC
#include
#include
// 使用 SOIL 头文件
#include
// 使用上一篇里的着色器类
#include "Shader.h"
#pragma comment(lib,"opengl32.lib")
#pragma comment(lib,"glu32.lib")
// 窗口大小
const GLuint WIDTH = 800, HEIGHT = 600;
int main () {
// GLFW
glfwInit();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_RESIZABLE, GL_FALSE);
GLFWwindow* window = glfwCreateWindow(WIDTH, HEIGHT, "UseTexture.cpp", nullptr, nullptr);
glfwMakeContextCurrent(window);
// GLEW
glewExperimental = GL_TRUE;
glewInit();
glViewport(0, 0, WIDTH, HEIGHT);
// 配置着色器,使用着色器