mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-30 15:02:56 +00:00
This is required to allow lighting to work properly in the GL. We currently have the maximum number of lights in the software GL context set to 8, as this is the minimum that OpenGL mandates according to the spec.
26 lines
768 B
C++
26 lines
768 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 = 32;
|
|
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;
|
|
|
|
}
|