From 70415e40dafbadcfe2e9a4fd10a75f004702f9f4 Mon Sep 17 00:00:00 2001 From: Nicolas Capens Date: Tue, 16 Jun 2015 13:56:37 -0700 Subject: [PATCH] Fix point rendering. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: I8262fa4bc527d719680d83bf9a1b8e88bdae07f8 Reviewed-on: https://swiftshader-review.googlesource.com/3514 Reviewed-by: Alexis Hétu Reviewed-by: Nicolas Capens Tested-by: Nicolas Capens --- src/OpenGL/libGLES_CM/Context.cpp | 6 +----- src/OpenGL/libGLES_CM/Context.h | 2 -- src/OpenGL/libGLES_CM/libGLES_CM.cpp | 3 +-- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/OpenGL/libGLES_CM/Context.cpp b/src/OpenGL/libGLES_CM/Context.cpp index 334b7dc02..1ba9f8bb5 100644 --- a/src/OpenGL/libGLES_CM/Context.cpp +++ b/src/OpenGL/libGLES_CM/Context.cpp @@ -199,6 +199,7 @@ Context::Context(const egl::Config *config, const Context *shareContext) } setVertexAttrib(sw::Normal, 0.0f, 0.0f, 1.0f, 1.0f); + setVertexAttrib(sw::PointSize, 1.0f, 1.0f, 1.0f, 1.0f); mHasBeenCurrent = false; @@ -643,11 +644,6 @@ void Context::setFogColor(float r, float g, float b, float a) device->setFogColor(sw::Color(r, g, b, a)); } -void Context::setPointSize(float size) -{ - device->setPointSize(size); -} - void Context::setTexture2Denabled(bool enable) { texture2Denabled[mState.activeSampler] = enable; diff --git a/src/OpenGL/libGLES_CM/Context.h b/src/OpenGL/libGLES_CM/Context.h index f7955211b..d76a13a15 100644 --- a/src/OpenGL/libGLES_CM/Context.h +++ b/src/OpenGL/libGLES_CM/Context.h @@ -335,8 +335,6 @@ public: void setLightAttenuationLinear(int index, float linear); void setLightAttenuationQuadratic(int index, float quadratic); - void setPointSize(float size); - void setFog(bool enabled); void setFogMode(GLenum mode); void setFogDensity(float fogDensity); diff --git a/src/OpenGL/libGLES_CM/libGLES_CM.cpp b/src/OpenGL/libGLES_CM/libGLES_CM.cpp index 923deb904..175f939f7 100644 --- a/src/OpenGL/libGLES_CM/libGLES_CM.cpp +++ b/src/OpenGL/libGLES_CM/libGLES_CM.cpp @@ -2702,7 +2702,7 @@ void PointSize(GLfloat size) if(context) { - context->setPointSize(size); + context->setVertexAttrib(sw::PointSize, size, size, size, size); } } @@ -3031,7 +3031,6 @@ void TexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *poin if(context) { GLenum texture = context->getClientActiveTexture(); - VertexAttribPointer(sw::TexCoord0 + (texture - GL_TEXTURE0), size, type, false, stride, pointer); } } -- 2.11.0