Search
Tuesday, 17th of November 2020, 21:51:30 UTC
21:56:16
selwyn
unsure why these values are chosen https://github.com/Shirakumo/alloy/blob/master/renderers/opengl/renderer.lisp#L102 particularly the stride
21:57:05
Shinmera
stride and offset are in bytes
21:57:32
Shinmera
a float is four bytes, so (4+2)*4
21:59:06
Shinmera
so in this case we have two attributes, one for xy position, and the other for rgba colour
22:03:48
Shinmera
The reason they're in bytes is because you technically can mix different types in the same pack of attributes.
22:06:29
selwyn
is offset 8 for alignment?
22:06:54
Shinmera
The first four bytes are for the 2 floats of the location.
22:07:17
Shinmera
right, so the offset has to be 8
22:14:36
Shinmera
Trial typically computes all this boring stuff automatically for meshes, but we don't have that here
22:21:48
Shinmera
anyway, in the array you create for the gradients it'll have to be packed as single-floats of X Y R G B A X Y R G B A, etc.
22:23:57
Shinmera
Having a helper to do the array indexing, like https://github.com/Shirakumo/alloy/blob/master/renderers/opengl/renderer.lisp#L32
22:24:03
Shinmera
should help a lot with that
22:27:24
selwyn
that's what i'm trying to do but it's getting in an infinite loop for some reason
22:27:52
selwyn
maybe i should choose more interesting values than 0f0
22:29:44
Shinmera
well where is it infinite loopin'?
22:35:23
selwyn
this https://github.com/Shirakumo/alloy/blob/master/renderers/opengl/renderer.lisp#L226 calls itself until a stack overflow
22:36:01
selwyn
i suspect because the renderer has an extent of 0. maybe i should have more interesting values than 0f0
22:36:44
Shinmera
why would hat cause a recursion?
22:36:52
selwyn
https://plaster.tymoon.eu/view/2154#2154
22:37:32
selwyn
i think because alloy:render (called at l.235) calls simple:call-with-pushed-transforms
22:39:05
selwyn
certainly some of its specializations do
22:39:13
selwyn
so much to learn! can't believe you wrote all this yourself
22:40:08
Shinmera
That still makes no sense to me
22:41:13
Shinmera
There's only two specialisations on call-with-pushed-transforms. The around and the primary method.
22:42:21
Shinmera
Does this happen for new stuff you implemented, or just in base alloy?
22:42:41
selwyn
yeah i don't suggest that this is a bug
22:43:03
selwyn
thinking out loud really
22:45:52
Shinmera
I presume what you're doing now is what I advised -- draw the shape as a clip, then draw the gradient, yeah? There is a cycle there taht needs to be broken, since then render -> clip -> render ...
22:46:36
Shinmera
I can only think of three ways to circumvent this, none of which are pretty
22:47:19
Shinmera
wait, it appears //I// wrote code for that already at some point
22:47:30
Shinmera
well shoot, nevermind then lol, all my fault
22:48:18
Shinmera
the transform push there https://github.com/Shirakumo/alloy/blob/master/renderers/opengl/gradient.lisp#L34 is necessary since we need to ensure the clip is undone afterwards
22:48:24
Shinmera
a clip command otherwise "sticks around"
22:50:20
Shinmera
I'd recompile the gradient methods and the around method with C-u C-c C-c to get better stack traces
22:50:30
Shinmera
and then see where exactly it goes wrong
22:50:51
Shinmera
(remember sldb-end-of-backtrace)
8:23:10
Shinmera
Ugh, trying to load kandria on my macbook now refuses to load shared libraries that used to work just fine for years
8:54:12
Shinmera
floating point invalid operation now
8:56:18
Shinmera
and now I hosed my osx 10.14 vm
9:01:00
Shinmera
I upgraded the vm type from 15 to 16 and that was Bad
9:01:15
Shinmera
probably need to hack vmware 16 to support osx again
9:02:06
Shinmera
okey, yea that fixed things. Still got no 3D support on em though so I can't test kandria on the vm
9:02:25
Shinmera
and on my macbook air I can't run it -- crashesh with that invalid floating point operation
9:02:37
selwyn
oh, i thought you'd ruined a whole vm with a floating point op
9:03:38
Shinmera
second try starting it up it worked
9:05:07
Shinmera
okey it runs and then did the fpe on exit
9:05:15
Shinmera
also crackles a lot in the audio
Wednesday, 18th of November 2020, 9:51:30 UTC