Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 05:50
    Marravillas starred mosra/magnum
  • Apr 04 21:19
  • Apr 04 19:52
    mosra edited #411
  • Apr 04 19:47

    mosra on next

    TinyGltfImporter: support per-v… StanfordImporter: tighten attri… (compare)

  • Apr 04 19:30

    mosra on master

    GL: fix compilation with ANGLE … GL: state reset needs to unbind… (compare)

  • Apr 04 18:47

    mosra on next

    GL: state reset needs to unbind… (compare)

  • Apr 04 18:28

    mosra on base-qt

    Add an EnterExternal also at th… (compare)

  • Apr 04 18:24

    mosra on next

    Math: I'm extremely stupid late… GL: fix compilation with ANGLE … GL: state reset needs to unbind… (compare)

  • Apr 04 17:28
    mosra commented #82
  • Apr 04 16:58
    xqms commented #82
  • Apr 04 16:36
    mosra labeled #82
  • Apr 04 16:36
    mosra commented #82
  • Apr 04 14:34

    mosra on next

    AssimpImporter: preserve transf… AssimpImporter: minor. doc: updated changelog. (compare)

  • Apr 04 12:00
    mosra commented #82
  • Apr 04 08:02
  • Apr 04 04:21
    ALMaclaine starred mosra/magnum
  • Apr 04 04:20
    ALMaclaine starred mosra/magnum-plugins
  • Apr 04 00:55
    Jsvcycling starred mosra/magnum
  • Apr 04 00:24
    Jsvcycling starred mosra/magnum
ryzhikovas
@ryzhikovas
And with this line my original project works too, rendering after resize is correct :)
hsdk123
@hsdk123
Screen Shot 2020-04-04 at 2.10.25 PM.png
Screen Shot 2020-04-04 at 2.13.17 PM.png
Putting the dylib issues aside for the moment, the top ss is when I'm using opengl es with angle and the bottom is when I'm using opengl.
Does anyone know what might be causing the difference?

I see

window: Vector(1280, 720) framebuffer: Vector(2560, 1440)

for both cases

Vladimír Vondruš
@mosra
is this angle on top of metal?
i don't remember how you fixed the original scaling issue :)
@ryzhikovas fix pushed as mosra/magnum@3c5e42b, will appear in master once the CIs get sufficiently green :)
Vladimír Vondruš
@mosra
to be clear, with this change you shouldn't need to do anything extra in your code, however you might want to add one EnterExternal also right at the end of initializeGL, just to be safe (i updated the bootstrap project to do this also)
hsdk123
@hsdk123
@mosra It's angle on top of opengl (haven't tried metal yet).
Before it was just because I wasn't giving the proper matrix to draw the render texture to the screen
(it wasn't taking into account that the default framebuffer size can change)
ryzhikovas
@ryzhikovas
Vladimír, thanks for your help and this library!
Vladimír Vondruš
@mosra
you're welcome :)
hmm of course i messed up, another try
@hsdk123 just to rule out the silly issues: you don't have any code depending on the MAGNUM_TARGET_GLES define, right?
hsdk123
@hsdk123
@mosra Nope, I'm trying to rule out defines as much as I can right now
Vladimír Vondruš
@mosra
are you on 10.15 now? or still 10.14
hsdk123
@hsdk123
10.14 still
Vladimír Vondruš
@mosra
there isn't anything done differently for ES on magnum side, so it has to be something in your app
(most probably not, but) it could also be that SDL does things right for desktop GL but messes it up for GLES, you could check that by running e.g the simple triangle example on ANGLE
i never tried ANGLE on Mac, so I have no idea about any bad interactions
hsdk123
@hsdk123
I'll try dig in a bit more....
hsdk123
@hsdk123
Hi, I've just tried pulling from the latest openal soft master branch, and I'm getting the following build errors:
C:\Users\daego\Desktop\Projects\Light.vn-multi\core\out\build\x64-Debug\MyCore.lib(AudioMgr.cpp.obj) : error LNK2019: unresolved external symbol __imp_alGenBuffers referenced in function "public: __cdecl Magnum::Audio::Buffer::Buffer(void)" (??0Buffer@Audio@Magnum@@QEAA@XZ)
C:\Users\daego\Desktop\Projects\Light.vn-multi\core\out\build\x64-Debug\MyCore.lib(AudioMgr.cpp.obj) : error LNK2019: unresolved external symbol __imp_alDeleteBuffers referenced in function "public: __cdecl Magnum::Audio::Buffer::~Buffer(void)" (??1Buffer@Audio@Magnum@@QEAA@XZ)
C:\Users\daego\Desktop\Projects\Light.vn-multi\core\out\build\x64-Debug\MyCore.lib(AudioData.cpp.obj) : error LNK2019: unresolved external symbol __imp_alBufferData referenced in function "public: class Magnum::Audio::Buffer & __cdecl Magnum::Audio::Buffer::setData(enum Magnum::Audio::BufferFormat,class Corrade::Containers::ArrayView<void const >,int)" (?setData@Buffer@Audio@Magnum@@QEAAAEAV123@W4BufferFormat@23@V?$ArrayView@$$CBX@Containers@Corrade@@H@Z)
C:\Users\daego\Desktop\Projects\Light.vn-multi\core\out\build\x64-Debug\MyCore.lib(Sound.cpp.obj) : error LNK2019: unresolved external symbol __imp_alGenSources referenced in function "public: __cdecl Magnum::Audio::Source::Source(void)" (??0Source@Audio@Magnum@@QEAA@XZ)
C:\Users\daego\Desktop\Projects\Light.vn-multi\core\out\build\x64-Debug\MyCore.lib(Sound.cpp.obj) : error LNK2019: unresolved external symbol __imp_alDeleteSources referenced in function "public: __cdecl Magnum::Audio::Source::~Source(void)" (??1Source@Audio@Magnum@@QEAA@XZ)
C:\Users\daego\Desktop\Projects\Light.vn-multi\core\out\build\x64-Debug\MyCore.lib(Sound.cpp.obj) : error LNK2019: unresolved external symbol __imp_alSourcef referenced in function "public: class Magnum::Audio::Source & __cdecl Magnum::Audio::Source::setGain(float)" (?setGain@Source@Audio@Magnum@@QEAAAEAV123@M@Z)
C:\Users\daego\Desktop\Projects\Light.vn-multi\core\out\build\x64-Debug\MyCore.lib(Sound.cpp.obj) : error LNK2019: unresolved external symbol __imp_alSourcei referenced in function "public: class Magnum::Audio::Source & __cdecl Magnum::Audio::Source::setLooping(bool)" (?setLooping@Source@Audio@Magnum@@QEAAAEAV123@_N@Z)
C:\Users\daego\Desktop\Projects\Light.vn-multi\core\out\build\x64-Debug\MagnumAudio-d.lib(Source.cpp.obj) : error LNK2001: unresolved external symbol __imp_alSourcei
hsdk123
@hsdk123
I've tried reverting versions and still the same error. Does this look familiar?
Found the reason - this seems to happen if I try to use the static version of openal soft
hsdk123
@hsdk123

Also some feedback on video
https://icculus.org/theoraplay/

If ffmpeg might take a while, this seems to be a relatively simple api into getting video capabilities.

Andy Somogyi
@AndySomogyi

Thanks, yeah, that did it, had to set the attributes in the Gl::Mesh::mesh.addVertexBuffer, that fixed the problem, thanks.

Did a bit of debug tracing, and figured out that this calls

glBindVertexArray bind the array, then

glEnableVertexAttribArray(attribute.location);

glVertexAttribIPointer(attribute.location, attribute.size, attribute.type, attribute.stride, attribute.offset);

I'm not really sure why GL needs the glEnableVertexAttribArray, when the shader declares the data layout right there, and then glMapBufferRange should just give you a pointer to a data block, with the structure layout defined by the shader.

GL is confusing, I think DirectX is a lot easier to understand.

Vladimír Vondruš
@mosra
i don't think the shader declares the structure layout fully .. it only says that it expects floats here, ints there, but you can still pass half-floats to the floats or unsigned bytes to the ints, unpacking those is the responsibility of the vertex pulling hardware, not the shader
tho glEnable*Array() is probably mostly historical, yep :)
Vladimír Vondruš
@mosra
it's Sunday morning, so i'll try to implement a very quick video animated GIF playback
Vladimír Vondruš
@mosra
$ magnum-imageconverter --info tenor.gif --importer StbImageImporter
Image 0:
  Level 0: PixelFormat::RGBA8Unorm Vector(135, 90)
