|
@@ -224,11 +224,10 @@ void Graphics::present()
|
|
|
|
|
|
void Graphics::setIcon(Image *image)
|
|
|
{
|
|
|
- love::image::ImageData *data = image->getData();
|
|
|
- if (data)
|
|
|
- currentWindow->setIcon(data);
|
|
|
- else
|
|
|
+ if (image->isCompressed())
|
|
|
throw love::Exception("Cannot use compressed image data to set an icon.");
|
|
|
+
|
|
|
+ currentWindow->setIcon(image->getData());
|
|
|
}
|
|
|
|
|
|
void Graphics::setCaption(const char *caption)
|
|
@@ -334,9 +333,11 @@ int Graphics::getScissor(lua_State *L) const
|
|
|
|
|
|
void Graphics::defineStencil()
|
|
|
{
|
|
|
+ // Disable color writes but don't save the mask values.
|
|
|
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
|
|
|
- glEnable(GL_STENCIL_TEST);
|
|
|
+
|
|
|
glClear(GL_STENCIL_BUFFER_BIT);
|
|
|
+ glEnable(GL_STENCIL_TEST);
|
|
|
glStencilFunc(GL_ALWAYS, 1, 1);
|
|
|
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
|
|
|
}
|