Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Doesn't look the same on iOS compared to Desktop — Gideros Forum

Doesn't look the same on iOS compared to Desktop

JohnJohn Member
edited January 21 in Bugs and issues
I tried all sort to get this looking the same and I am out of ideas. Any tip on why this might happen.

The issue is the red bit, on the desktop, left hand side image, it is solid red and on the ipad it got some alpha applied to it.

The code base is on the large side and I would not be able to get a repeatable working example. It currently uses mesh for those rectanges.

https://www.sphericalgames.co.uk/images/renderingIssue.png

I wouldn't spend any time on this given I've changed the way it is stored in a sprite. If I get a chance I'll try and reproduce this and provide some example code. I've not touched this in 3 years and it did work back then but something changed since. It also flashes when filling shapes, I can live with that, that effect never happened before and doesn't happen on mac desktop version.

Comments

  • JohnJohn Member
    I had another attempt to fix this correctly. I cannot be 100% sure without creating minimum code to prove this is the issue, because there is a lot more code involved and it could easily be something else involved, but it is something along the lines of….

    local mesh = Mesh.new()
    mesh:setAlpha(0.5) << Remove this and it is solved.


    Initialise mesh...
    mesh:setVertex(...
    mesh:setIndex(...
    mesh:setColor(...


    Somewhere later on….

    If (some flag setting….)
    mesh:setAlpha(1) <<< Does not work. Well it does on my Mac but not work on iOS devices
    end
  • MoKaLuxMoKaLux Member
    edited January 21
    you may want to use https://wiki.gideros.rocks/index.php/Mesh:setColor

    Something along the lines:
    for i = 1, #self._ia do -- the mesh index array
    	self:setColor(i, color, alpha or 1) -- (i,color,alpha)
    end
    I believe in your case, you can replace #self._ia by 4 since your mesh should have 4 vertices?
    for i = 1, 4 do -- the mesh index array
    	mesh:setColor(i, color, alpha or 1) -- (i,color,alpha)
    end
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • JohnJohn Member
    edited January 21
    Sorry, I probably wasn't very clear on my previous message as to the point of showing the video. I probably have 100K+ instances of meshes in this game and the chances of intialising something incorrectly demishes because you can easily encounter visual errors and I would have spot this problem years ago. It crashes if you don't do it correctly anyway because there are no buffer checks for speed reasons and you probably get half coloured in triangles if you don't complete the index correctly. I think the best thing I can do is to create a minimum code example demostrating this issue. For now I've fixed the issue.

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited January 21
    looks pretty nice and seems fun to play 😉

    Likes: John

    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
    +1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.