mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-24 05:25:13 +00:00
LibGL+LibGPU+LibSoftGPU: Move TexCoordGenerationConfig into LibGPU
This commit is contained in:
parent
8f359bf758
commit
5a5596b381
Notes:
sideshowbarker
2024-07-17 14:23:04 +09:00
Author: https://github.com/sunverwerth Commit: https://github.com/SerenityOS/serenity/commit/5a5596b381 Pull-request: https://github.com/SerenityOS/serenity/pull/13294 Reviewed-by: https://github.com/Quaker762 ✅ Reviewed-by: https://github.com/creator1creeper1 Reviewed-by: https://github.com/gmta
3 changed files with 22 additions and 7 deletions
|
@ -3089,7 +3089,7 @@ void GLContext::sync_device_texcoord_config()
|
|||
if (!context_coordinate_config.enabled)
|
||||
continue;
|
||||
|
||||
SoftGPU::TexCoordGenerationConfig* texcoord_generation_config;
|
||||
GPU::TexCoordGenerationConfig* texcoord_generation_config;
|
||||
switch (capability) {
|
||||
case GL_TEXTURE_GEN_S:
|
||||
enabled_coordinates |= GPU::TexCoordGenerationCoordinate::S;
|
||||
|
|
19
Userland/Libraries/LibGPU/TexCoordGenerationConfig.h
Normal file
19
Userland/Libraries/LibGPU/TexCoordGenerationConfig.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Jelle Raaijmakers <jelle@gmta.nl>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibGPU/Enums.h>
|
||||
#include <LibGfx/Vector4.h>
|
||||
|
||||
namespace GPU {
|
||||
|
||||
struct TexCoordGenerationConfig {
|
||||
GPU::TexCoordGenerationMode mode { GPU::TexCoordGenerationMode::EyeLinear };
|
||||
FloatVector4 coefficients {};
|
||||
};
|
||||
|
||||
}
|
|
@ -19,6 +19,7 @@
|
|||
#include <LibGPU/RasterPosition.h>
|
||||
#include <LibGPU/SamplerConfig.h>
|
||||
#include <LibGPU/StencilConfiguration.h>
|
||||
#include <LibGPU/TexCoordGenerationConfig.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
#include <LibGfx/Matrix3x3.h>
|
||||
#include <LibGfx/Matrix4x4.h>
|
||||
|
@ -36,11 +37,6 @@
|
|||
|
||||
namespace SoftGPU {
|
||||
|
||||
struct TexCoordGenerationConfig {
|
||||
GPU::TexCoordGenerationMode mode { GPU::TexCoordGenerationMode::EyeLinear };
|
||||
FloatVector4 coefficients {};
|
||||
};
|
||||
|
||||
struct RasterizerOptions {
|
||||
bool shade_smooth { true };
|
||||
bool enable_stencil_test { false };
|
||||
|
@ -75,7 +71,7 @@ struct RasterizerOptions {
|
|||
bool cull_back { true };
|
||||
bool cull_front { false };
|
||||
Array<u8, NUM_SAMPLERS> texcoord_generation_enabled_coordinates {};
|
||||
Array<Array<TexCoordGenerationConfig, 4>, NUM_SAMPLERS> texcoord_generation_config {};
|
||||
Array<Array<GPU::TexCoordGenerationConfig, 4>, NUM_SAMPLERS> texcoord_generation_config {};
|
||||
Gfx::IntRect viewport;
|
||||
bool lighting_enabled { false };
|
||||
bool color_material_enabled { false };
|
||||
|
|
Loading…
Add table
Reference in a new issue