mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 06:08:30 +09:00
[Feat] (MG_Impl/Texture): accept GL_TEXTURE_LOD_BIAS at frontend
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
#include "Validators.h"
|
#include "Validators.h"
|
||||||
#include "ProxyTexture.h"
|
#include "ProxyTexture.h"
|
||||||
#include "MG_State/GLState/TextureState/TextureObjectBuffer.h"
|
#include "MG_State/GLState/TextureState/TextureObjectBuffer.h"
|
||||||
|
#include "MG_Util/Converters/GLToStr/GLEnumConverter.h"
|
||||||
|
|
||||||
#include <MG_State/GLState/Core.h>
|
#include <MG_State/GLState/Core.h>
|
||||||
#include <MG_Util/Metrics/TextureMetrics.h>
|
#include <MG_Util/Metrics/TextureMetrics.h>
|
||||||
@@ -219,14 +220,17 @@ namespace MobileGL {
|
|||||||
textureObject->GetSamplerObject()->SetSamplerCompareFunc(
|
textureObject->GetSamplerObject()->SetSamplerCompareFunc(
|
||||||
MG_Util::ConvertGLEnumToSamplerCompareFunc(param));
|
MG_Util::ConvertGLEnumToSamplerCompareFunc(param));
|
||||||
break;
|
break;
|
||||||
|
case GL_TEXTURE_LOD_BIAS:
|
||||||
|
textureObject->GetSamplerObject()->SetLodBias(param);
|
||||||
|
break;
|
||||||
case GL_TEXTURE_SWIZZLE_RGBA:
|
case GL_TEXTURE_SWIZZLE_RGBA:
|
||||||
// Not supported in this function
|
// Not supported in this function
|
||||||
case GL_TEXTURE_BORDER_COLOR:
|
case GL_TEXTURE_BORDER_COLOR:
|
||||||
// Not supported in this function
|
// Not supported in this function
|
||||||
default:
|
default:
|
||||||
MG_State::pGLContext->RecordError(
|
MG_State::pGLContext->RecordError(
|
||||||
ErrorCode::InvalidEnum, MakeShared<GenericErrorInfo>("MG_Impl/GLImpl", "TexParameteri_State",
|
ErrorCode::InvalidEnum, MakeShared<GenericErrorInfo>("MG_Impl/GLImpl", __func__,
|
||||||
"pname is not a valid texture parameter."));
|
std::format("pname {} is not a valid texture parameter.", MG_Util::ConvertGLEnumToString(pname))));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -291,14 +295,17 @@ namespace MobileGL {
|
|||||||
textureObject->GetSamplerObject()->SetSamplerCompareFunc(
|
textureObject->GetSamplerObject()->SetSamplerCompareFunc(
|
||||||
MG_Util::ConvertGLEnumToSamplerCompareFunc(param));
|
MG_Util::ConvertGLEnumToSamplerCompareFunc(param));
|
||||||
break;
|
break;
|
||||||
|
case GL_TEXTURE_LOD_BIAS:
|
||||||
|
textureObject->GetSamplerObject()->SetLodBias((GLfloat)param);
|
||||||
|
break;
|
||||||
case GL_TEXTURE_SWIZZLE_RGBA:
|
case GL_TEXTURE_SWIZZLE_RGBA:
|
||||||
// Not supported in this function
|
// Not supported in this function
|
||||||
case GL_TEXTURE_BORDER_COLOR:
|
case GL_TEXTURE_BORDER_COLOR:
|
||||||
// Not supported in this function
|
// Not supported in this function
|
||||||
default:
|
default:
|
||||||
MG_State::pGLContext->RecordError(
|
MG_State::pGLContext->RecordError(
|
||||||
ErrorCode::InvalidEnum, MakeShared<GenericErrorInfo>("MG_Impl/GLImpl", "TexParameteri_State",
|
ErrorCode::InvalidEnum, MakeShared<GenericErrorInfo>("MG_Impl/GLImpl", __func__,
|
||||||
"pname is not a valid texture parameter."));
|
std::format("pname {} is not a valid texture parameter.", MG_Util::ConvertGLEnumToString(pname))));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user