vkQuake2 doxygen  1.0 dev
vk_local.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 1997-2001 Id Software, Inc.
3 Copyright (C) 2018-2019 Krzysztof Kondrak
4 
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 
14 See the GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 
20 */
21 #ifndef __VK_LOCAL_H__
22 #define __VK_LOCAL_H__
23 
24 #ifdef _WIN32
25 # include <windows.h>
26 # define VK_USE_PLATFORM_WIN32_KHR
27 #endif
28 
29 #ifdef __linux__
30 # define VK_USE_PLATFORM_XLIB_KHR
31 #endif
32 
33 #ifdef __APPLE__
34 # define VK_USE_PLATFORM_MACOS_MVK
35 #endif
36 
37 #include <stdio.h>
38 
39 #include <vulkan/vulkan.h>
40 #include <math.h>
41 
42 #include "../client/ref.h"
43 
44 #include "qvk.h"
45 
46 #define REF_VERSION "Vulkan (vkQuake2 v"VKQUAKE2_VERSION")"
47 #define VKQUAKE2_VERSION "1.4.3"
48 
49 // verify if VkResult is VK_SUCCESS
50 #ifdef _DEBUG
51 #define VK_VERIFY(x) { \
52  VkResult res = (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!"); \
56  } \
57 }
58 #else
59 # define VK_VERIFY(x) (void)(x)
60 #endif
61 
62 // up / down
63 #define PITCH 0
64 
65 // left / right
66 #define YAW 1
67 
68 // fall over
69 #define ROLL 2
70 
71 #ifndef min
72 #define min(a, b) (((a) < (b)) ? (a) : (b))
73 #endif
74 #ifndef max
75 #define max(a, b) (((a) > (b)) ? (a) : (b))
76 #endif
77 
78 typedef struct
79 {
80  unsigned width, height; // coordinates from main game
81 } viddef_t;
82 
83 extern viddef_t vid;
84 
85 
86 /*
87 
88  skins will be outline flood filled and mip mapped
89  pics and sprites with alpha will be outline flood filled
90  pic won't be mip mapped
91 
92  model skin
93  sprite frame
94  wall texture
95  pic
96 
97 */
98 
99 typedef enum
100 {
106 } imagetype_t;
107 
108 typedef struct image_s
109 {
110  char name[MAX_QPATH]; // game path, including extension
112  int width, height; // source image
113  int upload_width, upload_height; // after power of two and picmip
114  int registration_sequence; // 0 = free
115  struct msurface_s *texturechain; // for sort-by-texture world drawing
116  qvktexture_t vk_texture; // Vulkan texture handle
117  float sl, tl, sh, th; // 0,0 - 1,1 unless part of the scrap
118  qboolean scrap;
119 
120 } image_t;
121 
122 #define MAX_VKTEXTURES 1024
123 
124 //===================================================================
125 
126 typedef enum
127 {
129 
132 
134 } rserr_t;
135 
136 #include "vk_model.h"
137 
138 #define MAX_LBM_HEIGHT 480
139 
140 #define BACKFACE_EPSILON 0.01
141 
142 
143 //====================================================
144 
146 extern int numvktextures;
147 
148 extern image_t *r_notexture;
149 extern image_t *r_particletexture;
150 extern entity_t *currententity;
151 extern model_t *currentmodel;
152 extern int r_visframecount;
153 extern int r_framecount;
154 extern cplane_t frustum[4];
156 
157 //
158 // view origin
159 //
160 extern vec3_t vup;
161 extern vec3_t vpn;
162 extern vec3_t vright;
163 extern vec3_t r_origin;
164 
165 //
166 // screen size info
167 //
168 extern refdef_t r_newrefdef;
170 
171 extern cvar_t *r_norefresh;
172 extern cvar_t *r_lefthand;
173 extern cvar_t *r_drawentities;
174 extern cvar_t *r_drawworld;
175 extern cvar_t *r_speeds;
176 extern cvar_t *r_fullbright;
177 extern cvar_t *r_novis;
178 extern cvar_t *r_nocull;
179 extern cvar_t *r_lerpmodels;
180 
181 extern cvar_t *r_lightlevel; // FIXME: This is a HACK to get the client's light level
182 
183 extern cvar_t *vk_validation;
184 extern cvar_t *vk_mode;
185 extern cvar_t *vk_bitdepth;
186 extern cvar_t *vk_log;
187 extern cvar_t *vk_picmip;
188 extern cvar_t *vk_skymip;
189 extern cvar_t *vk_round_down;
190 extern cvar_t *vk_flashblend;
191 extern cvar_t *vk_finish;
192 extern cvar_t *vk_clear;
193 extern cvar_t *vk_lockpvs;
194 extern cvar_t *vk_polyblend;
195 extern cvar_t *vk_modulate;
196 extern cvar_t *vk_shadows;
197 extern cvar_t *vk_particle_size;
198 extern cvar_t *vk_particle_att_a;
199 extern cvar_t *vk_particle_att_b;
200 extern cvar_t *vk_particle_att_c;
203 extern cvar_t *vk_point_particles;
204 extern cvar_t *vk_dynamic;
205 extern cvar_t *vk_showtris;
206 extern cvar_t *vk_lightmap;
207 extern cvar_t *vk_texturemode;
208 extern cvar_t *vk_lmaptexturemode;
209 extern cvar_t *vk_aniso;
210 extern cvar_t *vk_sampleshading;
211 extern cvar_t *vk_vsync;
212 extern cvar_t *vk_device_idx;
213 
214 extern cvar_t *vid_fullscreen;
215 extern cvar_t *vid_gamma;
216 
217 extern cvar_t *intensity;
218 
219 extern int c_visible_lightmaps;
220 extern int c_visible_textures;
221 
222 extern float r_viewproj_matrix[16];
223 
224 void R_LightPoint (vec3_t p, vec3_t color);
225 void R_PushDlights (void);
226 
227 //====================================================================
228 
229 extern model_t *r_worldmodel;
230 
231 extern unsigned d_8to24table[256];
232 
233 extern int registration_sequence;
236 
237 qboolean R_Init( void *hinstance, void *hWnd );
238 void R_Shutdown( void );
239 
240 void R_RenderView (refdef_t *fd);
241 void Vk_ScreenShot_f (void);
242 void R_DrawAliasModel (entity_t *e);
243 void R_DrawBrushModel (entity_t *e);
244 void R_DrawSpriteModel (entity_t *e);
245 void R_DrawBeam( entity_t *e );
246 void R_DrawWorld (void);
247 void R_RenderDlights (void);
248 void R_DrawAlphaSurfaces (void);
249 void R_RenderBrushPoly (msurface_t *fa, float *modelMatrix, float alpha);
250 void R_InitParticleTexture (void);
251 void Draw_InitLocal (void);
253 qboolean R_CullBox (vec3_t mins, vec3_t maxs);
254 void R_RotateForEntity (entity_t *e, float *mvMatrix);
255 void R_MarkLeaves (void);
256 
257 void EmitWaterPolys (msurface_t *fa, image_t *texture, float *modelMatrix, float *color);
258 void R_AddSkySurface (msurface_t *fa);
259 void R_ClearSkyBox (void);
260 void R_DrawSkyBox (void);
261 void R_MarkLights (dlight_t *light, int bit, mnode_t *node);
262 
263 void COM_StripExtension (char *in, char *out);
264 
265 void Draw_GetPicSize (int *w, int *h, char *name);
266 void Draw_Pic (int x, int y, char *name);
267 void Draw_StretchPic (int x, int y, int w, int h, char *name);
268 void Draw_Char (int x, int y, int c);
269 void Draw_TileClear (int x, int y, int w, int h, char *name);
270 void Draw_Fill (int x, int y, int w, int h, int c);
271 void Draw_FadeScreen (void);
272 void Draw_StretchRaw (int x, int y, int w, int h, int cols, int rows, byte *data);
273 
274 void R_BeginFrame( float camera_separation );
275 void R_EndFrame( void );
276 void R_SetPalette ( const unsigned char *palette);
277 
278 int Draw_GetPalette (void);
279 
280 void Vk_ResampleTexture (unsigned *in, int inwidth, int inheight, unsigned *out, int outwidth, int outheight);
281 
282 struct image_s *R_RegisterSkin (char *name);
283 
284 void LoadPCX (char *filename, byte **pic, byte **palette, int *width, int *height);
285 image_t *Vk_LoadPic (char *name, byte *pic, int width, int height, imagetype_t type, int bits, qvksampler_t *samplerType);
286 image_t *Vk_FindImage (char *name, imagetype_t type, qvksampler_t *samplerType);
287 void Vk_TextureMode( char *string );
288 void Vk_LmapTextureMode( char *string );
289 void Vk_ImageList_f (void);
290 
291 void Vk_InitImages (void);
292 void Vk_ShutdownImages (void);
293 void Vk_FreeUnusedImages (void);
294 void Vk_DrawParticles( int n, const particle_t particles[], const unsigned colortable[768] );
295 
296 void Mat_Identity(float *matrix);
297 void Mat_Mul(float *m1, float *m2, float *res);
298 void Mat_Translate(float *matrix, float x, float y, float z);
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);
301 void Mat_Perspective(float *matrix, float *correction_matrix, float fovy, float aspect, float zNear, float zFar);
302 void Mat_Ortho(float *matrix, float left, float right, float bottom, float top, float zNear, float zFar);
303 
304 typedef struct
305 {
306  uint32_t vk_version;
307  const char *vendor_name;
308  const char *device_type;
309  const char *present_mode;
310  const char *supported_present_modes[256];
311  const char *extensions[256];
312  const char *layers[256];
325 } vkconfig_t;
326 
327 #define MAX_LIGHTMAPS 128
328 #define DYNLIGHTMAP_OFFSET MAX_LIGHTMAPS
329 
330 typedef struct
331 {
334 
336 
337  unsigned char *d_16to8table;
338 
339  qvktexture_t lightmap_textures[MAX_LIGHTMAPS*2];
340 
341  int currenttextures[2];
343 
346 
347  VkPipeline current_pipeline;
348 } vkstate_t;
349 
350 extern vkconfig_t vk_config;
351 extern vkstate_t vk_state;
352 
353 /*
354 ====================================================================
355 
356 IMPORTED FUNCTIONS
357 
358 ====================================================================
359 */
360 
361 extern refimport_t ri;
362 
363 
364 /*
365 ====================================================================
366 
367 IMPLEMENTATION SPECIFIC FUNCTIONS
368 
369 ====================================================================
370 */
371 
372 void Vkimp_BeginFrame( float camera_separation );
373 void Vkimp_EndFrame( void );
374 int Vkimp_Init( void *hinstance, void *hWnd );
375 void Vkimp_Shutdown( void );
376 int Vkimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen );
377 void Vkimp_AppActivate( qboolean active );
378 void Vkimp_EnableLogging( qboolean enable );
379 void Vkimp_LogNewFrame( void );
380 void Vkimp_GetSurfaceExtensions(char **extensions, uint32_t *extCount);
381 VkResult Vkimp_CreateSurface(void);
382 
383 #endif
it_sprite
@ it_sprite
Definition: vk_local.h:102
vid
viddef_t vid
Definition: r_main.c:24
LoadPCX
void LoadPCX(char *filename, byte **pic, byte **palette, int *width, int *height)
Definition: r_image.c:87
vk_dynamic
cvar_t * vk_dynamic
Definition: vk_rmain.c:112
r_notexture
image_t * r_notexture
Definition: gl_rmain.c:44
vk_shadows
cvar_t * vk_shadows
Definition: vk_rmain.c:103
image_s::vk_texture
qvktexture_t vk_texture
Definition: vk_local.h:116
vpn
vec3_t vpn
Definition: r_main.c:73
MAX_VKTEXTURES
#define MAX_VKTEXTURES
Definition: vk_local.h:122
it_pic
@ it_pic
Definition: vk_local.h:104
vk_particle_min_size
cvar_t * vk_particle_min_size
Definition: vk_rmain.c:108
height
GLsizei height
Definition: qgl_win.c:69
it_wall
@ it_wall
Definition: vk_local.h:103
vk_skymip
cvar_t * vk_skymip
Definition: vk_rmain.c:95
it_sky
@ it_sky
Definition: vk_local.h:105
Draw_StretchPic
void Draw_StretchPic(int x, int y, int w, int h, char *name)
Definition: r_draw.c:405
MAX_QPATH
#define MAX_QPATH
Definition: q_shared.h:80
R_DrawSkyBox
void R_DrawSkyBox(void)
Definition: gl_warp.c:562
Vk_LmapTextureMode
void Vk_LmapTextureMode(char *string)
Definition: vk_image.c:705
vk_showtris
cvar_t * vk_showtris
Definition: vk_rmain.c:114
Mat_Ortho
void Mat_Ortho(float *matrix, float left, float right, float bottom, float top, float zNear, float zFar)
Definition: vk_rmain.c:784
refdef_t
Definition: ref.h:102
R_DrawSpriteModel
void R_DrawSpriteModel(entity_t *e)
Definition: gl_rmain.c:189
numvktextures
int numvktextures
Definition: vk_image.c:25
image_s::th
float th
Definition: gl_local.h:96
vk_particle_att_b
cvar_t * vk_particle_att_b
Definition: vk_rmain.c:106
image_t
struct image_s image_t
Vkimp_BeginFrame
void Vkimp_BeginFrame(float camera_separation)
Definition: vk_imp.c:350
imagetype_t
imagetype_t
Definition: r_local.h:62
r_norefresh
cvar_t * r_norefresh
Definition: gl_rmain.c:79
vktextures
image_t vktextures[MAX_VKTEXTURES]
Definition: vk_image.c:24
vkstate_t::current_pipeline
VkPipeline current_pipeline
Definition: vk_local.h:347
bottom
GLdouble GLdouble bottom
Definition: qgl_win.c:159
R_MarkLeaves
void R_MarkLeaves(void)
Definition: r_main.c:467
vkconfig_t::device_type
const char * device_type
Definition: vk_local.h:308
Draw_InitLocal
void Draw_InitLocal(void)
Definition: r_draw.c:222
vk_aniso
cvar_t * vk_aniso
Definition: vk_rmain.c:118
vk_mode
cvar_t * vk_mode
Definition: vk_rmain.c:91
vk_picmip
cvar_t * vk_picmip
Definition: vk_rmain.c:94
r_oldviewcluster2
int r_oldviewcluster2
Definition: vk_local.h:169
zNear
GLdouble GLdouble GLdouble GLdouble zNear
Definition: qgl_win.c:159
vid_fullscreen
cvar_t * vid_fullscreen
Definition: vid_dll.c:47
frustum
cplane_t frustum[4]
Definition: gl_rmain.c:50
r_newrefdef
refdef_t r_newrefdef
Definition: r_main.c:38
MAX_LIGHTMAPS
#define MAX_LIGHTMAPS
Definition: vk_local.h:327
Mat_Perspective
void Mat_Perspective(float *matrix, float *correction_matrix, float fovy, float aspect, float zNear, float zFar)
Definition: vk_rmain.c:756
Vk_SubdivideSurface
void Vk_SubdivideSurface(msurface_t *fa)
Definition: vk_warp.c:164
vkstate_t::stereo_enabled
qboolean stereo_enabled
Definition: vk_local.h:345
vkstate_t::prev_mode
int prev_mode
Definition: vk_local.h:335
R_PushDlights
void R_PushDlights(void)
Definition: gl_light.c:164
qboolean
qboolean
Definition: q_shared.h:63
x
GLint GLenum GLint x
Definition: qgl_win.c:116
z
GLdouble GLdouble z
Definition: qgl_win.c:283
Vkimp_Shutdown
void Vkimp_Shutdown(void)
Definition: vk_imp.c:274
vkconfig_t::uniform_buffer_max_usage
uint32_t uniform_buffer_max_usage
Definition: vk_local.h:320
vk_log
cvar_t * vk_log
Definition: vk_rmain.c:93
d_8to24table
unsigned d_8to24table[256]
Definition: r_main.c:27
R_RenderBrushPoly
void R_RenderBrushPoly(msurface_t *fa, float *modelMatrix, float alpha)
Definition: vk_rsurf.c:271
Mat_Mul
void Mat_Mul(float *m1, float *m2, float *res)
Definition: vk_rmain.c:695
vkconfig_t::uniform_buffer_usage
uint32_t uniform_buffer_usage
Definition: vk_local.h:319
vkconfig_t
Definition: vk_local.h:304
Vk_TextureMode
void Vk_TextureMode(char *string)
Definition: vk_image.c:657
mnode_s
Definition: r_model.h:123
R_Shutdown
void R_Shutdown(void)
Definition: r_main.c:375
model_s
Definition: r_model.h:171
vright
vec3_t vright
Definition: r_main.c:74
R_DrawAlphaSurfaces
void R_DrawAlphaSurfaces(void)
Definition: r_poly.c:1342
Vk_ResampleTexture
void Vk_ResampleTexture(unsigned *in, int inwidth, int inheight, unsigned *out, int outwidth, int outheight)
Definition: vk_image.c:1145
vk_polyblend
cvar_t * vk_polyblend
Definition: vk_rmain.c:101
R_SetPalette
void R_SetPalette(const unsigned char *palette)
Definition: gl_rmain.c:1574
vid_gamma
cvar_t * vid_gamma
Definition: vid_dll.c:43
r_viewproj_matrix
float r_viewproj_matrix[16]
Definition: vk_rmain.c:64
width
GLint GLsizei width
Definition: qgl_win.c:115
r_lefthand
cvar_t * r_lefthand
Definition: r_main.c:117
vk_device_idx
cvar_t * vk_device_idx
Definition: vk_rmain.c:122
image_s::registration_sequence
int registration_sequence
Definition: r_local.h:77
type
GLenum type
Definition: qgl_win.c:72
viddef_t
Definition: vid.h:27
cvar_s
Definition: q_shared.h:324
vk_lmaptexturemode
cvar_t * vk_lmaptexturemode
Definition: vk_rmain.c:117
r_lerpmodels
cvar_t * r_lerpmodels
Definition: r_main.c:138
Vk_ScreenShot_f
void Vk_ScreenShot_f(void)
Definition: vk_rmisc.c:101
vk_clear
cvar_t * vk_clear
Definition: vk_rmain.c:99
vkconfig_t::triangle_fan_index_count
uint32_t triangle_fan_index_count
Definition: vk_local.h:324
vk_model.h
vkconfig_t::index_buffer_size
uint32_t index_buffer_size
Definition: vk_local.h:318
Vkimp_AppActivate
void Vkimp_AppActivate(qboolean active)
Definition: vk_imp.c:376
Mat_Identity
void Mat_Identity(float *matrix)
Definition: vk_rmain.c:675
R_EndFrame
void R_EndFrame(void)
Definition: vk_rmain.c:1285
qvk.h
vkstate_t::d_16to8table
unsigned char * d_16to8table
Definition: vk_local.h:337
R_RenderDlights
void R_RenderDlights(void)
Definition: gl_light.c:77
vk_current_sampler
qvksampler_t vk_current_sampler
Definition: vk_image.c:42
vkconfig_t::index_buffer_usage
uint32_t index_buffer_usage
Definition: vk_local.h:316
vk_particle_max_size
cvar_t * vk_particle_max_size
Definition: vk_rmain.c:109
Vkimp_Init
int Vkimp_Init(void *hinstance, void *hWnd)
Definition: vk_imp.c:304
vkconfig_t::present_mode
const char * present_mode
Definition: vk_local.h:309
image_s::scrap
qboolean scrap
Definition: gl_local.h:97
Vk_FreeUnusedImages
void Vk_FreeUnusedImages(void)
Definition: vk_image.c:1587
Draw_Char
void Draw_Char(int x, int y, int c)
Definition: r_draw.c:242
r_drawworld
cvar_t * r_drawworld
Definition: r_main.c:134
vk_texturemode
cvar_t * vk_texturemode
Definition: vk_rmain.c:116
Vkimp_EnableLogging
void Vkimp_EnableLogging(qboolean enable)
Definition: vk_common.c:2328
image_s::height
int height
Definition: r_local.h:75
qvksampler_t
qvksampler_t
Definition: qvk.h:63
refimport_t
Definition: ref.h:192
r_origin
vec3_t r_origin
Definition: r_main.c:75
Vkimp_CreateSurface
VkResult Vkimp_CreateSurface(void)
Definition: vk_imp.c:170
vkstate_t::currenttmu
int currenttmu
Definition: vk_local.h:342
vkconfig_t::index_buffer_max_usage
uint32_t index_buffer_max_usage
Definition: vk_local.h:317
vkstate_t::inverse_intensity
float inverse_intensity
Definition: vk_local.h:332
vk_finish
cvar_t * vk_finish
Definition: vk_rmain.c:98
c_visible_textures
int c_visible_textures
Definition: gl_rsurf.c:41
R_RotateForEntity
void R_RotateForEntity(entity_t *e, float *mvMatrix)
Definition: vk_rmain.c:150
Mat_Rotate
void Mat_Rotate(float *matrix, float deg, float x, float y, float z)
Definition: vk_rmain.c:728
vk_lockpvs
cvar_t * vk_lockpvs
Definition: vk_rmain.c:100
r_speeds
cvar_t * r_speeds
Definition: r_main.c:141
Vk_LoadPic
image_t * Vk_LoadPic(char *name, byte *pic, int width, int height, imagetype_t type, int bits, qvksampler_t *samplerType)
Definition: vk_image.c:1369
r_visframecount
int r_visframecount
Definition: r_main.c:98
vkconfig_t::vk_version
uint32_t vk_version
Definition: vk_local.h:306
vkconfig_t::vertex_buffer_usage
uint32_t vertex_buffer_usage
Definition: vk_local.h:313
R_DrawBrushModel
void R_DrawBrushModel(entity_t *e)
Definition: gl_rsurf.c:957
vk_validation
cvar_t * vk_validation
Definition: vk_rmain.c:90
vk_state
vkstate_t vk_state
Definition: vk_rmain.c:31
image_s::type
imagetype_t type
Definition: r_local.h:74
vk_particle_att_c
cvar_t * vk_particle_att_c
Definition: vk_rmain.c:107
R_Init
qboolean R_Init(void *hinstance, void *hWnd)
Definition: r_main.c:326
intensity
cvar_t * intensity
Definition: gl_image.c:31
r_worldmodel
model_t * r_worldmodel
Definition: r_main.c:41
R_AddSkySurface
void R_AddSkySurface(msurface_t *fa)
Definition: gl_warp.c:485
image_s::width
int width
Definition: r_local.h:75
vk_config
vkconfig_t vk_config
Definition: vk_rmain.c:30
Vkimp_SetMode
int Vkimp_SetMode(int *pwidth, int *pheight, int mode, qboolean fullscreen)
Definition: vk_imp.c:186
R_CullBox
qboolean R_CullBox(vec3_t mins, vec3_t maxs)
Definition: gl_rmain.c:151
vk_particle_size
cvar_t * vk_particle_size
Definition: vk_rmain.c:104
image_s::tl
float tl
Definition: gl_local.h:96
particle_t
Definition: ref.h:89
c_brush_polys
int c_brush_polys
Definition: gl_rmain.c:55
alpha
GLfloat GLfloat GLfloat alpha
Definition: qgl_win.c:74
r_drawentities
cvar_t * r_drawentities
Definition: r_main.c:135
Vkimp_EndFrame
void Vkimp_EndFrame(void)
Definition: vk_imp.c:369
image_s::name
char name[MAX_QPATH]
Definition: r_local.h:73
r_particletexture
image_t * r_particletexture
Definition: gl_rmain.c:45
R_DrawBeam
void R_DrawBeam(entity_t *e)
Definition: r_main.c:1342
vk_vsync
cvar_t * vk_vsync
Definition: vk_rmain.c:121
name
cvar_t * name
Definition: cl_main.c:79
r_oldviewcluster
int r_oldviewcluster
Definition: vk_local.h:169
y
GLint y
Definition: qgl_win.c:115
Vkimp_GetSurfaceExtensions
void Vkimp_GetSurfaceExtensions(char **extensions, uint32_t *extCount)
Definition: vk_imp.c:158
R_InitParticleTexture
void R_InitParticleTexture(void)
Definition: gl_rmisc.c:41
Draw_FadeScreen
void Draw_FadeScreen(void)
Definition: r_draw.c:620
rserr_invalid_fullscreen
@ rserr_invalid_fullscreen
Definition: vk_local.h:130
vkconfig_t::vertex_buffer_max_usage
uint32_t vertex_buffer_max_usage
Definition: vk_local.h:314
Vk_DrawParticles
void Vk_DrawParticles(int n, const particle_t particles[], const unsigned colortable[768])
Definition: vk_rmain.c:394
zFar
GLclampd zFar
Definition: qgl_win.c:125
vkconfig_t::uniform_buffer_size
uint32_t uniform_buffer_size
Definition: vk_local.h:321
vk_flashblend
cvar_t * vk_flashblend
Definition: vk_rmain.c:97
R_BeginFrame
void R_BeginFrame(float camera_separation)
Definition: r_main.c:1177
Draw_GetPalette
int Draw_GetPalette(void)
Definition: r_main.c:1423
Vk_ImageList_f
void Vk_ImageList_f(void)
Definition: vk_image.c:535
r_nocull
cvar_t * r_nocull
Definition: gl_rmain.c:85
COM_StripExtension
void COM_StripExtension(char *in, char *out)
Definition: q_shared.c:826
vkconfig_t::vendor_name
const char * vendor_name
Definition: vk_local.h:307
image_s::upload_width
int upload_width
Definition: gl_local.h:92
R_ClearSkyBox
void R_ClearSkyBox(void)
Definition: gl_warp.c:508
vk_sampleshading
cvar_t * vk_sampleshading
Definition: vk_rmain.c:120
Vk_InitImages
void Vk_InitImages(void)
Definition: vk_image.c:1654
image_s::sl
float sl
Definition: gl_local.h:96
EmitWaterPolys
void EmitWaterPolys(msurface_t *fa, image_t *texture, float *modelMatrix, float *color)
Definition: vk_warp.c:202
currentmodel
model_t * currentmodel
Definition: r_main.c:39
Mat_Translate
void Mat_Translate(float *matrix, float x, float y, float z)
Definition: vk_rmain.c:718
Draw_Fill
void Draw_Fill(int x, int y, int w, int h, int c)
Definition: r_draw.c:586
R_DrawAliasModel
void R_DrawAliasModel(entity_t *e)
Definition: gl_mesh.c:519
vkstate_t::camera_separation
float camera_separation
Definition: vk_local.h:344
R_LightPoint
void R_LightPoint(vec3_t p, vec3_t color)
Definition: r_light.c:226
dlight_t
Definition: ref.h:82
entity_s
Definition: ref.h:49
R_RenderView
void R_RenderView(refdef_t *fd)
Definition: gl_rmain.c:818
r_viewcluster
int r_viewcluster
Definition: r_main.c:108
R_DrawWorld
void R_DrawWorld(void)
Definition: gl_rsurf.c:1197
vk_bitdepth
cvar_t * vk_bitdepth
Definition: vk_rmain.c:92
R_RegisterSkin
struct image_s * R_RegisterSkin(char *name)
Definition: r_image.c:550
Mat_Scale
void Mat_Scale(float *matrix, float x, float y, float z)
Definition: vk_rmain.c:745
vkconfig_t::triangle_fan_index_usage
uint32_t triangle_fan_index_usage
Definition: vk_local.h:322
vk_particle_att_a
cvar_t * vk_particle_att_a
Definition: vk_rmain.c:105
Draw_TileClear
void Draw_TileClear(int x, int y, int w, int h, char *name)
Definition: r_draw.c:537
vk_lightmap
cvar_t * vk_lightmap
Definition: vk_rmain.c:115
vk_round_down
cvar_t * vk_round_down
Definition: vk_rmain.c:96
msurface_s
Definition: r_model.h:93
r_viewcluster2
int r_viewcluster2
Definition: vk_local.h:169
r_lightlevel
cvar_t * r_lightlevel
Definition: r_main.c:142
rserr_ok
@ rserr_ok
Definition: vk_local.h:128
r_framecount
int r_framecount
Definition: r_main.c:97
Draw_Pic
void Draw_Pic(int x, int y, char *name)
Definition: r_draw.c:438
R_MarkLights
void R_MarkLights(dlight_t *light, int bit, mnode_t *node)
Definition: r_light.c:40
texture
GLuint texture
Definition: qgl_win.c:68
image_s::upload_height
int upload_height
Definition: gl_local.h:92
vup
vec3_t vup
Definition: r_main.c:72
registration_sequence
int registration_sequence
Definition: r_model.c:44
Vk_ShutdownImages
void Vk_ShutdownImages(void)
Definition: vk_image.c:1704
ri
refimport_t ri
Definition: r_main.c:25
Draw_StretchRaw
void Draw_StretchRaw(int x, int y, int w, int h, int cols, int rows, byte *data)
Definition: r_draw.c:423
w
GLdouble GLdouble GLdouble w
Definition: qgl_win.c:291
top
GLdouble GLdouble GLdouble top
Definition: qgl_win.c:159
r_fullbright
cvar_t * r_fullbright
Definition: r_main.c:137
right
GLdouble right
Definition: qgl_win.c:159
rserr_t
rserr_t
Definition: vk_local.h:126
image_s
Definition: r_local.h:71
r_novis
cvar_t * r_novis
Definition: r_main.c:139
Draw_GetPicSize
void Draw_GetPicSize(int *w, int *h, char *name)
Definition: r_draw.c:321
particles
cparticle_t particles[MAX_PARTICLES]
Definition: cl_fx.c:887
mode
GLenum mode
Definition: qgl_win.c:113
cplane_s
Definition: q_shared.h:413
rserr_unknown
@ rserr_unknown
Definition: vk_local.h:133
vkconfig_t::vertex_buffer_size
uint32_t vertex_buffer_size
Definition: vk_local.h:315
qvktexture_t
Definition: qvk.h:77
vk_point_particles
cvar_t * vk_point_particles
Definition: vk_rmain.c:110
imagetype_t
imagetype_t
Definition: vk_local.h:99
vkstate_t::fullscreen
qboolean fullscreen
Definition: vk_local.h:333
Vkimp_LogNewFrame
void Vkimp_LogNewFrame(void)
Definition: vk_common.c:2356
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:134
it_skin
@ it_skin
Definition: vk_local.h:101
vkstate_t
Definition: vk_local.h:330
c_visible_lightmaps
int c_visible_lightmaps
Definition: gl_rsurf.c:40
vk_modulate
cvar_t * vk_modulate
Definition: vk_rmain.c:102
Vk_FindImage
image_t * Vk_FindImage(char *name, imagetype_t type, qvksampler_t *samplerType)
Definition: vk_image.c:1508
currententity
entity_t * currententity
Definition: r_bsp.c:28
c_alias_polys
int c_alias_polys
Definition: vk_local.h:155
vkconfig_t::triangle_fan_index_max_usage
uint32_t triangle_fan_index_max_usage
Definition: vk_local.h:323
rserr_invalid_mode
@ rserr_invalid_mode
Definition: vk_local.h:131
vk_current_lmap_sampler
qvksampler_t vk_current_lmap_sampler
Definition: vk_image.c:43
image_s::sh
float sh
Definition: gl_local.h:96
image_s::texturechain
struct msurface_s * texturechain
Definition: gl_local.h:94