Go to the documentation of this file.
21 #ifndef __VK_LOCAL_H__
22 #define __VK_LOCAL_H__
26 # define VK_USE_PLATFORM_WIN32_KHR
30 # define VK_USE_PLATFORM_XLIB_KHR
34 # define VK_USE_PLATFORM_MACOS_MVK
39 #include <vulkan/vulkan.h>
42 #include "../client/ref.h"
46 #define REF_VERSION "Vulkan (vkQuake2 v"VKQUAKE2_VERSION")"
47 #define VKQUAKE2_VERSION "1.4.3"
51 #define VK_VERIFY(x) { \
53 if(res != VK_SUCCESS) { \
54 ri.Con_Printf(PRINT_ALL, "VkResult verification failed: %s in %s:%d\n", QVk_GetError(res), __FILE__, __LINE__); \
55 assert(res == VK_SUCCESS && "VkResult verification failed!"); \
59 # define VK_VERIFY(x) (void)(x)
72 #define min(a, b) (((a) < (b)) ? (a) : (b))
75 #define max(a, b) (((a) > (b)) ? (a) : (b))
122 #define MAX_VKTEXTURES 1024
138 #define MAX_LBM_HEIGHT 480
140 #define BACKFACE_EPSILON 0.01
280 void Vk_ResampleTexture (
unsigned *in,
int inwidth,
int inheight,
unsigned *out,
int outwidth,
int outheight);
297 void Mat_Mul(
float *m1,
float *m2,
float *res);
299 void Mat_Rotate(
float *matrix,
float deg,
float x,
float y,
float z);
300 void Mat_Scale(
float *matrix,
float x,
float y,
float z);
310 const char *supported_present_modes[256];
311 const char *extensions[256];
312 const char *layers[256];
327 #define MAX_LIGHTMAPS 128
328 #define DYNLIGHTMAP_OFFSET MAX_LIGHTMAPS
341 int currenttextures[2];
374 int Vkimp_Init(
void *hinstance,
void *hWnd );
void LoadPCX(char *filename, byte **pic, byte **palette, int *width, int *height)
cvar_t * vk_particle_min_size
void Draw_StretchPic(int x, int y, int w, int h, char *name)
void Vk_LmapTextureMode(char *string)
void Mat_Ortho(float *matrix, float left, float right, float bottom, float top, float zNear, float zFar)
void R_DrawSpriteModel(entity_t *e)
cvar_t * vk_particle_att_b
void Vkimp_BeginFrame(float camera_separation)
image_t vktextures[MAX_VKTEXTURES]
VkPipeline current_pipeline
void Draw_InitLocal(void)
GLdouble GLdouble GLdouble GLdouble zNear
void Mat_Perspective(float *matrix, float *correction_matrix, float fovy, float aspect, float zNear, float zFar)
void Vk_SubdivideSurface(msurface_t *fa)
void Vkimp_Shutdown(void)
uint32_t uniform_buffer_max_usage
unsigned d_8to24table[256]
void R_RenderBrushPoly(msurface_t *fa, float *modelMatrix, float alpha)
void Mat_Mul(float *m1, float *m2, float *res)
uint32_t uniform_buffer_usage
void Vk_TextureMode(char *string)
void R_DrawAlphaSurfaces(void)
void Vk_ResampleTexture(unsigned *in, int inwidth, int inheight, unsigned *out, int outwidth, int outheight)
void R_SetPalette(const unsigned char *palette)
float r_viewproj_matrix[16]
int registration_sequence
cvar_t * vk_lmaptexturemode
void Vk_ScreenShot_f(void)
uint32_t triangle_fan_index_count
uint32_t index_buffer_size
void Vkimp_AppActivate(qboolean active)
void Mat_Identity(float *matrix)
unsigned char * d_16to8table
void R_RenderDlights(void)
qvksampler_t vk_current_sampler
uint32_t index_buffer_usage
cvar_t * vk_particle_max_size
int Vkimp_Init(void *hinstance, void *hWnd)
const char * present_mode
void Vk_FreeUnusedImages(void)
void Draw_Char(int x, int y, int c)
void Vkimp_EnableLogging(qboolean enable)
VkResult Vkimp_CreateSurface(void)
uint32_t index_buffer_max_usage
void R_RotateForEntity(entity_t *e, float *mvMatrix)
void Mat_Rotate(float *matrix, float deg, float x, float y, float z)
image_t * Vk_LoadPic(char *name, byte *pic, int width, int height, imagetype_t type, int bits, qvksampler_t *samplerType)
uint32_t vertex_buffer_usage
void R_DrawBrushModel(entity_t *e)
cvar_t * vk_particle_att_c
qboolean R_Init(void *hinstance, void *hWnd)
void R_AddSkySurface(msurface_t *fa)
int Vkimp_SetMode(int *pwidth, int *pheight, int mode, qboolean fullscreen)
qboolean R_CullBox(vec3_t mins, vec3_t maxs)
cvar_t * vk_particle_size
GLfloat GLfloat GLfloat alpha
void Vkimp_EndFrame(void)
image_t * r_particletexture
void R_DrawBeam(entity_t *e)
void Vkimp_GetSurfaceExtensions(char **extensions, uint32_t *extCount)
void R_InitParticleTexture(void)
void Draw_FadeScreen(void)
@ rserr_invalid_fullscreen
uint32_t vertex_buffer_max_usage
void Vk_DrawParticles(int n, const particle_t particles[], const unsigned colortable[768])
uint32_t uniform_buffer_size
void R_BeginFrame(float camera_separation)
int Draw_GetPalette(void)
void Vk_ImageList_f(void)
void COM_StripExtension(char *in, char *out)
cvar_t * vk_sampleshading
void EmitWaterPolys(msurface_t *fa, image_t *texture, float *modelMatrix, float *color)
void Mat_Translate(float *matrix, float x, float y, float z)
void Draw_Fill(int x, int y, int w, int h, int c)
void R_DrawAliasModel(entity_t *e)
void R_LightPoint(vec3_t p, vec3_t color)
void R_RenderView(refdef_t *fd)
struct image_s * R_RegisterSkin(char *name)
void Mat_Scale(float *matrix, float x, float y, float z)
uint32_t triangle_fan_index_usage
cvar_t * vk_particle_att_a
void Draw_TileClear(int x, int y, int w, int h, char *name)
void Draw_Pic(int x, int y, char *name)
void R_MarkLights(dlight_t *light, int bit, mnode_t *node)
int registration_sequence
void Vk_ShutdownImages(void)
void Draw_StretchRaw(int x, int y, int w, int h, int cols, int rows, byte *data)
GLdouble GLdouble GLdouble w
GLdouble GLdouble GLdouble top
void Draw_GetPicSize(int *w, int *h, char *name)
cparticle_t particles[MAX_PARTICLES]
uint32_t vertex_buffer_size
cvar_t * vk_point_particles
void Vkimp_LogNewFrame(void)
image_t * Vk_FindImage(char *name, imagetype_t type, qvksampler_t *samplerType)
uint32_t triangle_fan_index_max_usage
qvksampler_t vk_current_lmap_sampler
struct msurface_s * texturechain