Image 1:
  Level 0: PixelFormat::RGBA8Unorm Vector(135, 90)
Image 2:
  Level 0: PixelFormat::RGBA8Unorm Vector(135, 90)
Image 3:
  Level 0: PixelFormat::RGBA8Unorm Vector(135, 90)
Image 4:
  Level 0: PixelFormat::RGBA8Unorm Vector(135, 90)
Image 5:
  Level 0: PixelFormat::RGBA8Unorm Vector(135, 90)
...
nice
Vladimír Vondruš
@mosra
nice
image.png
now i just need to hook up a timeline
Philip Whitfield
@underdoeg
hi all. Is there a way to handle file drops in the glfw application?
Vladimír Vondruš
@mosra
d&d API is not exposed currently, but you should be able to call the GLFW APIs directly
Philip Whitfield
@underdoeg
ok, thanks. how do I get the glfw window handle though?
oh sorry nevermind, by calling window()...
Vladimír Vondruš
@mosra
yup it should be all exposed i think :)
Philip Whitfield
@underdoeg
yes it is. though I guess glfwSetWindowUserPointer is already used internally?
ah it points to the GlfwApplication, so I guess I can cast it to my child class
Philip Whitfield
@underdoeg
for future reference, this works, thanks
class CustomApp : public Platform::Application {
public:
    CustomApp(){
        glfwSetDropCallback(window(), glfwDropCallback);
    }

    void fileDropEvent(const std::string& filepath);
    static void glfwDropCallback(GLFWwindow* window, int count, const char** paths){
        reinterpret_cast<CustomApp*>(glfwGetWindowUserPointer(window))->fileDropEvent(paths[0]);
    }
}
Vladimír Vondruš
@mosra
thanks as well!
hmm, seeing const char there, did the glfw documentation mention anything about unicode on windows?
i hope the API supplies UTF-8 or something
Philip Whitfield
@underdoeg
yes, according to the docs it is The UTF-8 encoded file and/or directory path names.
Vladimír Vondruš
@mosra
nice
Vladimír Vondruš
@mosra
today is fun
image.png
actually... why not make a terminal gif player while i'm at it