Skip to content

implement msgbox #46

@sebbekarlsson

Description

@sebbekarlsson

msgbox("Hello there")

should probably be implemented as a separate library (.so) to keep this code minimal.

Maybe using glfw? or maybe just GTK

#include <GLFW/glfw3.h>

#include "config.h" //Configured constants
#include "platform.h" //Platform specific functions
//Further includes

int main(int argc, char* argv[])
{
    Platform::Initialize(argc, argv); //Initialize platform
    glfwInit(); //Initialize GLFW
    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(Config::WINDOWWIDTH, 
        Config::WINDOWHEIGHT, "Main window", nullptr, nullptr); //Create GLFW window
    if(window == nullptr)
    {
        Platform::ShowMessage("Failed to create the main window"); //Show message on failure
        glfwTerminate();
        return 1;
    }
    //Further code
    return 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions