@@ -18,6 +18,9 @@ extern "C" {
1818 CNFG_USE_DOUBLE_FUNCTIONS -> Use double-precision floating point for CNFG3D.
1919 CNFGOGL -> Use an OpenGL Backend for all rawdraw functionality.
2020 ->Caveat->If using CNFG_HAS_XSHAPE, then, we do something realy wacky.
21+ CNFGVK -> Use the experimental Vulkan backend
22+ CNFGVK_VALIDATION_LAYERS -> Enable the validation layers of the batched renderer
23+ CNFGVK_IMAGE_ALLOCATION -> Specify the amount of VRAM allocated towards images in the batched renderer
2124 CNFGRASTERIZER -> Software-rasterize the rawdraw calls, and, use
2225 CNFGUpdateScreenWithBitmap to send video to webpage.
2326 CNFGCONTEXTONLY -> Don't add any drawing functions, only opening a window to
@@ -73,6 +76,15 @@ Usually tested combinations:
7376 #endif
7477#endif
7578
79+ #ifdef CNFGVK
80+ #define CNFG_BATCH 8192
81+
82+ #include <vulkan/vulkan.h>
83+
84+ // The drivers define the CNFG_SURFACE_EXTENSION macro for their required extensions
85+ VkResult CNFGCreateVkSurface ( VkInstance inst , const VkAllocationCallbacks * alloc , VkSurfaceKHR * surface );
86+ #endif
87+
7688typedef struct {
7789 short x , y ;
7890} RDPoint ;
@@ -111,6 +123,10 @@ void CNFGBlitImage( uint32_t * data, int x, int y, int w, int h );
111123void CNFGDeleteTex ( unsigned int tex );
112124unsigned int CNFGTexImage ( uint32_t * data , int w , int h );
113125void CNFGBlitTex ( unsigned int tex , int x , int y , int w , int h );
126+ #endif
127+
128+ #if defined( CNFGOGL ) || defined( CNFGVK )
129+ void CNFGSetVSync ( int vson ); // Not supported on all systems
114130void CNFGSetScissors ( int * xywh );
115131void CNFGGetScissors ( int * xywh );
116132#endif
@@ -156,7 +172,6 @@ void CNFGInternalResize( short x, short y ); //don't call this.
156172
157173//Not available on all systems. Use The OGL portion with care.
158174#ifdef CNFGOGL
159- void CNFGSetVSync ( int vson );
160175void * CNFGGetExtension ( const char * extname );
161176#endif
162177
0 commit comments