Removed Tex2DMS functions.

This commit is contained in:
Leonardo Zide 2021-01-09 18:01:03 -08:00
parent a0867c9b80
commit 6bfc4ff9b1
5 changed files with 2 additions and 35 deletions

View file

@ -42,7 +42,6 @@ lcContext::lcContext()
mColorEnabled = false; mColorEnabled = false;
mTexture2D = 0; mTexture2D = 0;
mTexture2DMS = 0;
mTextureCubeMap = 0; mTextureCubeMap = 0;
mPolygonOffset = lcPolygonOffset::None; mPolygonOffset = lcPolygonOffset::None;
mDepthWrite = true; mDepthWrite = true;
@ -386,13 +385,6 @@ void lcContext::SetDefaultState()
glBindTexture(GL_TEXTURE_2D, 0); glBindTexture(GL_TEXTURE_2D, 0);
mTexture2D = 0; mTexture2D = 0;
#ifndef LC_OPENGLES
if (gSupportsTexImage2DMultisample)
{
glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, 0);
mTexture2DMS = 0;
}
#endif
glBindTexture(GL_TEXTURE_CUBE_MAP, 0); glBindTexture(GL_TEXTURE_CUBE_MAP, 0);
mTextureCubeMap = 0; mTextureCubeMap = 0;
@ -439,7 +431,6 @@ void lcContext::ClearResources()
ClearVertexBuffer(); ClearVertexBuffer();
ClearIndexBuffer(); ClearIndexBuffer();
BindTexture2D(0); BindTexture2D(0);
BindTexture2DMS(0);
} }
void lcContext::SetMaterial(lcMaterialType MaterialType) void lcContext::SetMaterial(lcMaterialType MaterialType)
@ -566,20 +557,6 @@ void lcContext::BindTexture2D(GLuint Texture)
mTexture2D = Texture; mTexture2D = Texture;
} }
void lcContext::BindTexture2DMS(GLuint Texture)
{
if (mTexture2DMS == Texture)
return;
#ifndef LC_OPENGLES
if (gSupportsTexImage2DMultisample)
{
glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, Texture);
mTexture2DMS = Texture;
}
#endif
}
void lcContext::BindTextureCubeMap(GLuint Texture) void lcContext::BindTextureCubeMap(GLuint Texture)
{ {
if (mTextureCubeMap == Texture) if (mTextureCubeMap == Texture)

View file

@ -141,7 +141,6 @@ public:
void SetLineWidth(float LineWidth); void SetLineWidth(float LineWidth);
void SetSmoothShading(bool Smooth); void SetSmoothShading(bool Smooth);
void BindTexture2D(GLuint Texture); void BindTexture2D(GLuint Texture);
void BindTexture2DMS(GLuint Texture);
void BindTextureCubeMap(GLuint Texture); void BindTextureCubeMap(GLuint Texture);
void UnbindTexture2D(GLuint Texture); void UnbindTexture2D(GLuint Texture);
void UnbindTextureCubeMap(GLuint Texture); void UnbindTextureCubeMap(GLuint Texture);
@ -209,7 +208,6 @@ protected:
bool mColorEnabled; bool mColorEnabled;
GLuint mTexture2D; GLuint mTexture2D;
GLuint mTexture2DMS;
GLuint mTextureCubeMap; GLuint mTextureCubeMap;
lcPolygonOffset mPolygonOffset; lcPolygonOffset mPolygonOffset;
bool mDepthWrite; bool mDepthWrite;

View file

@ -5,7 +5,6 @@
bool gSupportsShaderObjects; bool gSupportsShaderObjects;
bool gSupportsVertexBufferObject; bool gSupportsVertexBufferObject;
bool gSupportsFramebufferObject; bool gSupportsFramebufferObject;
bool gSupportsTexImage2DMultisample;
bool gSupportsBlendFuncSeparate; bool gSupportsBlendFuncSeparate;
bool gSupportsAnisotropic; bool gSupportsAnisotropic;
GLfloat gMaxAnisotropy; GLfloat gMaxAnisotropy;
@ -59,9 +58,4 @@ void lcInitializeGLExtensions(const QOpenGLContext* Context)
gSupportsFramebufferObject = Functions->hasOpenGLFeature(QOpenGLFunctions::Framebuffers); gSupportsFramebufferObject = Functions->hasOpenGLFeature(QOpenGLFunctions::Framebuffers);
gSupportsBlendFuncSeparate = Functions->hasOpenGLFeature(QOpenGLFunctions::BlendFuncSeparate); gSupportsBlendFuncSeparate = Functions->hasOpenGLFeature(QOpenGLFunctions::BlendFuncSeparate);
gSupportsShaderObjects = Functions->hasOpenGLFeature(QOpenGLFunctions::Shaders); gSupportsShaderObjects = Functions->hasOpenGLFeature(QOpenGLFunctions::Shaders);
QOpenGLFunctions_3_2_Core* Funcs = Context->versionFunctions<QOpenGLFunctions_3_2_Core>();
if (Funcs)
gSupportsTexImage2DMultisample = true;
} }

