by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Janos95
@Janos95_gitlab
I think for imgui you will need a cmake find script
dong
@dongfangliu
how do you guys solve this problem
Janos95
@Janos95_gitlab
you can copy this file
to your project
then in your cmakelist file you need to append the path where you have put the find script to you CMAKE_MODULE_PATH
somethin like list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/modules) if you put the find script into a folder called modules
dong
@dongfangliu
i do have this file in my project and adds it as modules, but the error remains
Janos95
@Janos95_gitlab
have you set IMGUI_DIR (the same way you did when configuring magnum-integration)?
dong
@dongfangliu
wooo, that works. i should set that before find magnum
i shall tests more and report the result later
thank you all
dong
@dongfangliu
ok, a short summay, install with dpkg -i ../magnum-integration*.deb and set the IMGUI_DIR before find(magnum) in our own project
that should work in project configuration and generation, not tested on compilation yet
also the IMGUI_DIR should also be specified in the debian/rules
thanks @linuxaged @Janos95_gitlab
Janos95
@Janos95_gitlab
no problem :)
Tracy Ma
@linuxaged
when you have time should give vcpkg a try, seriously
dong
@dongfangliu
hahaha, yes, that's really appealing
dong
@dongfangliu
now tested compilation, also works
Tracy Ma
@linuxaged
@mosra i have quantized the vertices(position,normal) and rendered correctly. addVertexBuffer(std::move(vbuffer), 0, Phong::Position{Phong::Position::DataType::HalfFloat}, Phong::Normal{Phong::Normal::DataType::HalfFloat})
it's common to quantize normals using 3 8-bit integers but you can use higher-precision quantization (for example using 10 bits per component in a 10_10_10_2 format),
i want to go a step further, so how to deal with 10_10_10_2 format?
Tracy Ma
@linuxaged
which kind of Phong::Normal::DataType should i choose?
Guillaume Jacquemin
@williamjcm
There's Int2101010Rev and an UnsignedInt2101010Rev variant, so, one of them, I think.
Tracy Ma
@linuxaged
why it's not available E0135 enum "Magnum::GL::Implementation::Attribute<Magnum::Math::Vector<3U, Magnum::Float>>::DataType" has no member "UnsignedInt2101010Rev"
Guillaume Jacquemin
@williamjcm
It's only on GL 3.3+ (with an extension), GLES 3.0+, and WebGL 2.
Tracy Ma
@linuxaged
oh, i know Only for four-component float vector attribute type.
Guillaume Jacquemin
@williamjcm
Oh, yeah, that too.
Tracy Ma
@linuxaged
my normal is a vector3
Vladimír Vondruš
@mosra
@linuxaged this looks like some unfortunate omission, it should be exposed for three-component vectors as well, sorry about that .. you could work around this by using a DynamicAttribute instead, that one doesn't have such restrictions i hope
hsdk123
@hsdk123

Hi, I'm currently looking into importing gltf files and I've come across this example:

https://github.com/mosra/magnum-examples/blob/master/src/viewer/ViewerExample.cpp#L249

Is using Object3D the recommended route for displaying objects with magnum?

I also wasn't sure why there were a bunch of new allocations happening without deletes, or why not unique_ptrs, etc.

Vladimír Vondruš
@mosra
you can (but don't have to) use the SceneGraph lib, most of the examples use it and i think it has a good tradeoff between flexibility and usability
hsdk123
@hsdk123

Gotcha, just for reference, I think from a user perspective the example would have been a lot more understandable with the

Object3D& first = scene.addChild<Object3D>();

notation instead (...)

Vladimír Vondruš
@mosra
yeah, i could switch all the code to use these instead
reason is these were added not so long ago, all existing code already used naked new, and i didn't bother updating
hsdk123
@hsdk123
Ah, gotcha. Switching though would be nice! Especially the parts that just 'new' and don't seem to set any variable, it just seems extremely foreign
Vladimír Vondruš
@mosra
:+1: throwing that on the pile of TODOs, then
btw., you switched from 2D to 3D nowadays? :)
hsdk123
@hsdk123
Thought I'd start mixing the two : )
Oh btw, I've started releasing the official magnum port for the thing that I showed before - if you need another project to showcase some time coming up, feel free to let me know
Vladimír Vondruš
@mosra
it's ... this thing, right? https://lightvn.net/
i'll add it to my list so i don't forget and ping you when i get to doing another release
hsdk123
@hsdk123
Yup! Sounds good
pezcode
@pezcode
re: addFeature: this requires my Drawable/Animable to take AbstractObject& as its first constructor parameter, right?

how do I get a AbstractTranslation3D out of AbstractObject? I've tried:

transformation(static_cast<Magnum::SceneGraph::Object<Transform>&>(abstractObject))

but I'm getting:

error C2440: 'initializing': cannot convert from 'Magnum::SceneGraph::AbstractObject<3,Magnum::Float>' to 'Magnum::SceneGraph::AbstractTranslationRotation3D &'

I'm a little lost in the class hierarchies
... ignore that, the error message was more than obvious :laughing: I had the code twice and forgot to change it in one place