1
Scripting / Re: Problem with fe.layout + fe.add_surface
« on: September 29, 2016, 11:28:28 PM »
yeah, i can use this:
but if i do this i will go back to the main reason i was thinking to use 640x480: slowdown. If i set the surface and the image to 1920x1080 the wheel scrolls very slow. And if i set the same image to 1920x1080 without surface the wheel scrolls fast, even with the fe.layout in 1920x1080:
But i need the surface to turn the image visible/invisible.
So, for now:
Great image quality, good performance (but no surface):
Poor image quality, good performance:
Great image quality, bad performance:
Why the combination of surface at 1920x1080 + image at 1920x1080 is going to a bad performance if the same image at 1920x1080 without surface do not slowdown? Even converting the image to just 50KB dont speed up...
Code: [Select]
local flx = fe.layout.width=640;
local fly = fe.layout.height=480;
local flw = fe.layout.width;
local flh = fe.layout.height;
local imageSurface = fe.add_surface(1920, 1080);
imageSurface.set_pos(0, 0, 1920, 1080);
local img = imageSurface.add_image( "image.jpg", 0, 0, flw, flh );
img.set_pos(0, 0, flw, flh);
but if i do this i will go back to the main reason i was thinking to use 640x480: slowdown. If i set the surface and the image to 1920x1080 the wheel scrolls very slow. And if i set the same image to 1920x1080 without surface the wheel scrolls fast, even with the fe.layout in 1920x1080:
Code: [Select]
local flx = fe.layout.width;
local fly = fe.layout.height;
local flw = fe.layout.width;
local flh = fe.layout.height;
local image = fe.add_image( "image.jpg", 0, 0, flw, flh );
But i need the surface to turn the image visible/invisible.
So, for now:
Great image quality, good performance (but no surface):
Code: [Select]
local flx = fe.layout.width; //1920
local fly = fe.layout.height; //1080
local flw = fe.layout.width;
local flh = fe.layout.height;
local image = fe.add_image( "image.jpg", 0, 0, flw, flh );
Poor image quality, good performance:
Code: [Select]
local flx = fe.layout.width=640;
local fly = fe.layout.height=480;
local flw = fe.layout.width;
local flh = fe.layout.height;
local imageSurface = fe.add_surface(flx, fly);
imageSurface.set_pos(0, 0, flw, flh);
local img = imageSurface.add_image( "image.jpg", 0, 0, flw, flh );
img.set_pos(0, 0, flw, flh);
Great image quality, bad performance:
Code: [Select]
local flx = fe.layout.width=640;
local fly = fe.layout.height=480;
local flw = fe.layout.width;
local flh = fe.layout.height;
local imageSurface = fe.add_surface(1920, 1080);
imageSurface.set_pos(0, 0, 1920, 1080);
local img = imageSurface.add_image( "image.jpg", 0, 0, flw, flh );
img.set_pos(0, 0, flw, flh);
Why the combination of surface at 1920x1080 + image at 1920x1080 is going to a bad performance if the same image at 1920x1080 without surface do not slowdown? Even converting the image to just 50KB dont speed up...