mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
Start working on creating the render plugins.
Things blow up quite nicely. :)
This commit is contained in:
parent
8530959752
commit
ad61c7a30c
8 changed files with 683 additions and 226 deletions
|
@ -155,6 +155,7 @@ typedef struct vid_render_funcs_s {
|
|||
void (*D_FlushCaches) (void);
|
||||
|
||||
vid_particle_funcs_t *particles;
|
||||
vid_model_funcs_t *model_funcs;
|
||||
} vid_render_funcs_t;
|
||||
|
||||
typedef struct vid_render_data_s {
|
||||
|
|
|
@ -22,9 +22,13 @@ common_sources= \
|
|||
crosshair.c noisetextures.c r_alias.c r_bsp.c r_cvar.c r_dyn_textures.c \
|
||||
r_efrag.c r_ent.c r_graph.c r_light.c r_main.c r_part.c r_screen.c
|
||||
|
||||
renderer_libs= \
|
||||
@vid_render_static_plugin_libs@ \
|
||||
$(top_builddir)/libs/util/libQFutil.la
|
||||
|
||||
libQFrenderer_la_LDFLAGS= $(lib_ldflags)
|
||||
libQFrenderer_la_LIBADD=
|
||||
libQFrenderer_la_DEPENDENCIES=
|
||||
libQFrenderer_la_LIBADD= $(renderer_libs)
|
||||
libQFrenderer_la_DEPENDENCIES= $(renderer_libs)
|
||||
libQFrenderer_la_SOURCES= r_init.c r_progs.c
|
||||
|
||||
gl_libs= \
|
||||
|
@ -33,7 +37,7 @@ gl_libs= \
|
|||
vid_render_gl_la_LDFLAGS= $(plugin_ldflags)
|
||||
vid_render_gl_la_LIBADD= $(gl_libs)
|
||||
vid_render_gl_la_DEPENDENCIES= $(gl_libs)
|
||||
vid_render_gl_la_SOURCES= $(common_sources) #vid_render_gl.c
|
||||
vid_render_gl_la_SOURCES= $(common_sources) vid_render_gl.c
|
||||
|
||||
glsl_libs= \
|
||||
glsl/libglsl.la \
|
||||
|
@ -41,7 +45,7 @@ glsl_libs= \
|
|||
vid_render_glsl_la_LDFLAGS= $(plugin_ldflags)
|
||||
vid_render_glsl_la_LIBADD= $(glsl_libs)
|
||||
vid_render_glsl_la_DEPENDENCIES=$(glsl_libs)
|
||||
vid_render_glsl_la_SOURCES= $(common_sources) #vid_render_glsl.c
|
||||
vid_render_glsl_la_SOURCES= $(common_sources) vid_render_glsl.c
|
||||
|
||||
sw_libs= \
|
||||
sw/libsw.la \
|
||||
|
@ -49,7 +53,7 @@ sw_libs= \
|
|||
vid_render_sw_la_LDFLAGS= $(plugin_ldflags)
|
||||
vid_render_sw_la_LIBADD= $(sw_libs)
|
||||
vid_render_sw_la_DEPENDENCIES= $(sw_libs)
|
||||
vid_render_sw_la_SOURCES= $(common_sources) #vid_render_sw.c
|
||||
vid_render_sw_la_SOURCES= $(common_sources) vid_render_sw.c
|
||||
|
||||
sw32_libs= \
|
||||
sw32/libsw32.la \
|
||||
|
@ -57,4 +61,4 @@ sw32_libs= \
|
|||
vid_render_sw32_la_LDFLAGS= $(plugin_ldflags)
|
||||
vid_render_sw32_la_LIBADD= $(sw32_libs)
|
||||
vid_render_sw32_la_DEPENDENCIES=$(sw32_libs)
|
||||
vid_render_sw32_la_SOURCES= $(common_sources) #vid_render_sw32.c
|
||||
vid_render_sw32_la_SOURCES= $(common_sources) vid_render_sw32.c
|
||||
|
|
163
libs/video/renderer/vid_render_gl.c
Normal file
163
libs/video/renderer/vid_render_gl.c
Normal file
|
@ -0,0 +1,163 @@
|
|||
/*
|
||||
vid_render_gl.c
|
||||
|
||||
GL version of the renderer
|
||||
|
||||
Copyright (C) 2012 Bill Currie <bill@taniwha.org>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include "QF/plugin/general.h"
|
||||
#include "QF/plugin/vid_render.h"
|
||||
|
||||
#include "mod_internal.h"
|
||||
#include "r_internal.h"
|
||||
|
||||
static general_funcs_t plugin_info_general_funcs = {
|
||||
};
|
||||
|
||||
static vid_model_funcs_t model_funcs = {
|
||||
Mod_LoadExternalTextures,
|
||||
Mod_LoadLighting,
|
||||
Mod_SubdivideSurface,
|
||||
Mod_ProcessTexture,
|
||||
Mod_LoadAliasModel,
|
||||
Mod_LoadSpriteModel,
|
||||
|
||||
Skin_SetColormap,
|
||||
Skin_SetSkin,
|
||||
Skin_SetupSkin,
|
||||
Skin_SetTranslation,
|
||||
Skin_ProcessTranslation,
|
||||
Skin_InitTranslations,
|
||||
Skin_Init_Textures,
|
||||
Skin_SetPlayerSkin,
|
||||
};
|
||||
|
||||
static vid_render_funcs_t vid_render_funcs = {
|
||||
Draw_Init,
|
||||
Draw_Character,
|
||||
Draw_String,
|
||||
Draw_nString,
|
||||
Draw_AltString,
|
||||
Draw_ConsoleBackground,
|
||||
Draw_Crosshair,
|
||||
Draw_CrosshairAt,
|
||||
Draw_TileClear,
|
||||
Draw_Fill,
|
||||
Draw_TextBox,
|
||||
Draw_FadeScreen,
|
||||
Draw_BlendScreen,
|
||||
Draw_CachePic,
|
||||
Draw_UncachePic,
|
||||
Draw_MakePic,
|
||||
Draw_DestroyPic,
|
||||
Draw_PicFromWad,
|
||||
Draw_Pic,
|
||||
Draw_Picf,
|
||||
Draw_SubPic,
|
||||
|
||||
SCR_UpdateScreen,
|
||||
SCR_DrawRam,
|
||||
SCR_DrawFPS,
|
||||
SCR_DrawTime,
|
||||
SCR_DrawTurtle,
|
||||
SCR_DrawPause,
|
||||
SCR_CaptureBGR,
|
||||
SCR_ScreenShot,
|
||||
SCR_DrawStringToSnap,
|
||||
|
||||
Fog_Update,
|
||||
Fog_ParseWorldspawn,
|
||||
|
||||
R_ClearState,
|
||||
R_LoadSkys,
|
||||
R_NewMap,
|
||||
R_AddEfrags,
|
||||
R_RemoveEfrags,
|
||||
R_EnqueueEntity,
|
||||
R_LineGraph,
|
||||
R_AllocDlight,
|
||||
R_AllocEntity,
|
||||
R_RenderView,
|
||||
R_DecayLights,
|
||||
D_FlushCaches,
|
||||
0,
|
||||
&model_funcs
|
||||
};
|
||||
|
||||
static vid_render_data_t vid_render_data = {
|
||||
&vid, &r_refdef, &scr_vrect,
|
||||
0, 0, 0,
|
||||
0,
|
||||
0, 0,
|
||||
0.0,
|
||||
true, false, false, false,
|
||||
0,
|
||||
0, 0,
|
||||
0,
|
||||
0.0, 0.0,
|
||||
0,
|
||||
r_origin, vpn, vright, vup
|
||||
};
|
||||
|
||||
static general_data_t plugin_info_general_data;
|
||||
|
||||
static plugin_funcs_t plugin_info_funcs = {
|
||||
&plugin_info_general_funcs,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
&vid_render_funcs,
|
||||
};
|
||||
|
||||
static plugin_data_t plugin_info_data = {
|
||||
&plugin_info_general_data,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
&vid_render_data,
|
||||
};
|
||||
|
||||
static plugin_t plugin_info = {
|
||||
qfp_snd_render,
|
||||
0,
|
||||
QFPLUGIN_VERSION,
|
||||
"0.1",
|
||||
"GL Renderer",
|
||||
"Copyright (C) 1996-1997 Id Software, Inc.\n"
|
||||
"Copyright (C) 1999-2012 contributors of the QuakeForge project\n"
|
||||
"Please see the file \"AUTHORS\" for a list of contributors",
|
||||
&plugin_info_funcs,
|
||||
&plugin_info_data,
|
||||
};
|
||||
|
||||
PLUGIN_INFO(vid_render, gl)
|
||||
{
|
||||
return &plugin_info;
|
||||
}
|
163
libs/video/renderer/vid_render_glsl.c
Normal file
163
libs/video/renderer/vid_render_glsl.c
Normal file
|
@ -0,0 +1,163 @@
|
|||
/*
|
||||
vid_render_gl.c
|
||||
|
||||
GLSL version of the renderer
|
||||
|
||||
Copyright (C) 2012 Bill Currie <bill@taniwha.org>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include "QF/plugin/general.h"
|
||||
#include "QF/plugin/vid_render.h"
|
||||
|
||||
#include "mod_internal.h"
|
||||
#include "r_internal.h"
|
||||
|
||||
static general_funcs_t plugin_info_general_funcs = {
|
||||
};
|
||||
|
||||
static vid_model_funcs_t model_funcs = {
|
||||
Mod_LoadExternalTextures,
|
||||
Mod_LoadLighting,
|
||||
Mod_SubdivideSurface,
|
||||
Mod_ProcessTexture,
|
||||
Mod_LoadAliasModel,
|
||||
Mod_LoadSpriteModel,
|
||||
|
||||
Skin_SetColormap,
|
||||
Skin_SetSkin,
|
||||
Skin_SetupSkin,
|
||||
Skin_SetTranslation,
|
||||
Skin_ProcessTranslation,
|
||||
Skin_InitTranslations,
|
||||
Skin_Init_Textures,
|
||||
Skin_SetPlayerSkin,
|
||||
};
|
||||
|
||||
static vid_render_funcs_t vid_render_funcs = {
|
||||
Draw_Init,
|
||||
Draw_Character,
|
||||
Draw_String,
|
||||
Draw_nString,
|
||||
Draw_AltString,
|
||||
Draw_ConsoleBackground,
|
||||
Draw_Crosshair,
|
||||
Draw_CrosshairAt,
|
||||
Draw_TileClear,
|
||||
Draw_Fill,
|
||||
Draw_TextBox,
|
||||
Draw_FadeScreen,
|
||||
Draw_BlendScreen,
|
||||
Draw_CachePic,
|
||||
Draw_UncachePic,
|
||||
Draw_MakePic,
|
||||
Draw_DestroyPic,
|
||||
Draw_PicFromWad,
|
||||
Draw_Pic,
|
||||
Draw_Picf,
|
||||
Draw_SubPic,
|
||||
|
||||
SCR_UpdateScreen,
|
||||
SCR_DrawRam,
|
||||
SCR_DrawFPS,
|
||||
SCR_DrawTime,
|
||||
SCR_DrawTurtle,
|
||||
SCR_DrawPause,
|
||||
SCR_CaptureBGR,
|
||||
SCR_ScreenShot,
|
||||
SCR_DrawStringToSnap,
|
||||
|
||||
Fog_Update,
|
||||
Fog_ParseWorldspawn,
|
||||
|
||||
R_ClearState,
|
||||
R_LoadSkys,
|
||||
R_NewMap,
|
||||
R_AddEfrags,
|
||||
R_RemoveEfrags,
|
||||
R_EnqueueEntity,
|
||||
R_LineGraph,
|
||||
R_AllocDlight,
|
||||
R_AllocEntity,
|
||||
R_RenderView,
|
||||
R_DecayLights,
|
||||
D_FlushCaches,
|
||||
0,
|
||||
&model_funcs
|
||||
};
|
||||
|
||||
static vid_render_data_t vid_render_data = {
|
||||
&vid, &r_refdef, &scr_vrect,
|
||||
0, 0, 0,
|
||||
0,
|
||||
0, 0,
|
||||
0.0,
|
||||
true, false, false, false,
|
||||
0,
|
||||
0, 0,
|
||||
0,
|
||||
0.0, 0.0,
|
||||
0,
|
||||
r_origin, vpn, vright, vup
|
||||
};
|
||||
|
||||
static general_data_t plugin_info_general_data;
|
||||
|
||||
static plugin_funcs_t plugin_info_funcs = {
|
||||
&plugin_info_general_funcs,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
&vid_render_funcs,
|
||||
};
|
||||
|
||||
static plugin_data_t plugin_info_data = {
|
||||
&plugin_info_general_data,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
&vid_render_data,
|
||||
};
|
||||
|
||||
static plugin_t plugin_info = {
|
||||
qfp_snd_render,
|
||||
0,
|
||||
QFPLUGIN_VERSION,
|
||||
"0.1",
|
||||
"GLSL Renderer",
|
||||
"Copyright (C) 1996-1997 Id Software, Inc.\n"
|
||||
"Copyright (C) 1999-2012 contributors of the QuakeForge project\n"
|
||||
"Please see the file \"AUTHORS\" for a list of contributors",
|
||||
&plugin_info_funcs,
|
||||
&plugin_info_data,
|
||||
};
|
||||
|
||||
PLUGIN_INFO(vid_render, glsl)
|
||||
{
|
||||
return &plugin_info;
|
||||
}
|
163
libs/video/renderer/vid_render_sw.c
Normal file
163
libs/video/renderer/vid_render_sw.c
Normal file
|
@ -0,0 +1,163 @@
|
|||
/*
|
||||
vid_render_gl.c
|
||||
|
||||
SW version of the renderer
|
||||
|
||||
Copyright (C) 2012 Bill Currie <bill@taniwha.org>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include "QF/plugin/general.h"
|
||||
#include "QF/plugin/vid_render.h"
|
||||
|
||||
#include "mod_internal.h"
|
||||
#include "r_internal.h"
|
||||
|
||||
static general_funcs_t plugin_info_general_funcs = {
|
||||
};
|
||||
|
||||
static vid_model_funcs_t model_funcs = {
|
||||
Mod_LoadExternalTextures,
|
||||
Mod_LoadLighting,
|
||||
Mod_SubdivideSurface,
|
||||
Mod_ProcessTexture,
|
||||
Mod_LoadAliasModel,
|
||||
Mod_LoadSpriteModel,
|
||||
|
||||
Skin_SetColormap,
|
||||
Skin_SetSkin,
|
||||
Skin_SetupSkin,
|
||||
Skin_SetTranslation,
|
||||
Skin_ProcessTranslation,
|
||||
Skin_InitTranslations,
|
||||
Skin_Init_Textures,
|
||||
Skin_SetPlayerSkin,
|
||||
};
|
||||
|
||||
static vid_render_funcs_t vid_render_funcs = {
|
||||
Draw_Init,
|
||||
Draw_Character,
|
||||
Draw_String,
|
||||
Draw_nString,
|
||||
Draw_AltString,
|
||||
Draw_ConsoleBackground,
|
||||
Draw_Crosshair,
|
||||
Draw_CrosshairAt,
|
||||
Draw_TileClear,
|
||||
Draw_Fill,
|
||||
Draw_TextBox,
|
||||
Draw_FadeScreen,
|
||||
Draw_BlendScreen,
|
||||
Draw_CachePic,
|
||||
Draw_UncachePic,
|
||||
Draw_MakePic,
|
||||
Draw_DestroyPic,
|
||||
Draw_PicFromWad,
|
||||
Draw_Pic,
|
||||
Draw_Picf,
|
||||
Draw_SubPic,
|
||||
|
||||
SCR_UpdateScreen,
|
||||
SCR_DrawRam,
|
||||
SCR_DrawFPS,
|
||||
SCR_DrawTime,
|
||||
SCR_DrawTurtle,
|
||||
SCR_DrawPause,
|
||||
SCR_CaptureBGR,
|
||||
SCR_ScreenShot,
|
||||
SCR_DrawStringToSnap,
|
||||
|
||||
Fog_Update,
|
||||
Fog_ParseWorldspawn,
|
||||
|
||||
R_ClearState,
|
||||
R_LoadSkys,
|
||||
R_NewMap,
|
||||
R_AddEfrags,
|
||||
R_RemoveEfrags,
|
||||
R_EnqueueEntity,
|
||||
R_LineGraph,
|
||||
R_AllocDlight,
|
||||
R_AllocEntity,
|
||||
R_RenderView,
|
||||
R_DecayLights,
|
||||
D_FlushCaches,
|
||||
0,
|
||||
&model_funcs
|
||||
};
|
||||
|
||||
static vid_render_data_t vid_render_data = {
|
||||
&vid, &r_refdef, &scr_vrect,
|
||||
0, 0, 0,
|
||||
0,
|
||||
0, 0,
|
||||
0.0,
|
||||
true, false, false, false,
|
||||
0,
|
||||
0, 0,
|
||||
0,
|
||||
0.0, 0.0,
|
||||
0,
|
||||
r_origin, vpn, vright, vup
|
||||
};
|
||||
|
||||
static general_data_t plugin_info_general_data;
|
||||
|
||||
static plugin_funcs_t plugin_info_funcs = {
|
||||
&plugin_info_general_funcs,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
&vid_render_funcs,
|
||||
};
|
||||
|
||||
static plugin_data_t plugin_info_data = {
|
||||
&plugin_info_general_data,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
&vid_render_data,
|
||||
};
|
||||
|
||||
static plugin_t plugin_info = {
|
||||
qfp_snd_render,
|
||||
0,
|
||||
QFPLUGIN_VERSION,
|
||||
"0.1",
|
||||
"SW Renderer",
|
||||
"Copyright (C) 1996-1997 Id Software, Inc.\n"
|
||||
"Copyright (C) 1999-2012 contributors of the QuakeForge project\n"
|
||||
"Please see the file \"AUTHORS\" for a list of contributors",
|
||||
&plugin_info_funcs,
|
||||
&plugin_info_data,
|
||||
};
|
||||
|
||||
PLUGIN_INFO(vid_render, sw)
|
||||
{
|
||||
return &plugin_info;
|
||||
}
|
163
libs/video/renderer/vid_render_sw32.c
Normal file
163
libs/video/renderer/vid_render_sw32.c
Normal file
|
@ -0,0 +1,163 @@
|
|||
/*
|
||||
vid_render_gl.c
|
||||
|
||||
SW32 version of the renderer
|
||||
|
||||
Copyright (C) 2012 Bill Currie <bill@taniwha.org>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include "QF/plugin/general.h"
|
||||
#include "QF/plugin/vid_render.h"
|
||||
|
||||
#include "mod_internal.h"
|
||||
#include "r_internal.h"
|
||||
|
||||
static general_funcs_t plugin_info_general_funcs = {
|
||||
};
|
||||
|
||||
static vid_model_funcs_t model_funcs = {
|
||||
Mod_LoadExternalTextures,
|
||||
Mod_LoadLighting,
|
||||
Mod_SubdivideSurface,
|
||||
Mod_ProcessTexture,
|
||||
Mod_LoadAliasModel,
|
||||
Mod_LoadSpriteModel,
|
||||
|
||||
Skin_SetColormap,
|
||||
Skin_SetSkin,
|
||||
Skin_SetupSkin,
|
||||
Skin_SetTranslation,
|
||||
Skin_ProcessTranslation,
|
||||
Skin_InitTranslations,
|
||||
Skin_Init_Textures,
|
||||
Skin_SetPlayerSkin,
|
||||
};
|
||||
|
||||
static vid_render_funcs_t vid_render_funcs = {
|
||||
Draw_Init,
|
||||
Draw_Character,
|
||||
Draw_String,
|
||||
Draw_nString,
|
||||
Draw_AltString,
|
||||
Draw_ConsoleBackground,
|
||||
Draw_Crosshair,
|
||||
Draw_CrosshairAt,
|
||||
Draw_TileClear,
|
||||
Draw_Fill,
|
||||
Draw_TextBox,
|
||||
Draw_FadeScreen,
|
||||
Draw_BlendScreen,
|
||||
Draw_CachePic,
|
||||
Draw_UncachePic,
|
||||
Draw_MakePic,
|
||||
Draw_DestroyPic,
|
||||
Draw_PicFromWad,
|
||||
Draw_Pic,
|
||||
Draw_Picf,
|
||||
Draw_SubPic,
|
||||
|
||||
SCR_UpdateScreen,
|
||||
SCR_DrawRam,
|
||||
SCR_DrawFPS,
|
||||
SCR_DrawTime,
|
||||
SCR_DrawTurtle,
|
||||
SCR_DrawPause,
|
||||
SCR_CaptureBGR,
|
||||
SCR_ScreenShot,
|
||||
SCR_DrawStringToSnap,
|
||||
|
||||
Fog_Update,
|
||||
Fog_ParseWorldspawn,
|
||||
|
||||
R_ClearState,
|
||||
R_LoadSkys,
|
||||
R_NewMap,
|
||||
R_AddEfrags,
|
||||
R_RemoveEfrags,
|
||||
R_EnqueueEntity,
|
||||
R_LineGraph,
|
||||
R_AllocDlight,
|
||||
R_AllocEntity,
|
||||
R_RenderView,
|
||||
R_DecayLights,
|
||||
D_FlushCaches,
|
||||
0,
|
||||
&model_funcs
|
||||
};
|
||||
|
||||
static vid_render_data_t vid_render_data = {
|
||||
&vid, &r_refdef, &scr_vrect,
|
||||
0, 0, 0,
|
||||
0,
|
||||
0, 0,
|
||||
0.0,
|
||||
true, false, false, false,
|
||||
0,
|
||||
0, 0,
|
||||
0,
|
||||
0.0, 0.0,
|
||||
0,
|
||||
r_origin, vpn, vright, vup
|
||||
};
|
||||
|
||||
static general_data_t plugin_info_general_data;
|
||||
|
||||
static plugin_funcs_t plugin_info_funcs = {
|
||||
&plugin_info_general_funcs,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
&vid_render_funcs,
|
||||
};
|
||||
|
||||
static plugin_data_t plugin_info_data = {
|
||||
&plugin_info_general_data,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
&vid_render_data,
|
||||
};
|
||||
|
||||
static plugin_t plugin_info = {
|
||||
qfp_snd_render,
|
||||
0,
|
||||
QFPLUGIN_VERSION,
|
||||
"0.1",
|
||||
"SW32 Renderer",
|
||||
"Copyright (C) 1996-1997 Id Software, Inc.\n"
|
||||
"Copyright (C) 1999-2012 contributors of the QuakeForge project\n"
|
||||
"Please see the file \"AUTHORS\" for a list of contributors",
|
||||
&plugin_info_funcs,
|
||||
&plugin_info_data,
|
||||
};
|
||||
|
||||
PLUGIN_INFO(vid_render, sw32)
|
||||
{
|
||||
return &plugin_info;
|
||||
}
|
|
@ -36,8 +36,7 @@ AM_CFLAGS= @PTHREAD_CFLAGS@
|
|||
|
||||
bin_PROGRAMS= @NQ_TARGETS@
|
||||
|
||||
EXTRA_PROGRAMS= nq-fbdev nq-glx nq-glslx nq-mgl nq-sdl nq-sdl32 nq-sgl \
|
||||
nq-sglsl nq-svga nq-3dfx nq-wgl nq-x11 nq-server
|
||||
EXTRA_PROGRAMS= nq-fbdev nq-sdl nq-svga nq-wgl nq-x11 nq-server
|
||||
|
||||
noinst_LIBRARIES= @nq_libs@
|
||||
EXTRA_LIBRARIES=libnq_client.a libnq_common.a libnq_sdl.a libnq_server.a
|
||||
|
@ -87,14 +86,12 @@ server_libs = libnq_server.a libnq_common.a
|
|||
|
||||
# Software-rendering targets
|
||||
|
||||
soft_QFLIBS= $(top_builddir)/libs/video/renderer/libQFrenderer.la \
|
||||
$(top_builddir)/libs/models/libQFmodels.la
|
||||
|
||||
# ... Linux FBDev
|
||||
nq_fbdev_libs= \
|
||||
$(client_libs) \
|
||||
$(cl_plugin_LIBS) \
|
||||
$(soft_QFLIBS) \
|
||||
$(top_builddir)/libs/video/renderer/libQFrenderer.la \
|
||||
$(top_builddir)/libs/models/libQFmodels.la \
|
||||
$(top_builddir)/libs/video/targets/libQFfbdev.la \
|
||||
$(client_LIBS)
|
||||
nq_fbdev_SOURCES= sys_unix.c
|
||||
|
@ -102,24 +99,13 @@ nq_fbdev_LDADD= $(nq_fbdev_libs) $(NET_LIBS)
|
|||
nq_fbdev_LDFLAGS= $(common_ldflags)
|
||||
nq_fbdev_DEPENDENCIES= $(nq_fbdev_libs)
|
||||
|
||||
# ... SciTech MGL
|
||||
nq_mgl_libs= \
|
||||
$(client_libs) \
|
||||
$(cl_plugin_LIBS) \
|
||||
$(soft_QFLIBS) \
|
||||
$(top_builddir)/libs/video/targets/libQFmgl.la \
|
||||
$(client_LIBS)
|
||||
nq_mgl_SOURCES= sys_win.c
|
||||
nq_mgl_LDADD= $(nq_mgl_libs) $(MGL_LIBS) $(NET_LIBS)
|
||||
nq_mgl_LDFLAGS= $(common_ldflags)
|
||||
nq_mgl_DEPENDENCIES= $(nq_mgl_libs)
|
||||
|
||||
# ... SDL, version 1.2 and higher
|
||||
nq_sdl_libs= \
|
||||
libnq_sdl.a \
|
||||
$(client_libs) \
|
||||
$(cl_plugin_LIBS) \
|
||||
$(soft_QFLIBS) \
|
||||
$(top_builddir)/libs/video/renderer/libQFrenderer.la \
|
||||
$(top_builddir)/libs/models/libQFmodels.la \
|
||||
$(top_builddir)/libs/video/targets/libQFsdl.la \
|
||||
$(client_LIBS)
|
||||
nq_sdl_SOURCES=sdl_link.c
|
||||
|
@ -127,25 +113,12 @@ nq_sdl_LDADD= $(nq_sdl_libs) $(SDL_LIBS) $(NET_LIBS)
|
|||
nq_sdl_LDFLAGS= $(common_ldflags)
|
||||
nq_sdl_DEPENDENCIES= $(nq_sdl_libs)
|
||||
|
||||
# ... 32-bit software, SDL
|
||||
nq_sdl32_libs= \
|
||||
libnq_sdl.a \
|
||||
$(client_libs) \
|
||||
$(cl_plugin_LIBS) \
|
||||
$(top_builddir)/libs/video/renderer/libQFrenderer.la \
|
||||
$(top_builddir)/libs/models/libQFmodels.la \
|
||||
$(top_builddir)/libs/video/targets/libQFsdl32.la \
|
||||
$(client_LIBS)
|
||||
nq_sdl32_SOURCES=sdl_link.c
|
||||
nq_sdl32_LDADD= $(nq_sdl32_libs) $(SDL_LIBS) $(NET_LIBS)
|
||||
nq_sdl32_LDFLAGS= $(common_ldflags)
|
||||
nq_sdl32_DEPENDENCIES= $(nq_sdl32_libs)
|
||||
|
||||
# ... Linux SVGAlib
|
||||
nq_svga_libs= \
|
||||
$(client_libs) \
|
||||
$(cl_plugin_LIBS) \
|
||||
$(soft_QFLIBS) \
|
||||
$(top_builddir)/libs/video/renderer/libQFrenderer.la \
|
||||
$(top_builddir)/libs/models/libQFmodels.la \
|
||||
$(top_builddir)/libs/video/targets/libQFsvga.la \
|
||||
$(client_LIBS)
|
||||
nq_svga_SOURCES= sys_unix.c
|
||||
|
@ -157,7 +130,8 @@ nq_svga_DEPENDENCIES= $(nq_svga_libs)
|
|||
nq_x11_libs= \
|
||||
$(client_libs) \
|
||||
$(cl_plugin_LIBS) \
|
||||
$(soft_QFLIBS) \
|
||||
$(top_builddir)/libs/video/renderer/libQFrenderer.la \
|
||||
$(top_builddir)/libs/models/libQFmodels.la \
|
||||
$(top_builddir)/libs/video/targets/libQFx11.la \
|
||||
$(client_LIBS)
|
||||
nq_x11_SOURCES= sys_unix.c
|
||||
|
@ -169,79 +143,6 @@ nq_x11_DEPENDENCIES= $(nq_x11_libs)
|
|||
|
||||
# OpenGL-using targets
|
||||
|
||||
opengl_QFLIBS= \
|
||||
$(top_builddir)/libs/video/renderer/libQFrenderer.la \
|
||||
$(top_builddir)/libs/models/libQFmodels.la
|
||||
|
||||
glsl_QFLIBS= \
|
||||
$(top_builddir)/libs/video/renderer/libQFrenderer.la \
|
||||
$(top_builddir)/libs/models/libQFmodels.la
|
||||
|
||||
# ... Linux 3DFX
|
||||
nq_3dfx_libs= \
|
||||
$(client_libs) \
|
||||
$(cl_plugin_LIBS) \
|
||||
$(opengl_QFLIBS) \
|
||||
$(top_builddir)/libs/video/targets/libQFtdfx.la \
|
||||
$(client_LIBS)
|
||||
nq_3dfx_SOURCES= sys_unix.c
|
||||
nq_3dfx_LDADD= $(nq_3dfx_libs) $(SVGA_LIBS) $(NET_LIBS)
|
||||
nq_3dfx_LDFLAGS= $(common_ldflags)
|
||||
nq_3dfx_DEPENDENCIES= $(nq_3dfx_libs)
|
||||
|
||||
# ... OpenGL in X Window
|
||||
nq_glx_libs= \
|
||||
$(client_libs) \
|
||||
$(cl_plugin_LIBS) \
|
||||
$(opengl_QFLIBS) \
|
||||
$(top_builddir)/libs/video/targets/libQFglx.la \
|
||||
$(client_LIBS)
|
||||
nq_glx_SOURCES= sys_unix.c
|
||||
nq_glx_LDADD= $(nq_glx_libs) \
|
||||
$(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 \
|
||||
-lXext $(X_EXTRA_LIBS) $(DL_LIBS) $(NET_LIBS)
|
||||
nq_glx_LDFLAGS= $(common_ldflags)
|
||||
nq_glx_DEPENDENCIES= $(nq_glx_libs)
|
||||
|
||||
nq_glslx_libs= \
|
||||
$(client_libs) \
|
||||
$(cl_plugin_LIBS) \
|
||||
$(glsl_QFLIBS) \
|
||||
$(top_builddir)/libs/video/targets/libQFglslx.la \
|
||||
$(client_LIBS)
|
||||
nq_glslx_SOURCES= sys_unix.c
|
||||
nq_glslx_LDADD= $(nq_glslx_libs) \
|
||||
$(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 \
|
||||
-lXext $(X_EXTRA_LIBS) $(DL_LIBS) $(NET_LIBS)
|
||||
nq_glslx_LDFLAGS= $(common_ldflags)
|
||||
nq_glslx_DEPENDENCIES= $(nq_glslx_libs)
|
||||
|
||||
# ... Simple Directmedia Layer, version 1.2 and higher, in GL mode
|
||||
nq_sgl_libs= \
|
||||
libnq_sdl.a \
|
||||
$(client_libs) \
|
||||
$(cl_plugin_LIBS) \
|
||||
$(opengl_QFLIBS) \
|
||||
$(top_builddir)/libs/video/targets/libQFsgl.la \
|
||||
$(client_LIBS)
|
||||
nq_sgl_SOURCES=sdl_link.c
|
||||
nq_sgl_LDADD= $(nq_sgl_libs) $(SDL_LIBS) $(DL_LIBS) $(NET_LIBS)
|
||||
nq_sgl_LDFLAGS= $(common_ldflags)
|
||||
nq_sgl_DEPENDENCIES= $(nq_sgl_libs)
|
||||
|
||||
# ... Simple Directmedia Layer, version 1.2 and higher, in GLSL mode
|
||||
nq_sglsl_libs= \
|
||||
libnq_sdl.a \
|
||||
$(client_libs) \
|
||||
$(cl_plugin_LIBS) \
|
||||
$(glsl_QFLIBS) \
|
||||
$(top_builddir)/libs/video/targets/libQFsglsl.la \
|
||||
$(client_LIBS)
|
||||
nq_sglsl_SOURCES=sdl_link.c
|
||||
nq_sglsl_LDADD= $(nq_sglsl_libs) $(SDL_LIBS) $(DL_LIBS) $(NET_LIBS)
|
||||
nq_sglsl_LDFLAGS= $(common_ldflags)
|
||||
nq_sglsl_DEPENDENCIES= $(nq_sglsl_libs)
|
||||
|
||||
# ... SGI/Microsoft WGL (Windows OpenGL)
|
||||
nq_wgl_libs= \
|
||||
$(client_libs) \
|
||||
|
|
|
@ -36,9 +36,8 @@ AM_CFLAGS= @PTHREAD_CFLAGS@
|
|||
|
||||
bin_PROGRAMS= @QW_TARGETS@
|
||||
|
||||
EXTRA_PROGRAMS= qw-client-fbdev qw-client-glx qw-client-glslx qw-client-mgl \
|
||||
qw-client-sdl qw-client-sdl32 qw-client-sgl qw-client-sglsl \
|
||||
qw-client-svga qw-client-3dfx qw-client-wgl qw-client-x11 \
|
||||
EXTRA_PROGRAMS= \
|
||||
qw-client-fbdev qw-client-sdl qw-client-svga qw-client-wgl qw-client-x11 \
|
||||
qw-server qw-master
|
||||
|
||||
noinst_LIBRARIES= @qw_libs@
|
||||
|
@ -117,14 +116,12 @@ libqw_client_a_SOURCES= \
|
|||
|
||||
# Software-rendering clients
|
||||
|
||||
soft_LIBS= $(top_builddir)/libs/video/renderer/libQFrenderer.la \
|
||||
$(top_builddir)/libs/models/libQFmodels.la
|
||||
|
||||
# ... Linux FBDev
|
||||
qw_client_fbdev_libs= \
|
||||
$(client_libs) \
|
||||
$(cl_plugin_LIBS) \
|
||||
$(soft_LIBS) \
|
||||
$(top_builddir)/libs/video/renderer/libQFrenderer.la \
|
||||
$(top_builddir)/libs/models/libQFmodels.la
|
||||
$(top_builddir)/libs/video/targets/libQFfbdev.la \
|
||||
$(client_LIBS)
|
||||
qw_client_fbdev_SOURCES= cl_sys_unix.c
|
||||
|
@ -132,24 +129,13 @@ qw_client_fbdev_LDADD= $(qw_client_fbdev_libs) $(NET_LIBS) $(LIBCURL_LIBS)
|
|||
qw_client_fbdev_LDFLAGS= $(common_ldflags)
|
||||
qw_client_fbdev_DEPENDENCIES= $(qw_client_fbdev_libs)
|
||||
|
||||
# ... SciTech MGL
|
||||
qw_client_mgl_libs= \
|
||||
$(client_libs) \
|
||||
$(cl_plugin_LIBS) \
|
||||
$(soft_LIBS) \
|
||||
$(top_builddir)/libs/video/targets/libQFmgl.la \
|
||||
$(client_LIBS)
|
||||
qw_client_mgl_SOURCES= cl_sys_win.c
|
||||
qw_client_mgl_LDADD= $(qw_client_mgl_libs) $(MGL_LIBS) $(NET_LIBS) $(LIBCURL_LIBS)
|
||||
qw_client_mgl_LDFLAGS= $(common_ldflags)
|
||||
qw_client_mgl_DEPENDENCIES= $(qw_client_mgl_libs)
|
||||
|
||||
# ... Simple DirectMedia Layer, version 1.2 and higher
|
||||
qw_client_sdl_libs= \
|
||||
libqw_sdl.a \
|
||||
$(client_libs) \
|
||||
$(cl_plugin_LIBS) \
|
||||
$(soft_LIBS) \
|
||||
$(top_builddir)/libs/video/renderer/libQFrenderer.la \
|
||||
$(top_builddir)/libs/models/libQFmodels.la
|
||||
$(top_builddir)/libs/video/targets/libQFsdl.la \
|
||||
$(client_LIBS)
|
||||
qw_client_sdl_SOURCES=sdl_link.c
|
||||
|
@ -157,25 +143,12 @@ qw_client_sdl_LDADD= libqw_sdl.a $(qw_client_sdl_libs) $(SDL_LIBS) $(NET_LIBS) $
|
|||
qw_client_sdl_LDFLAGS= $(common_ldflags)
|
||||
qw_client_sdl_DEPENDENCIES= libqw_sdl.a $(qw_client_sdl_libs)
|
||||
|
||||
# ... 32-bit software, SDL
|
||||
qw_client_sdl32_libs= \
|
||||
libqw_sdl.a \
|
||||
$(client_libs) \
|
||||
$(cl_plugin_LIBS) \
|
||||
$(top_builddir)/libs/video/renderer/libQFrenderer.la \
|
||||
$(top_builddir)/libs/models/libQFmodels.la \
|
||||
$(top_builddir)/libs/video/targets/libQFsdl32.la \
|
||||
$(client_LIBS)
|
||||
qw_client_sdl32_SOURCES=sdl_link.c
|
||||
qw_client_sdl32_LDADD= libqw_sdl.a $(qw_client_sdl32_libs) $(SDL_LIBS) $(NET_LIBS) $(LIBCURL_LIBS)
|
||||
qw_client_sdl32_LDFLAGS=$(common_ldflags)
|
||||
qw_client_sdl32_DEPENDENCIES= libqw_sdl.a $(qw_client_sdl32_libs)
|
||||
|
||||
# ... Linux SVGAlib
|
||||
qw_client_svga_libs= \
|
||||
$(client_libs) \
|
||||
$(cl_plugin_LIBS) \
|
||||
$(soft_LIBS) \
|
||||
$(top_builddir)/libs/video/renderer/libQFrenderer.la \
|
||||
$(top_builddir)/libs/models/libQFmodels.la
|
||||
$(top_builddir)/libs/video/targets/libQFsvga.la \
|
||||
$(client_LIBS)
|
||||
qw_client_svga_SOURCES= cl_sys_unix.c
|
||||
|
@ -187,7 +160,8 @@ qw_client_svga_DEPENDENCIES= $(qw_client_svga_libs)
|
|||
qw_client_x11_libs= \
|
||||
$(client_libs) \
|
||||
$(cl_plugin_LIBS) \
|
||||
$(soft_LIBS) \
|
||||
$(top_builddir)/libs/video/renderer/libQFrenderer.la \
|
||||
$(top_builddir)/libs/models/libQFmodels.la
|
||||
$(top_builddir)/libs/video/targets/libQFx11.la \
|
||||
$(client_LIBS)
|
||||
qw_client_x11_SOURCES= cl_sys_unix.c
|
||||
|
@ -197,81 +171,6 @@ qw_client_x11_LDADD= $(qw_client_x11_libs) \
|
|||
qw_client_x11_LDFLAGS= $(common_ldflags)
|
||||
qw_client_x11_DEPENDENCIES= $(qw_client_x11_libs)
|
||||
|
||||
# OpenGL-using clients
|
||||
|
||||
opengl_LIBS= $(top_builddir)/libs/video/renderer/libQFrenderer.la \
|
||||
$(top_builddir)/libs/models/libQFmodels.la
|
||||
|
||||
glsl_LIBS= $(top_builddir)/libs/video/renderer/libQFrenderer.la \
|
||||
$(top_builddir)/libs/models/libQFmodels.la
|
||||
|
||||
# ... OpenGL in X Window
|
||||
qw_client_glx_libs= \
|
||||
$(client_libs) \
|
||||
$(cl_plugin_LIBS) \
|
||||
$(opengl_LIBS) \
|
||||
$(top_builddir)/libs/video/targets/libQFglx.la \
|
||||
$(client_LIBS)
|
||||
qw_client_glx_SOURCES= cl_sys_unix.c
|
||||
qw_client_glx_LDADD= $(qw_client_glx_libs) \
|
||||
$(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 \
|
||||
-lXext $(X_EXTRA_LIBS) $(DL_LIBS) $(NET_LIBS) $(LIBCURL_LIBS)
|
||||
qw_client_glx_LDFLAGS= $(common_ldflags)
|
||||
qw_client_glx_DEPENDENCIES= $(qw_client_glx_libs)
|
||||
|
||||
# ... OpenGLSL in X Window
|
||||
qw_client_glslx_libs= \
|
||||
$(client_libs) \
|
||||
$(cl_plugin_LIBS) \
|
||||
$(glsl_LIBS) \
|
||||
$(top_builddir)/libs/video/targets/libQFglslx.la \
|
||||
$(client_LIBS)
|
||||
qw_client_glslx_SOURCES= cl_sys_unix.c
|
||||
qw_client_glslx_LDADD= $(qw_client_glslx_libs) \
|
||||
$(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 \
|
||||
-lXext $(X_EXTRA_LIBS) $(DL_LIBS) $(NET_LIBS) $(LIBCURL_LIBS)
|
||||
qw_client_glslx_LDFLAGS= $(common_ldflags)
|
||||
qw_client_glslx_DEPENDENCIES= $(qw_client_glslx_libs)
|
||||
|
||||
# ... Linux 3DFX
|
||||
qw_client_3dfx_libs= \
|
||||
$(client_libs) \
|
||||
$(cl_plugin_LIBS) \
|
||||
$(opengl_LIBS) \
|
||||
$(top_builddir)/libs/video/targets/libQFtdfx.la \
|
||||
$(client_LIBS)
|
||||
qw_client_3dfx_SOURCES= cl_sys_unix.c
|
||||
qw_client_3dfx_LDADD= $(qw_client_3dfx_libs) \
|
||||
$(SVGA_LIBS) $(NET_LIBS) $(LIBCURL_LIBS)
|
||||
qw_client_3dfx_LDFLAGS= $(common_ldflags)
|
||||
qw_client_3dfx_DEPENDENCIES= $(qw_client_3dfx_libs)
|
||||
|
||||
# ... Simple DirectMedia Layer, version 1.2 and higher, in GL mode
|
||||
qw_client_sgl_libs= \
|
||||
libqw_sdl.a \
|
||||
$(client_libs) \
|
||||
$(cl_plugin_LIBS) \
|
||||
$(opengl_LIBS) \
|
||||
$(top_builddir)/libs/video/targets/libQFsgl.la \
|
||||
$(client_LIBS)
|
||||
qw_client_sgl_SOURCES=sdl_link.c
|
||||
qw_client_sgl_LDADD= $(qw_client_sgl_libs) $(SDL_LIBS) $(DL_LIBS) $(NET_LIBS) $(LIBCURL_LIBS)
|
||||
qw_client_sgl_LDFLAGS= $(common_ldflags)
|
||||
qw_client_sgl_DEPENDENCIES= $(qw_client_sgl_libs)
|
||||
|
||||
# ... Simple DirectMedia Layer, version 1.2 and higher, in GLSL mode
|
||||
qw_client_sglsl_libs= \
|
||||
libqw_sdl.a \
|
||||
$(client_libs) \
|
||||
$(cl_plugin_LIBS) \
|
||||
$(glsl_LIBS) \
|
||||
$(top_builddir)/libs/video/targets/libQFsglsl.la \
|
||||
$(client_LIBS)
|
||||
qw_client_sglsl_SOURCES=sdl_link.c
|
||||
qw_client_sglsl_LDADD= $(qw_client_sglsl_libs) $(SDL_LIBS) $(DL_LIBS) $(NET_LIBS) $(LIBCURL_LIBS)
|
||||
qw_client_sglsl_LDFLAGS= $(common_ldflags)
|
||||
qw_client_sglsl_DEPENDENCIES= $(qw_client_sglsl_libs)
|
||||
|
||||
# ... SGI/Microsoft WGL (Windows OpenGL)
|
||||
qw_client_wgl_libs= \
|
||||
$(client_libs) \
|
||||
|
|
Loading…
Reference in a new issue