Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 02 05:57
    Tapuzi starred mosra/magnum
  • Jul 01 20:08

    mosra on master

    package/ci: use Xcode 11.7 on C… python: adapt to Magnum changes. (compare)

  • Jul 01 19:57

    mosra on master

    Containers: doc++ Utility: don't use <> for intra… Revert "package/ci: temporarily… and 5 more (compare)

  • Jul 01 19:57

    mosra on next

    package/ci: use Xcode 11.7 on C… python: adapt to Magnum changes. (compare)

  • Jul 01 19:56

    mosra on master

    Revert "package/ci: temporarily… package/ci: use Xcode 11.7 on C… package/ci: build on iOS in par… and 1 more (compare)

  • Jul 01 19:48

    mosra on master

    package/ci: use Xcode 11.7 on C… package/ci: build on iOS in par… Adapt to Magnum changes. (compare)

  • Jul 01 19:08

    mosra on next

    Revert "package/ci: temporarily… package/ci: use Xcode 11.7 on C… package/ci: build on iOS in par… and 1 more (compare)

  • Jul 01 19:06

    mosra on next

    package/ci: use Xcode 11.7 on C… package/ci: build on iOS in par… Adapt to Magnum changes. (compare)

  • Jul 01 19:06

    mosra on master

    doc: update imageconverter --in… Revert "package/ci: temporarily… package/ci: Xcode 11.7 is the o… and 2 more (compare)

  • Jul 01 18:23

    mosra on next

    Containers: this operation seem… PluginManager: don't check retu… PluginManager: add a Manager::e… (compare)

  • Jul 01 18:05

    mosra on next

    Containers: doc++ Utility: don't use <> for intra… Revert "package/ci: temporarily… and 5 more (compare)

  • Jul 01 17:36

    mosra on next

    package/ci: Xcode 11.7 is the o… Math: rename BoolVector to BitV… [wip] package/ci: iOS UGH why s… (compare)

  • Jul 01 16:47

    mosra on next

    package/ci: Xcode 11.7 is the o… Math: rename BoolVector to BitV… (compare)

  • Jul 01 16:42

    mosra on next

    doc: update imageconverter --in… Revert "package/ci: temporarily… package/ci: Xcode 11.7 is the o… and 1 more (compare)

  • Jul 01 14:52
    mosra edited #453
  • Jul 01 14:32
    mosra edited #115
  • Jul 01 05:54
    Build #1826 passed
  • Jul 01 04:22
    anwengel starred mosra/magnum
  • Jul 01 02:23
    Wuteva starred mosra/magnum
  • Jun 30 20:14

    mosra on master

    Revert "package/ci: add explici… GltfImporter: fix wrong constan… GltfImporter: minor. and 2 more (compare)

hsdk123
@hsdk123
Seems it had to with adding the launch images or a launch storyboard
Vladimír Vondruš
@mosra
is it possible sdl has some weird / outdated default sizes? iirc (in 2016) i always had to force the size manually somehow to make it fill the screen and be "Retina"
Fo Nz
@FoNz99089892_twitter
@mosra How do I preserve the OpenGL ES Context on Android? Normally, I would destroy the window, but not the context. Then, on resume, I would create a new window and reattach the old context. This resembles the behaviour of setPreserveEGLContextOnPause. Can I do this without some tweaking on Magnum's source?
I don't care if app gets destroyed by the OS while in background. This would happen with any app, anyway.
Vladimír Vondruš
@mosra
i have no idea, honestly
do you use the AndroidApplication or something custom?
as long as you can retrieve and save the context handle (and the corresponding magnum GL context) then it should work
Fo Nz
@FoNz99089892_twitter

do you use the AndroidApplication or something custom?

Yes, I use Magnum's AndroidApplication. I know how to do it. I just wanted to know if it was possible without modifying the Magnum's source, but I think it's necessary. Thanks!

Vladimír Vondruš
@mosra
if you think there's something that i could add to AndroidApplication to make this easier to do externally, feel free to suggest that :)
hsdk123
@hsdk123

android context

https://gist.github.com/hsdk123/ea5b70493cc0923cb48de1bb86c6fbfe
https://gist.github.com/hsdk123/3a392070192bfaa6e97348f6023160d3

I remember having to do the same thing and ended up copying most of the androidapplication class and modifying it. @mosra if you might be able to take this into androidapplication, would be great

