-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
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
Labels
No labels