View file

@ -5,7 +5,6 @@ void lcInitializeGLExtensions(const QOpenGLContext* Context);
extern bool gSupportsShaderObjects; extern bool gSupportsShaderObjects;
extern bool gSupportsVertexBufferObject; extern bool gSupportsVertexBufferObject;
extern bool gSupportsFramebufferObject; extern bool gSupportsFramebufferObject;
extern bool gSupportsTexImage2DMultisample;
extern bool gSupportsBlendFuncSeparate; extern bool gSupportsBlendFuncSeparate;
extern bool gSupportsAnisotropic; extern bool gSupportsAnisotropic;
extern GLfloat gMaxAnisotropy; extern GLfloat gMaxAnisotropy;

View file

@ -30,15 +30,14 @@ lcQAboutDialog::lcQAboutDialog(QWidget *parent) :
const QString BuffersFormat = tr("Color Buffer: %1 bits\nDepth Buffer: %2 bits\nStencil Buffer: %3 bits\n\n"); const QString BuffersFormat = tr("Color Buffer: %1 bits\nDepth Buffer: %2 bits\nStencil Buffer: %3 bits\n\n");
const QString Buffers = BuffersFormat.arg(QString::number(ColorDepth), QString::number(Format.depthBufferSize()), QString::number(Format.stencilBufferSize())); const QString Buffers = BuffersFormat.arg(QString::number(ColorDepth), QString::number(Format.depthBufferSize()), QString::number(Format.stencilBufferSize()));
const QString ExtensionsFormat = tr("Buffers: %1\nShaders: %2\nFramebuffers: %3\nTexImage2DMultisample: %4\nBlendFuncSeparate: %5\nAnisotropic: %6\n"); const QString ExtensionsFormat = tr("Buffers: %1\nShaders: %2\nFramebuffers: %3\nBlendFuncSeparate: %4\nAnisotropic: %5\n");
const QString VertexBuffers = gSupportsVertexBufferObject ? tr("Supported") : tr("Not supported"); const QString VertexBuffers = gSupportsVertexBufferObject ? tr("Supported") : tr("Not supported");
const QString Shaders = gSupportsShaderObjects ? tr("Supported") : tr("Not supported"); const QString Shaders = gSupportsShaderObjects ? tr("Supported") : tr("Not supported");
const QString Framebuffers = gSupportsFramebufferObject ? tr("Supported") : tr("Not supported"); const QString Framebuffers = gSupportsFramebufferObject ? tr("Supported") : tr("Not supported");
const QString TexImage2DMultisample = gSupportsTexImage2DMultisample ? tr("Supported") : tr("Not supported");
const QString BlendFuncSeparate = gSupportsBlendFuncSeparate ? tr("Supported") : tr("Not supported"); const QString BlendFuncSeparate = gSupportsBlendFuncSeparate ? tr("Supported") : tr("Not supported");
const QString Anisotropic = gSupportsAnisotropic ? tr("Supported (max %1)").arg(gMaxAnisotropy) : tr("Not supported"); const QString Anisotropic = gSupportsAnisotropic ? tr("Supported (max %1)").arg(gMaxAnisotropy) : tr("Not supported");
const QString Extensions = ExtensionsFormat.arg(VertexBuffers, Shaders, Framebuffers, TexImage2DMultisample, BlendFuncSeparate, Anisotropic); const QString Extensions = ExtensionsFormat.arg(VertexBuffers, Shaders, Framebuffers, BlendFuncSeparate, Anisotropic);
ui->info->setText(QtVersion + Version + Buffers + Extensions); ui->info->setText(QtVersion + Version + Buffers + Extensions);
} }