AODQ / pulchritude-engine

lingua franca game engine
MIT License
0 stars 0 forks source link

PulePlatform - window resizing from ABI #6

Open AODQ opened 2 years ago

AODQ commented 2 years ago

Description

Right now window resizing has no ABI control, we want to be able to enable resizing as well as setting explicit window sizes

We don't consider full-screen options for now.


Proposed new ABI

void pulePlatformWindowSizeSet(PuleWindow const platform, PuleI32v2 const size);
void pulePlatformWindowBorderSet(bool const enabled);
void pulePlatformWindowResizableSet(bool const enabled);
bool pulePlatformWindowBorder();
bool pulePlatformWindowResizable();
AODQ commented 2 years ago

Consider

typedef enum {
  PulePlatformWindowFlags_resizable,
  PulePlatformWindowFlags_borderless,
} PulePlatformWindowFlags;

typedef struct {
...
  PulePlatformWindowFlags flags;
} PulePlatformCreateInfo;

void pulePlatformWindowFlagsSet(PulePlatformWindowFlags const flags);
t-c-b commented 2 years ago

I don't think that's necessary as long as we're on glfw because there aren't many window flags and we can use glfw[GS]etWindowAttrib

AODQ commented 2 years ago

Yeah and on second thought I realize too not all will be boolean.