1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:58:11 +00:00
serenity/Userland/Libraries/LibSoftGPU/Config.h
Stephan Unverwerth a5040ecdfc LibSoftGPU: Reduce number of samplers to 2
OpenGL mandates at least 2 texture units when multitexturing is
supported. This keeps our vertices lean and gives a nice speed
improvement in glquake. Until we support shaders this should be enough.
2022-01-19 19:57:49 +01:00

26 lines
767 B
C++

/*
* Copyright (c) 2021, Stephan Unverwerth <s.unverwerth@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#define INCREASE_STATISTICS_COUNTER(stat, n) \
do { \
if constexpr (ENABLE_STATISTICS_OVERLAY) \
stat += (n); \
} while (0)
namespace SoftGPU {
static constexpr bool ENABLE_STATISTICS_OVERLAY = false;
static constexpr int NUM_SAMPLERS = 2;
static constexpr int SUBPIXEL_BITS = 5;
static constexpr int NUM_LIGHTS = 8;
// See: https://www.khronos.org/opengl/wiki/Common_Mistakes#Texture_edge_color_problem
// FIXME: make this dynamically configurable through ConfigServer
static constexpr bool CLAMP_DEPRECATED_BEHAVIOR = false;
}