Skip to content

Latest commit

 

History

History
43 lines (34 loc) · 836 Bytes

File metadata and controls

43 lines (34 loc) · 836 Bytes

FSWindow

FSWindow (Fairly Simple Window) is a windowing library that supports Linux and Windows

Usage

Clone the repo as git submodule

git submodule add https://github.com/fahad-cpp/FSWindow vendor/FSWindow

add in cmake as subdirectory and link to project

cmake_minimum_required(VERSION 3.30)

project(MyProj)

add_subdirectory(vendor/FSWindow)

add_executable(MyProj Game.cpp Application.cpp)

target_link_libraries(MyProj FSWindow)

include in project and use

#include <FSWindow.h>

void init(){
  //initialize your app
}
void update(FS::Input& input){
  //Do something per-frame
}

int main(){
    FS::Window window("MyWindow",720,720);
    init();
    while(window.isOpen()){
        window.processMessages();

        update(window.getInput());
        
        window.swapBuffers();
    }
}