2012-05-14 01:41:08 +00:00
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
texcom_t com;
|
|
|
|
|
|
|
|
char name[64];
|
2013-07-14 12:22:51 +00:00
|
|
|
int pwidth;
|
|
|
|
int pheight;
|
|
|
|
int pwidthmask;
|
|
|
|
int pheightmask;
|
2012-05-14 01:41:08 +00:00
|
|
|
int pitch;
|
|
|
|
unsigned int data[1];
|
|
|
|
} swimage_t;
|
|
|
|
|
2013-07-14 12:22:51 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
float matrix[16];
|
|
|
|
vec4_t viewplane;
|
|
|
|
} swuniforms_t;
|
|
|
|
|
2012-05-14 01:41:08 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
volatile unsigned int readpoint; //the command queue point its reading from
|
|
|
|
void *thread;
|
|
|
|
|
|
|
|
#ifdef _DEBUG
|
|
|
|
float idletime;
|
|
|
|
float activetime;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
unsigned int interlaceline;
|
|
|
|
unsigned int interlacemod;
|
|
|
|
unsigned int threadnum; //for relocating viewport info
|
|
|
|
unsigned int *vpdbuf;
|
|
|
|
unsigned int *vpcbuf;
|
|
|
|
unsigned int vpwidth;
|
|
|
|
unsigned int vpheight;
|
2013-07-14 12:22:51 +00:00
|
|
|
swuniforms_t u;
|
2012-05-14 01:41:08 +00:00
|
|
|
qintptr_t vpcstride;
|
2012-09-30 05:52:03 +00:00
|
|
|
struct workqueue_s *wq;
|
2012-05-14 01:41:08 +00:00
|
|
|
} swthread_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
vec4_t vcoord;
|
|
|
|
vec2_t tccoord;
|
|
|
|
vec2_t lmcoord;
|
|
|
|
byte_vec4_t colour;
|
|
|
|
unsigned int clipflags; /*1=left,2=right,4=top,8=bottom,16=near*/
|
|
|
|
} swvert_t;
|
|
|
|
|
2012-09-30 05:52:03 +00:00
|
|
|
#define WQ_SIZE 1024*1024*8
|
|
|
|
#define WQ_MASK (WQ_SIZE-1)
|
|
|
|
#define WQ_MAXTHREADS 64
|
|
|
|
struct workqueue_s
|
|
|
|
{
|
|
|
|
unsigned int numthreads;
|
|
|
|
qbyte queue[WQ_SIZE];
|
|
|
|
volatile unsigned int pos;
|
|
|
|
|
|
|
|
swthread_t swthreads[WQ_MAXTHREADS];
|
|
|
|
};
|
|
|
|
extern struct workqueue_s commandqueue;
|
|
|
|
|
2012-05-14 01:41:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
enum wqcmd_e
|
|
|
|
{
|
|
|
|
WTC_DIE,
|
|
|
|
WTC_SYNC,
|
|
|
|
WTC_NEWFRAME,
|
|
|
|
WTC_NOOP,
|
|
|
|
WTC_VIEWPORT,
|
|
|
|
WTC_TRIFAN,
|
2012-09-30 05:52:03 +00:00
|
|
|
WTC_TRISOUP,
|
2013-07-14 12:22:51 +00:00
|
|
|
WTC_SPANS,
|
|
|
|
WTC_UNIFORMS
|
2012-05-14 01:41:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
CLIP_LEFT_FLAG = 1,
|
|
|
|
CLIP_RIGHT_FLAG = 2,
|
|
|
|
CLIP_TOP_FLAG = 4,
|
|
|
|
CLIP_BOTTOM_FLAG = 8,
|
2013-07-14 12:22:51 +00:00
|
|
|
CLIP_NEAR_FLAG = 16,
|
|
|
|
CLIP_FAR_FLAG = 32
|
2012-05-14 01:41:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef union
|
|
|
|
{
|
|
|
|
unsigned char align[16];
|
|
|
|
|
|
|
|
struct wqcom_s
|
|
|
|
{
|
|
|
|
enum wqcmd_e command;
|
|
|
|
unsigned int cmdsize;
|
|
|
|
} com;
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
struct wqcom_s com;
|
|
|
|
|
|
|
|
swimage_t *texture;
|
|
|
|
int numverts;
|
|
|
|
swvert_t verts[1];
|
|
|
|
} trifan;
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
struct wqcom_s com;
|
|
|
|
|
|
|
|
swimage_t *texture;
|
|
|
|
int numverts;
|
|
|
|
int numidx;
|
|
|
|
swvert_t verts[1];
|
|
|
|
} trisoup;
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
struct wqcom_s com;
|
2013-07-14 12:22:51 +00:00
|
|
|
|
2012-05-14 01:41:08 +00:00
|
|
|
unsigned int *cbuf;
|
|
|
|
unsigned int *dbuf;
|
|
|
|
unsigned int width;
|
|
|
|
unsigned int height;
|
|
|
|
qintptr_t stride;
|
|
|
|
unsigned int interlace;
|
|
|
|
unsigned int framenum;
|
|
|
|
|
|
|
|
qboolean cleardepth;
|
|
|
|
qboolean clearcolour;
|
|
|
|
} viewport;
|
2012-09-30 05:52:03 +00:00
|
|
|
struct
|
2013-07-14 12:22:51 +00:00
|
|
|
{
|
|
|
|
struct wqcom_s com;
|
|
|
|
swuniforms_t u;
|
|
|
|
} uniforms;
|
|
|
|
struct
|
2012-09-30 05:52:03 +00:00
|
|
|
{
|
|
|
|
int foo;
|
|
|
|
} spans;
|
2012-05-14 01:41:08 +00:00
|
|
|
} wqcom_t;
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-30 05:52:03 +00:00
|
|
|
void SWRast_EndCommand(struct workqueue_s *wq, wqcom_t *com);
|
|
|
|
wqcom_t *SWRast_BeginCommand(struct workqueue_s *wq, int cmdtype, unsigned int size);
|
|
|
|
void SWRast_Sync(struct workqueue_s *wq);
|
2012-05-14 01:41:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
qboolean SW_VID_Init(rendererstate_t *info, unsigned char *palette);
|
|
|
|
void SW_VID_DeInit(void);
|
2013-05-11 14:02:55 +00:00
|
|
|
qboolean SW_VID_ApplyGammaRamps (unsigned short *ramps);
|
2012-05-14 01:41:08 +00:00
|
|
|
char *SW_VID_GetRGBInfo(int prepad, int *truevidwidth, int *truevidheight);
|
|
|
|
void SW_VID_SetWindowCaption(char *msg);
|
|
|
|
void SW_VID_SwapBuffers(void);
|
|
|
|
void SW_VID_UpdateViewport(wqcom_t *com);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
texid_tf SW_LoadTexture(char *identifier, int width, int height, uploadfmt_t fmt, void *data, unsigned int flags);
|
|
|
|
texid_tf SW_LoadTexture8Pal24(char *identifier, int width, int height, qbyte *data, qbyte *palette24, unsigned int flags);
|
|
|
|
texid_tf SW_LoadTexture8Pal32(char *identifier, int width, int height, qbyte *data, qbyte *palette32, unsigned int flags);
|
|
|
|
texid_tf SW_LoadCompressed(char *name);
|
2012-09-30 05:52:03 +00:00
|
|
|
texid_tf SW_FindTexture(char *identifier, unsigned int flags);
|
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
|
|
|
texid_tf SW_AllocNewTexture(char *identifier, int w, int h, unsigned int flags);
|
2012-05-14 01:41:08 +00:00
|
|
|
void SW_Upload(texid_t tex, char *name, uploadfmt_t fmt, void *data, void *palette, int width, int height, unsigned int flags);
|
|
|
|
void SW_DestroyTexture(texid_t tex);
|
|
|
|
|
|
|
|
|
|
|
|
void SWBE_SelectMode(backendmode_t mode);
|
|
|
|
void SWBE_DrawMesh_List(shader_t *shader, int nummeshes, struct mesh_s **mesh, struct vbo_s *vbo, struct texnums_s *texnums, unsigned int be_flags);
|
|
|
|
void SWBE_DrawMesh_Single(shader_t *shader, struct mesh_s *meshchain, struct vbo_s *vbo, struct texnums_s *texnums, unsigned int be_flags);
|
|
|
|
void SWBE_SubmitBatch(struct batch_s *batch);
|
|
|
|
struct batch_s *SWBE_GetTempBatch(void);
|
2012-09-30 05:52:03 +00:00
|
|
|
void SWBE_DrawWorld(qboolean drawworld, qbyte *vis);
|
2012-05-14 01:41:08 +00:00
|
|
|
void SWBE_Init(void);
|
|
|
|
void SWBE_GenBrushModelVBO(struct model_s *mod);
|
|
|
|
void SWBE_ClearVBO(struct vbo_s *vbo);
|
|
|
|
void SWBE_UploadAllLightmaps(void);
|
|
|
|
void SWBE_SelectEntity(struct entity_s *ent);
|
|
|
|
void SWBE_SelectDLight(struct dlight_s *dl, vec3_t colour);
|
|
|
|
qboolean SWBE_LightCullModel(vec3_t org, struct model_s *model);
|
|
|
|
void SWBE_Set2D(void);
|