mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
[renderer] Move driver specific texture chain defs
The GL/GLSL/Vulklan texture chaining defs never should have been in r_internal.h in the first place. They still need a better name, though.
This commit is contained in:
parent
0f259c647b
commit
3351b62318
10 changed files with 46 additions and 35 deletions
|
@ -28,14 +28,26 @@
|
|||
#ifndef __QF_GL_rsurf_h
|
||||
#define __QF_GL_rsurf_h
|
||||
|
||||
typedef struct gltex_s {
|
||||
struct texture_s *texture;
|
||||
int gl_texturenum;
|
||||
int gl_fb_texturenum;
|
||||
struct instsurf_s *tex_chain;
|
||||
struct instsurf_s **tex_chain_tail;
|
||||
} gltex_t;
|
||||
|
||||
extern int gl_mirrortexturenum; // quake texturenum, not gltexturenum
|
||||
|
||||
struct model_s;
|
||||
struct entity_s;
|
||||
struct msurface_s;
|
||||
|
||||
void gl_lightmap_init (void);
|
||||
void GL_BuildLightmaps (struct model_s **models, int num_models);
|
||||
|
||||
void R_DrawBrushModel (struct entity_s *e);
|
||||
void R_DrawWorld (void);
|
||||
|
||||
void GL_EmitWaterPolys (msurface_t *fa);
|
||||
void GL_EmitWaterPolys (struct msurface_s *fa);
|
||||
|
||||
#endif // __QF_GL_rsurf_h
|
||||
|
|
|
@ -32,6 +32,16 @@
|
|||
|
||||
#include "QF/GLSL/types.h"
|
||||
|
||||
typedef struct glsltex_s {
|
||||
struct texture_s *texture;
|
||||
int gl_texturenum;
|
||||
int sky_tex[2];
|
||||
struct instsurf_s *tex_chain;
|
||||
struct instsurf_s **tex_chain_tail;
|
||||
struct elechain_s *elechain;
|
||||
struct elechain_s **elechain_tail;
|
||||
} glsltex_t;
|
||||
|
||||
typedef struct bspvert_s {
|
||||
quat_t vertex;
|
||||
quat_t tlst;
|
||||
|
@ -53,11 +63,13 @@ typedef struct elechain_s {
|
|||
float *color;
|
||||
} elechain_t;
|
||||
|
||||
struct model_s;
|
||||
|
||||
void glsl_R_ClearElements (void);
|
||||
void glsl_R_DrawWorld (void);
|
||||
void glsl_R_DrawSky (void);
|
||||
void glsl_R_RegisterTextures (model_t **models, int num_models);
|
||||
void glsl_R_BuildDisplayLists (model_t **models, int num_models);
|
||||
void glsl_R_RegisterTextures (struct model_s **models, int num_models);
|
||||
void glsl_R_BuildDisplayLists (struct model_s **models, int num_models);
|
||||
void glsl_R_InitBsp (void);
|
||||
|
||||
#endif//__QF_GLSL_qf_bsp_h
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
* 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
|
||||
*/
|
||||
|
||||
#ifndef __QFGL_types_h
|
||||
#define __QFGL_types_h
|
||||
#ifndef __QF_GLSL_types_h
|
||||
#define __QF_GLSL_types_h
|
||||
|
||||
#include "QF/qtypes.h"
|
||||
|
||||
|
|
|
@ -39,6 +39,17 @@
|
|||
|
||||
#include "QF/simd/types.h"
|
||||
|
||||
typedef struct vulktex_s {
|
||||
struct texture_s *texture;
|
||||
struct instsurf_s *tex_chain; // for gl_texsort drawing
|
||||
struct instsurf_s **tex_chain_tail;
|
||||
struct elechain_s *elechain;
|
||||
struct elechain_s **elechain_tail;
|
||||
struct qfv_tex_s *tex;
|
||||
struct qfv_tex_s *glow;
|
||||
byte *glow_pixels;
|
||||
} vulktex_t;
|
||||
|
||||
typedef struct bspvert_s {
|
||||
quat_t vertex;
|
||||
quat_t tlst;
|
||||
|
@ -99,7 +110,7 @@ typedef struct bspframeset_s
|
|||
DARRAY_TYPE (bspframe_t) bspframeset_t;
|
||||
|
||||
typedef struct texchainset_s
|
||||
DARRAY_TYPE (struct vulktex_s *) texchainset_t;
|
||||
DARRAY_TYPE (vulktex_t *) texchainset_t;
|
||||
|
||||
typedef struct bspctx_s {
|
||||
instsurf_t *waterchain;
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef HAVE_SYSTEM_MSG_T
|
||||
# define msg_t sys_msg_t
|
||||
|
|
|
@ -9,35 +9,6 @@
|
|||
#include "r_screen.h"
|
||||
#include "r_shared.h"
|
||||
|
||||
typedef struct gltex_s {
|
||||
texture_t *texture;
|
||||
int gl_texturenum;
|
||||
int gl_fb_texturenum;
|
||||
instsurf_t *tex_chain; // for gl_texsort drawing
|
||||
instsurf_t **tex_chain_tail;
|
||||
} gltex_t;
|
||||
|
||||
typedef struct glsltex_s {
|
||||
texture_t *texture;
|
||||
int gl_texturenum;
|
||||
int sky_tex[2];
|
||||
instsurf_t *tex_chain; // for gl_texsort drawing
|
||||
instsurf_t **tex_chain_tail;
|
||||
struct elechain_s *elechain;
|
||||
struct elechain_s **elechain_tail;
|
||||
} glsltex_t;
|
||||
|
||||
typedef struct vulktex_s {
|
||||
texture_t *texture;
|
||||
instsurf_t *tex_chain; // for gl_texsort drawing
|
||||
instsurf_t **tex_chain_tail;
|
||||
struct elechain_s *elechain;
|
||||
struct elechain_s **elechain_tail;
|
||||
struct qfv_tex_s *tex;
|
||||
struct qfv_tex_s *glow;
|
||||
byte *glow_pixels;
|
||||
} vulktex_t;
|
||||
|
||||
extern viddef_t vid; // global video state
|
||||
|
||||
extern vid_render_data_t vid_render_data;
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#include "QF/quakefs.h"
|
||||
#include "QF/sys.h"
|
||||
#include "QF/va.h"
|
||||
#include "QF/GL/qf_rsurf.h"
|
||||
#include "QF/GL/qf_textures.h"
|
||||
|
||||
#include "compat.h"
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
#include "QF/vid.h"
|
||||
#include "QF/GLSL/defines.h"
|
||||
#include "QF/GLSL/funcs.h"
|
||||
#include "QF/GLSL/qf_bsp.h"
|
||||
#include "QF/GLSL/qf_textures.h"
|
||||
|
||||
#include "compat.h"
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "QF/plugin/general.h"
|
||||
#include "QF/plugin/vid_render.h"
|
||||
|
||||
#include "QF/GL/qf_rsurf.h"
|
||||
#include "QF/GL/qf_vid.h"
|
||||
|
||||
#include "mod_internal.h"
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "QF/plugin/general.h"
|
||||
#include "QF/plugin/vid_render.h"
|
||||
|
||||
#include "QF/GLSL/qf_bsp.h"
|
||||
#include "QF/GLSL/qf_vid.h"
|
||||
|
||||
#include "mod_internal.h"
|
||||
|
|
Loading…
Reference in a new issue