Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17625

Platform independence layer - platform specific data?

$
0
0

Hi,

i started to implement a little platform abstraction layer into my project. At the moment I have a header file (platform.h) which contains all my function declarations / data types for the platform stuff. In the corresponding source files (win32_platform.cpp, linux_platform.cpp …) I defined the functions from platform.h. 

Now I dont know how I should store the “platform specific data”. Lets take window creation as an example:

For window creation I have the function PlatformCreateWindow which takes a pointer to a PlatformWindow struct and some other data:

int PlatformCreateWindow(PlatformWindow* wnd, int x, int y, int …

Viewing all articles
Browse latest Browse all 17625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>