diff --git a/engine/Quake/gl_mesh.c b/engine/Quake/gl_mesh.c index c362fce..cea27a3 100644 --- a/engine/Quake/gl_mesh.c +++ b/engine/Quake/gl_mesh.c @@ -349,10 +349,14 @@ void GL_MakeAliasModelDisplayLists (qmodel_t *m, aliashdr_t *hdr) for (j=0 ; jnumtris; } +#endif // USE_OPENGL + /* ============= GL_DrawAliasFrame -- johnfitz -- rewritten to support colored light, lerping, entalpha, multitexture, and r_drawflat @@ -748,12 +752,14 @@ void R_DrawAliasModel (entity_t *e) GL_DrawAliasFrame (paliashdr, lerpdata); glEnable (GL_TEXTURE_2D); } +#ifdef USE_OPENGL // call fast path if possible. if the shader compliation failed for some reason, // r_alias_program will be 0. else if (r_alias_program != 0) { GL_DrawAliasFrame_GLSL (paliashdr, lerpdata, tx, fb); } +#endif // USE_OPENGL else if (overbright) { if (gl_texture_env_combine && gl_mtexable && gl_texture_env_add && fb) //case 1: everything in one pass diff --git a/engine/Quake/r_brush.c b/engine/Quake/r_brush.c index 1499908..796ae4c 100644 --- a/engine/Quake/r_brush.c +++ b/engine/Quake/r_brush.c @@ -951,6 +951,8 @@ void GL_BuildLightmaps (void) //johnfitz } +#ifdef USE_OPENGL + /* ============================================================= @@ -1037,6 +1039,8 @@ void GL_BuildBModelVertexBuffer (void) GL_ClearBufferBindings (); } +#endif // USE_OPENGL + /* =============== R_AddDynamicLights diff --git a/engine/Quake/r_world.c b/engine/Quake/r_world.c index de5b9f3..a8726da 100644 --- a/engine/Quake/r_world.c +++ b/engine/Quake/r_world.c @@ -796,6 +796,8 @@ void R_DrawLightmapChains (void) } } +#ifdef USE_OPENGL + static GLuint r_world_program; // uniforms used in vert shader @@ -1013,6 +1015,8 @@ void R_DrawTextureChains_GLSL (qmodel_t *model, entity_t *ent, texchain_t chain) } } +#endif // USE_OPENGL + /* ============= R_DrawWorld -- johnfitz -- rewritten @@ -1072,6 +1076,7 @@ void R_DrawTextureChains (qmodel_t *model, entity_t *ent, texchain_t chain) R_DrawTextureChains_NoTexture (model, chain); +#ifdef USE_OPENGL // OpenGL 2 fast path if (r_world_program != 0) { @@ -1080,6 +1085,7 @@ void R_DrawTextureChains (qmodel_t *model, entity_t *ent, texchain_t chain) R_DrawTextureChains_GLSL (model, ent, chain); return; } +#endif // USE_OPENGL if (gl_overbright.value) { diff --git a/engine/Quake/sys_sdl_win.c b/engine/Quake/sys_sdl_win.c index a11e7a4..b998a1b 100644 --- a/engine/Quake/sys_sdl_win.c +++ b/engine/Quake/sys_sdl_win.c @@ -48,7 +48,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. qboolean Win95, Win95old, WinNT, WinVista; -cvar_t sys_throttle = {"sys_throttle", "0.02", CVAR_ARCHIVE}; static HANDLE hinput, houtput; diff --git a/engine/UniQuake/stub/stub_opengl.c b/engine/UniQuake/stub/stub_opengl.c index fb1f082..68d4dd9 100644 --- a/engine/UniQuake/stub/stub_opengl.c +++ b/engine/UniQuake/stub/stub_opengl.c @@ -286,4 +286,12 @@ GLAPI void GLAPIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height) { } +GLAPI void GLAPIENTRY GL_MTexCoord2fFunc(GLenum target, GLfloat s, GLfloat t) +{ +} + +GLAPI void GLAPIENTRY GL_SelectTextureFunc(GLenum target) +{ +} + #endif // !USE_OPENGL diff --git a/engine/UniQuake/stub/stub_vidgl.c b/engine/UniQuake/stub/stub_vidgl.c new file mode 100644 index 0000000..e8870b8 --- /dev/null +++ b/engine/UniQuake/stub/stub_vidgl.c @@ -0,0 +1,42 @@ +#if !defined(USE_LIBSDL) && !defined(USE_OPENGL) + +#include "quakedef.h" + +int gl_stencilbits = 0; +qboolean gl_texture_NPOT = false; +qboolean gl_glsl_gamma_able = false; +qboolean gl_mtexable = false; +float gl_max_anisotropy = 1; +qboolean gl_texture_env_combine = false; +qboolean gl_texture_env_add = false; + +cvar_t vid_gamma = { "gamma", "1", CVAR_ARCHIVE }; +cvar_t vid_contrast = { "contrast", "1", CVAR_ARCHIVE }; + +void VID_Init(void) +{ + Cvar_RegisterVariable(&vid_gamma); + Cvar_RegisterVariable(&vid_contrast); +} + +void VID_Shutdown(void) +{ +} + +void VID_Toggle(void) +{ +} + +void VID_Lock(void) +{ +} + +void GL_BeginRendering(int *x, int *y, int *width, int *height) +{ +} + +void GL_EndRendering(void) +{ +} + +#endif // !USE_LIBSDL && !USE_OPENGL diff --git a/engine/UniQuake/sys_uniquake.c b/engine/UniQuake/sys_uniquake.c index e716890..ce55f0f 100644 --- a/engine/UniQuake/sys_uniquake.c +++ b/engine/UniQuake/sys_uniquake.c @@ -4,6 +4,8 @@ qboolean isDedicated; +cvar_t sys_throttle = { "sys_throttle", "0.02", CVAR_ARCHIVE }; + typedef struct unity_syscalls_s { void *target; diff --git a/engine/Windows/VisualStudio/uniquake.vcxproj b/engine/Windows/VisualStudio/uniquake.vcxproj index 8e421dd..ecc4d63 100644 --- a/engine/Windows/VisualStudio/uniquake.vcxproj +++ b/engine/Windows/VisualStudio/uniquake.vcxproj @@ -149,7 +149,7 @@ Disabled ..\SDL2\include;..\..\FMOD\inc;..\..\Quake;%(AdditionalIncludeDirectories) - UNIQUAKE_EXPORTS;WIN32;_DEBUG;_WINDOWS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;USE_FMOD;USE_SDL2;%(PreprocessorDefinitions) + UNIQUAKE_EXPORTS;WIN32;_DEBUG;_WINDOWS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;USE_FMOD;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -168,7 +168,7 @@ MachineX86 - copy $(TargetDir)$(TargetName).dll $(SolutionDir)..\..\..\Assets\Plugins\windows\x86\uniquake.dll + copy "$(TargetDir)$(TargetName).dll" $(SolutionDir)..\..\..\Assets\Plugins\windows\x86\uniquake.dll @@ -233,7 +233,7 @@ copy "$(SolutionDir)\..\SDL2\lib\*.dll" "$(TargetDir)" Disabled ..\SDL2\include;..\..\FMOD\inc;..\..\Quake;%(AdditionalIncludeDirectories) - UNIQUAKE_EXPORTS;WIN32;_DEBUG;_WINDOWS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;USE_FMOD;USE_SDL2;%(PreprocessorDefinitions) + UNIQUAKE_EXPORTS;WIN32;_DEBUG;_WINDOWS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;USE_FMOD;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -252,7 +252,7 @@ copy "$(SolutionDir)\..\SDL2\lib\*.dll" "$(TargetDir)" MachineX64 - copy $(TargetDir)$(TargetName).dll $(SolutionDir)..\..\..\Assets\Plugins\windows\x86_64\uniquake.dll + copy "$(TargetDir)$(TargetName).dll" $(SolutionDir)..\..\..\Assets\Plugins\windows\x86_64\uniquake.dll @@ -363,6 +363,7 @@ copy "$(SolutionDir)\..\SDL2\lib64\*.dll" "$(TargetDir)" + diff --git a/engine/Windows/VisualStudio/uniquake.vcxproj.filters b/engine/Windows/VisualStudio/uniquake.vcxproj.filters index fb9c695..ef58998 100644 --- a/engine/Windows/VisualStudio/uniquake.vcxproj.filters +++ b/engine/Windows/VisualStudio/uniquake.vcxproj.filters @@ -238,6 +238,9 @@ uniquake + + stub +