A Cross-Platform Window Manager similar to GLFW written in C99
---- How To Show A Window ----
- Initialize the platform layer
- Create a loop to poll for events
- destroy the window when no longer needed
Platform_Init() Initializes the platform layer and returns true on success:
bool platform_init(platform_state* state, const char* app_name, int width, int height);
Platform_Poll_Events() Listens for platform-specific messages/events:
bool platform_poll_events(platform_state* state);
Platform_Shutdown() Destroys the platform instance and free's any memory if any has been allocated:
bool platform_shutdown(platform_state* state);
BASIC EXAMPLE OF HOW TO CREATE A WINDOW
int main(){
platform_state state;
if(platform_init(&state, "Basic Window", 640, 400)){
while(state.isRunning){
platform_poll_events(&state);
}
}
platform_shutdown(&state);
return 0;
}
Platform_State?
This is a structure that holds two variables.
- It contains a
void pointer*
to theinternal_state
which contains further information. - It also contains a global variable of type
bool
,isRunning
which holds true if platform is actively running or false if it is not.
Platforms | Support Status |
---|---|
MacOS | Supported |
Windows | Pending |
Linux | Pending |
This project is not completed and thus further updates will still be issued. Here are some of the main tasks that still need to be completed.
-
Add Mac Support - Add Windows Support
- Add Linux Support
- Add Support for any Graphics Pipeline (Vulkan, OpengGL, DirectX) etc.
- Add Flexible Event System