|
@@ -75,6 +75,7 @@ Shader::Shader(const ShaderSource &source)
|
|
|
, builtinAttributes()
|
|
|
, lastCanvas((Canvas *) -1)
|
|
|
, lastViewport()
|
|
|
+ , lastPointSize(0.0f)
|
|
|
{
|
|
|
if (source.vertex.empty() && source.pixel.empty())
|
|
|
throw love::Exception("Cannot create shader: no source code!");
|
|
@@ -216,6 +217,8 @@ bool Shader::loadVolatile()
|
|
|
lastCanvas = (Canvas *) -1;
|
|
|
lastViewport = OpenGL::Viewport();
|
|
|
|
|
|
+ lastPointSize = 0.0f;
|
|
|
+
|
|
|
// zero out active texture list
|
|
|
activeTexUnits.clear();
|
|
|
activeTexUnits.insert(activeTexUnits.begin(), gl.getMaxTextureUnits() - 1, 0);
|
|
@@ -709,6 +712,16 @@ void Shader::checkSetScreenParams()
|
|
|
lastViewport = view;
|
|
|
}
|
|
|
|
|
|
+void Shader::checkSetPointSize(float size)
|
|
|
+{
|
|
|
+ if (size == lastPointSize)
|
|
|
+ return;
|
|
|
+
|
|
|
+ sendBuiltinFloat(BUILTIN_POINT_SIZE, 1, &size, 1);
|
|
|
+
|
|
|
+ lastPointSize = size;
|
|
|
+}
|
|
|
+
|
|
|
const std::map<std::string, Object *> &Shader::getBoundRetainables() const
|
|
|
{
|
|
|
return boundRetainables;
|