Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 00:53
    yongwangzhao88 starred mosra/magnum-examples
  • Oct 15 22:47
    Build #3513 passed
  • Oct 15 20:28
    mosra commented #110
  • Oct 15 20:03

    mosra on master

    KtxImporter: doc++ (compare)

  • Oct 15 20:00

    mosra on master

    doc: mention new KTX and glTF p… (compare)

  • Oct 15 19:49

    mosra on master

    Doc++ (compare)

  • Oct 15 19:46
    mosra labeled #107
  • Oct 15 19:45
    mosra closed #107
  • Oct 15 19:45

    mosra on master

    CgltfImporter: new plugin CgltfImporter: add bundled cglt… external: clean up trailing whi… and 6 more (compare)

  • Oct 15 19:32
    mosra edited #240
  • Oct 15 19:31
    mosra edited #240
  • Oct 15 19:29
    mosra edited #240
  • Oct 15 19:26
    mosra edited #240
  • Oct 15 18:36
    mosra commented #107
  • Oct 15 18:05
    pezcode commented #110
  • Oct 15 15:35
    mosra commented #110
  • Oct 15 12:03
    codecov[bot] commented #107
  • Oct 15 12:01
    codecov[bot] commented #107
  • Oct 15 11:59
    codecov[bot] commented #107
  • Oct 15 11:56
    codecov[bot] commented #107
Guillaume Jacquemin
@williamjcm
I moved them out, and the same error happens.
:thinking:
Oh, well, I should sleep, it's already 00:41 here.
Guillaume Jacquemin
@williamjcm
Okay, got it fixed.
For some reason, I had to switch to the DefaultInit constructor for those arrays that contained structures.
Guillaume Jacquemin
@williamjcm
After more testing, looks like it was a compiler bug or similar.
Now I'm back to normal argument-less constructors, and it works.
I'm stumped.
Fo Nz
@FoNz99089892_twitter
I think docs for iOS should node that it's better for CMAKE_OSX_DEPLOYMENT_TARGET to be set, along with 64-bit-only architectures (arm64) for iOS 11 and beyond.
Fo Nz
@FoNz99089892_twitter
I cannot get corrade-rc to be compiled on MacOS. Why? The same arguments work for Windows and Android, but not for iOS!
1 reply
Vladimír Vondruš
@mosra
what error do you get?
Mathew
@lectroMathew
If I extract some of the magnum classes to my project and change them in one way or another, should leave the license text there or not?
pezcode
@pezcode

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

I'm not a lawyer, but modifying code probably still qualifies as a 'substantial portion'

Vladimír Vondruš
@mosra
all examples are in public domain, so you can do whatever you want with them, but for magnum code itself you have to keep the license, yes
curious -- what do you need to change there?
Vladimír Vondruš
@mosra
image.png
apparently CircleCI deployed a broken update on Sunday evening US time and they didn't wake up yet to discover the breakage :D
Vladimír Vondruš
@mosra
Mathew
@lectroMathew

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

I'm not a lawyer, but modifying code probably still qualifies as a 'substantial portion'

Yes that's what I thought as well, but then again having non-original software saying that it is an original software seemed iffy to me, so had to make sure :) I'm also not a lawyer ykno

curious -- what do you need to change there?

Just some changes here and there, renaming and general refactoring to better suit the project

Vladimír Vondruš
@mosra
renaming :eyes:
from my experience it was usually easier to try to upstream the changes instead of maintaining a modified copy, upgrades are less painful that way
Mathew
@lectroMathew

from my experience it was usually easier to try to upstream the changes instead of maintaining a modified copy, upgrades are less painful that way

Oh I ceratainly do believe it's less painful, but magnum's Application class is a bit too monolithic for my needs, so I wanted to take it apart into smaller pieces

Vladimír Vondruš
@mosra
ah, haha, yeah that's true .. though i don't really see a way to break it apart while keeping it easy to switch between SDL/GLFW/... on different platforms
Mathew
@lectroMathew
true, I didn't either so decided to just stick with SDL
Vladimír Vondruš
@mosra

FYI recent Magnum update tightened assertions on Quaternion::fromMatrix(), which requires the matrix to be a proper rotation (before it allowed reflections, but resulted in broken output): mosra/magnum@3697125

if your code starts failing on this new assert and you think it shouldn't, please let me know :)

Fo Nz
@FoNz99089892_twitter

what error do you get?

My bad. I was expecting corrade-rc while compiling for iOS. Excuse me.

Jean-Marie Baran
@Jim-Bar
Hi there, quick question. Do we agree that if I want to do shadow mapping I must drop the PhongGL shader altogether and write my own? Kind of newb on all this shader stuff
pezcode
@pezcode

Hi there, quick question. Do we agree that if I want to do shadow mapping I must drop the PhongGL shader altogether and write my own? Kind of newb on all this shader stuff

Yeah, the shader that calculates lighting needs access to the shadow maps, and PhongGL has no built-in shadow map support.

The shadow mapping example might help you get started:
https://doc.magnum.graphics/magnum/examples-shadows.html
Jean-Marie Baran
@Jim-Bar
Okay, thanks for your answer
hsdk123
@hsdk123
image.png

Hi all, I'm attempting to overlay 2 textures to create 1 texture through the frame buffer.
The result in an image program is the above,
while the frame buffer overlay method I'm using is the below.

I wasn't sure why I'm getting the difference, would anyone understand?

face.png
base.png
(overlay face on base)
I'm using alpha blending when overlaying the textures
Vladimír Vondruš
@mosra
alpha blending is always a trial&error for me :sweat_smile:
what is your clear color set to?
the greyish background above indicates transparency? or is it really just grey
hsdk123
@hsdk123
The grey colour's just the clear colour for the window
The frame buffer that I'm rendering the 2 textures to clears with (0,0,0,0)
Vladimír Vondruš
@mosra
hm there was this neat online tool for figuring out alpha modes somewhere, let me find it
hsdk123
@hsdk123

https://gist.github.com/hsdk123/7f66ecf92d8f51ffaa3e4ac241d4682f

Here's a copy of my code if it shows anything

Vladimír Vondruš
@mosra
are you setting Renderer::setBlendFunction somewhere? i can't see that
what is documented there is one way, you might need some other way depending on whether the images have premultiplied alpha or not, and the tool could help figure out the parameters
hsdk123
@hsdk123
Yeah, it's in
void lvn::CRenderMgr::ApplyBlendMode(const BlendMode& new_mode)
{
    using namespace Magnum;
    static bool init = false;
    static BlendMode cache = BlendMode::BlendAlpha;

    if (!init) {
        GL::Renderer::enable(GL::Renderer::Feature::Blending);
    }
    if (!init || cache != new_mode) {
        GL::Renderer::setBlendFunction(
            static_cast<GL::Renderer::BlendFunction>(new_mode.rgbSrcFactor),
            static_cast<GL::Renderer::BlendFunction>(new_mode.rgbDstFactor),
            static_cast<GL::Renderer::BlendFunction>(new_mode.alphaSrcFactor),
            static_cast<GL::Renderer::BlendFunction>(new_mode.alphaDstFactor)
        );
        GL::Renderer::setBlendEquation(
            static_cast<GL::Renderer::BlendEquation>(new_mode.rgbEquation),
            static_cast<GL::Renderer::BlendEquation>(new_mode.alphaEquation)
        );

        cache = new_mode;
    }

    init = true;
}
Vladimír Vondruš
@mosra
ah i see, sorry, did a lazy search and it didn't find Renderer .. now i see it :)