mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 21:37:58 +03:00
LibGL: Calculate maximum log2 of texture size
This commit is contained in:
parent
eb81b66b4e
commit
d7f1dc146e
Notes:
sideshowbarker
2024-07-17 07:15:45 +09:00
Author: https://github.com/gmta Commit: https://github.com/SerenityOS/serenity/commit/d7f1dc146e Pull-request: https://github.com/SerenityOS/serenity/pull/15150 Reviewed-by: https://github.com/linusg ✅ Reviewed-by: https://github.com/sunverwerth ✅
@ -11,11 +11,11 @@
|
||||
#include "Texture.h"
|
||||
|
||||
#include <AK/Array.h>
|
||||
#include <AK/IntegralMath.h>
|
||||
#include <LibGL/GL/gl.h>
|
||||
#include <LibGL/Tex/MipMap.h>
|
||||
#include <LibGL/Tex/Sampler2D.h>
|
||||
#include <LibGPU/ImageDataLayout.h>
|
||||
#include <LibGfx/Vector3.h>
|
||||
|
||||
namespace GL {
|
||||
|
||||
@ -23,7 +23,7 @@ class Texture2D final : public Texture {
|
||||
public:
|
||||
// FIXME: These shouldn't really belong here, they're context specific.
|
||||
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; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user