Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 04:01
    20kano starred mosra/magnum
  • Dec 08 23:47
    bqqbarbhg commented #133
  • Dec 08 23:08
    bqqbarbhg commented #133
  • Dec 08 23:07
    bqqbarbhg synchronize #133
  • Dec 08 22:57
    bqqbarbhg synchronize #133
  • Dec 08 22:40
    codecov[bot] commented #133
  • Dec 08 22:40
    bqqbarbhg synchronize #133
  • Dec 08 00:59
    Wuqiqi123 starred mosra/magnum
  • Dec 06 19:41
    bqqbarbhg commented #133
  • Dec 06 16:52
    KorigamiK closed #14
  • Dec 06 16:52
    KorigamiK commented #14
  • Dec 06 16:37
    mosra commented #14
  • Dec 06 16:25
    KorigamiK commented #14
  • Dec 06 16:09
    mosra commented #14
  • Dec 06 16:09
    mosra commented #14
  • Dec 06 16:09
    mosra commented #14
  • Dec 06 15:26
    bqqbarbhg commented #133
  • Dec 06 14:49
    bqqbarbhg commented #133
  • Dec 06 13:39
    bqqbarbhg commented #133
  • Dec 06 13:38
    bqqbarbhg commented #133
Visage
@Azvf
It's not multiple buffering, it's multiple framebuffer combined on a sole defaultframebuffer
Vladimír Vondruš
@mosra
ah, hmmm
debugging idea -- if you clear those to 0x00ffff_rgbf right after the recreation, does that color appear in the default framebuffer?
or is it still the default black-ish
Visage
@Azvf
do you mean clear the source framebuffer
Vladimír Vondruš
@mosra
yes
in the viewport event, right after you attachRenderbuffer()s to it
Visage
@Azvf
ok
Visage
@Azvf
it's still the same
there's a draw call overwriting the resize result so I commented it out. The result just changed to switching between cyan and black when I scale the window.
Vladimír Vondruš
@mosra
at this point i see the only solution as recording the actual GL calls with renderdoc or apitrace and then inspecting what gets done in each frame

it works fine when I use the 'default' blit.

if i understand correctly what you mean, the default blit is only implicitly passing the size, but it's the same operation underneath so it shouldn't matter

Visage
@Azvf
I'll work on that tomorrow. Appreciate your help!🙏
This line:
Containers::StridedArrayView2D<std::uint32_t> image = images[5];
shouldn't it say images[4]?
Vladimír Vondruš
@mosra
what the hell, the whole section seems cursed
what did i do there
but yeah, it should be [4]
fixing
pezcode
@pezcode
Related question: how do I get 2D z-slices of a 3D array?
const auto slice0 = image->pixels<Color4ub>().prefix<2>({1, image->size()[1], image->size()[0]});
this is giving me a 2D view with size 27, 1 and I'm not sure what I'm doing
original image is 63, 27,3 and I want 63, 27
Vladimír Vondruš
@mosra
huh, why is Z last?
usually it's Z first, then Y then X
so a 2D Z slice is simply pixels<T>()[i]
pezcode
@pezcode
oh dear, you're right
Vladimír Vondruš
@mosra
in other words, for the pixels view the strided array view size should be image.size().flipped() :)
to answer your original question, if Z would really be last then pixels<T>().transposed<0, 2>()[i], where the transpose turns it from XYZ order to ZYX
pezcode
@pezcode
no you were right, z is the first dimension, I just got really confused in my head
Vladimír Vondruš
@mosra
i made this exact mistake several times myself also, so i learned to spot it :D
pezcode
@pezcode
so if I was trying to emulate pixels<T>()[i] with prefix/slice, how would I do that?
Vladimír Vondruš
@mosra
hmmm your image->pixels<Color4ub>().prefix<2>({1, image->size()[1], image->size()[0]}); should work 🤔
or even image->pixels<Color4ub>().prefix<2>(1) but there doesn't seem to be such an overload
ah no
if you say prefix<2> it discards the last dimension, taking just the first slice out of it
so you end up with 1, 27, yeah
prefix<n>() takes dimensions off the end, [i] off the start, so you need the [] here
Vladimír Vondruš
@mosra
pixels.transposed<0, 1>().transposed<1, 2>().prefix<2>({image->size()[1], image->size()[0], 1}); would probably work, but ...
pezcode
@pezcode
ah, that makes sense
thanks!
pezcode
@pezcode
is it safe to call an instanced test case from another instanced test case? :eyes: ignore that, I need different input files anyway
Vladimír Vondruš
@mosra
should be safe, except that you need to call some verification macro before to register correct function name
Mathew
@lectroMathew
is Quaternion::toMatrix() * Vector3::zAxis() the best way to convert quaternion to directional vector?
Mathew
@lectroMathew
since there's no vector x quaternion overload of operator*
Vladimír Vondruš
@mosra
toMatrix().backward() gives you the Z axis also
Mathew
@lectroMathew
toMatrix spits out Matrix3 so there's no backward()
Visage
@Azvf
I figured it out. Then blit fails when the src rang2di and dst range2di don't match. I split the defaultframebuffer to 2 halves to render so when the width of the defaultframebuffer is an odd number the two parts will have one pixel difference which caused the blit not passing data.
Vladimír Vondruš
@mosra
@lectroMathew ah, in that case just toMatrix()[2] -- for a 3x3 rotation matrix, the three columns are the X Y Z basis vectors