vsync wait on win32 #86

Merged
MartinFouilleul merged 5 commits from vblank_notification into main 2023-09-09 12:40:00 +00:00
2 changed files with 2 additions and 21 deletions
Showing only changes of commit aa1c5ef915 - Show all commits

View File

@ -131,7 +131,7 @@ ORCA_API void oc_surface_send_to_back(oc_surface surface); //DOC: puts surface
typedef void (*oc_vsync_callback)(void* data);
ORCA_API void oc_vsync_init();
ORCA_API void oc_vsync_init(void);
ORCA_API void oc_vsync_window(oc_window window);
//------------------------------------------------------------------------------------------

View File

@ -6,34 +6,15 @@
*
*****************************************************************/
// #define WIN32_LEAN_AND_MEAN
// #define WIN32_EXTRA_LEAN
// #define NOMINMAX
// #define D3D11_NO_HELPERS
// #define CINTERFACE
// #define COBJMACROS
// #define interface struct
// #include <windows.h>
#include "platform/platform_thread.h"
#include "app/win32_app.h"
// This forward declaration is needed to suppress an order of declarations bug in the d3d headers.
// d3d11shader.h(454): warning C4115: 'ID3D11ModuleInstance': named type definition in parentheses
// struct ID3D11ModuleInstance;
#define COBJMACROS
#define interface struct
#include <d3d11_1.h>
#include <dxgi1_6.h>
#undef interface
// #include <dxgidebug.h>
// #include <d3dcompiler.h>
typedef struct oc_vsync_data
{
IDXGIFactory4* factory;
@ -125,7 +106,7 @@ static i32 oc_window_vysnc_notification_thread(void* userPointer)
return 0;
}
void oc_vsync_init()
void oc_vsync_init(void)
{
if(__oc_vsync_data.adapter)
{