Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 10 20:24
    beeperdeeper089 starred mosra/corrade
  • Apr 10 15:14
  • Apr 10 14:35
    perolehs starred mosra/magnum
  • Apr 10 12:37
    thorikawa starred mosra/toolchains
  • Apr 10 12:12
    Frandy starred mosra/corrade
  • Apr 10 00:43
    MarymagdalenaX86 starred mosra/magnum
  • Apr 10 00:01
    SriniVest starred mosra/magnum
  • Apr 09 20:29
  • Apr 09 17:56
    iceonepiece starred mosra/magnum
  • Apr 09 16:35
    ramcdona starred mosra/magnum
  • Apr 09 15:12

    mosra on master

    *ImageConverter: adapt to Magnu… (compare)

  • Apr 09 14:22

    mosra on next

    *ImageConverter: adapt to Magnu… (compare)

  • Apr 09 14:19

    mosra on master

    Trade: fix a bad doc copypaste. Trade: use the "new" less annoy… Trade: refresh the AbstractImag… and 2 more (compare)

  • Apr 09 10:26

    mosra on next

    Trade: refresh the AbstractImag… Trade: doc++ Trade: support 1D and 3D images… (compare)

  • Apr 09 09:00

    mosra on next

    Trade: refresh the AbstractImag… Trade: doc++ Trade: support 1D and 3D images… (compare)

  • Apr 09 07:09

    mosra on next

    Trade: refresh the AbstractImag… Trade: doc++ Trade: support 1D and 3D images… (compare)

  • Apr 09 06:59
    thtrummer starred mosra/magnum
  • Apr 08 18:57

    mosra on next

    Trade: refresh the AbstractImag… Trade: doc++ Trade: support 1D and 3D images… (compare)

  • Apr 08 16:47
    Benjman starred mosra/corrade
  • Apr 08 16:27
    stm32guy starred mosra/magnum-integration
bfeldpw
@bfeldpw
@mosra Thanks :-). I'm a little torn with BattleSub, but that's just because I'm only hobby-coding next to family and job and BattleSub was initially meant as a playground for, you guess: Magnum. Now, that I learned it the Magnum-way ;-), I was just to motivated to restart my project planeworld. The GitHub-Page is still quite empty, but I spend a lot of time researching the probability distributions of stars, planets etc. in galaxies. I might post (or add to the GitHub-Page) some screen soon.
Vladimír Vondruš
@mosra
okay, i'll just ask you what to publish (which project) when i get closer to a release :)
Andy Somogyi
@AndySomogyi

I originally copied the Magnum convertImageDataToJpeg function into my code, because I just wanted a plain simple function, and didn't want the complexity of plugins, worked fine for a while.

Of course, that #!ck!nG APPLE uses libjpeg, but don't provide a header file for it, so I was using libjpeg from brew, statically linked.

The project this student is working on doesn't render images, so I''ll just disable this on ARM, just need a quick and dirty solution.

I was originally going to use jpeg-turbo, but that doesn't support universal binary builds.

bfeldpw
@bfeldpw
Take your time, I'll need mine to make some nice pictures and documentation ;-)
Vladimír Vondruš
@mosra

didn't want the complexity of plugins

that was quite some years ago, right? ... 2016? 2017? it's not as bad and complex to set up as it used to be :D

