mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:07:35 +00:00
LibGL: Calculate maximum log2 of texture size
This commit is contained in:
parent
eb81b66b4e
commit
d7f1dc146e
1 changed files with 2 additions and 2 deletions
|
@ -11,11 +11,11 @@
|
||||||
#include "Texture.h"
|
#include "Texture.h"
|
||||||
|
|
||||||
#include <AK/Array.h>
|
#include <AK/Array.h>
|
||||||
|
#include <AK/IntegralMath.h>
|
||||||
#include <LibGL/GL/gl.h>
|
#include <LibGL/GL/gl.h>
|
||||||
#include <LibGL/Tex/MipMap.h>
|
#include <LibGL/Tex/MipMap.h>
|
||||||
#include <LibGL/Tex/Sampler2D.h>
|
#include <LibGL/Tex/Sampler2D.h>
|
||||||
#include <LibGPU/ImageDataLayout.h>
|
#include <LibGPU/ImageDataLayout.h>
|
||||||
#include <LibGfx/Vector3.h>
|
|
||||||
|
|
||||||
namespace GL {
|
namespace GL {
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ class Texture2D final : public Texture {
|
||||||
public:
|
public:
|
||||||
// FIXME: These shouldn't really belong here, they're context specific.
|
// FIXME: These shouldn't really belong here, they're context specific.
|
||||||
static constexpr u16 MAX_TEXTURE_SIZE = 2048;
|
static constexpr u16 MAX_TEXTURE_SIZE = 2048;
|
||||||
static constexpr u8 LOG2_MAX_TEXTURE_SIZE = 11;
|
static constexpr u8 LOG2_MAX_TEXTURE_SIZE = AK::log2(MAX_TEXTURE_SIZE);
|
||||||
|
|
||||||
virtual bool is_texture_2d() const override { return true; }
|
virtual bool is_texture_2d() const override { return true; }
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue