I changed Lime version from 3.5.2 to 4.0.2 and OpenFL version from 4.5.2 to 4.9.1 and I noticed, that some images became blurry. It’s not because of smoothing
- even when I don’t use this property, images remain blurred.
Is this HTML5, or another target? Are you using a specific width and height value in project.xml? If so, it will allow CSS scaling of the final canvas
You can also see if openfl test html5 -Dcanvas
gives you different results than openfl test html5
, as we default to WebGL now, and didn’t before
This is HTML5 target. In project.xml I have sizes only <window width="0" height="0" unless="mobile" />
, but it’s not used, because I develop for desktop.
By comliling via command line I had error ‘listen eaddrinuse’, but results are the same - images are blurry. Usually, I compile via FlashDevelop and before, in older versions Lime/OpenFL, I had clear images. Maybe, the reason not in compile mode, maybe something was changed in options in new versions Lime/OpenFL?
Just to confirm, openfl test html5 -Dwebgl
and openfl test html5 -Dcanvas
look the same, and you can confirm that the canvas is not being scaled by CSS?
Thanks
I tried compile by
<haxedef name="canvas" if="html5" />
and
<haxedef name="webgl" if="html5" />
.
In any case I see blurry images.
If I set real sizes of my application in index.html in lime.embed function, than application resizes when resizing a browser:
lime.embed ("myApp", "openfl-content", 1200, 650, { parameters: {} });
If I set zeros in sizes, than application don’t resize when resizing a browser:
lime.embed ("myApp", "openfl-content", 0, 0, { parameters: {} });
Try <define name="canvas" if="html5" />
or <set name="canvas" if="html5" /><haxedef name="canvas" if="html5" />
if you do it in XML
That is two ways for canvas and two ways for webgl?
First way for canvas is:
<define name="canvas" if="html5" />
<haxedef name="canvas" if="html5" />
Second way for canvas is:
<set name="canvas" if="html5" />
<haxedef name="canvas" if="html5" />
First way for webgl is:
<define name="webgl" if="html5" />
<haxedef name="webgl" if="html5" />
Second way for webgl is:
<set name="webgl" if="html5" />
<haxedef name="webgl" if="html5" />
Did you mean it?
When you use openfl test html5 -Dcanvas
(using a command-line), it implies using both <set />
and <haxedef />
, or in new versions of Lime, there is a new <define />
tag that applies both.
As a result, you can try:
<define name="canvas" if="html5" />
With the current release, or with either a newer or older release:
<set name="canvas" if="html5" />
<haxedef name="canvas" if="html5" />
This should be the same as using openfl test html5 -Dcanvas
I just tried compile with both cases, but images are blurry as before (2nd case on the screenshot).
As soon as I lower Lime version to 3.5.2 and OpenFL version to 4.5.2, then images are clear (1st case on the screenshot).
Do you know of a test I could run to reproduce what you are seeing? Thank you