Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 03 06:07
    CarlSandstrom starred mosra/magnum
  • Oct 03 04:18
    dongyifan starred mosra/magnum
  • Oct 03 03:22
    SandWind starred mosra/magnum
  • Oct 03 00:24
    adjarar starred mosra/magnum
  • Oct 02 20:59
    1nfdev starred mosra/magnum
  • Oct 02 06:39
    lizhan17 starred mosra/magnum-examples
  • Oct 01 21:05
    uhryniuk starred mosra/magnum
  • Oct 01 15:01
    Bendimester23 starred mosra/magnum
  • Sep 30 16:03
    mosra edited #146
  • Sep 30 13:15
    peiwoli starred mosra/magnum
  • Sep 29 19:02
    Drwalin starred mosra/magnum
  • Sep 29 18:34

    mosra on master

    modules: updated FindMagnum.cma… python: properly test trade.Ima… python: expose trade.MeshData.i… and 2 more (compare)

  • Sep 29 18:22

    mosra on next

    modules: updated FindMagnum.cma… python: properly test trade.Ima… python: expose trade.MeshData.i… and 2 more (compare)

  • Sep 29 17:27
    mljack starred mosra/magnum
  • Sep 28 23:47

    mosra on master

    sceneconverter: missing include… {scene,image}converter: split i… imageconverter: start testing t… and 17 more (compare)

  • Sep 28 23:06

    mosra on next

    {scene,image}converter: split i… imageconverter: start testing t… imageconverter: remove no longe… and 16 more (compare)

  • Sep 28 22:47

    mosra on next

    (compare)

  • Sep 28 22:37

    mosra on next

    {scene,image}converter: split i… imageconverter: start testing t… imageconverter: remove no longe… and 16 more (compare)

  • Sep 28 22:18

    mosra on next

    {scene,image}converter: split i… imageconverter: start testing t… imageconverter: remove no longe… and 16 more (compare)

  • Sep 28 22:06

    mosra on next

    imageconverter: start testing t… imageconverter: remove no longe… imageconverter: reorder all plu… and 15 more (compare)

Vladimír Vondruš
@mosra

_bufferGroup[index]

multiple buffering, right? could it be that, at the time of a blit right after the resize, it takes the source data from a framebuffer that hasn't been rendered to yet (because it got just recreated after a resize)?

Azvf
@Azvf
Is the viewport event async?
Vladimír Vondruš
@mosra
no, everything happens in the same thread
are you multiple buffering? that's the root cause i think
Azvf
@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
Azvf
@Azvf
do you mean clear the source framebuffer
Vladimír Vondruš
@mosra
yes
in the viewport event, right after you attachRenderbuffer()s to it
Azvf
@Azvf
ok
Azvf
@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

Azvf
@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*