Skip to content

Commit

Permalink
Adds SOKOL_NOAPI to WIN32
Browse files Browse the repository at this point in the history
  • Loading branch information
pplux committed Apr 20, 2024
1 parent c2bb83f commit 56aa6ef
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions sokol_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#define SOKOL_D3D11
#define SOKOL_METAL
#define SOKOL_WGPU
#define SOKOL_NOAPI
Optionally provide the following defines with your own implementations:
Expand Down Expand Up @@ -87,7 +88,7 @@
- makes the rendered frame visible
- provides keyboard-, mouse- and low-level touch-events
- platforms: MacOS, iOS, HTML5, Win32, Linux/RaspberryPi, Android
- 3D-APIs: Metal, D3D11, GL3.2, GLES3, WebGL, WebGL2
- 3D-APIs: Metal, D3D11, GL3.2, GLES3, WebGL, WebGL2, NOAPI
FEATURE/PLATFORM MATRIX
=======================
Expand All @@ -97,6 +98,7 @@
gles3/webgl2 | --- | --- | YES(2)| YES | YES | YES
metal | --- | YES | --- | YES | --- | ---
d3d11 | YES | --- | --- | --- | --- | ---
noapi | YES | TODO | TODO | --- | TODO | ---
KEY_DOWN | YES | YES | YES | SOME | TODO | YES
KEY_UP | YES | YES | YES | SOME | TODO | YES
CHAR | YES | YES | YES | YES | TODO | YES
Expand Down Expand Up @@ -1978,8 +1980,8 @@ inline void sapp_run(const sapp_desc& desc) { return sapp_run(&desc); }
#elif defined(_WIN32)
/* Windows (D3D11 or GL) */
#define _SAPP_WIN32 (1)
#if !defined(SOKOL_D3D11) && !defined(SOKOL_GLCORE33)
#error("sokol_app.h: unknown 3D API selected for Win32, must be SOKOL_D3D11 or SOKOL_GLCORE33")
#if !defined(SOKOL_D3D11) && !defined(SOKOL_GLCORE33) && !defined(SOKOL_NOAPI)
#error("sokol_app.h: unknown 3D API selected for Win32, must be SOKOL_D3D11, SOKOL_GLCORE33 or SOKOL_NOAPI")
#endif
#elif defined(__ANDROID__)
/* Android */
Expand Down Expand Up @@ -7314,6 +7316,9 @@ _SOKOL_PRIVATE void _sapp_win32_timing_measure(void) {
#if defined(SOKOL_GLCORE33)
_sapp_timing_measure(&_sapp.timing);
#endif
#if defined(SOKOL_NOAPI)
_sapp_timing_measure(&_sapp.timing);
#endif
}

_SOKOL_PRIVATE LRESULT CALLBACK _sapp_win32_wndproc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
Expand Down

0 comments on commit 56aa6ef

Please sign in to comment.