> Newcomers roadmap: from where to start learning Gideros "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
> Newcomers roadmap: from where to start learning Gideros "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
set some appropriate blend mode to the lines and add them as children to the pic. and then render the pic+lines to a rendertarget. add this result to stage.
My additions to @MoKaLux code are below. Is it what you expected ?
local bg = Bitmap.new(Texture.new("gfx/vip/background.png"))local ticket = Bitmap.new(Texture.new("gfx/vip/ticket.png"))local text = Bitmap.new(Texture.new("gfx/vip/text.png"))local fx1 = Bitmap.new(Texture.new("gfx/vip/fx1.png"))local fx2 = Bitmap.new(Texture.new("gfx/vip/fx2.png"))
stage:addChild(bg)
stage:addChild(ticket) ticket:setPosition(80,20)
ticket:addChild(fx1) fx1:setX(-100)
fx1:addChild(fx2) fx2:setX(-100)
ticket:addChild(text)-- Use auto layout on ticket to center text automatically
ticket:setLayoutParameters{ rowWeights={1}, columnWeights={1}}
text:setLayoutConstraints{}--Use stencil for masking glow:--1) Clear stencil and set it to '1' for every pixel drawn on 'ticket'
ticket:setStencilOperation{ stencilClear=true, stenciMask=1, stencilWriteMask=1,
stencilRef=1, stencilFunc=Sprite.STENCIL_ALWAYS,
depthPass=Sprite.STENCIL_REPLACE}--2) Only draw fx1/fx2 if stencil isn't 0
fx1:setStencilOperation{ stencilClear=false, stencilMask=1, stencilRef=0, stencilFunc=Sprite.STENCIL_NOTEQUAL}local dir =1
stage:addEventListener(Event.ENTER_FRAME, function()if fx1:getX()>450then
dir = -1elseif fx1:getX()< -100then
dir =1end
fx1:setX(fx1:getX() + dir*5)end)
> Newcomers roadmap: from where to start learning Gideros "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
these example codes in the wiki are nice but without the appropriate image files it's hard to see what it should do. isn't there an option to attach example code in zip to the appropriate page?
also i have to admit i did not get closer to understand this stencil mumbo-jumbo but i like it a lot.
I also have absolutely no idea how this stencil stuff works I read it again and again, it's like chinese alphabet to me. @hgy29 was stencil integrated as a code library from somewhere? Do they have some basic documentation? Thx!
> Newcomers roadmap: from where to start learning Gideros "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
@Apollo14, stencil is not a lib but a GPU standard capability. Basically this is another buffer alongside the render target or the frame buffer, on which you can instruct the GPU to do things or act upon its content.
> Newcomers roadmap: from where to start learning Gideros "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
Comments
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: MoKaLux
Likes: hgy29, SinisterSoft
Likes: MoKaLux, antix
Likes: MoKaLux
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: Apollo14
Fragmenter - animated loop machine and IKONOMIKON - the memory game
I read it again and again, it's like chinese alphabet to me.
@hgy29 was stencil integrated as a code library from somewhere? Do they have some basic documentation? Thx!
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glStencilFunc.xhtml
Likes: Apollo14
Fragmenter - animated loop machine and IKONOMIKON - the memory game
A bit of litterature:
- https://open.gl/depthstencils
- https://learnopengl.com/Advanced-OpenGL/Stencil-testing
Likes: Apollo14
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)