and i think this is exactly why plugins are worth it, because you don't need to worry about porting some crazy 3rd party library and can (temporarily) switch to something simpler, with no code changes needed
bfeldpw
@bfeldpw
image.png
Very early Galaxy representation featuring Magnum...
Don't bother about those frametimes, at the moment the whole galaxy (13 000 stars I think) is transmitted via websocket -> json -> json-rpc from server to client each frame...
bfeldpw
@bfeldpw
All the probability distributions for mass, radius, temperature, brightness,... are already in, so I plan to implement some nice shaders based on those values.
Vladimír Vondruš
@mosra
nice :)
Tracy Ma
@linuxaged
why is windowSize() not same as framebufferSize() on firefox?
windowSize Vector(640, 480)
framebufferSize Vector(698, 523)
dpiScaling Vector(1, 1)
Vladimír Vondruš
@mosra
there is a complex reason for this, i'm sure
window size is the "virtual pixels" that events are measured in, framebuffer size is the actual hardware pixels
dpi scaling is 1 tho because it made more sense that way i think (don't remember why anymore, tho)
the difference is also consistent with what pure webgl has (there you also get events in virtual pixels but framebuffer size matches the hardware)
hsdk123
@hsdk123

Hey guys, > TextureTransformation in Flat

I'm finding a hard time understanding how this works. Basically if I give this option, I can specify a transform matrix on the texture coordinates, but I don't see where we set the base texture coordinate this multiplier acts on.

Vladimír Vondruš
@mosra
that's the texture coordinates attribute in the mesh
for example on the square primitive you have it from (0, 0) in the bottom left corner to (1, 1) in the upper right corner
and this transformation matrix in the shader is then used as if you'd call m.transformPoint() on each texture coordinates attribute of each vertex
hsdk123
@hsdk123
Ah! Gotcha, now makes sense
hsdk123
@hsdk123
image.png
Hey all, I'm trying to replicate some functionality in the Flat shader, and I get the following error. Would anyone know what might be happening?
nvm, adding the matrix3 header fixed it
Andy Somogyi
@AndySomogyi

Hey, i'm running my app in a web server. On my local linux box, egl initilizes fine, everything work. But on the remove server, can't seem to initialize egl on the default devices:

print(m.system.egl_info())
EGL client extensions string:    EGL_EXT_platform_base EGL_EXT_device_base EGL_EXT_device_enumeration
    EGL_EXT_device_query EGL_KHR_client_get_all_proc_addresses
    EGL_EXT_client_extensions EGL_KHR_debug EGL_KHR_platform_x11
    EGL_EXT_platform_x11 EGL_EXT_platform_device EGL_EXT_platform_wayland
    EGL_MESA_platform_gbm EGL_MESA_platform_surfaceless

Default display
eglinfo: eglInitialize failed

I'm looking through the Magnum bool WindowlessEglApplication::tryCreateContext(const Configuration& configuration)

This dumps a lot of error info to the Debug{} or Error{} objects. Since this in a web server, I don't have any access to the stdout. Is there any way I could somehow hook up say a stringstream to these, and grab the contents of that?

Andy Somogyi
@AndySomogyi

Thanks @pezcode

Any guess why EGL would fail to initialize on this particular machine, but seems to work fine on every other LInux box?

ytain
@ytain:matrix.org
[m]
it could be that it's a virtual environment? so no hardware gl context to create?
so you need a software based rasterizer like llvmpipe
ytain
@ytain:matrix.org
[m]
could you run glxgears on that machine, if you can't then it's a virtual server
ytain
@ytain:matrix.org
[m]
there's also this linux utility that can query for gl contexts if available, you could compile magnum-gl-info and run it on that web server
if no gl context are found then you are stuck with the use of llvmpipe
ytain
@ytain:matrix.org
[m]
you could try using a docker to emulate the web server environment and find out what is missing and add it to make your program running
Andy Somogyi
@AndySomogyi_twitter
If I run the command like ‘eglinfo’ in thr jupiter notbook, it does list all the devices and seems to initialize the last one, which is an nvidia tesla.
I need to take a closer look at the magnum windowless egl app to figure out the context init logic.
Im on my phone now so will have to wait until i get home.
But its a web server, with an nividia card, and no X Server. The annoying thing is it used to work, but the sysadmin changed something and doesnt know what changed
ytain
@ytain:matrix.org
[m]
aha ok
well the blame is on the sysadmin
could they do a rollback?
Andy Somogyi
@AndySomogyi
@ytain:matrix.org , a rollback, I checked, and they don't have any version control on their dev system. But, I did port the entire eglinfo code into my library, so I know it's all running in the same process, and here's what it reports:
>>> import mechanica as m
>>> print(m.system.egl_info())

EGL client extensions string:    EGL_EXT_platform_base EGL_EXT_device_base EGL_EXT_device_enumeration
    EGL_EXT_device_query EGL_KHR_client_get_all_proc_addresses
    EGL_EXT_client_extensions EGL_KHR_debug EGL_KHR_platform_x11
    EGL_EXT_platform_x11 EGL_EXT_platform_device EGL_EXT_platform_wayland
    EGL_MESA_platform_gbm EGL_MESA_platform_surfaceless

GBM platform
eglinfo: eglInitialize failed
Wayland platform
eglinfo: eglInitialize failed
X11 platform
eglinfo: eglInitialize failed
Surfaceless platform
EGL API version: 1.4
EGL vendor string: Mesa Project
EGL version string: 1.4
EGL client APIs: OpenGL OpenGL_ES 
EGL extensions string:    EGL_KHR_cl_event2 EGL_KHR_config_attribs
    EGL_KHR_context_flush_control EGL_KHR_create_context
    EGL_KHR_create_context_no_error EGL_KHR_fence_sync
    EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace
    EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image
    EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image
    EGL_KHR_image_base EGL_KHR_no_config_context EGL_KHR_reusable_sync
    EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float
    EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image
Configurations:
     bf lv colorbuffer dp st  ms    vis   cav bi  renderable  supported
  id sz  l  r  g  b  a th cl ns b    id   eat nd gl es es2 vg surfaces 
---------------------------------------------------------------------
0x01 32  0  8  8  8  8  0  0  0 0 0x00--   a y y y   pb
0x02 32  0  8  8  8  8 16  0  0 0 0x00--   a y y y   pb
0x03 32  0  8  8  8  8 24  0  0 0 0x00--   a y y y   pb
0x04 32  0  8  8  8  8 24  8  0 0 0x00--   a y y y   pb
0x05 32  0  8  8  8  8 32  0  0 0 0x00--   a y y y   pb
0x06 24  0  8  8  8  0  0  0  0 0 0x00--   y y y y   pb
0x07 24  0  8  8  8  0 16  0  0 0 0x00--   y y y y   pb
0x08 24  0  8  8  8  0 24  0  0 0 0x00--   y y y y   pb
0x09 24  0  8  8  8  0 24  8  0 0 0x00--   y y y y   pb
0x0a 24  0  8  8  8  0 32  0  0 0 0x00--   y y y y   pb
0x0b 16  0  5  6  5  0  0  0  0 0 0x00--   y y y y   pb
0x0c 16  0  5  6  5  0 16  0  0 0 0x00--   y y y y   pb
0x0d 16  0  5  6  5  0 24  0  0 0 0x00--   y y y y   pb
0x0e 16  0  5  6  5  0 24  8  0 0 0x00--   y y y y   pb
0x0f 16  0  5  6  5  0 32  0  0 0 0x00--   y y y y   pb
Device platform
EGL API version: 1.5
EGL vendor string: NVIDIA
EGL version string: 1.5
EGL client APIs: OpenGL_ES OpenGL
EGL extensions string:    EGL_EXT_buffer_age EGL_EXT_client_sync
    EGL_EXT_create_context_robustness EGL_EXT_output_base
    EGL_EXT_output_drm EGL_EXT_protected_content
    EGL_EXT_stream_consumer_egloutput EGL_EXT_stream_acquire_mode
    EGL_EXT_sync_reuse EGL_IMG_context_priority EGL_KHR_config_attribs
    EGL_KHR_create_context_no_error EGL_KHR_context_flush_control
    EGL_KHR_create_context EGL_KHR_fence_sync
    EGL_KHR_get_all_proc_addresses EGL_KHR_partial_update
    EGL_KHR_swap_buffers_with_damage EGL_KHR_no_config_context
    EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image
    EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image
    EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base
    EGL_KHR_reusable_sync EGL_KHR_stream EGL_KHR_stream_attrib
    EGL_KHR_stream_consumer_gltexture EGL_KHR_stream_cross_process_fd
    EGL_KHR_stream_fifo EGL_KHR_stream_producer_eglsurface
    EGL_KHR_surfaceless_context EGL_KHR_wait_sync EGL_NV_nvrm_fence_sync
    EGL_NV_quadruple_buffer EGL_NV_stream_cross_display
    EGL_NV_stream_cross_object EGL_NV_stream_cross_process
    EGL_NV_stream_cross_system EGL_NV_stream_dma EGL_NV_stream_flush
    EGL_NV_stream_metadata EGL_NV_stream_remote EGL_NV_stream_reset
    EGL_NV_stream_socket EGL_NV_stream_socket_inet
    EGL_NV_stream_socket_unix EGL_NV_stream_sync EGL_NV_stream_fifo_next
    EGL_NV_stream_fifo_synchronous EGL_NV_stream_consumer_gltexture_yuv
    EGL_NV_stream_attrib EGL_NV_stream_origin EGL_NV_system_time
    EGL_NV_output_drm_flip_event EGL_NV_triple_buffer
Configurations:
     bf lv colorbuffer dp st  ms    vis   cav bi  renderable  supported
  id sz  l  r  g  b  a th cl ns b    id   eat nd gl es es2 vg surfaces 
---------------------------------------------------------------------
0x01 32  0  8  8  8  8 24  8  0 0 0x00--     y y y   pb,str
0x02 32  0  8  8  8  8 24  0  0 0 0x00--     y y y   pb,str
0x03 32  0  8  8  8  8  0  8  0 0 0x00--     y y y   pb,str
0x04 32  0  8  8  8  8  0  0  0 0 0x00--     y y y   pb,str
0x05 32  0  8  8  8  8 24  8  2 1 0x00--     y y y   pb,str
0x06 32  0  8  8  8  8 24  0  2 1 0x00--     y y y   pb,str
0x07 32  0  8  8  8  8  0  8  2 1 0x00--     y y y   pb,str
0x08 32  0  8  8  8  8  0  0  2 1 0x00--     y y y   pb,str
0x09 32  0  8  8  8  8 24  8  4 1 0x00--     y y y   pb,str
0x0a 32  0  8  8  8  8 24  8  4 1 0x00--     y y y   pb,str
0x0b 32  0  8  8  8  8 24  8  4 1 0x00--     y y y   pb,str
0x0c 32  0  8  8  8  8 24  0  4 1 0x00--     y y y   pb,str
0x0d 32  0  8  8  8  8 24  0  4 1 0x00--     y y y   pb,str
0x0e 32  0  8  8  8  8 24  0  4 1 0x00--     y y y   pb,str
0x0f 32  0  8  8  8  8  0  8  4 1 0x00--     y y y   pb,str
0x10 32  0  8  8  8  8  0  8  4 1 0x00--     y y y   pb,str
0x11 32  0  8  8  8  8  0  8  4 1 0x00--     y y y   pb,str
0x12 32  0  8  8  8  8  0  0  4 1 0x00--     y y y   pb,str
0x13 32  0  8  8  8  8  0  0  4 1 0x00--     y y y   pb,str
0x14 32  0  8  8  8  8  0  0  4 1 0x00--     y y y   pb,str
0x15 32  0  8  8  8  8 24  8  8 1 0x00--     y y y   pb,str
0x16 32  0  8  8  8  8 24  8  8 1 0x00--     y y y   pb,str
0x17 32  0  8  8  8  8 24  0  8 1 0x00--     y y y   pb,str
0x18 32  0  8  8  8  8 24  0  8 1 0x00--     y y y   pb,str
0x19 32  0  8  8  8  8  0  8  8 1 0x00--     y y y   pb,str
0x1a 32  0  8  8  8  8  0  8  8 1 0x00--     y y y   pb,str
0x1b 32  0  8  8  8  8  0  0  8 1 0x00--     y y y   pb,str
0x1c 32  0  8  8  8  8  0  0  8 1 0x00--     y y y   pb,str
0x1d 24  0  8  8  8  0 24  8  0 0 0x00--     y y y   pb,str
0x1e 24  0  8  8  8  0 24  0  0 0 0x00--     y y y   pb,str
0x1f 24  0  8  8  8  0  0  8  0 0 0x00--     y y y   pb,str
0x20 24  0  8  8  8  0  0  0  0 0 0x00--     y y y   pb,str
0x21 24  0  8  8  8  0 24  8  2 1 0x00--     y y y   pb,str
0x22 24  0  8  8  8  0 24  0  2 1 0x00--     y y y   pb,str
0x23 24  0  8  8  8  0  0  8  2 1 0x00--     y y y   pb,str
0x24 24  0  8  8  8  0  0  0  2 1 0x00--     y y y   pb,str
0x25 24  0  8
Andy Somogyi
@AndySomogyi

So, what I'm thinking about, is since I use the Magnum WindowlessEglApp, in has a configuration where I you can pass in a display and context, i.e.:

  if(configuration.sharedContext() != EGL_NO_CONTEXT && configuration.sharedDisplay() != EGL_NO_DISPLAY) {
        _display = configuration.sharedDisplay();
        _sharedContext = true;
    } else

I can grab the display and context form the NVidia Device Platform and pass those in.

Andy Somogyi
@AndySomogyi
Screen Shot 2021-04-11 at 1.42.57 AM.png
Got it working, turns out it was a stupid mistake on both my part, and the sysadmins part, in how Jupyter was set up, and how I was detecting it. This caused it to parse nonsense into the config that got given to the egl app.
ytain
@ytain:matrix.org
[m]
glad to hear