Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 13:40

    mosra on master

    Math: adapt to changes in Corra… SceneTools: add a note why std:… Shaders: don't use std::pair he… and 3 more (compare)

  • 13:22

    mosra on next

    Containers: take raw pointers i… Containers: add a debug perf TO… Containers: take raw arrays ins… (compare)

  • 12:50

    mosra on next

    Containers: rename StridedBitAr… Containers: doc++ Containers: added "updimensioni… and 9 more (compare)

  • 12:16

    mosra on next

    Containers: as usual, finding d… Containers: advertise sliceBit(… Containers: pass Strided*ArrayV… and 11 more (compare)

  • 12:04
    mosra commented #21
  • 12:03
    mosra commented #21
  • 11:57
    mosra commented #21
  • 04:33
    pmp-p commented #21
  • Feb 02 22:12

    mosra on next

    Math: adapt to changes in Corra… SceneTools: add a note why std:… Shaders: don't use std::pair he… and 3 more (compare)

  • Feb 02 17:24
    Adeon18 starred mosra/magnum
  • Feb 02 15:20
    gabriel-v edited #21
  • Feb 02 14:19
    gabriel-v edited #21
  • Feb 02 14:06
    gabriel-v edited #21
  • Feb 02 13:50
    gabriel-v opened #21
  • Feb 02 11:32

    mosra on master

    Containers: unify default *View… Containers: unify tests for nul… Containers: group StridedArrayV… and 40 more (compare)

  • Feb 02 01:57

    mosra on next

    Utility: ability to parse/retri… Utility: reorder test to a bett… Utility: add Json::commonArrayT… and 4 more (compare)

  • Feb 02 01:05

    mosra on next

    Containers: add StridedArrayVie… Containers: expand a comment so… Containers: minor. and 11 more (compare)

  • Feb 01 23:01

    mosra on master

    Animation: indent the Easing na… Animation: make Easing a templa… Animation: be less strict about… and 2 more (compare)

  • Feb 01 21:45

    mosra on next

    Animation: make Easing a templa… Animation: be less strict about… doc: regenerate SVGs for Animat… and 1 more (compare)

  • Feb 01 20:30

    mosra on next

    Animation: be less strict about… package/ci: reduce parallelism … (compare)

Vladimír Vondruš
@mosra
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
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
@Azvf oh, glad to hear that :) so the original code caused a GL error or something like that?
Visage
@Azvf
There's no assert or anything, from what i saw just when the 2 rectangles' sizes are not the exactly same, the blit function just won't execute the blit process.
static void Magnum::GL::AbstractFramebuffer::blit(AbstractFramebuffer& source, AbstractFramebuffer& destination, const Range2Di& sourceRectangle, const Range2Di& destinationRectangle, FramebufferBlitMask mask, FramebufferBlitFilter filter)
Vladimír Vondruš
@mosra

There's no assert or anything

it'd give an OpenGL error (which is not checked by Magnum by default because it'd be too slow), you only see it if you run with --magnum-gpu-validation on passed on the command line or if you check GL::Renderer::error()

... and the error seems to be this, according to the spec:

GL_INVALID_OPERATION is generated if the value of GL_SAMPLE_BUFFERS for both read and draw buffers is greater than zero and the dimensions of the source and destination rectangles is not identical.

Visage
@Azvf
there's some other info printing at the time, guess I missed that. Noticed now, thank you for the explaination.
Guillaume Jacquemin
@williamjcm
Welp, today I learnt Tweakable doesn't work with hex literals:
Utility::TweakableParser: 0x9F00A5FF has an unexpected suffix, expected u
Utility::Tweakable::update(): change of CORRADE_TWEAKABLE(0x9F00A5FF) in ../../../src/SaveTool/SaveTool_MassViewer.cpp:645 requested a recompile
Vladimír Vondruš
@mosra
huh
it does
but you have to use 0x9F00A5FFu
Guillaume Jacquemin
@williamjcm
Ah.
Vladimír Vondruš
@mosra
i assume it was an unsigned integer before?
there's this restriction where you have to stay at exactly the same type otherwise if you'd save and recompile it could lead to a completely different code (for example due to different function overloads chosen etc)
Guillaume Jacquemin
@williamjcm

i assume it was an unsigned integer before?

Yeah.

An ImU32, to be accurate.
Vladimír Vondruš
@mosra
image.png
(thank you @pezcode for the new plugin!)
Guillaume Jacquemin
@williamjcm
Damn, that's quite an improvement.
Vladimír Vondruš
@mosra
it can be even less once openMemory() is a thing
basically, instead of copying everything into some internal representation (like ass imp, like tinygltf) it operates directly on the passed data
so, theoretically, if i would memory-map the file and load it using openMemory() (which only adds a guarantee that the memory doesn't go out of scope so the importer doesn't need to make a copy), then the physical memory usage could be just 370 kB also for the glb case
pezcode
@pezcode
what does ownership transfer mean there?
the memory mapping?
Vladimír Vondruš
@mosra
(i wanted to commit this 3 hours ago but got stuck somewhere else)
it's just about the initial copy not happening in doOpenData()
it took me quite a while to figure out an API that wouldn't require every plugin to implement two or three different variants doOpenData() based on what's passed in
Mathew
@lectroMathew
wow, what a boost!
On the other hand, assimp never fails to surprise in a bad way, I assume it's by design that they copy all data, what a failure of a design tho
Vladimír Vondruš
@mosra
it processes the data into their own internal structures, which ultimately means it gets inflated to a much bigger size than it was originally
but it got designed back in the day when people thought storing meshes in text files is fine, so i can't really blame it
Mathew
@lectroMathew
There are 59 values in Magnum::PixelFormat, do I have to check for each of them when importing textures, so that I can match GL::TextureFormat, when working with AnySceneImporter and assimp?
Vladimír Vondruš
@mosra
@lectroMathew GL::textureFormat(Magnum::PixelFormat) is what you want to use :)
Mathew
@lectroMathew

I don't think if (_lightCount) checks in PhongGL::bind*Texture like here are necessary, since right now setups like this:

    shader.bindDiffuseTexture(texture);

and

    shader.bindTextures(nullptr, texture, nullptr, nullptr);

produce different results

Also no idea why this check didn't pass, even tho I do have lights in my scene
Just spent unforgivable amount of time trying to understand why no texture were drawn

@lectroMathew GL::textureFormat(Magnum::PixelFormat) is what you want to use :)

Oh well, probably should've read the docs more carefully before writing my own copy of this. Thanks

Vladimír Vondruš
@mosra
is it possible that you have an ambient texture enabled as well? that way bindTextures() will not assert
although i gotta admit that's a bit shitty, yes