hsdk123
@hsdk123

Hey all, I'm using magnum's phong shader, but I'm getting different results on windows/emscripten vs mobile (android, ios).

On Windows / emscripten:

gamen.png
image0 (1).png
I can tell it probably has something to do with lighting, but I'm not sure where to start looking. Any suggestions?
(all running on opengl es)
Fo Nz
@FoNz99089892_twitter

I can tell it probably has something to do with lighting, but I'm not sure where to start looking. Any suggestions?

Try to look at JS console... maybe there is something.

Fo Nz
@FoNz99089892_twitter

I remember having to do the same thing and ended up copying most of the androidapplication class and modifying it. @mosra if you might be able to take this into androidapplication, would be great

This is fine, but you should destroy the old resources, like the GL Surface, when re-creating the new one, otherwise you will result in a memory leak!

Fo Nz
@FoNz99089892_twitter
I have done it! Keep the GL Context in memory on Android is definitely possible! I would borrow the code from @hsdk123 with the eglDestroySurface on the old surface, when the app requires a new surface.
OptimusLime
@OptimusLime
Howdy, long time lurker, I am experiencing some build issues that I've tried to track down for quite a few hours. The issue doesn't appear if I clone magnum into a folder and cmake add_subdirectory(... EXCLUDE_FROM_ALL). However, if I use Cmake "FetchContent" to clone the github repo, then when I build I get a whole bunch of errors like this:
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(53,66): warning C4346: 'Magnum::Math::IsScalar<T>::value': dependent name is not a type [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(53,66): message : prefix with 'typename' to indicate a type [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(53,82): error C2146: syntax error: missing ')' before identifier 'value' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(53,82): error C2365: 'T': redefinition; previous definition was 'template parameter' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(53): message : see  declaration of 'T' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(53,82): error C2061: syntax error: identifier 'value' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(53,19): error C2059: syntax error: ')' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(53,82): error C2146: syntax error: missing ')' before identifier 'min' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(53,82): error C2146: syntax error: missing ';' before identifier 'min' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(53,102): error C2143: syntax error: missing ';' before '{' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(53,102): error C2447: '{': missing function header (old-style formal list?) [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(56,66): warning C4346: 'Magnum::Math::IsScalar<T>::value': dependent name is not a type [C:\Users\paul\coding\neurite\frontiers\scratch\sdlcs_helloworld_multiplatform\plugins\mag-plugin-node-api\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(56,66): message : prefix with 'typename' to indicate a type [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(56,82): error C2146: syntax error: missing ')' before identifier 'value' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(56,82): error C2365: 'T': redefinition; previous definition was 'template parameter' [C:\Users\paul\coding\neurite\frontiers\scratch\sdlcs_helloworld_multiplatform\plugins\mag-plugin-node-api\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(56): message : see declaration of 'T' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(56,82): error C2061: syntax error: identifier 'value' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(56,19): error C2059: syntax error: ')' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(56,82): error C2146: syntax error: missing ')' before identifier 'max' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(56,82): error C2146: syntax error: missing ';' before identifier 'max' [C:\coding\build\plugin-node-api.vcxproj]
FetchContent simply clones into a directory build/_deps/magnum-src and then builds to build/_deps/mangum-build. Nothing special. Any ideas on why this might be happening?
Vladimír Vondruš
@mosra
on line 53 there's a definition of a min() function
so i have a hunch that this has something to do with windows.h and the insane macros there
build with #define NOMINMAX? :)
in all places in magnum where i'm including windows.h i'm defining this, so this is probably due to your code (or a 3rd party lib used by your code) including windows.h without defining NOMINMAX first
OptimusLime
@OptimusLime
I just got back to the computer. Wow, that did it! I can't thank you enough, that was so difficult to track down.
Innokentiy Alaytsev
@Innokentiy-Alaytsev
IMHO, the best solution is to define NOMINMAX globally for the entire project through CMake target property (target_compile_definitions or something). In theory, Magnum could do that the same way and make in PUBLIC. The latter has the downside of being totalitarian.
OptimusLime
@OptimusLime
I did it through "add_compile_definitions(NOMINMAX)" in CMake. Is this a pretty common error case when getting started with Magnum and Windows?
hsdk123
@hsdk123
Hey all, referring back to my question on the phong shader - would anyone know what might be happening?
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