Aded Renderer::GetMaxTextureSize()
+ minor changes Former-commit-id: 6b80280d018c323ceb393c58aab96d68a15f3ff2
This commit is contained in:
parent
5cbdd8832c
commit
72a24c4d7c
|
|
@ -57,6 +57,7 @@ class NAZARA_API NzRenderer
|
||||||
static nzUInt8 GetMaxAnisotropyLevel();
|
static nzUInt8 GetMaxAnisotropyLevel();
|
||||||
static unsigned int GetMaxColorAttachments();
|
static unsigned int GetMaxColorAttachments();
|
||||||
static unsigned int GetMaxRenderTargets();
|
static unsigned int GetMaxRenderTargets();
|
||||||
|
static unsigned int GetMaxTextureSize();
|
||||||
static unsigned int GetMaxTextureUnits();
|
static unsigned int GetMaxTextureUnits();
|
||||||
static unsigned int GetMaxVertexAttribs();
|
static unsigned int GetMaxVertexAttribs();
|
||||||
static float GetPointSize();
|
static float GetPointSize();
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@ namespace
|
||||||
bool s_useVertexArrayObjects;
|
bool s_useVertexArrayObjects;
|
||||||
unsigned int s_maxColorAttachments;
|
unsigned int s_maxColorAttachments;
|
||||||
unsigned int s_maxRenderTarget;
|
unsigned int s_maxRenderTarget;
|
||||||
|
unsigned int s_maxTextureSize;
|
||||||
unsigned int s_maxTextureUnit;
|
unsigned int s_maxTextureUnit;
|
||||||
unsigned int s_maxVertexAttribs;
|
unsigned int s_maxVertexAttribs;
|
||||||
|
|
||||||
|
|
@ -612,6 +613,11 @@ unsigned int NzRenderer::GetMaxRenderTargets()
|
||||||
return s_maxRenderTarget;
|
return s_maxRenderTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned int NzRenderer::GetMaxTextureSize()
|
||||||
|
{
|
||||||
|
return s_maxTextureSize;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int NzRenderer::GetMaxTextureUnits()
|
unsigned int NzRenderer::GetMaxTextureUnits()
|
||||||
{
|
{
|
||||||
return s_maxTextureUnit;
|
return s_maxTextureUnit;
|
||||||
|
|
@ -762,6 +768,10 @@ bool NzRenderer::Initialize()
|
||||||
else
|
else
|
||||||
s_maxTextureUnit = 1;
|
s_maxTextureUnit = 1;
|
||||||
|
|
||||||
|
GLint maxTextureSize;
|
||||||
|
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTextureSize);
|
||||||
|
s_maxTextureSize = maxTextureSize;
|
||||||
|
|
||||||
GLint maxVertexAttribs;
|
GLint maxVertexAttribs;
|
||||||
glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &maxVertexAttribs);
|
glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &maxVertexAttribs);
|
||||||
s_maxVertexAttribs = static_cast<unsigned int>(maxVertexAttribs);
|
s_maxVertexAttribs = static_cast<unsigned int>(maxVertexAttribs);
|
||||||
|
|
@ -1966,6 +1976,7 @@ void NzRenderer::OnTextureReleased(const NzTexture* texture)
|
||||||
{
|
{
|
||||||
if (unit.texture == texture)
|
if (unit.texture == texture)
|
||||||
unit.texture = nullptr;
|
unit.texture = nullptr;
|
||||||
|
|
||||||
// Inutile de changer le flag pour une texture désactivée
|
// Inutile de changer le flag pour une texture désactivée
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue