Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 05 23:28
    danieloff starred mosra/magnum
  • Dec 05 21:57
    mosra synchronize #525
  • Dec 05 21:57

    mosra on scenedata

    package/ci: F how does it happe… (compare)

  • Dec 05 21:50

    mosra on scenedata

    AssimpImporter: port tests to t… [wip] package/ci: use Magnum's … [wip] PrimitiveImporter: MSVC 2… (compare)

  • Dec 05 21:47

    mosra on master

    Containers: these new inlines c… (compare)

  • Dec 05 21:46

    mosra on master

    doc: rename DOXYGEN_IGNORE() to… Containers: these new inlines c… (compare)

  • Dec 05 21:32
    mosra synchronize #525
  • Dec 05 21:32

    mosra on scenedata

    Trade: initial redesign of the … Trade: add SceneField string ma… Trade: MSVC 2017, what are you … and 40 more (compare)

  • Dec 05 21:27

    mosra on master

    doc: finally fix all those anno… Math: fix Clang "unused but set… Test: resolve some TODOs now th… and 4 more (compare)

  • Dec 05 20:41

    mosra on scenedata

    package/ci: use Xcode 10.3 imag… DartIntegration: port to the ne… [wip] package/ci: use Magnum sc… (compare)

  • Dec 05 20:36

    mosra on scenedata

    viewer: port to the new SceneDa… package/ci: doc++ [wip] package/ci: use Magnum's … (compare)

  • Dec 05 20:34

    mosra on scenedata

    DartIntegration: port to the ne… [wip] package/ci: use Magnum sc… (compare)

  • Dec 05 20:26
    Build #1552 passed
  • Dec 05 20:20

    mosra on master

    doc: rename DOXYGEN_IGNORE() to… doc: dividing integers wasn't t… (compare)

  • Dec 05 17:44

    mosra on next

    Test: resolve some TODOs now th… Test: wait, Mac, what the heck … GL: fix EXT_color_buffer_half_f… and 2 more (compare)

  • Dec 05 16:11
    Build #3606 passed
  • Dec 05 15:41

    mosra on master

    showcase: update gl-info-webgl2… (compare)

  • Dec 05 15:31

    mosra on next

    Test: resolve some TODOs now th… GL: fix EXT_color_buffer_half_f… (compare)

  • Dec 05 14:40

    mosra on master

    AssimpImporter: reorder functio… AssimpImporter: add proper test… AssimpImporter: add a test for … and 3 more (compare)

  • Dec 05 14:23

    mosra on next

    Trade: forgotten forward declar… doc: updated changelog. doc: rename DOXYGEN_IGNORE() to… and 2 more (compare)

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 :)
hsdk123
@hsdk123
No problem, I'm sorry I couldn't clean up the code more
Vladimír Vondruš
@mosra
how does it look if you use One / OneMinusSourceAlpha for both RGB and Alpha?
hsdk123
@hsdk123
image.png
Bright white
Jordan Peck
@Auburn
WSL2 has hardware accelerated GUI support in Windows 11 :O
Guillaume Jacquemin
@williamjcm
I'm personally not too thrilled about Windows 11, to be honest.
By the time Windows 10 goes out of support, I'm sure Linux will run pretty much everything I run on Windows, either natively or through Wine/Proton.
Vladimír Vondruš
@mosra
@hsdk123 sorry, had to leave early yesterday .. this looks closer to the ideal, what's special about the bottom row that it gets treated differently? can you also try SourceAlpha / OneMinusSourceAlpha?
Fo Nz
@FoNz99089892_twitter

image.png

This could be a blending function mistake. It happened to me. If you are working on 2D (for GUI, to say...), disable depth test and clear on RGB channels.

hsdk123
@hsdk123

@mosra

what's special about the bottom row

The bottom row, for both images, is semi-transparent. I think that's what's causing it

hsdk123
@hsdk123
image.png
SourceAlpha / OneMinusSourceAlpha
@FoNz99089892_twitter
I was so hoping disabling depth test would work, but sadly it didn't. Any other ideas?
hsdk123
@hsdk123
@mosra
I'm using One Zero to overlay the first texture on to the frame buffer - would this be incorrect?
Vladimír Vondruš
@mosra
i have no better suggestion than loading the two textures in https://www.andersriggelsen.dk/glblendfunc.php and doing trial&error until it does the right thing
Igal Alkon
@alkavan

I'm having some trouble drawing multiple lines in 3D space. In Drawable3D::draw() have this:

_buffer.setData(_lines, GL::BufferUsage::StreamDraw);
_mesh.setCount(_lines.size());

I added 4 points to the _lines vector, but only two (one line) is drawn. GL::BufferUsage::StreamDraw is not the way?

Hans Loeblich
@thehans
Is there documentation on how to get started with a user-defined shader? I think I was reading such a page the other day, but can't find it now. The overall organization of the docs is very confusing to me.
Guillaume Jacquemin
@williamjcm
IMO, the best documentation is the textured triangle example.