Files
Osmium/Osmium.cpp
2025-07-15 03:08:42 +03:00

48 lines
842 B
C++

#include <iostream>
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include "config.h"
int main(int argc, char **argv) {
std::cout << "Hello working!" << std::endl;
glfwInit();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
GLFWwindow *window = glfwCreateWindow(640, 480, "OpenGL Demo", NULL, NULL);
if (!window) {
std::cout << "Failed to create GLFW window." << std::endl;
glfwTerminate();
return -1;
}
glfwMakeContextCurrent(window);
gladLoadGL();
glViewport(0, 0, 640, 480);
while (!glfwWindowShouldClose(window)) {
glClearColor(1.0f,.5f,.2f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
glfwSwapBuffers(window);
glfwPollEvents();
}
glfwDestroyWindow(window);
glfwTerminate();
return 0;
}