Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 04:29
    nhatson1987 starred mosra/magnum
  • Jan 27 20:01

    mosra on master

    Shaders: add MeshVisualizer TBN… Shaders: minor, but confusing. … Shaders: reduce redundant expre… and 16 more (compare)

  • Jan 27 19:30

    mosra on next

    Shaders: implement object ID te… Shaders: forgot to enable the U… Shaders: more paranoid tests fo… and 2 more (compare)

  • Jan 27 18:49

    mosra on next

    Shaders: add missing MeshVisual… Shaders: add a multidraw MeshVi… Shaders: huh @mosra died mid-se… and 10 more (compare)

  • Jan 27 13:28
    alialhasnawi starred mosra/magnum
  • Jan 27 12:02
    kirin123kirin starred mosra/magnum-singles
  • Jan 27 09:35
    martinekerstedt starred mosra/corrade
  • Jan 27 07:10
  • Jan 27 05:35
    fesoliveira014 starred mosra/magnum-singles
  • Jan 26 14:32
    griels starred mosra/magnum
  • Jan 25 23:15
    Squareys commented #550
  • Jan 25 20:52
    bigbike opened #550
  • Jan 25 17:55

    mosra on next

    doc: minor OCD annoyance. GL: no, not even I know what th… Shaders: implement instancing i… (compare)

  • Jan 25 16:51

    mosra on next

    Shaders: add a multidraw MeshVi… Shaders: huh @mosra died mid-se… Shaders: implement instancing i… and 2 more (compare)

  • Jan 25 15:21

    mosra on master

    Utility: optimize populating la… (compare)

  • Jan 25 15:00
  • Jan 25 15:00
    ajunlonglive starred mosra/magnum
  • Jan 25 14:43
    xiaosz starred mosra/magnum
  • Jan 25 12:56

    mosra on next

    Containers: fix a Doxygen warni… Utility: optimize populating la… (compare)

Vladimír Vondruš
@mosra

Is this a pretty common error case when getting started with Magnum and Windows?

@OptimusLime you'd hit this whenever there's a variable or a function defined min or max anywhere, so i wouldn't say this is specific to Magnum, even the standard <limits> header has issues with this ... so i'd say dealing with NOMINMAX is a common Windows practice? (not a Windows user myself tho)

