Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 13:39
    joao-miguel27 starred mosra/toolchains
  • 09:02
    mosra edited #453
  • 08:47
    Squareys commented #102
  • 08:46
    Squareys commented #102
  • 07:44
    TylerSeppala opened #102
  • Jan 18 20:43

    mosra on next

    MeshTools: add a flag to toggle… MeshTools: test removeDuplicate… MeshTools: unconditionally repa… (compare)

  • Jan 18 20:32

    mosra on next

    MeshTools: add a flag to toggle… MeshTools: test removeDuplicate… MeshTools: unconditionally repa… (compare)

  • Jan 18 20:26

    mosra on next

    MeshTools: document what interl… doc: yep, this order is wrong. … MeshTools: don't put const on a… and 6 more (compare)

  • Jan 18 20:25
    skaman starred mosra/magnum
  • Jan 18 15:57
    Malstraem starred mosra/magnum
  • Jan 18 13:22

    mosra on master

    package/ci: GitHub says I can't… package/ci: drop Gitter webhook… package/ci: reduce parallelism … and 25 more (compare)

  • Jan 18 11:05

    mosra on next

    Trade: this comment no longer m… doc: ew, a std::vector! Funny … MeshTools: doc++ and 2 more (compare)

  • Jan 18 10:16
    mosra edited #548
  • Jan 18 09:55
    mosra opened #548
  • Jan 18 06:20
    sw1520 starred mosra/magnum-plugins
  • Jan 18 06:05
    Thunraz starred mosra/magnum
  • Jan 18 01:54
    sliechti starred mosra/magnum
  • Jan 17 21:26
    Build #1596 passed
  • Jan 17 18:25
    mosra edited #306
  • Jan 17 18:24
    mosra edited #306
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.
It'll only show the Magnum way of using a custom shader, though, so if you need help writing the actual shader code, there are other resources for that.
Hans Loeblich
@thehans
ok, I'll review that one, thanks. 2nd question, just curious is there a list of projects which use Magnum?
I think i've got the GLSL aspect of it covered, no worries.
Guillaume Jacquemin
@williamjcm

2nd question, just curious is there a list of projects which use Magnum?

I don't remember seeing one of these on the website itself, but the blog post announcing the 2020.06 release mentions a few of them, and other posts might mention more.

Vladimír Vondruš
@mosra

@alkavan how did you add the vertex buffer to the mesh? how are the attributes set up? for example, if the mesh would expect a position and a normal (for whatever reasons) for every vertex but you specify just positions, then it ends up looking at just half of the points

the BufferUsage has nothing to do with this, it's merely a suggestion to the driver where to best put the memory

Igal Alkon
@alkavan
@mosra I already found the issue, kind of stupid. It all worked actually, the issue was I also have a wireframe grid, at y=0.0 and the other lines I added were exactly where grid is and so I didn't see them :)
Vladimír Vondruš
@mosra
ahah :)

@thehans out of the public projects, there's also habitat-sim, and you can find various projects under the #magnum topic on github: https://github.com/topics/magnum

The overall organization of the docs is very confusing to me.

do you have an idea how it could be improved? regular users get blind to the deficiencies over time, so fresh ideas are always welcome :)

11 replies
Igal Alkon
@alkavan

btw, something just a little annoying, CLion (Clang-Tidy) inspection produce a warning on:

_mesh.setCount(_lines.size());
// Clang-Tidy: Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long') to signed type 'Magnum::Int' (aka 'int') is implementation-defined

I can do Magnum::Int(_lines.size()), this part if I'm not wrong taken from an example, this how I should do it?

Vladimír Vondruš
@mosra
clang tidy is a bit overmotivated, i'd say
the relevant GL API takes a (signed) int, and if i'd make setCount(std::size_t), then it would complain if passing an int to it again
Guillaume Jacquemin
@williamjcm
Today, I learnt Magnum types such as Color4 or Vector3 were trivially copyable, and thus made one of my struct types trivially copyable as well.
Fo Nz
@FoNz99089892_twitter

Today, I learnt Magnum types such as Color4 or Vector3 were trivially copyable, and thus made one of my struct types trivially copyable as well.

As I saw, basically they have a data method where it returns the base address for the internal array. I think you can just memcpy them.

Jordan Peck
@Auburn
@mosra I've updated my Nvidia drivers to latest version on Windows and I'm now having an issue with ImGui not correctly handling alpha
image.png
ImGui is rendering a fullscreen quad with this color data
I'm sure it is caused by the driver update, since a user was having the issue on the latest driver. So I updated then I had the same issue
Fo Nz
@FoNz99089892_twitter
I'm trying to use AnySceneImporter on iOS, but when it's loaded by the PluginManager, the application says that the plugin is not present. I can see the library being statically linked into my Xcode project. I all the dependencies by myself. What's the error? Any idea? Thanks in advance.
Jordan Peck
@Auburn
I found a fix by changing ImGui window flags, seems odd though that a driver update would cause the behaviour to change? I would have thought OpenGL doesn't get touched much these days
Vladimír Vondruš
@mosra
@Auburn what was the flag that fixed it? all i can think of is the new driver not clearing framebuffer attachments by default (or vice versa) so you end up with something different if you forgot to clear explicitly

@FoNz99089892_twitter if you're not using CMake to link the static plugins, you have to perform an additional step to register them for the plugin manager, basically the following in a file that's compiled directly to the final executable (and not any intermediate static library):

#include <MagnumPlugins/AnySceneImporter/importStaticPlugin.cpp>

Relevant docs: https://doc.magnum.graphics/magnum/plugins.html#plugins-static

Fo Nz
@FoNz99089892_twitter
@mosra Thanks a lot! I completely missed that.
Jordan Peck
@Auburn
@mosra It was this flag for a dock node, which in turn sets the fullscreen imgui window flag ImGuiWindowFlags_NoBackground https://github.com/Auburn/FastNoise2/commit/732577d86dbdf7f79de949b86c3ef3589ba82699#diff-13f4704b60755926950ac5d2b0ca1e4850f8a69d0a51ebc2cce9418b8dfefa95L550
if (dockspace_flags & ImGuiDockNodeFlags_PassthruCentralNode) host_window_flags |= ImGuiWindowFlags_NoBackground;
Which makes me wonder how it was working before...
Jordan Peck
@Auburn
Linux and MacOS are fine without the fix, but it seems like that behaviour is wrong
Jordan Peck
@Auburn
image.png
With the fix
image.png
Without
My only guess is that there was something in driver hiding the fullscreen quad previously