GLM ist eine Bibliothek für OpenGL.
GLM von hier herunterladen und den 'include' Ordner an die Compilerflags anhängen.
#include <GLFW/glfw3.h>
#include <glm/glm.hpp>
glm::vec3 vertices[] = {
glm::vec3( 0.0f, 1.0f, 0.0f),
glm::vec3( 1.0f, -1.0f, 0.0f),
glm::vec3(-1.0f, -1.0f, 0.0f)
};
int main(void)
{
GLFWwindow* window;
if (!glfwInit())
return -1;
window = glfwCreateWindow(800, 600, "OpenGL GLFW", NULL, NULL);
if (!window)
{
glfwTerminate();
return -1;
}
glfwMakeContextCurrent(window);
while (!glfwWindowShouldClose(window))
{
glClear(GL_COLOR_BUFFER_BIT);
glfwSwapBuffers(window);
glfwPollEvents();
}
glfwTerminate();
return 0;
}