Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ TextTool/text
ogltest
rawdraw
rawdraw_ogl
rawdraw_vk
simple
examples/fontsize
examples/fontsize_ogl
Expand All @@ -15,3 +16,5 @@ tools/binary_to_buffer
tools/single_file_creator
tools/rawdraw_http_page.h
rawdraw_sf.hf

vk/*temp
10 changes: 10 additions & 0 deletions CNFG.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ int CNFGLastScancode = 0;

#include "CNFGFunctions.c"

#ifdef CNFGOGL
#include "CNFGOGL.c"
#endif

#ifdef CNFGVK
#ifndef CNFGCONTEXTONLY
#include "CNFGVK.c"
#endif
#endif

#ifdef CNFG3D
#include "CNFG3D.c"
#endif
Expand Down
17 changes: 16 additions & 1 deletion CNFG.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ extern "C" {
CNFG_USE_DOUBLE_FUNCTIONS -> Use double-precision floating point for CNFG3D.
CNFGOGL -> Use an OpenGL Backend for all rawdraw functionality.
->Caveat->If using CNFG_HAS_XSHAPE, then, we do something realy wacky.
CNFGVK -> Use the experimental Vulkan backend
CNFGVK_VALIDATION_LAYERS -> Enable the validation layers of the batched renderer
CNFGVK_IMAGE_ALLOCATION -> Specify the amount of VRAM allocated towards images in the batched renderer
CNFGRASTERIZER -> Software-rasterize the rawdraw calls, and, use
CNFGUpdateScreenWithBitmap to send video to webpage.
CNFGCONTEXTONLY -> Don't add any drawing functions, only opening a window to
Expand Down Expand Up @@ -73,6 +76,15 @@ Usually tested combinations:
#endif
#endif

#ifdef CNFGVK
#define CNFG_BATCH 8192

#include <vulkan/vulkan.h>

// The drivers define the CNFG_SURFACE_EXTENSION macro for their required extensions
VkResult CNFGCreateVkSurface( VkInstance inst, const VkAllocationCallbacks* alloc, VkSurfaceKHR* surface );
#endif

typedef struct {
short x, y;
} RDPoint;
Expand Down Expand Up @@ -111,6 +123,10 @@ void CNFGBlitImage( uint32_t * data, int x, int y, int w, int h );
void CNFGDeleteTex( unsigned int tex );
unsigned int CNFGTexImage( uint32_t *data, int w, int h );
void CNFGBlitTex( unsigned int tex, int x, int y, int w, int h );
#endif

#if defined( CNFGOGL ) || defined( CNFGVK )
void CNFGSetVSync( int vson ); // Not supported on all systems
void CNFGSetScissors( int * xywh );
void CNFGGetScissors( int * xywh );
#endif
Expand Down Expand Up @@ -156,7 +172,6 @@ void CNFGInternalResize( short x, short y ); //don't call this.

//Not available on all systems. Use The OGL portion with care.
#ifdef CNFGOGL
void CNFGSetVSync( int vson );
void * CNFGGetExtension( const char * extname );
#endif

Expand Down
Loading