@hsdk123 sorry, forgot to reply :) i have some ideas:
  • the red window blinds are also a Phong shader? or something different
  • could it be some uninitialized variable that's just lucky to be non-zero on emscripten/desktop but is zero on the phone?
  • what all features do you enable for it? is it textured (is it possible that it's referencing some uninitialized texture)?
  • if you set the ambient color to something non-black, does anything change?
  • if not, does anything change if you set light count to 0?
  • if you enable GL debug output on the (android) phone, do you get any messages / errors? or, in case of iOS, the GL debugger in Xcode?
  • is the ANGLE translation layer involved in this or are you running directly on device GL drivers?
hsdk123
@hsdk123

@mosra

the red window blinds

This is just the clear colour coming through.

angle

On windows it's angle, and then for browser it's emscripten. The windows + emscripten outputs are the same (The model shows with shading). The ios + android outputs are the same (model doesn't show)

I'll try think on the other points!
Jordan Peck
@Auburn
Just to let you know, MSVC 2022 still requires MSVC2019_COMPATIBILITY to compile
Vladimír Vondruš
@mosra
is it out already?
or is it still a preview?
Jordan Peck
@Auburn
Preview 4 just came out, I was testing that
Vladimír Vondruš
@mosra
appveyor/ci#3712 subscribed to this issue, i'll look at it once i can test on AppVeyor
and i guess i'll drop MSVC 2015 then, nobody hopefully uses that anymore :D
Guillaume Jacquemin
@williamjcm

Dunno if it's a Corrade or C++ issue (leaning towards the latter), but I got something weird today.

I have a growable Array containing Pointer<Base>s to take advantage of polymorphism.

I tried doing arrayAppend(array, pointer<Derived>(args)), but the compiler rejected it.

However, Pointer<Base> p = pointer<Derived>(args) followed by arrayAppend(array, p) is fine.

Vladimír Vondruš
@mosra
and i suppose arrayAppend with InPlaceInit works, right?
Guillaume Jacquemin
@williamjcm
It's a possibility, but I forgot to try it.
Vladimír Vondruš
@mosra
i hit this a few times myself as well, it boils down to a conflict in template type
the signature should be arrayAppend(Array<T>&, const std::common_type<T>::type&) instead of arrayAppend(Array<T>&, const T&) and then it would work i think
Guillaume Jacquemin
@williamjcm

and i suppose arrayAppend with InPlaceInit works, right?

Yup.

Vladimír Vondruš
@mosra
i am useless today anyway, so i could as well just go and fix that
Guillaume Jacquemin
@williamjcm
Ah, I just saw you finally implemented your own Pair type. :)
Been a while since I last took a glance at the sidebar in Gitter.
Vladimír Vondruš
@mosra
and a Triple :D
Pair is there for quite a while, Triple since now
i hope i'll never need a Quadruple
mosra/corrade@34a53fa should be the fix
once the CI gods approve
Guillaume Jacquemin
@williamjcm
It'll give me an excuse to upgrade my current project's dependencies.
Vladimír Vondruš
@mosra
i guess i could do also arrayInsert() and arrayRemove() while at it
Guillaume Jacquemin
@williamjcm
I haven't updated Corrade or Magnum since I added them as submodules in early June.
At the same time, I haven't really needed any of the new stuff.
Guillaume Jacquemin
@williamjcm

i guess i could do also arrayInsert() and arrayRemove() while at it

Now that I think about it, while I won't need arrayInsert(), arrayRemove() will be useful.

While I could do std::remove_if() combined with arrayRemoveSuffix(), it's a bit too long just to remove single elements.

Jamil Halabi
@jay3d
Installing magnum on linux with vcpkg is failing
CMake Error at scripts/cmake/vcpkg_from_github.cmake:164 (message):
  Failed to parse API response from '':



  {

    "ref": "refs/heads/master",
    "node_id": "MDM6UmVmMjg2MzkwOTpyZWZzL2hlYWRzL21hc3Rlcg==",
    "url": "https://api.github.com/repos/mosra/corrade/git/refs/heads/master",
    "object": {
      "sha": "34a53fab11928765f5fb2704b5653769a20b63a5",
      "type": "commit",
      "url": "https://api.github.com/repos/mosra/corrade/git/commits/34a53fab11928765f5fb2704b5653769a20b63a5"
    }

  }



Call Stack (most recent call first):
  ports/corrade/portfile.cmake:1 (vcpkg_from_github)
  scripts/ports.cmake:140 (include)
Vladimír Vondruš
@mosra
errrrr
doesn't sound like my problem, tho
Jamil Halabi
@jay3d
Yes I think it's a problem getting head packages from vcpkg on linux
Vladimír Vondruš
@mosra
from 19th August, lol
microsoft/vcpkg#19657 seems to be a candidate for a fix and/or introducing other bugs
Vladimír Vondruš
@mosra
where is the dumpster fire emoji
Jamil Halabi
@jay3d
How to download this as a patch again :P
Ah just add .patch
Jamil Halabi
@jay3d
Nice! works
Fo Nz
@FoNz99089892_twitter

image0 (1).png

I think I encountered this same exact problem. I had a mesh, where Phong shader didn't work correctly. PART OF MESH appeared all white, but only on ES, not on Desktop. This was strange. The culprit was the model, whose local coordinates didn't match transformations in global coordinates (as I saw in Blender).

Vladimír Vondruš
@mosra
but how would that manifest only on ES?
Fo Nz
@FoNz99089892_twitter

image.png

This is how I was seeing my mesh in ES. After I fixed my mesh in Blender, it rendered correctly with Phong shader.

This mesh was downloaded from internet. Then I changed it a bit, but basically it was made by someone else.

but how would that manifest only on ES?

I really don't know...

When I say ES, I mean OpenGL ES!!! NOT EcmaScript!!!!
Vladimír Vondruš
@mosra
yeah i get you ;)
no idea, the only possibility is something related to floating point, a NaN that propagates differently on mobile drivers, or an (ES-specific) shader precision causing normals to explode?