mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 04:22:34 +00:00
- moved sprite CVARs out of the global CVAR storage file.
They are local to hw_sprites.cpp now, as they aren't used anywhere else.
This commit is contained in:
parent
686aa9779d
commit
1ad2f30e0d
12 changed files with 69 additions and 66 deletions
|
@ -21,22 +21,20 @@
|
||||||
|
|
||||||
#include "gl_system.h"
|
#include "gl_system.h"
|
||||||
#include "m_png.h"
|
#include "m_png.h"
|
||||||
#include "r_utility.h"
|
|
||||||
#include "gl/system/gl_buffers.h"
|
#include "gl/system/gl_buffers.h"
|
||||||
#include "gl/system/gl_framebuffer.h"
|
#include "gl/system/gl_framebuffer.h"
|
||||||
#include "hwrenderer/utility/hw_cvars.h"
|
|
||||||
#include "gl/system/gl_debug.h"
|
#include "gl/system/gl_debug.h"
|
||||||
#include "gl/renderer/gl_renderstate.h"
|
|
||||||
#include "gl/renderer/gl_renderbuffers.h"
|
#include "gl/renderer/gl_renderbuffers.h"
|
||||||
#include "gl/renderer/gl_renderer.h"
|
#include "gl/renderer/gl_renderer.h"
|
||||||
#include "gl/renderer/gl_postprocessstate.h"
|
#include "gl/renderer/gl_postprocessstate.h"
|
||||||
#include "gl/shaders/gl_shaderprogram.h"
|
#include "gl/shaders/gl_shaderprogram.h"
|
||||||
#include "hwrenderer/postprocessing/hw_postprocess.h"
|
#include "hwrenderer/postprocessing/hw_postprocess.h"
|
||||||
#include "hwrenderer/postprocessing/hw_postprocess_cvars.h"
|
#include "hwrenderer/postprocessing/hw_postprocess_cvars.h"
|
||||||
#include "hw_vrmodes.h"
|
|
||||||
#include "hwrenderer/data/flatvertices.h"
|
#include "hwrenderer/data/flatvertices.h"
|
||||||
#include "gl/textures/gl_hwtexture.h"
|
|
||||||
#include "r_videoscale.h"
|
#include "r_videoscale.h"
|
||||||
|
#include "v_video.h"
|
||||||
|
#include "templates.h"
|
||||||
|
#include "hw_vrmodes.h"
|
||||||
|
|
||||||
extern bool vid_hdr_active;
|
extern bool vid_hdr_active;
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#include "gl_interface.h"
|
#include "gl_interface.h"
|
||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
#include "c_cvars.h"
|
#include "c_cvars.h"
|
||||||
#include "r_defs.h"
|
|
||||||
|
|
||||||
namespace OpenGLRenderer
|
namespace OpenGLRenderer
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "gl_system.h"
|
#include "gl_system.h"
|
||||||
#include "v_video.h"
|
#include "v_video.h"
|
||||||
#include "gl_interface.h"
|
#include "gl_interface.h"
|
||||||
|
#include "printf.h"
|
||||||
#include "hwrenderer/utility/hw_cvars.h"
|
#include "hwrenderer/utility/hw_cvars.h"
|
||||||
#include "gl/system/gl_debug.h"
|
#include "gl/system/gl_debug.h"
|
||||||
#include "gl/renderer/gl_renderer.h"
|
#include "gl/renderer/gl_renderer.h"
|
||||||
|
@ -29,8 +30,10 @@
|
||||||
#include "gl/renderer/gl_postprocessstate.h"
|
#include "gl/renderer/gl_postprocessstate.h"
|
||||||
#include "gl/shaders/gl_shaderprogram.h"
|
#include "gl/shaders/gl_shaderprogram.h"
|
||||||
#include "gl/system/gl_buffers.h"
|
#include "gl/system/gl_buffers.h"
|
||||||
|
#include "templates.h"
|
||||||
#include <random>
|
#include <random>
|
||||||
|
|
||||||
|
EXTERN_CVAR(Int, gl_debug_level)
|
||||||
CVAR(Int, gl_multisample, 1, CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
|
CVAR(Int, gl_multisample, 1, CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
|
||||||
|
|
||||||
namespace OpenGLRenderer
|
namespace OpenGLRenderer
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "gl/shaders/gl_shader.h"
|
|
||||||
#include "hwrenderer/postprocessing/hw_postprocess.h"
|
#include "hwrenderer/postprocessing/hw_postprocess.h"
|
||||||
|
|
||||||
namespace OpenGLRenderer
|
namespace OpenGLRenderer
|
||||||
|
|
|
@ -19,7 +19,6 @@ struct particle_t;
|
||||||
class FCanvasTexture;
|
class FCanvasTexture;
|
||||||
class FFlatVertexBuffer;
|
class FFlatVertexBuffer;
|
||||||
class FSkyVertexBuffer;
|
class FSkyVertexBuffer;
|
||||||
class FShaderManager;
|
|
||||||
class HWPortal;
|
class HWPortal;
|
||||||
class FLightBuffer;
|
class FLightBuffer;
|
||||||
class DPSprite;
|
class DPSprite;
|
||||||
|
@ -32,6 +31,7 @@ struct FRenderViewpoint;
|
||||||
|
|
||||||
namespace OpenGLRenderer
|
namespace OpenGLRenderer
|
||||||
{
|
{
|
||||||
|
class FShaderManager;
|
||||||
class FSamplerManager;
|
class FSamplerManager;
|
||||||
class OpenGLFrameBuffer;
|
class OpenGLFrameBuffer;
|
||||||
class FPresentShaderBase;
|
class FPresentShaderBase;
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#include "cmdlib.h"
|
#include "cmdlib.h"
|
||||||
#include "md5.h"
|
#include "md5.h"
|
||||||
#include "m_misc.h"
|
#include "m_misc.h"
|
||||||
|
#include "gl/shaders/gl_shader.h"
|
||||||
#include "hwrenderer/utility/hw_shaderpatcher.h"
|
#include "hwrenderer/utility/hw_shaderpatcher.h"
|
||||||
#include "hwrenderer/data/shaderuniforms.h"
|
#include "hwrenderer/data/shaderuniforms.h"
|
||||||
#include "hwrenderer/scene/hw_viewpointuniforms.h"
|
#include "hwrenderer/scene/hw_viewpointuniforms.h"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
|
||||||
#include "tarray.h"
|
#include "tarray.h"
|
||||||
|
#include "r_defs.h"
|
||||||
struct vertex_t;
|
struct vertex_t;
|
||||||
|
|
||||||
struct FQualifiedVertex
|
struct FQualifiedVertex
|
||||||
|
|
|
@ -48,6 +48,7 @@ EXTERN_CVAR(Float, r_visibility)
|
||||||
CVAR(Bool, gl_bandedswlight, false, CVAR_ARCHIVE)
|
CVAR(Bool, gl_bandedswlight, false, CVAR_ARCHIVE)
|
||||||
CVAR(Bool, gl_sort_textures, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
CVAR(Bool, gl_sort_textures, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
CVAR(Bool, gl_no_skyclear, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
CVAR(Bool, gl_no_skyclear, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
CVAR(Int, gl_enhanced_nv_stealth, 3, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
|
||||||
CVAR(Bool, gl_texture, true, 0)
|
CVAR(Bool, gl_texture, true, 0)
|
||||||
CVAR(Float, gl_mask_threshold, 0.5f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
CVAR(Float, gl_mask_threshold, 0.5f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
|
|
@ -68,6 +68,26 @@ EXTERN_CVAR(Bool, r_debug_disable_vis_filter)
|
||||||
EXTERN_CVAR(Float, transsouls)
|
EXTERN_CVAR(Float, transsouls)
|
||||||
|
|
||||||
|
|
||||||
|
//==========================================================================
|
||||||
|
//
|
||||||
|
// Sprite CVARs
|
||||||
|
//
|
||||||
|
//==========================================================================
|
||||||
|
|
||||||
|
CVAR(Bool, gl_usecolorblending, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
CVAR(Bool, gl_sprite_blend, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
|
||||||
|
CVAR(Int, gl_spriteclip, 1, CVAR_ARCHIVE)
|
||||||
|
CVAR(Float, gl_sclipthreshold, 10.0, CVAR_ARCHIVE)
|
||||||
|
CVAR(Float, gl_sclipfactor, 1.8f, CVAR_ARCHIVE)
|
||||||
|
CVAR(Int, gl_particles_style, 2, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) // 0 = square, 1 = round, 2 = smooth
|
||||||
|
CVAR(Int, gl_billboard_mode, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
CVAR(Bool, gl_billboard_faces_camera, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
CVAR(Bool, gl_billboard_particles, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
CUSTOM_CVAR(Int, gl_fuzztype, 0, CVAR_ARCHIVE)
|
||||||
|
{
|
||||||
|
if (self < 0 || self > 8) self = 0;
|
||||||
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,24 +1,39 @@
|
||||||
//
|
/*
|
||||||
//---------------------------------------------------------------------------
|
** hw_cvars.cpp
|
||||||
//
|
**
|
||||||
// Copyright(C) 2005-2016 Christoph Oelckers
|
** most of the hardware renderer's CVARs.
|
||||||
// All rights reserved.
|
**
|
||||||
//
|
**---------------------------------------------------------------------------
|
||||||
// This program is free software: you can redistribute it and/or modify
|
** Copyright 2005-2020 Christoph Oelckers
|
||||||
// it under the terms of the GNU Lesser General Public License as published by
|
** All rights reserved.
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
**
|
||||||
// (at your option) any later version.
|
** Redistribution and use in source and binary forms, with or without
|
||||||
//
|
** modification, are permitted provided that the following conditions
|
||||||
// This program is distributed in the hope that it will be useful,
|
** are met:
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
**
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
** 1. Redistributions of source code must retain the above copyright
|
||||||
// GNU Lesser General Public License for more details.
|
** notice, this list of conditions and the following disclaimer.
|
||||||
//
|
** 2. Redistributions in binary form must reproduce the above copyright
|
||||||
// You should have received a copy of the GNU Lesser General Public License
|
** notice, this list of conditions and the following disclaimer in the
|
||||||
// along with this program. If not, see http://www.gnu.org/licenses/
|
** documentation and/or other materials provided with the distribution.
|
||||||
//
|
** 3. The name of the author may not be used to endorse or promote products
|
||||||
//--------------------------------------------------------------------------
|
** derived from this software without specific prior written permission.
|
||||||
//
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||||
|
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
|
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
**---------------------------------------------------------------------------
|
||||||
|
**
|
||||||
|
**
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "c_cvars.h"
|
#include "c_cvars.h"
|
||||||
|
@ -65,7 +80,7 @@ CVAR(Int, gl_satformula, 1, CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
|
||||||
// Texture CVARs
|
// Texture CVARs
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
CUSTOM_CVAR(Float,gl_texture_filter_anisotropic,8.0f,CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCALL)
|
CUSTOM_CVARD(Float, gl_texture_filter_anisotropic, 8, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL, "changes the OpenGL texture anisotropy setting")
|
||||||
{
|
{
|
||||||
screen->TextureFilterChanged();
|
screen->TextureFilterChanged();
|
||||||
}
|
}
|
||||||
|
@ -75,7 +90,7 @@ CCMD(gl_flush)
|
||||||
TexMan.FlushAll();
|
TexMan.FlushAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
CUSTOM_CVAR(Int, gl_texture_filter, 4, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCALL)
|
CUSTOM_CVARD(Int, gl_texture_filter, 4, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCALL, "changes the texture filtering settings")
|
||||||
{
|
{
|
||||||
if (self < 0 || self > 6) self=4;
|
if (self < 0 || self > 6) self=4;
|
||||||
screen->TextureFilterChanged();
|
screen->TextureFilterChanged();
|
||||||
|
@ -83,26 +98,6 @@ CUSTOM_CVAR(Int, gl_texture_filter, 4, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINI
|
||||||
|
|
||||||
CVAR(Bool, gl_precache, false, CVAR_ARCHIVE)
|
CVAR(Bool, gl_precache, false, CVAR_ARCHIVE)
|
||||||
|
|
||||||
//==========================================================================
|
|
||||||
//
|
|
||||||
// Sprite CVARs
|
|
||||||
//
|
|
||||||
//==========================================================================
|
|
||||||
|
|
||||||
CVAR(Bool, gl_usecolorblending, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|
||||||
CVAR(Bool, gl_sprite_blend, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
|
|
||||||
CVAR(Int, gl_spriteclip, 1, CVAR_ARCHIVE)
|
|
||||||
CVAR(Float, gl_sclipthreshold, 10.0, CVAR_ARCHIVE)
|
|
||||||
CVAR(Float, gl_sclipfactor, 1.8f, CVAR_ARCHIVE)
|
|
||||||
CVAR(Int, gl_particles_style, 2, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) // 0 = square, 1 = round, 2 = smooth
|
|
||||||
CVAR(Int, gl_billboard_mode, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
|
||||||
CVAR(Bool, gl_billboard_faces_camera, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
|
||||||
CVAR(Bool, gl_billboard_particles, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
|
||||||
CVAR(Int, gl_enhanced_nv_stealth, 3, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
|
||||||
CUSTOM_CVAR(Int, gl_fuzztype, 0, CVAR_ARCHIVE)
|
|
||||||
{
|
|
||||||
if (self < 0 || self > 8) self = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
CUSTOM_CVAR(Int, gl_shadowmap_filter, 1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
CUSTOM_CVAR(Int, gl_shadowmap_filter, 1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
#include "r_defs.h"
|
|
||||||
#include "c_cvars.h"
|
#include "c_cvars.h"
|
||||||
|
|
||||||
|
|
||||||
EXTERN_CVAR(Bool,gl_enhanced_nightvision)
|
EXTERN_CVAR(Bool,gl_enhanced_nightvision)
|
||||||
EXTERN_CVAR(Int, screenblocks);
|
EXTERN_CVAR(Int, screenblocks);
|
||||||
EXTERN_CVAR(Int, gl_texture_filter)
|
EXTERN_CVAR(Int, gl_texture_filter)
|
||||||
|
@ -52,19 +50,6 @@ EXTERN_CVAR(Float, gl_ssao_blur_amount)
|
||||||
EXTERN_CVAR(Int, gl_debug_level)
|
EXTERN_CVAR(Int, gl_debug_level)
|
||||||
EXTERN_CVAR(Bool, gl_debug_breakpoint)
|
EXTERN_CVAR(Bool, gl_debug_breakpoint)
|
||||||
|
|
||||||
|
|
||||||
EXTERN_CVAR(Bool, gl_usecolorblending)
|
|
||||||
EXTERN_CVAR(Bool, gl_sprite_blend)
|
|
||||||
EXTERN_CVAR(Int, gl_spriteclip)
|
|
||||||
EXTERN_CVAR(Float, gl_sclipthreshold)
|
|
||||||
EXTERN_CVAR(Float, gl_sclipfactor)
|
|
||||||
EXTERN_CVAR(Int, gl_particles_style)
|
|
||||||
EXTERN_CVAR(Int, gl_billboard_mode)
|
|
||||||
EXTERN_CVAR(Bool, gl_billboard_faces_camera)
|
|
||||||
EXTERN_CVAR(Bool, gl_billboard_particles)
|
|
||||||
EXTERN_CVAR(Int, gl_enhanced_nv_stealth)
|
|
||||||
EXTERN_CVAR(Int, gl_fuzztype)
|
|
||||||
|
|
||||||
EXTERN_CVAR(Int, gl_shadowmap_filter)
|
EXTERN_CVAR(Int, gl_shadowmap_filter)
|
||||||
|
|
||||||
EXTERN_CVAR(Bool, gl_brightfog)
|
EXTERN_CVAR(Bool, gl_brightfog)
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include "vulkan/system/vk_builders.h"
|
#include "vulkan/system/vk_builders.h"
|
||||||
#include "vulkan/system/vk_framebuffer.h"
|
#include "vulkan/system/vk_framebuffer.h"
|
||||||
#include "hwrenderer/utility/hw_cvars.h"
|
#include "hwrenderer/utility/hw_cvars.h"
|
||||||
|
#include "templates.h"
|
||||||
|
|
||||||
VkRenderBuffers::VkRenderBuffers()
|
VkRenderBuffers::VkRenderBuffers()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue