Fix point rendering.
Change-Id: I8262fa4bc527d719680d83bf9a1b8e88bdae07f8
Reviewed-on: https://swiftshader-review.googlesource.com/3514
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
diff --git a/src/OpenGL/libGLES_CM/Context.cpp b/src/OpenGL/libGLES_CM/Context.cpp
index 334b7dc..1ba9f8b 100644
--- a/src/OpenGL/libGLES_CM/Context.cpp
+++ b/src/OpenGL/libGLES_CM/Context.cpp
@@ -199,6 +199,7 @@
}
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 @@
device->setFogColor(sw::Color<float>(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 f795521..d76a13a 100644
--- a/src/OpenGL/libGLES_CM/Context.h
+++ b/src/OpenGL/libGLES_CM/Context.h
@@ -335,8 +335,6 @@
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 923deb9..175f939 100644
--- a/src/OpenGL/libGLES_CM/libGLES_CM.cpp
+++ b/src/OpenGL/libGLES_CM/libGLES_CM.cpp
@@ -2702,7 +2702,7 @@
if(context)
{
- context->setPointSize(size);
+ context->setVertexAttrib(sw::PointSize, size, size, size, size);
}
}
@@ -3031,7 +3031,6 @@
if(context)
{
GLenum texture = context->getClientActiveTexture();
-
VertexAttribPointer(sw::TexCoord0 + (texture - GL_TEXTURE0), size, type, false, stride, pointer);
}
}