Skip to content

suconbu/glapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

glapp

This library for easily creating OpenGL application.

Example

#include "glapp.hpp"

int main()
{
    // Get glapp instance
    auto app = glapp::get();

    // Create window and setup callbacks
    auto w = app->add_window(400, 300, "example");
    w->on_frame([](glapp::window& window){
        glClearColor(0.1f, 0.1f, 0.1f, 1.0f);
        glClear(GL_COLOR_BUFFER_BIT);
        int32_t w = window.framebuffer_size().width();
        int32_t h = window.framebuffer_size().height();
        glViewport(0, 0, w, h);
        // ...
    });

    // Start event loop
    return app->run();
}

Dependencies

  • GLFW is backend library
    If it is not installed in the environment, it will be get the source code and build automatically.

License

MIT License.

About

A library for easily creating OpenGL application.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors