40 lines · 818 B · C
RawDownload
/* * This file is part of MXE. See LICENSE.md for licensing information. */ #include <GLFW/glfw3.h> int main(void){    GLFWwindow* window;     /* Initialize the library */    if (!glfwInit())        return -1;     /* Create a windowed mode window and its OpenGL context */    window = glfwCreateWindow(640, 480, "Hello World", NULL, NULL);    if (!window)    {        glfwTerminate();        return -1;    }     /* Make the window's context current */    glfwMakeContextCurrent(window);     /* Loop until the user closes the window */    while (!glfwWindowShouldClose(window))    {        /* Render here */         /* Swap front and back buffers */        glfwSwapBuffers(window);         /* Poll for and process events */        glfwPollEvents();    }     glfwTerminate();    return 0;}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t