#HaxeUI Ceramic
1 messages · Page 3 of 1
can you remember what we use a shader on?
ah, a mesh?
guide says filter but that seems a bit heavy
maybe it's just 1 example
var rect = new Mesh();
rect.shader = assets.shader(Shaders.SDF_RECT);
rect.anchor(0.5, 0.5);
rect.pos(width / 2, height / 2);
this.add(rect);
something like this, but you would also need to create all of the vertices and pass parameters into the vert shader
aka porting everything rectangle related from SDFPainter to Ceramic
a bunch of stuff i have no clue about, will check the kha stuff
sdfpainter also has stuff for sdf circles and what not, so most can be ignored
what exactly is the shader doing?
I thought it would "draw" the rect
but i think it's returning numbers instead
I am not a shader guy at all, but basically it calculates the color of a pixel based on its position and the parameters provided
since it is a shader, the gpu is doing this async all at once
the numbers are probably RGBA values
i don't mean to explain the shader code, i just mean, is it meant to draw a rounded rect or provide values that i should draw a rounded rect from
it will draw the rounded rectangle
okay cool
It seems to be based on this shadertoy https://www.shadertoy.com/view/4llXD7
iq is basically shader jesus
but i think some of the complexity in the one sdfpainter uses is because it needs to compensate for different aspect ratios
can we just use the one from shader toy?
like if your rounded rect is longer in one axis, the corners will get stretched
this is what box/bx is for
is there an api for glsl shaders?
to interact with them or within them?
vec4(float red, float green, float blue, float alpha)
yeah, that would be black
0-255
0-1, correct
nice, but is there an api i can look at for this stuff?
i would have way too many questions otherwise
probably official khronos docs
Not just shader related, but I am sure you can pick through stuff here too https://learnopengl.com/
Learn OpenGL . com provides good and clear modern 3.3+ OpenGL tutorials with clear examples. A great resource to learn modern OpenGL aimed at beginners.
Learn OpenGL . com provides good and clear modern 3.3+ OpenGL tutorials with clear examples. A great resource to learn modern OpenGL aimed at beginners.
this specifically seems good
i was on that page 😄
but i'm guessing an "api" doesn't really exist for something like this
"just" documentation
i guess
you can probably use ceramic's triangle class and then set the color within a fragment shader
well seems like we can't just copy paste the code directly
yup
do you happen to know what the difference between what's on that opengl site and ceramic shaders?
is it a case of versions or a completely different shader language?
okay so i need to be looking for "gles" guides?
Here's a frag shader I use, if syntax is the question
mostly just figuring out how to "render" a shader
var rect = new Visual();
var shader = assets.shader(Shaders.SDF_RECT).clone();
shader.setVec4('rectColor', 0, 0, 0, 1);
shader.setVec3('borderColor', 0, 0, 0);
rect.shader = shader;
rect.size(200, 200);
rect.anchor(0.5, 0.5);
rect.pos(width / 2, height / 2);
this.add(rect);
Like debug the effect or attach it to a quad?
I've got this atm but it doesn't seem to render anything
What's your frag look like?
probably should be a quad not a visual
#1209142804819869736 message
Yea that's the first thing
i'm hoping around to all the things
but in my searches, jeremy mentioned visuals "are fine" although i understand why a quad/mesh is more appropriate
i just wanted to get away from any potential earcut/triangulation issues getting in the way of my ignorance
Tbh I'd start with setting every pixel to your input color and ignoring the logic for a bit
See if that even works
Am i not doing that? 😂
You're calling functions and stuff, I mean literally gl_FragColor = myInputColor
To see if the issue is in your logic or in your setup
it is def still partially your setup, you need to pass in box, corner, and what not too
i don't see attributes representing these
OH, am i dealing with the frag file?!
I've been reading the properties in the vert file
Yeah like messing with a vert when you don't even know if the frag works isn't gonna work out
Lol
this is literally day 0 shader work for me
Make a color appear using the default vert and a slightly modified default frag
Then do the hard stuff
I made a whole game to help me understand verts lol
i was going to go that approach but I'm not sure what resources are applicable to ceramic shaders
i was just using the shaders built in to ceramic for reference
the learn opengl site doesn't seem to be relevant
some of them link to the shaders they were ported from, so you can kinda see the differences
I'm getting close to finishing this project so I'll be able to contribute soon enough if needed
var rect = new Quad();
var shader = assets.shader(Shaders.SDF_RECT).clone();
shader.setVec4('rCol', 0, 0, 0, 1);
shader.setVec3('bCol', 0, 0, 0);
shader.setVec4('corner', 0, 0, 0, 0);
shader.setVec2('box', 100, 100);
shader.setFloat('thickness', 1);
shader.setFloat('smoothstep', 1);
here's the revised setup
i'm assuming the "box" attr represents width/height
we still end up with nothing getting rendered but we have no errors
uh box confuses me but i think it is for maintaining aspect ratio
var u = w / Math.max(w, h);
var v = h / Math.max(w, h);
visual dimensions or screen size?
is your background also black?
ah k
i gtg for a bit, but when I come back I can try making a simple shader sample as a basis
oh, i'm missing attributes
vertexpos and vertextcoord
attribute vec3 vertexPosition;
attribute vec2 vertexTCoord;
how do we know if something is "mandatory"
i think those get passed in for us by ceramic
Oh definitely do not mess with resolution and real w/h yet
tried setting them anyway and still have nothing anyways
That's worse than getting a color to appear and worse than a basic vert
what does this do? would it work "standalone"?
I just want to see if i can render "something"
That masks a section of a spritesheet using a different section of the sheet
The most basic thing you can do is gl_FragColor = vec4(1, 0, 0, 1);
From there, the quad or whatever you're shading needs to have a width and height defined. Those default to 0
I'm late to the party, but I don't think using SDF shader is a good idea. You are going to totally break batching and destroy performances
lol
baha
i think you might have told me before and i forgot
it is just the way I am familiar with because of haxeui-kha
I think a mesh-based implementation is the cleanest way to go
because that will get batched with the rest
I agree with that
Uh but do crop and 9 slice first before losing your sanity with meshes and how those would integrate with everything @burnt dune
If the number of vertices becomes a problem, you could add strategies to rasterize rounded rects into nineslices, but I doubt that would be actually necessary
(and not even sure that's useful)
meshes are already part of the backend
because we need them for gradients
There's so much of haxeui I do not use lol
You can create a gradient rounded mesh ha ha
yeah, i think it's also "expected"
solid only rounded corners seems a bit odd
okay, so abandon shader land - then?
The problem with shaders here is that using different shaders = each time you draw with a different shader you add 1 draw call
Ah so mesh without using earcut/poly2tri triangulation
Yes
You could even compute UV array so that it would work if you assign a texture
Side project to learn how they work 😅
i don't want to learn something i don't have a usecase for 😅
I was thinking UV array yeah
i'm 31 and want to finish stuff 😂
If I can get the FnF devs into shaders I can get you into them too
But yeah not relelvant here
i see their utility, they seem great
but if i have to learn about it, there has to be a pay off for it
i don't really want to learn things for no follow up application
Earlier it seemed like the concern was how to make all of these things work using ceramic's impls with haxeui's constraints/impl/etc
I was able to get things individually working but together idk
https://notes.underscorediscovery.com/shaders-a-primer/ good resource to get an idea about shaders
A common theme I run into when talking to some developers is that they wish they could wrap their head around shaders. Shaders always seem to solve a lot of problems, and often are referenced as to the solution to the task at hand. But just as often they are
i read it whilst scanning the discord
that mostly talks about "what they can do"
Flixel gets away with it by drawing shapes onto a bitmap, so it doesn't need to retain classes for 9slice and round rects
i have "something" but I ran across a weird issue where if I stop "resetting" the texture every frame the texture doesn't show lol
My friend got a job after writing this article, more practical than all the others I've read https://gamedevelopment.tutsplus.com/a-beginners-guide-to-coding-graphics-shaders--cms-23313t
I have a rounded rect implementation that makes use of Arc's and quad's
issue is, the inside content doesn't conform to the arc x)
lets see if i can figure out a mesh rounded rect with a border
You'd be better of generating the full mesh from scratch, the math is not that complicated
You can actually take a look at how it is done in the Arc class
it's only the border that's required, i can use the out of the box api for the backgrounds
but i do think the one of in the ceramic api doesn't work with gradients
!!!!!!!!!!!!!!!!!!!!!!
Huh
Haxeu
Ian is gonna have to rename it now
i'll push it to haxeui foundation as that don't you worry
😄
i think i know what's going on here tho dw
shit... how do i handle "colors"
are rounded borders always a single colour?
I don't think haxeui-kha has gradient borders
so you should be good?
progress!
if i can eliminate these, it probably will work quite well
Mesh
I think those errors are all coming from the rounded rect in ceramic
the borders are all shaped correctly
however the bg isn't in various places
thickness is missing but that's because i just forgot to map that
Ah
so freaking hyped
I think with this, Ceramic is def gonna be a top contender for HaxeUI backends
I can't seem to get past this :/
for now off to bed
but pretty cool none the less 😄
Maybe I should try using heap's poly2tri: https://github.com/HeapsIO/heaps/tree/master/hxd/poly2tri
Or... just ditch holes support for now and come up with a more simple implementation
will this cause any issues with what i've done so far? 😭
Isn't a 'border' a shape with a 'hole'?
i wonder if I could just "git pull" in ceramic's directory to pick the update up
I wouldn't advise to pull ceramic changes at the moment
Do you have your own border implementation?
yes, i'm also working on my own rounded rect implementation as it's basically just a cut down version of the border
More progress 😈
Trying to draw mesh RoundedBg with vertices colors but colors array is too short. It must have at least 64 elements
what 😅
Ceramic's border class doesn't use triangulation anyway, I don't want to depend on complex triangulation algos for predictible shapes like this (same should go for roundedrect, which should not depend on that imo)
do I REALLY need 64 colours to gradient-ify a rounded rect?
it's basically going to be [for (i in 0...vertices.length) start] (repeat for end)
is this "efficient"?
I expect it to still be more efficient than using a sdf shader
(for the reasons explained yesterday)

is the resolution really low or something? It looks quite pixelated.
maybe it is just on your side
i don't really know how to improve that
i thought by increasing the number of segments it would get smoother
this is 200 segments and it seems pretty much the same lol
but i'll leave that for another time
i think i've got gradients mostly there now
it isn't perfect but this is pretty cool either way
👀
somethings going wrong
but it's damn cool to see a little bit of rounding on the buttons
apparently the buttons demo causes some kind of massive loop?
App completely stalls
probably related to the massive style recursion issue that comes up on tracy :/
@edgy mason are you free atm?
Could you run a quick haxeui test using the xml from here https://haxeui.org/explorer/#basic/buttons
this seems to turn into an infinite loop but I can't figure out where its coming from
no worries
i've commit hopped in both ceramic backend and core and gone quite far but it seems to have been there for a while which is odd to me
can't find a point it didn't occur
so something is causing layout to refresh, which is causing the text to get remeasured which is causing layout to refresh... constantly
everything is being emitted by calllater :/
so i guess the issue is in componentimpl somewhere
awesome to see how tracy makes an impact on generating insights. Makes every minute spent on it soo worthwhile
It's super useful for sure!
I wouldn't even know this much 😂
none of this whole issue makes sense
it's only an issue with item renderers
is it just your backend or something haxeui suffers from in general(and noone noticed)?
I haven't even thought to confirm with another composite backend
i just default to it's my backend 😅
okay, defo my backend
heaps is fine
i just can't find where things broke :/
then your impl might not correctly set/return its state back to haxeui. You could create a minimal example and then compare a single frame to isolate the stack level it differs and then start debugging that area and compare each other versions
okay... i thought it was due to item renderers
<vbox width="100%" style="padding:10px;">
<section-header text="Buttons + Item Renderers" />
</vbox>
this breaks things
which is very bizarre to me
<?xml version="1.0" encoding="utf-8" ?>
<vbox width="100%" style="padding:10px;">
<section-header text="Default Buttons" />
<hbox>
<hbox>
<button text="Normal" />
<button text="Toggle" toggle="true" selected="true" />
<button text="Repeater" repeater="true" />
<button text="Disabled" disabled="true" />
</hbox>
<grid columns="2">
<button text="Left" icon="haxeui-core/styles/default/haxeui_small.png" />
<button text="Right" icon="haxeui-core/styles/default/haxeui_small.png" iconPosition="right" />
<button text="Top" icon="haxeui-core/styles/default/haxeui_small.png" iconPosition="top" width="100%" />
<button text="Bottom" icon="haxeui-core/styles/default/haxeui_small.png" iconPosition="bottom" width="100%" />
</grid>
<button text="Disabled" icon="haxeui-core/styles/default/haxeui_small.png" disabled="true" />
</hbox>
</vbox>
because this works fine........
and that has a section-header in it
the heck is this issue
<section-header text="Buttons + Item Renderers" /><-- crashes
<section-header text="Buttons + Item Renderer" /><-- fine
text-width interfering with element width?
i think that's what's going on
We got a render
it takes about 10 seconds upon window opening for this page to display
should be instant :/
but thanks for the lil nudge, realised that I was assuming it was item renderers
Word wrap!
It'll come, have you been using the backend
has it not been super slow at all for you?
Not in this project, I will once it’s done
But I meant more that word wrap is causing your issue it looks like, or a lack of wrapping
oh, the button height?
nah it's cool, think i figured out the issue
If adding 1 letter causes a crash, sounds like you’re exceeding some width and not syncing the new width between the two
Or that you are but super recursively and that’s just the breaking point
yeah, it was this
if (w > 0 && visual.width != w) {
visual.width = w;
//text_visual.fitWidth = w;
}
i'll have to do this properly
Ah yeah a relayout each time would do it
uncommenting that line will result in the halt
its been in for ages
i'm surprised i haven't even tripped this
we still seeem to have some constant revalidation going on tho
My other guess was gonna be when you use “width=100%”
I wish i could make really easy repros for tracy so I could compare changes 😂
As that also involves some back and forth between compos
sometimes I can't be sure whether the differences i see are due to me testing slightly differently from run to run
oh, now we are in shared territory again since I use the haxe-ui styling in cortex as well. This indicates that you have styles that are constantly applied every frame, meaning you have a constant difference between the component property (e.g. width) and the style.width(roughly speaking)
i think its going to be something like: fitWidth has a subtle gutter or something so you set the width to 100, that sets the fitWidth to 100, but actually, its 96 or something (inventing these numbers ofc), that causes the textfield it increase in hieght which causes a new invalidation, and then over and over again (something like that anyway - i would guess)
tbf though, i cant see anthing like that: https://github.com/search?q=repo%3Aceramic-engine%2Fceramic fitWidth&type=code
that's exactly what the stack looked like in tracy
think I got it
okay, that's the cleanest it's looked so far
most of those red spikes are related to mouse hover events

somewhere along the way the mouse events became terrible as well
:/
i swear this used to work well, maybe i need to run my chart through this 😂
my chart stuff might be doing a lot of bad stuff
I'm so confused by these performance issues :/
I'm currently on a commit from march 2nd 2024 and it's running badly
i swear at some point things ran fine
I think there may be something in ceramic v1.6.0 that has issues or changed something 🤔
v1.3.0-v1.5.0 runs fine (tried all with hxcpp set to git)
going to update haxe to 4.3.6 locally just to exclude that before reupgrading to v1.6.0
okay, i'm not sure what i've done
but it seems like version hopping has improved my setup
going to downgrade to 1.4.0 one more time just to verify
there's defo a performance difference between 1.6 and 1.4
top is v1.6.0
bottom is v1.4.0
I will say that the tests aren't 100% exact, but, the app feels noticeably better from version to version
but i did perform the exact same actions throughout both tests
I am not sure why things are better over here, the change log doesn't suggest anything major being altered
will have to compare to 1.5.0
for now, I'm happy to see that things were good at some point 😂
if you want, send me the 2 recordings and I take a look if something jumps out after a smoke and coffee
Need to see the actual frame stacks to make conclusions for sure
I didn't save the 1.4.0 run
but I have a 1.6 and 1.5 run, there's still a difference here
need to upload them somewhere, the files are large :/
I'd be interested in understanding how you guys come to conclusions to me i'm mostly just trying to understand numbers
i have no frame of reference for what's good, what's bad and how to gain that experience
already deleted?
was looking at particles, sry didnt notice disc
Let me know if Ceramic is proven guilty
wouldn't it be ceramic if the only thing i change is ceramic versions 🤔
Not necessarily, you could be doing something wrong too that gets worse in new versions 😄 but only actual data will make us know that
heh, i'm working on improving the data quality
just made a little benchmark test that runs the exact same things on a per run basis
If it’s a Ceramic regression I’ll look into it for sure
a couple of differences I spot from the very top:
source file cache shouldnt worry us. But double the zone amount in less than double the time ran? could be the first hint
there is a clear difference in the end of frames
@burnt dune try disabling your websocket connection and test again?
will take a minute, installing ceramic 1.4 again to test that
gone through 1.5, 1.6 gonna run 1.4 on all doing the exact same things
the yellow frames in 1.6 each have a socket.select that eats time
one thing that looks strange is SDLRuntime.windowSwap
okay, got my updated runs done, will go back to 1.6 and disable the socket
but the graph on 1.4 vs 1.5 & 1.6 is super different
issue might have began on 1.5 rather than 1.6
Random guess could be a regression due to the GL pausing changes between frames
I don’t recall, need to check the history on git, but not on a computer right now
so our main concern is 1.4 vs 1.6?
correct
do you remember what you called the change in the log
yeah, you wanna check anything related to this windowswap
that's an average frame with a select, they look identical. so no major concern for me there(only number/frequency could add up)
but looking at the "short" frames, we see windowswap is a clear difference
global numbers on the bottom left show a clear global difference in amount of time and amount/count of calls of the swap
also, MTPC is totally different
so 1.4 has it called more but it takes less time per call and 1.6 calls it less but takes more time
interesting
whenever i'm looking at these runs in tracy i'm ignoring all ceramic backend stuff 😅
naturally, 1.6. spends longer in the swap and less fps in general
ah, so, what you're looking for here is behavioural differences rather than timing differences
timing just points to a behaviour change
yeah, numbers will never be frame-exact between runs, so you are looking for patterns / relations between kpis
does the socket seem like the obvious issue here then?
maybe an incompatibility with ceramic?
then you look at the structure/zonestack of short & long frames and compare the zone-layout
I dont think the socket plays a role
it plays a role in the long frames but they average out to about the same frequency in both runs, so I dont consider them an issue atm
so yeah, if i'm reading it right
it might be that sleep that was introduced to stop ceramic from eating large amounts of cpu
1.6 has that in the runtime loop, 1.4 doesn't
has a knock on effect to whatever windowSnap does?
oh
you are right, it's missing in 1.4. I crossed that of my mental map when comparing 1.5vs1.6, totally missed that in 1.4
oh wait
it is there in both, 1.4 you have to zoom in
issue found?
ah ok
it really is quite hidden
maybe play with this define and see how it changes your runs
lol what? tracy bundles the code with the run?! 😂
I mentally signed your NDA
hahahaha
that's why the runs are so large
it really takes in all the data
that define makes no real difference on 1.4
to be expected, 1.6 is where it should show a diff
in any case still a bit weird. swap is still the biggest difference. did you check if there are any default config parameters that changed between releases?
i read the change logs of ceramic and there was nothing obvious in them that would suggest issues
this change in clay directly references windowswap and was after 1.4
compiling clay_native_no_tick_sleep on 1.6 atm
i think it makes it look more like 1.5 rather than 1.6 though
makes an improvement but not the same as 1.4
i think what you can do is revert these changes locally in your 1.6 clay-setup and see what it does
i assume you will see parity then
winner, winner, chicken dinner
hard to make a call on these numbers alone. But in any case you have a valid difference isolated, how does the frame-view(top bars) look like between the 2?
more blue I assume with the loop change?
the question then becomes what is actually happening here and what is considered to be "correct". 1.6 might just be correct, but "offbeat" with timing between the sleeps and the swap
personally dunno, I never had to mess with SDL+GL in detail on that level
bottom is 1.4
more blue
but not as much blue
ok i guess, given that might be other changes affecting the frames
getting the graph to zoom to the same amounts on both windows is a pita 😂
yeah, i don't change any project settings between the runs
only thing changing is ceramic
next thing I would do is check both apps with renderdoc / nsight to see how a frame on the gpu differs on the gpu
the swap should be visible there
or give extra pointers. maybe for some reason different profiles are choosen or there is a difference in order that we dont have yet seen due to zoom levels in tracy
you might also wanna compare real fullscreen vs. windowed
this is shit can get so complex
lol
thanks for looking at things tho @hexed nebula
these things have been awkward in figuring out what exactly is the issue with my haxeui backend, my app etc etc
So, in conclusion, what code/commit in Ceramic is causing the perf issue?
sdl loop in clay is part of the picture
but there's something going on with windowSnap
even reverting that commit suggests there's something is different with it from daz's analysis
so there may be some other commit that's an issue
that was just an obvious one for me to pick out
correct
the flag is present in my hxml
Try to comment the code in clay that calls GL.finish()
with or without the sdl commit?
If you can try both ?
will try, getting ready for work
I reverted back to normal 1.6
that's with gl.finish commented out
it's basically "fine"
from the graph perspective
i'll do the other test when i get back later, but, I don't think the gl.finish call exists on 1.4 there
^ 1.4
commenting out glfinish basically makes window snap identical between the runs
Yeah expected it
I’ll disable GL.finish() by default then. Already disabled it on mac because it was causing issues. Was hoping windows wouldn’t be a problem, but apparently it is
Using it does reduce CPU usage when the app is idle though, so maybe we could try disabling it only when there are actual interactions on screen, idk
Or I should try to measure frame time without GL.finish(), because that’s the actual problem that I was trying to solve, but that’s quite difficult to do reliably without GL.finish() because any GL call can be the one that will « wait() », as surprising as it sounds
And maybe that behaviour is also driver-specific
doesnt that just mean you base your reduction of cpu usage on whatever your gfxdriver deems correct(lockstepping your cpu to gpu)... from what I remember glfinish wasnt really useful when using double buffered swaps
i think i only ever used it when doing readbacks of screenshots
The only reason I tried to use it was to have a predictable place where I can measure the idle time between frames
define "idle time"
The time between when the work on current frame is finished (everything sent to the gpu) and the time until when the new frame starts so that it will stay in sync with the screen refresh rate
so you are trying to forcefully singlethread a multithreaded system? 😄
I was just trying to use less cpu on windows because it seems that it goes through an active loop that consumes CPU when waiting for next frame
(The problem doesn’t seem to exist on mac for instance)
so basically you try to explicitly sleep() the right time between frames on windows so that it does pause cpu consumption when there is no cpu work to do
And the part that has been difficult is to actually measure that time to sleep (if not using gl.finish())
#ceramic message
here's the initial context
a 'hello world' ceramic project would run at 15% 'for nothing'
Jeremy was working on that particular issue
well, isnt that the nature of the beast? actually what you really want is a different type of main-loop, one that explicitly renders fps on demand + dirty-rects
openfl and heaps didn't have the 'issue'
Heaps dos have a comment about it in hlsdl
Looks like a completely different system lol
The shiro games use a while loop waiting until the delta t >= the desired value...
Which seems more cpu intensive than the glfinish thing which isn't really my territory tbh so I don't fully get it
yeah, the main concern I had was due to it being an app and was concerned for low end devices + battery ones, an app spinning like that seemed odd when I've seen massive games not reach the same amounts of cpu usage in comparison
(I understand that these things are difficult tho)
I’ll disable the GL.finish() for now, and when I have some time I’ll try another strategy on windows
Small sleep() calls in a loop to reach the right time is still much better that asking windows open gl to « wait » as that eats the CPU, so I might just do that as well
i have some brainfog, so I dont get it. it all sounds wrong to me
That’s a very GL on windows problem, I wouldn’t be surprised the issue doesn’t exist with GL via ANGLE on top of directx
I never really profiled it though, so you're right maybe it's better or far worse than other options
Ah this is when there is no vsync, another thing
Yeah I’m tired too it’s late
i need to repair my mouse. I think the left button trigger has work itself into the plastic of the button
the clicks and holding have become unreliable
lol
i've got other problems 😂
oh wait, that might be tracy!
yeah, that's tracy
now my test haxeui app no longer takes 20 seconds to start and it runs nicely 😄
i didnt fully follow through the whole conversation, just parts - what was the issue?
remember when jeremy was investigating the whole "app taking 15% in idle" thing
one of the changes with that caused massive slow downs
oh
i never really noticed at the time because i've been on electron until recently
so back to 15% idle?
Indeed 😄
buuuut, the tabs feel like native soooooo i can live with it for now 🤣
@burnt dune for the future: You can actually compare traces in tracy and compare zones between 2 saved traces.
just stumbled upon this while profiling cortex
I've been messing with comparisons for a little bit but I can never make much sense of the ui
watched a few vids but they're all so surface level
want me to test it on tke?
You can, but i'm certain it won't work
i've changed a lot more than just the borders in here
check out surfacereworkv2 branch
would be funny to see how broken it is though x)
the last commit should be one week old right?
yeah
i've got more changes locally as well
just trying to take one problem at a time
and each problem keeps taking me down other paths x)
huh interesting
is that scaled right?
i don't think so, this is just a pretty low res screen
so it is scaled right?
scaled via?
Yeah
only weird thing is borders and the X on the tab breaking again
tabs look close to normal again
give me a min and i'll push my local changes
@edgy mason pull the latest
ahah
some details have come back
text being weird is expected, that's an issue that came up with daz's profiling insights
i just haven't looked at a fix for that bit just yet
might be an illusion, but the text rendering looks a bit crisipier?
i made a change at some point where i thought the same thing
but i was so preoccupied with solving some issue at the time that i have no idea what or when and if it occured 😂
it's hard for me to spot these things on my test monitor, it's quite low res and low quality
wait huh
sometimes gradient buttons on haxeui look like solid colours until i drag it over to my main screen
does things "feel faster" at all?
more responsive?
Maybe? This system is pretty slow to begin with
it is a chromebook running a fedora container
ahh
fans aren't ramping up though which is good
is that native or electron
why are tooltips so long?
wdym
most likely a text width issue
baha
tried to get the depth issue here solved again, couldn't do it so moving on to the next thing
borders seem to be rendered mostly correctly, style wise, now tho
lets see if I can get nine slice going :/
🎉
because I had a very unfortunately placed bgAlpha = 0 that was part of different bg handling code :/
now to have a quick look and see if i broke anything else related to images
should probably check if a single image can be sliced as well... it's been quite a bit lol
ugly demo but it works
aww damn logo
i can't test TKE on native
keyson and json2object seem to be incompatible
yeah i tried figuring out awhile ago but no luck
#haxe message
var kle = haxe.Json.parse(string);
if you typed this
it might get a lot further
i'd try locally but i can't see what type it's meant to be
instead of json2object?
this is in keyson, so i assume your own code
this line is left as dynamic
but if it was given a type hint with null<float> etc, it might clear out some errors
oh hmm
Seems like it would be Array<Array<Dynamic>>
[["Num Lock", "/", "*", "-", { "x": 0.25, "f": 4, "w": 14, "h": 5, "d": true }] here is an example snippet
ahh cool
I'll have a play in a bit
that's an awkward format to work with in haxe lol
baha, hence why we made our own
but we still need to be able to convert stuff from legacy kle to keyson
damn great job past logo
need a complete code snippet
I’ll skim over it when you commit
But yeah at the time it seemed less straightforward than the other backends which I thought was interesting
it's up in the surfacereworkv2 branch
typedef KeyType = {
x: Null<Float>,
f: Null<Int>,
w: Null<Float>,
h: Null<Float>,
y: Null<Float>,
rx: Null<Float>,
ry: Null<Float>,
w2: Null<Float>,
a: Null<Int>,
c: String,
t: String,
d: Bool
}
and then
for (column in (row:Array<KeyType>)) {
fixes all of the keyson related errors
why the hell json2obj is failling on a macro call is beyond me
might be a similar story though
just need to find the origin of the call
@edgy mason
👀
runs really nicely as well
what's going on
could you send a pr or patch?
the entire project is hacky
key and mouse is offset on native 😂
oh, it's not all the time
but app runs nice
does anything look wrong or not as expected that could be the fault of haxeui ceramic? @edgy mason
not really, the tab close button looks really thick though?
oh it does seem a bit off
oh wait
this isn't the new version
this is on master
i forgot how to switch branches with ceramic.yml
just git checkout in .haxelib LOL
well, lets see if everything breaks
Look at the web version here, it is using git master of haxeui-ceramic. Try hovering over the close button. Seems like the bg covers the icon.
https://thekeyboardeditor.github.io/theKeyboardEditor/
normal mode?
new patches has some error but I can't find the source because for some reason i'm not getting any stack traces on crashes :/
error only occurs on windows because it's the silly mesh colour error
Anyone have any ideas why I would randomly stop getting crash errors?
I am in debug mode
Small question: All components are Visuals right?
Does that mean I could in theory attach a Click component to UI elements and bypass HaxeUI event system? :p
yes!
neaat
but I can't guarantee how well it works
you may need to disable haxeui interactions but I can't remember how to do that
I'll let you know how it goes 😄
Ceramic is neat, u were right
The font rendering is glorious indeed and feels extremely snappy
And haxeui works... much better 😛
I'm happy you're happy with the font
it took me a while to sort that out with the backend 😅
Dialog misalignment issue
I found another issue
Selecting an item from a dropdown straight made the app crash
lmao
Color pickers too
Is it just the branch you told me?
If so I might just switch to the main branch, since I'm gonna avoid dialogs anyway
likely, yeah
Funny enough, this just happens when interacting with the drop down on the collapsible, not on a dialog
So i don't even know if it's the drop down to blame here
nah, almost 100% gonna be the backend
Ah no, my bad
It just won't select anything even if I click it, but it doesn't crash
Just for the windows target, web works well
ah okay, will have a look soon!
on the surfacereworkv2 branch sometimes the background of a button on a buttonbar disappears
@burnt dune
On git main branch, I get
clay.Clay.emitTick ../../ceramic/git/clay/src/clay/Clay.hx:271
backend.ClayEvents.tick ../../ceramic/plugins/clay/runtime/src/backend/ClayEvents.hx:134
backend.Backend.emitUpdate ../../ceramic/git/tracker/src/tracker/macros/EventsMacro.hx:959
backend.Backend.emitUpdateBoxed ../../ceramic/git/tracker/src/tracker/macros/EventsMacro.hx:999
ceramic.App.update ../../ceramic/runtime/src/ceramic/App.hx:1305
ceramic.App.flushImmediate ../../ceramic/runtime/src/ceramic/App.hx:349
backend.Textures.loadFromBytes ../../ceramic/plugins/clay/runtime/src/backend/Textures.hx:167
ceramic.Texture.fromBytes ../../ceramic/runtime/src/ceramic/Texture.hx:158
ceramic.Texture.new ../../ceramic/runtime/src/ceramic/Texture.hx:170
ceramic.Texture.set_density ../../ceramic/runtime/src/ceramic/Texture.hx:79
Null Object Reference
when trying to start my app.
I can't seem to isolate where in my app it originates since the stack trace is contained in ceramic.
Is this consistent with using the canvas and number steppers which you say are unsupported?
Or maybe there's an easy way to diagnose it?
can you try the surfacereworkv2 branch
Seems to be identical crash, @burnt dune , although it would not recognize that i had changed branch and i had to delete /out to trigger a recompile.
it makes me wonder if it picked up any changes
I would not look too far into this, I think my project is not going to be feasible to work with the ceramic ecosystem
it seems to have global imports that shadow many of my classes, and my own resource system clashes with how it is expecting resources to be managed
is the project public or the version you're testing?
it may just be a case of unfamiliarty or its a case of there's something wrong with the backend, either way, it would be nice to know
Unfortunately not just now
It will be, but it three code bases and I need to understand the licensing requirements of some resources used first
ah cool, if its not a massive task i'll probably see if it can just plug into ceramic backend whenever i'm playing around with that stuff again
Which branch should I be on for playing around? And latest core + whatever ceramic?
core anything on git
surfacereworkv2 to play around, technically the master should be more stable but I hear the opposite is true
I have released the project and lib sources now if you're interested in navigating a mess, !b 😂
Ok you can tell I've opened up a new project bc of the following list of questions lol
Why are all the performance and font things in ToolkitOptions? I'm not confident with how ceramic does fonts, but a lot of it seems like stuff the user would do themselves
Or would go in a backend package's helper class
I had animation stuff in flixel's TKO for instance that got removed after an asset refactor in core making it not necessary
createInstance("../assets/test.xml") not a fan of having to go out a directory by default, but I'll survive
I would want a warning before the asset finder starts diving into root scenes imo
It's weird having to use the image asset name in the XML even though that makes complete sense given the framework
I think I'm just highlighting how you couldn't copy paste the same code/xml into a different backend and get the same result
I don't understand, they're in there to give you the choice
This is more of a problem with haxeui rather ceramic, I mentioned a solution to Ian in the past but he's just busy
could consider that
defo is a bit weird, how does flixel work with this? I think all backends are a little bit different here but I might be able to simulate others a bit
The other backends use the file path as that’s how you get to the file (by name)
It’s often fairly empty in the backends, it’s fine just took me by surprise
There’s a bit more custom support for asset names now in core, but I’m not sure ceramic is intended to use the file names at all
you can use filepaths here as well, it will just load the file by sys, but if you wish to work with ceramic's assets then that option is there as well
😄
I can look into whether that's possible
Not at all a priority lol
yeah, i get that the current way is unintuitive
I got a few test UIs going, so nothing worth making an issue for
Should issues/PRs be against surfacereworkv2 if it's supposedly more stable?
<image width="200" height="200" style="background-image:image:ceramic" /> doesn't display anything bc this.visual is not added to the screen or to a filter by default
don't worry about it, just put an issue up and I'll test, surfacereworkv2 will get merged to master at some point but if it's failing in master there's a decent chance it will fail in the branch
but if you are gonna make a pr, it's probably better to do it against surfacereworkv2 rather than master
there's also a chance that something that isn't working is fixed in the branch

I actually need to figure out breakpoint debugging with ceramic bc this is different enough from the other backends that I need to see everything
it should work out of the box
ceramic electron
- Grab yourself the following files: main.js and preload.js
- This setup comes configured to allow full sys access, adjust if needed
- Place these files in
.../projectroot/project/web - Next grab launch.json and place this in your
.../projectroot/.vscodefolder - At the bottom of the vscode window change the build task to
clay / Build Web - Now when you go to the debug tab, select
Electron: All - Wait for all adapters to connect, it will take a little bit of time on the first launch. A drop down list will appear when completed
- When the dropdown list has appeared, select
Electron: Renderer - Now when you hit your
Restart debugshortcut or button it will just reload inside of the window, rather than relaunch the entire electron instance
here's my setup tho
It looks like runtime debugging works, but frame 0 doesn't with the default launch configs and stuff
Since it needs to be running already to attach
I'll think about that later, been low on time
Ah no, visual.solid.alpha is 0 for some reason. Tried diving into the parent/filter tree so many different ways just for it to be that lol
Made an issue
lol, the reason I did it this way was because managing all the different things was a pita the old way
It’s a different way of thinking compared to using the graphics api for everything
wanted to use whatever ceramic had available
Got bg clipping working which is my main use case, I'll check out 9slice to see if I broke anything there
Idk if it's efficient to have 8 degenerate quads if you are only clipping and not slicing, but someone can figure that out later
lol what did you do
./src/haxe/ui/backend/ceramic/RoundedBorder.cpp(320): error C3861: 'get_radius': identifier not found
the hell is this error
Clip with no slice defaults to 9 slice with the center being the full size of the sprite, so the 8 outer quads aren’t doing anything
If the slice params are all 0, then your apply slice function just by default does what you want
lol, sorry haven't been looking into haxeui stuff
But that case could be handled more elegantly I think
i defo remember not being exhaustive with that stuff when i was last working on it
It’s fine
at some point i think I need to start cutting some obligations from life in general, there's defo somethings that are taking too much attention 😅
its minor depth issues here and there
tabs should be better now as well, but they're also still not 100%
just having my regular old quick lil dip to see if i can get something
shit like this
but at least the tabs are properly highlighted now lol
but the selected tab needs to not have that grey border
aha
I'm happy, I think most out of the box components are basically in a usable state now!
just gotta work on the NineSlice stuff
and I'll probably merge the branch into master
Master performs so much worse than v2 branch
#haxe-go is in game framework q&a for some reason
You can iirc
Smth on server settings -> channels
Np :3
rounded borders look great - love shit like this, tiny tiny detail but makes the whole thing seem much more pro
optionboxes look right now?
Last time I looked at them they were so bugged out I immediately left the scene, forgot about them will check later 😅
(by the way Ian, no rush at all but did you happen to see this message? #haxeui message)
Probably better to file it as an issue cause I think Ian is quite busy atm
I should probably do the same
perfect... the holy grail of custom backends 🙂
@unborn dragon I'm sure you asked for something
surprised there's no pin for it though
Am i not remembering right
ahhh its on the github 😄
For your backend?
It’s been so long, I have actual time now to work on these things again
yea
i vaguely remember something to do with file types but can't recall what it was
Oh yeah it was using the ceramic name of an asset as opposed to the file name
In the xml file, which is a little odd at first since the xml should be universal
it kind of is universal
if you use paths it uses sys to load the file
if you use asset ids it uses ceramic
The others use “path” as the index into the local asset manager
from what I can tell that how it works in the other backends, but I can see if I can get ceramic to pick up an asset via the path
I think there’s one way to do sys loading and then the typical way which uses assets
nine slice defo working
probably not exhaustive, but i'm also cleaning up the actual componentimpl
because it's a mess
so silly, for some reason background images aren't working
alpha 😄 , got one image displaying
ono
<image width="200" height="200" style="background-image:ceramic" />
This one works
<image width="200" height="200" style="background-image:ceramic;background-image-clip:0 0 200 200" />
this one fails
@edgy mason is the keyboardEditor building against master?
yeah! want me to rerun ci so you can play around with it?
If you can, i haven't changed a ton of stuff, but the changes are with delicate areas
just want to make sure nothing crazy has occured
can you run it against the v2 branch?
uh how do i do that in my ceramic.yml
i'm not sure
i don't think you can
i guess i could fork it and rename the v2 branch lol
i know you can do it via haxelib
i guess i could just do a quick checkout in the ci workflow itself
haxelib git haxeui-ceramic https://github.com/jarrio/haxeui-ceramic surfacereworkv2
lol not heaps
maybe you could add the cmd command to the end lol
my app hasn't broken or anything so hopefully yours is fine
wat
not my fault 👀
ill look into this in a bit lol
feels snappy but i don't have a reference point
also, tabs might not be 100% fixed i guess?
i knew that, but i expected the highlight to work...
i think its odd that the first and last one doesn't have the line
these tabs work, the side bar one doesn't is the sidebar a custom implementation?
rounded corners are working 😄
hm no
ah wait no it is
it is a button bar
hmm... well testing button bar locally it seems to work
so i'll consider this a 50:50 chance its the backend
<button-bar selectedIndex="0" direction="vertical" id="modes" styleName="modeSelector">
<button id="place-mode" text="Place" icon="icons/place-mode" iconPosition="top" />
<button id="edit-mode" text="Edit" icon="icons/edit-mode" iconPosition="top" />
<button id="unit-mode" text="Unit" icon="icons/unit-mode" iconPosition="top" />
<button id="legend-mode" text="Legend" icon="icons/legend-mode" iconPosition="top" />
<button id="color-mode" text="Color" icon="icons/color-mode" iconPosition="top" />
<button id="present-mode" text="Present" icon="icons/keyboard-mode" iconPosition="top" />
</button-bar>
guessing it is the selectedIndex thing that is broken
got the styles handy
a builder paste would be nice
all i do is set the width it seems
not sure why that is a full style lol
ah nm, github search failed me
.modeSelector {
width: 64px;
height: 100%;
background-color: #282828;
}
.modeSelector button {
width: 64px;
height: 64px;
}
.modeSelector button:down {
border-left: 3px solid $accent-color;
}
yeah its the backend
can't even select the button
so weird
the buttons work for me when i click them
just the first and last border doesn't show
oh weird 
and i can't click and select a button
kind of understand what's going on with the buttonbar
the 2 that are failing (top and bottom) have rounded corners
that makes it more confusing to me lol
but i trust you
i hate silly stuff like this x)
it IS so confusing
I don't even know why the accent border needs any rounding 😭
but yeah, maybe some edge case with the rounded border code :/
we fixed it
but also made other things worse
😄
ono

