mosra / magnum-examples Goto Github PK
View Code? Open in Web Editor NEWExamples for the Magnum C++11 graphics engine
Home Page: https://magnum.graphics/
License: The Unlicense
Examples for the Magnum C++11 graphics engine
Home Page: https://magnum.graphics/
License: The Unlicense
Only the background color is rendered. The app doesn't seem to crash.
The device I'm using (iPhone 5) seems to be SDF-capable since it's able to run this demo: https://evanw.github.io/font-texture-generator/example-webgl/
I haven't been able to make my game render any SDF text or image on iOS either. The game runs, but just won't render SDF. I've tried to fiddle with mipmaps (following the answer of this Stack Overflow question: https://stackoverflow.com/questions/27892283/libgdx-distance-field-font-support-on-ios/49968657 ), without success.
cannot load the cubemap texture, got black screen, while executed successfully on nvidia cards.
Renderer: Intel(R) HD Graphics 530 by Intel
OpenGL version: 4.5.0 - Build 23.20.16.4973
Magnum console gave no warning/error message.
In the imgui example, there's a set of comments here that say it's sufficient to do this in the renderer constructor if you're only drawing imgui elements.
/* Set appropriate states. If you only draw imgui UI, it is sufficient to
do this once in the constructor. */
GL::Renderer::enable(GL::Renderer::Feature::Blending);
GL::Renderer::disable(GL::Renderer::Feature::FaceCulling);
GL::Renderer::disable(GL::Renderer::Feature::DepthTest);
GL::Renderer::enable(GL::Renderer::Feature::ScissorTest);
Which suggests you can just comment out these lines:
// /* Reset state. Only needed if you want to draw something else with
// different state next frame. */
// GL::Renderer::disable(GL::Renderer::Feature::ScissorTest);
// GL::Renderer::enable(GL::Renderer::Feature::DepthTest);
// GL::Renderer::enable(GL::Renderer::Feature::FaceCulling);
// GL::Renderer::disable(GL::Renderer::Feature::Blending);
While this comment seems valid on Emscripten, at least when I build locally with SDL2 this doesn't work. By doing nothing other than commenting out the line disabling the scissor test, I get those solitaire card effects or glitchy Windows95 things being dragged and I get a trail of the old imgui windows.
Frankly, I'm somewhat baffled.
That being said, I probably have an odd setup. I'll just list what I think would be relevant.
libsdl2-2.0-0/oldstable,now 2.0.5+dfsg1-2 amd64 [installed,automatic]
Simple DirectMedia Layer
libsdl2-dev/oldstable,now 2.0.5+dfsg1-2 amd64 [installed]
Simple DirectMedia Layer development files
Renderer: virgl by Red Hat
OpenGL version: 4.3 (Core Profile) Mesa 19.2.0-devel
Using optional features:
GL_ARB_ES2_compatibility
GL_ARB_direct_state_access
GL_ARB_get_texture_sub_image
GL_ARB_invalidate_subdata
GL_ARB_multi_bind
GL_ARB_robustness
GL_ARB_separate_shader_objects
GL_ARB_texture_filter_anisotropic
GL_ARB_texture_storage
GL_ARB_texture_storage_multisample
GL_ARB_vertex_array_object
GL_KHR_debug
Using driver workarounds:
no-layout-qualifiers-on-old-glsl
mesa-forward-compatible-line-width-range
I am not sure if this is an issue with magnum itself or with firefox (perhaps webgl2 only?), but the model viewer seems to have some depth issues. It does not happen with Edge on the same computer.
Here are the webgl reports:
Platform: | Win32 |
---|---|
Browser User Agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0 |
Context Name: | webgl |
GL Version: | WebGL 1.0 |
Shading Language Version: | WebGL GLSL ES 1.0 |
Vendor: | Mozilla |
Renderer: | Mozilla |
Unmasked Vendor: | Google Inc. |
Unmasked Renderer: | ANGLE (Intel(R) HD Graphics 4600 Direct3D11 vs_5_0 ps_5_0) |
Antialiasing: | Available |
ANGLE: | Yes, D3D11 |
Major Performance Caveat: | No |
Platform: | Win32 |
---|---|
Browser User Agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0 |
Context Name: | webgl2 |
GL Version: | WebGL 2.0 |
Shading Language Version: | WebGL GLSL ES 3.00 |
Vendor: | Mozilla |
Renderer: | Mozilla |
Unmasked Vendor: | Google Inc. |
Unmasked Renderer: | ANGLE (Intel(R) HD Graphics 4600 Direct3D11 vs_5_0 ps_5_0) |
Antialiasing: | Available |
ANGLE: | Yes, D3D11 |
Major Performance Caveat: | No |
Platform: | Win32 |
---|---|
Browser User Agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063 |
Context Name: | experimental-webgl |
GL Version: | WebGL 1.0 |
Shading Language Version: | WebGL GLSL ES 1.0 |
Vendor: | Microsoft |
Renderer: | Microsoft Edge |
Unmasked Vendor: | Microsoft |
Unmasked Renderer: | Intel(R) HD Graphics 4600 |
Antialiasing: | Available |
ANGLE: | No |
Major Performance Caveat: | No |
No webgl2 support
I have tried to follow closely the documentation to run the
I am on windows, using vcpkg (it's quite neat!).
I have vcpkg-installed: sdl2, magnum, corrade, magnum-plugins[freetypefont]
I am trying to stay entirely within visual studio (2017 community edition) so I have edited CMakeSettings.json to include the CMake directives:
WITH_TEXT_EXAMPLE=ON
CMAKE_TOOLCHAIN_FILE=<points to vcpkg.cmake>
CMAKE_RUNTIME_OUTPUT_DIRECTORY="bin"
I have one blocking issue and two minor ones:
A) at runtime I get the error:
PluginManager::Manager::load(): plugin FreeTypeFont is not static and was not found in
What step am I missing?
B)when I run the install target, only magnum-text.exe and magnum-triangle.exe get copied in the install location (magnum-examples\install\x86-Debug\bin), none of the supporting libs are present so I am running from the build directory for the time being, i.e. magnum-examples\build\x86-Debug\src\text\bin
C)SDL2.dll doesn't get copied to the build directory along with the other libs, I have to do it manually. I thought the point of CMAKE_RUNTIME_OUTPUT_DIRECTORY was to grab all the dependencies?
The doc stops early:
@until std::tie
Thus it misses out on this line:
indexBuffer.setData(indexData, BufferUsage::StaticDraw);
Without that line, the program crashes. I had quite a headache trying to compare my code to the tutorial code to see where I had gone wrong.
EDIT: Looks like you addressed it in 4ba9644 - thanks! I'll let you close this issue.
EmscriptenApplication.js:15 exception thrown: TypeError: Cannot read property 'getParameter' of undefined,TypeError: Cannot read property 'getParameter' of undefined
at _glGetString (http://static.magnum.graphics/showcase/picking/magnum-picking.js:1:187188)
at wasm-function[296]:160
at wasm-function[159]:688
at wasm-function[169]:52
at Object.Module._main (http://static.magnum.graphics/showcase/picking/magnum-picking.js:1:231714)
at Object.callMain (http://static.magnum.graphics/showcase/picking/magnum-picking.js:1:239067)
at doRun (http://static.magnum.graphics/showcase/picking/magnum-picking.js:1:239810)
at http://static.magnum.graphics/showcase/picking/magnum-picking.js:1:239960
printErr @ EmscriptenApplication.js:15
callMain @ magnum-picking.js:1
doRun @ magnum-picking.js:1
(anonymous) @ magnum-picking.js:1
setTimeout (async)
run @ magnum-picking.js:1
runCaller @ magnum-picking.js:1
removeRunDependency @ magnum-picking.js:1
receiveInstance @ magnum-picking.js:1
receiveInstantiatedSource @ magnum-picking.js:1
Promise.then (async)
doNativeWasm @ magnum-picking.js:1
Module.asm @ magnum-picking.js:1
(anonymous) @ magnum-picking.js:1
magnum-picking.js:1 Uncaught TypeError: Cannot read property 'getParameter' of undefined
at _glGetString (magnum-picking.js:1)
at /showcase/picking/wasm-function[296]:160
at /showcase/picking/wasm-function[159]:688
at /showcase/picking/wasm-function[169]:52
at Object.Module._main (magnum-picking.js:1)
at Object.callMain (magnum-picking.js:1)
at doRun (magnum-picking.js:1)
at magnum-picking.js:1
They print this:
$ /usr/local/bin/magnum-primitives
Platform: can't get Xft.dpi property for virtual DPI scaling, falling back to physical DPI
Renderer: GeForce GT 610/PCIe/SSE2 by NVIDIA Corporation
OpenGL version: OpenGL ES 3.2 NVIDIA 390.87
Using optional features:
GL_EXT_robustness
GL_EXT_texture_filter_anisotropic
$ /usr/local/bin/magnum-triangle
Platform: can't get Xft.dpi property for virtual DPI scaling, falling back to physical DPI
Renderer: GeForce GT 610/PCIe/SSE2 by NVIDIA Corporation
OpenGL version: OpenGL ES 3.2 NVIDIA 390.87
Using optional features:
GL_EXT_robustness
GL_EXT_texture_filter_anisotropic
On Debian 8 x86_64 I've successfully built and installed corrade, magnum and magnum-plugins¹ for both the system's ELF clang-3.5 chain and for the emscripten (emcc 1.36.0) chain.
I sudo-installed corrade, magnum and magnum-plugins¹ underneath default /usr/local; "emsdk_portable" resides in my home directory.
Given that environment, the magnum viewer example builds flawlessly with the clang for ELF. and emcc and em++ compile HelloWorld programs to valid js.
On the example tree, however, after git'ing the toolchains
module and patching toolchains/generic/Emscripten.cmake
to point to my emsdk location, cmake (3.0.2), invoked from a build dir underneath the magnum-examples
- root dir like
cmake -DCMAKE_TOOLCHAIN_FILE="../toolchains/generic/Emscripten.cmake" ..
first detects valid emcc and em++ but then fails with
CMake Error at /usr/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:136 (message):
Could NOT find Corrade (missing: _CORRADE_MODULE_DIR)
Call Stack (most recent call first):
/usr/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:343 (_FPHSA_FAILURE_MESSAGE)
modules/FindCorrade.cmake:457 (find_package_handle_standard_args)
modules/FindMagnum.cmake:186 (find_package)
CMakeLists.txt:43 (find_package)
For my purposes, not all of the examples would need to be compiled to js, if it'd be just the viewer example itself - like it apparently was for mosra's showcases - I'd be happy enough.
Due to the complexity of the build infrastructure involved I cannot be totally sure that this is an issue - it is a perfectly plausible alternative hypothesis that I just messed sth up.
But I've tried several approaches to alter cmake-module paths, setting missing variables on the command line or in the cmake-gui etc, but to no avail yet.
Could you look into that, please?
Yours sincerely,
decltype-auto
P.S. @mosra: Your Magnum is a BRILLIANT piece of software!
Likely the cleanest real-life C++11/14 I've yet seen; I'm really enthusiastic about it.
¹ For emscripten just with
-DWITH_ANYAUDIOIMPORTER=ON
-DWITH_ANYIMAGECONVERTER=ON
-DWITH_ANYIMAGEIMPORTER=ON
-DWITH_ANYSCENEIMPORTER=ON
-DWITH_OPENGEXIMPORTER=ON
due to lack of libpng, libfont_whatever_ in my emsdk environment.
Greeting @mosra I found an amazing code which wraps Camera capture and there is an example with OpenGL displaying the raw data coming from the camera.
Since I don't know yet how to integrate OpenGL, Magnum, and display all of above inside of ImGui I'm wondering if you can give me some guidance.
This is the original code : https://www.codeproject.com/Articles/776058/Capturing-Live-video-from-Web-camera-on-Windows-an`
The part which interests me is Update on VS2013Express for Desktop
How do I need to think to be able to adapt that code for ImGui, Magnum, OpeGL Wrapper and camera capture?
Thank you for your suggestion.
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
#include <gl/gl.h>
#include <memory>
#include <vector>
#include "../videoInput/videoInput.h"
#pragma comment(lib, "opengl32.lib")
#pragma comment(lib, "../videoInput/Debug/videoInput.lib")
#define GL_BGR 0x80E0
/**************************
* Function Declarations
*
**************************/
LRESULT CALLBACK WndProc(HWND hWnd, UINT message,
WPARAM wParam, LPARAM lParam);
void EnableOpenGL(HWND hWnd, HDC *hDC, HGLRC *hRC);
void DisableOpenGL(HWND hWnd, HDC hDC, HGLRC hRC);
int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
_In_opt_ HINSTANCE hPrevInstance,
_In_ LPTSTR lpCmdLine,
_In_ int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
/* initialisation videoinput */
using namespace std;
vector<Device> listOfDevices;
ResultCode::Result result = videoInput::getInstance().getListOfDevices(listOfDevices);
if (listOfDevices.size() == 0)
return -1;
DeviceSettings deviceSettings;
deviceSettings.symbolicLink = listOfDevices[0].symbolicName;
deviceSettings.indexStream = 0;
deviceSettings.indexMediaType = 0;
CaptureSettings captureSettings;
captureSettings.pIStopCallback = 0;
captureSettings.readMode = ReadMode::SYNC;
captureSettings.videoFormat = CaptureVideoFormat::RGB24;
MediaType MT = listOfDevices[0].listStream[0].listMediaType[0];
unique_ptr<unsigned char> frame(new unsigned char[3 * MT.width * MT.height]);
ReadSetting readSetting;
readSetting.symbolicLink = deviceSettings.symbolicLink;
readSetting.pPixels = frame.get();
result = videoInput::getInstance().setupDevice(deviceSettings, captureSettings);
ResultCode::Result readState = videoInput::getInstance().readPixels(readSetting);
/* check access to the video device */
if (readState != ResultCode::READINGPIXELS_DONE)
return -1;
float halfQuadWidth = 0.75;
float halfQuadHeight = 0.75;
WNDCLASS wc;
HWND hWnd;
HDC hDC;
HGLRC hRC;
MSG msg;
BOOL bQuit = FALSE;
float theta = 0.0f;
/* register window class */
wc.style = CS_OWNDC;
wc.lpfnWndProc = WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
wc.lpszMenuName = NULL;
wc.lpszClassName = L"OpenGLWebCamCapture";
RegisterClass(&wc);
/* create main window */
hWnd = CreateWindow(
L"OpenGLWebCamCapture", L"OpenGLWebCamCapture Sample",
WS_CAPTION | WS_POPUPWINDOW | WS_VISIBLE,
0, 0, MT.width, MT.height,
NULL, NULL, hInstance, NULL);
/* enable OpenGL for the window */
EnableOpenGL(hWnd, &hDC, &hRC);
GLuint textureID;
glGenTextures(1, &textureID);
// "Bind" the newly created texture : all future texture functions will modify this texture
glBindTexture(GL_TEXTURE_2D, textureID);
// Give the image to OpenGL
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, MT.width, MT.height, 0, GL_BGR, GL_UNSIGNED_BYTE, frame.get());
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
/* program main loop */
while (!bQuit)
{
/* check for messages */
if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
/* handle or dispatch messages */
if (msg.message == WM_QUIT)
{
bQuit = TRUE;
}
else
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
else
{
/* OpenGL animation code goes here */
ResultCode::Result readState = videoInput::getInstance().readPixels(readSetting);
if (readState != ResultCode::READINGPIXELS_DONE)
break;
glClear(GL_COLOR_BUFFER_BIT);
glLoadIdentity();
glBindTexture(GL_TEXTURE_2D, textureID);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, MT.width,
MT.height, GL_BGR, GL_UNSIGNED_BYTE, frame.get());
glBegin(GL_QUADS); // Beginning of drawing of Square.
glTexCoord2f(0, 1); glVertex2f(-halfQuadWidth, -halfQuadHeight); // Bottom Left
glTexCoord2f(1, 1); glVertex2f(halfQuadWidth, -halfQuadHeight); // Bottom right
glTexCoord2f(1, 0); glVertex2f(halfQuadWidth, halfQuadHeight); // Top right
glTexCoord2f(0, 0); glVertex2f(-halfQuadWidth, halfQuadHeight); // Top Left
glEnd();
SwapBuffers(hDC);
Sleep(1);
}
}
/* shutdown OpenGL */
DisableOpenGL(hWnd, hDC, hRC);
/* destroy the window explicitly */
DestroyWindow(hWnd);
/* release captured webcam */
videoInput::getInstance().closeDevice(deviceSettings);
return msg.wParam;
}
/********************
* Window Procedure
*
********************/
LRESULT CALLBACK WndProc(HWND hWnd, UINT message,
WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_CREATE:
return 0;
case WM_CLOSE:
PostQuitMessage(0);
return 0;
case WM_DESTROY:
return 0;
case WM_KEYDOWN:
switch (wParam)
{
case VK_ESCAPE:
PostQuitMessage(0);
return 0;
}
return 0;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
}
/*******************
* Enable OpenGL
*
*******************/
void EnableOpenGL(HWND hWnd, HDC *hDC, HGLRC *hRC)
{
PIXELFORMATDESCRIPTOR pfd;
int iFormat;
/* get the device context (DC) */
*hDC = GetDC(hWnd);
/* set the pixel format for the DC */
ZeroMemory(&pfd, sizeof (pfd));
pfd.nSize = sizeof (pfd);
pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW |
PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = 24;
pfd.cDepthBits = 16;
pfd.iLayerType = PFD_MAIN_PLANE;
iFormat = ChoosePixelFormat(*hDC, &pfd);
SetPixelFormat(*hDC, iFormat, &pfd);
/* create and enable the render context (RC) */
*hRC = wglCreateContext(*hDC);
wglMakeCurrent(*hDC, *hRC);
glEnable(GL_TEXTURE_2D); // Enable of texturing for OpenGL
}
/******************
* Disable OpenGL
*
******************/
void DisableOpenGL(HWND hWnd, HDC hDC, HGLRC hRC)
{
wglMakeCurrent(NULL, NULL);
wglDeleteContext(hRC);
ReleaseDC(hWnd, hDC);
}
The maintainers of this project are doing a formidable job. 😄
I am trying to get the viewer
example going (2020.06).
I installed magnum the vcpkg
way, I use CMake on Ubuntu 20.04.
Then, I installed the magnum plugins too vcpkg install magnum-plugins\[\*\]
.
Now, I see that these plugin libraries are present in the lib
dir of vcpkg
, although static .a
.
When I try to run the example, I run into the following issue:
PluginManager::Manager::Manager(): none of the plugin search paths in {/home/me/vcpkg/installed/x64-linux/debug/bin/magnum-d/importers, ../lib/magnum-d/importers, magnum-d/importers} exists and pluginDirectory was not set, skipping plugin discovery
PluginManager::Manager::load(): plugin AnySceneImporter is not static and was not found in
I have tried passing the vcpkg
prefix to the plugin manager.
I feel like I am missing a step, how do I get dynamic plugins working the vcpkg
way?
Thanks in advance for your time.
Following the guide I tried to compile TriangleExample.cpp. But I get these errors:
magnum-examples/src/triangle/TriangleExample.cpp:65:24: error: no matching function for call to ‘Magnum::GL::Buffer::setData(const Magnum::Examples::TriangleExample::TriangleExample(const Magnum::Platform::Sdl2Application::Arguments&)::TriangleVertex [3])’
buffer.setData(data);
magnum-examples/src/triangle/TriangleExample.cpp:70:13: error: ‘Color3’ is not a member of ‘Magnum::Shaders::VertexColor2D {aka Magnum::Shaders::VertexColor<2u>}’
Shaders::VertexColor2D::Color3{});
Maybe it is a version mismatch problem, but I dont see in the docs any mention to these changes.
BTW magnum-examples-dev package is not present in the Ubuntu package (I am trying to run it in Ubuntu 18.04)
Hi,
I can't get the viewer example to start on Windows, VS2019
When executing the .parse(argc, argv) the application exists with exit(1) without printing anything.
The exact part of the code where this is happening is here (checked with the debugger)
Utility::Arguments args;
args.addArgument("file").setHelp("file", "file to load")
.addOption("importer", "AnySceneImporter").setHelp("importer", "importer plugin to use")
.addSkippedPrefix("magnum", "engine-specific options")
.setGlobalHelp("Displays a 3D scene file provided on command line.")
.parse(arguments.argc, arguments.argv);
An I missing some arguments when executing the application, if yes how to pass them?
Thansk!
Jquiver
I'm having issues trying to build some of the magnum-examples using Bullet and ImGui, the project was opened in VS 2019 as a CMake project with vcpkg integration. Here's the build output and I've included my configuration.
>------ Rebuild started: Project: CMakeLists, Configuration: Debug ------
Microsoft (R) Build Engine version 16.8.3+39993bd9d for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Microsoft (R) Build Engine version 16.8.3+39993bd9d for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Checking Build System
Building Custom Rule C:/Projects/CPP/magnum-examples/src/imgui/CMakeLists.txt
ImGuiExample.cpp
C:\Projects\CPP\magnum-examples\out\build\x64-Debug (default)\ImGuiExample.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl ImGui::SetCurrentContext(struct ImGuiContext *)" (__imp_?SetCurrentContext@ImGui@@YAXPEAUImGuiContext@@@Z) referenced in function "private: bool __cdecl Magnum::ImGuiIntegration::Context::handleKeyEvent<class Magnum::Platform::Sdl2Application::KeyEvent>(class Magnum::Platform::Sdl2Application::KeyEvent &,bool)" (??$handleKeyEvent@VKeyEvent@Sdl2Application@Platform@Magnum@@@Context@ImGuiIntegration@Magnum@@AEAA_NAEAVKeyEvent@Sdl2Application@Platform@2@_N@Z)
C:\Projects\CPP\magnum-examples\out\build\x64-Debug (default)\ImGuiExample.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) struct ImGuiIO & __cdecl ImGui::GetIO(void)" (__imp_?GetIO@ImGui@@YAAEAUImGuiIO@@XZ) referenced in function "public: virtual void __cdecl Magnum::Examples::ImGuiExample::drawEvent(void)" (?drawEvent@ImGuiExample@Examples@Magnum@@UEAAXXZ)
C:\Projects\CPP\magnum-examples\out\build\x64-Debug (default)\ImGuiExample.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl ImGui::ShowDemoWindow(bool *)" (__imp_?ShowDemoWindow@ImGui@@YAXPEA_N@Z) referenced in function "public: virtual void __cdecl Magnum::Examples::ImGuiExample::drawEvent(void)" (?drawEvent@ImGuiExample@Examples@Magnum@@UEAAXXZ)
C:\Projects\CPP\magnum-examples\out\build\x64-Debug (default)\ImGuiExample.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) bool __cdecl ImGui::Begin(char const *,bool *,int)" (__imp_?Begin@ImGui@@YA_NPEBDPEA_NH@Z) referenced in function "public: virtual void __cdecl Magnum::Examples::ImGuiExample::drawEvent(void)" (?drawEvent@ImGuiExample@Examples@Magnum@@UEAAXXZ)
C:\Projects\CPP\magnum-examples\out\build\x64-Debug (default)\ImGuiExample.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl ImGui::End(void)" (__imp_?End@ImGui@@YAXXZ) referenced in function "public: virtual void __cdecl Magnum::Examples::ImGuiExample::drawEvent(void)" (?drawEvent@ImGuiExample@Examples@Magnum@@UEAAXXZ)
C:\Projects\CPP\magnum-examples\out\build\x64-Debug (default)\ImGuiExample.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl ImGui::SetNextWindowPos(struct ImVec2 const &,int,struct ImVec2 const &)" (__imp_?SetNextWindowPos@ImGui@@YAXAEBUImVec2@@H0@Z) referenced in function "public: virtual void __cdecl Magnum::Examples::ImGuiExample::drawEvent(void)" (?drawEvent@ImGuiExample@Examples@Magnum@@UEAAXXZ)
C:\Projects\CPP\magnum-examples\out\build\x64-Debug (default)\ImGuiExample.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl ImGui::SetNextWindowSize(struct ImVec2 const &,int)" (__imp_?SetNextWindowSize@ImGui@@YAXAEBUImVec2@@H@Z) referenced in function "public: virtual void __cdecl Magnum::Examples::ImGuiExample::drawEvent(void)" (?drawEvent@ImGuiExample@Examples@Magnum@@UEAAXXZ)
C:\Projects\CPP\magnum-examples\out\build\x64-Debug (default)\ImGuiExample.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl ImGui::Text(char const *,...)" (__imp_?Text@ImGui@@YAXPEBDZZ) referenced in function "public: virtual void __cdecl Magnum::Examples::ImGuiExample::drawEvent(void)" (?drawEvent@ImGuiExample@Examples@Magnum@@UEAAXXZ)
C:\Projects\CPP\magnum-examples\out\build\x64-Debug (default)\ImGuiExample.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) bool __cdecl ImGui::Button(char const *,struct ImVec2 const &)" (__imp_?Button@ImGui@@YA_NPEBDAEBUImVec2@@@Z) referenced in function "public: virtual void __cdecl Magnum::Examples::ImGuiExample::drawEvent(void)" (?drawEvent@ImGuiExample@Examples@Magnum@@UEAAXXZ)
C:\Projects\CPP\magnum-examples\out\build\x64-Debug (default)\ImGuiExample.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) bool __cdecl ImGui::SliderFloat(char const *,float *,float,float,char const *,int)" (__imp_?SliderFloat@ImGui@@YA_NPEBDPEAMMM0H@Z) referenced in function "public: virtual void __cdecl Magnum::Examples::ImGuiExample::drawEvent(void)" (?drawEvent@ImGuiExample@Examples@Magnum@@UEAAXXZ)
C:\Projects\CPP\magnum-examples\out\build\x64-Debug (default)\ImGuiExample.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) bool __cdecl ImGui::ColorEdit3(char const *,float * const,int)" (__imp_?ColorEdit3@ImGui@@YA_NPEBDQEAMH@Z) referenced in function "public: virtual void __cdecl Magnum::Examples::ImGuiExample::drawEvent(void)" (?drawEvent@ImGuiExample@Examples@Magnum@@UEAAXXZ)
C:\Projects\CPP\magnum-examples\out\build\x64-Debug (default)\ImGuiExample.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl ImGui::GetMouseCursor(void)" (__imp_?GetMouseCursor@ImGui@@YAHXZ) referenced in function "public: void __cdecl Magnum::ImGuiIntegration::Context::updateApplicationCursor<class Magnum::Examples::ImGuiExample>(class Magnum::Examples::ImGuiExample &)" (??$updateApplicationCursor@VImGuiExample@Examples@Magnum@@@Context@ImGuiIntegration@Magnum@@QEAAXAEAVImGuiExample@Examples@2@@Z)
C:\Projects\CPP\magnum-examples\out\build\x64-Debug (default)\ImGuiExample.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl ImGuiIO::AddInputCharactersUTF8(char const *)" (__imp_?AddInputCharactersUTF8@ImGuiIO@@QEAAXPEBD@Z) referenced in function "public: bool __cdecl Magnum::ImGuiIntegration::Context::handleTextInputEvent<class Magnum::Platform::Sdl2Application::TextInputEvent>(class Magnum::Platform::Sdl2Application::TextInputEvent &)" (??$handleTextInputEvent@VTextInputEvent@Sdl2Application@Platform@Magnum@@@Context@ImGuiIntegration@Magnum@@QEAA_NAEAVTextInputEvent@Sdl2Application@Platform@2@@Z)
C:\Projects\CPP\magnum-examples\out\build\x64-Debug (default)\Debug\bin\magnum-imgui.exe : fatal error LNK1120: 13 unresolved externals
Rebuild failed.
Visual Studio 2019 Config
vsconfig.txt
vcpkg listing
bullet3:x64-windows 2.89-1 Bullet Physics is a professional collision detec...
bullet3:x86-windows 2.89-1 Bullet Physics is a professional collision detec...
corrade:x64-windows 2020.06 C++11/C++14 multiplatform utility library
corrade:x86-windows 2020.06 C++11/C++14 multiplatform utility library
corrade[interconnect]:x64-windows Interconnect library
corrade[interconnect]:x86-windows Interconnect library
corrade[pluginmanager]:x64-windows PluginManager library
corrade[pluginmanager]:x86-windows PluginManager library
corrade[testsuite]:x64-windows TestSuite library
corrade[testsuite]:x86-windows TestSuite library
corrade[utility]:x64-windows Utility library
corrade[utility]:x86-windows Utility library
eigen3:x64-windows 3.3.9 C++ template library for linear algebra: matrice...
eigen3:x86-windows 3.3.9 C++ template library for linear algebra: matrice...
entt:x64-windows 3.6.0 Gaming meets modern C++ - a fast and reliable en...
entt:x86-windows 3.6.0 Gaming meets modern C++ - a fast and reliable en...
freeglut:x64-windows 3.2.1-4 Open source implementation of GLUT with source a...
freeglut:x86-windows 3.2.1-4 Open source implementation of GLUT with source a...
glew:x64-windows 2.1.0#10 The OpenGL Extension Wrangler Library (GLEW) is ...
glew:x86-windows 2.1.0#10 The OpenGL Extension Wrangler Library (GLEW) is ...
glfw3:x64-windows 3.3.2#1 GLFW is a free, Open Source, multi-platform libr...
glfw3:x86-windows 3.3.2#1 GLFW is a free, Open Source, multi-platform libr...
glm:x64-windows 0.9.9.8 OpenGL Mathematics (GLM)
glm:x86-windows 0.9.9.8 OpenGL Mathematics (GLM)
imgui:x64-windows 1.81 Bloat-free Immediate Mode Graphical User interfa...
imgui:x86-windows 1.81 Bloat-free Immediate Mode Graphical User interfa...
magnum-integration:x64-windows 2020.06 Integrations for magnum, C++11/C++14 graphics mi...
magnum-integration:x86-windows 2020.06 Integrations for magnum, C++11/C++14 graphics mi...
magnum-integration[bullet]:x64-windows BulletIntegration library
magnum-integration[bullet]:x86-windows BulletIntegration library
magnum-integration[eigen]:x64-windows EigenIntegration library
magnum-integration[eigen]:x86-windows EigenIntegration library
magnum-integration[glm]:x64-windows GlmIntegration library
magnum-integration[glm]:x86-windows GlmIntegration library
magnum-integration[imgui]:x64-windows ImGuiIntegration library
magnum-integration[imgui]:x86-windows ImGuiIntegration library
magnum:x64-windows 2020.06#3 C++11/C++14 graphics middleware for games and da...
magnum:x86-windows 2020.06#3 C++11/C++14 graphics middleware for games and da...
magnum[al-info]:x64-windows magnum-al-info utility
magnum[al-info]:x86-windows magnum-al-info utility
magnum[anyaudioimporter]:x64-windows AnyAudioImporter plugin
magnum[anyaudioimporter]:x86-windows AnyAudioImporter plugin
magnum[anyimageconverter]:x64-windows AnyImageConverter plugin
magnum[anyimageconverter]:x86-windows AnyImageConverter plugin
magnum[anyimageimporter]:x64-windows AnyImageImporter plugin
magnum[anyimageimporter]:x86-windows AnyImageImporter plugin
magnum[anysceneconverter]:x64-windows AnySceneConverter plugin
magnum[anysceneconverter]:x86-windows AnySceneConverter plugin
magnum[anysceneimporter]:x64-windows AnySceneImporter plugin
magnum[anysceneimporter]:x86-windows AnySceneImporter plugin
magnum[anyshaderconverter]:x64-windows AnyShaderConverter plugin
magnum[anyshaderconverter]:x86-windows AnyShaderConverter plugin
magnum[audio]:x64-windows Audio library
magnum[audio]:x86-windows Audio library
magnum[cglcontext]:x64-windows CglContext library
magnum[cglcontext]:x86-windows CglContext library
magnum[debugtools]:x64-windows DebugTools library
magnum[debugtools]:x86-windows DebugTools library
magnum[distancefieldconverter]:x64-windows magnum-distancefieldconverter utility
magnum[distancefieldconverter]:x86-windows magnum-distancefieldconverter utility
magnum[eglcontext]:x64-windows EglContext library
magnum[eglcontext]:x86-windows EglContext library
magnum[fontconverter]:x64-windows magnum-fontconverter utility
magnum[fontconverter]:x86-windows magnum-fontconverter utility
magnum[gl-info]:x64-windows gl-info utility
magnum[gl-info]:x86-windows gl-info utility
magnum[gl]:x64-windows GL library
magnum[gl]:x86-windows GL library
magnum[glfwapplication]:x64-windows GlfwApplication library
magnum[glfwapplication]:x86-windows GlfwApplication library
magnum[glxcontext]:x64-windows GlxContext library
magnum[glxcontext]:x86-windows GlxContext library
magnum[imageconverter]:x64-windows magnum-imageconverter utility
magnum[imageconverter]:x86-windows magnum-imageconverter utility
magnum[magnumfont]:x64-windows MagnumFont plugin
magnum[magnumfont]:x86-windows MagnumFont plugin
magnum[magnumfontconverter]:x64-windows MagnumFontConverter plugin
magnum[magnumfontconverter]:x86-windows MagnumFontConverter plugin
magnum[meshtools]:x64-windows MeshTools library
magnum[meshtools]:x86-windows MeshTools library
magnum[objimporter]:x64-windows ObjImporter plugin
magnum[objimporter]:x86-windows ObjImporter plugin
magnum[opengltester]:x64-windows OpenGLTester library
magnum[opengltester]:x86-windows OpenGLTester library
magnum[primitives]:x64-windows Primitives library
magnum[primitives]:x86-windows Primitives library
magnum[sceneconverter]:x64-windows magnum-sceneconverter utility
magnum[sceneconverter]:x86-windows magnum-sceneconverter utility
magnum[scenegraph]:x64-windows SceneGraph library
magnum[scenegraph]:x86-windows SceneGraph library
magnum[sdl2application]:x64-windows Sdl2Application library
magnum[sdl2application]:x86-windows Sdl2Application library
magnum[shaderconverter]:x64-windows magnum-shaderconverter utility
magnum[shaderconverter]:x86-windows magnum-shaderconverter utility
magnum[shaders]:x64-windows Shaders library
magnum[shaders]:x86-windows Shaders library
magnum[shadertools]:x64-windows ShaderTools library
magnum[shadertools]:x86-windows ShaderTools library
magnum[text]:x64-windows Text library
magnum[text]:x86-windows Text library
magnum[texturetools]:x64-windows TextureTools library
magnum[texturetools]:x86-windows TextureTools library
magnum[tgaimageconverter]:x64-windows TgaImageConverter plugin
magnum[tgaimageconverter]:x86-windows TgaImageConverter plugin
magnum[tgaimporter]:x64-windows TgaImporter plugin
magnum[tgaimporter]:x86-windows TgaImporter plugin
magnum[trade]:x64-windows Trade library
magnum[trade]:x86-windows Trade library
magnum[vk-info]:x64-windows vk-info utility
magnum[vk-info]:x86-windows vk-info utility
magnum[vk]:x64-windows Vk library
magnum[vk]:x86-windows Vk library
magnum[wavaudioimporter]:x64-windows WavAudioImporter plugin
magnum[wavaudioimporter]:x86-windows WavAudioImporter plugin
magnum[wglcontext]:x64-windows WglContext library
magnum[wglcontext]:x86-windows WglContext library
magnum[windowlesscglapplication]:x64-windows WindowlessCglApplication library
magnum[windowlesscglapplication]:x86-windows WindowlessCglApplication library
magnum[windowlesseglapplication]:x64-windows WindowlessEglApplication library
magnum[windowlesseglapplication]:x86-windows WindowlessEglApplication library
magnum[windowlessglxapplication]:x64-windows WindowlessGlxApplication library
magnum[windowlessglxapplication]:x86-windows WindowlessGlxApplication library
magnum[windowlesswglapplication]:x64-windows WindowlessWglApplication library
magnum[windowlesswglapplication]:x86-windows WindowlessWglApplication library
mimalloc:x64-windows 1.6.4 Compact general purpose allocator with excellent...
mimalloc:x86-windows 1.6.4 Compact general purpose allocator with excellent...
openal-soft:x64-windows 1.21.1 OpenAL Soft is an LGPL-licensed, cross-platform,...
openal-soft:x86-windows 1.21.1 OpenAL Soft is an LGPL-licensed, cross-platform,...
opengl:x64-windows 0.0#8 Open Graphics Library (OpenGL)[3][4][5] is a cro...
opengl:x86-windows 0.0#8 Open Graphics Library (OpenGL)[3][4][5] is a cro...
sdl2:x64-windows 2.0.14#2 Simple DirectMedia Layer is a cross-platform dev...
sdl2:x86-windows 2.0.14#2 Simple DirectMedia Layer is a cross-platform dev...
vulkan:x64-windows 1.1.82.1-1 A graphics and compute API that provides high-ef...
vulkan:x86-windows 1.1.82.1-1 A graphics and compute API that provides high-ef...
Hi there,
I create this issue to make sure we don't forget about our high-DPI problem: mouse position is not correct when running WebGL examples on high DPI monitor.
The examples still have this problem: Bullet and Fluid2D (please add more if you know).
I trying next:
Triangle example working. But I can't run cubemap example.
acterhd@acterhd-desktop:~/magnum-examples/build$ sudo /usr/bin/magnum-cubemap
Renderer: GeForce GTX 970/PCIe/SSE2 by NVIDIA Corporation
OpenGL version: 4.5.0 NVIDIA 367.44
Using optional features:
GL_ARB_ES2_compatibility
GL_ARB_direct_state_access
GL_ARB_get_texture_sub_image
GL_ARB_invalidate_subdata
GL_ARB_multi_bind
GL_ARB_robustness
GL_ARB_separate_shader_objects
GL_ARB_texture_storage
GL_ARB_texture_storage_multisample
GL_ARB_vertex_array_object
GL_EXT_direct_state_access
GL_EXT_texture_filter_anisotropic
GL_KHR_debug
Using driver workarounds:
no-forward-compatible-core-context
no-layout-qualifiers-on-old-glsl
nv-cubemap-inconsistent-compressed-image-size
nv-cubemap-broken-full-compressed-image-query
nv-compressed-block-size-in-bits
Trade::AbstractImporter::openFile(): cannot open file +x.jpg
Trade::AbstractImporter::image2D(): no file opened
Aborted (core dumped)
Currently Box2DExample.cpp
uses #include <Box2D/Box2D.h>
while the actual box2d repo uses lower-case. This cause issue with case-sensitive filesystem on Linux. Change the include to use #include <box2d/box2d.h>
fixes it.
I'm trying to get the viewer
example to work with the example window setup code (mainly to enable MSAA for modeling viewing).
By default, viewer
sets up the window like this:
ViewerExample::ViewerExample(const Arguments& arguments):
Platform::Application{arguments, Configuration{}
.setTitle("Magnum Viewer Example")
.setWindowFlags(Configuration::WindowFlag::Resizable)}
{ ... }
But when the window was setup like this (took from other examples):
ViewerExample::ViewerExample(const Arguments& arguments)
: Platform::Application{arguments, NoCreate} {
/* Setup window */
{
const Vector2 dpiScaling = this->dpiScaling({});
Configuration conf;
conf.setTitle("Magnum Model Viewer Example")
.setSize(conf.size(), dpiScaling)
.setWindowFlags(Configuration::WindowFlag::Resizable);
GLConfiguration glConf;
glConf.setSampleCount(dpiScaling.max() < 2.0f ? 8 : 2);
if (!tryCreate(conf, glConf)) {
create(conf, glConf.setSampleCount(0));
}
}
...
}
the code compiled but when executed I got Segmentation fault
. I'm not quite sure if this is the only way to enable MSAA or if this is directly related to the viewer
example but so far this is the only example that has this issue.
Magnum (2020.06) and all other dependencies were compiled as CMake subprojects. I'm working on Ubuntu 20.04 x86_64
.
Thank you in advance for your investigation.
My prefix folder is /opt and I build everything with BUILD_STATIC=OFF, but I still receive the error
Utility::Resource: group 'MagnumShaders' was not found
Whenever I try to run the Triangle example.
Also, the OpenGEX importer does not work with GCC 4.8.2 and the compiler throws errors.
Hi,
I just did a build of Platform::EmscriptenApplication and it works just fine with the default "myApplication" project and the triangle example, displaying them correctly in the browser. However, I run into an issue when I attempt to build the WebXR example.
The project compiles just fine without any errors, and when I run it on a local server, it displays the expected page in the browser, even showing the correct scene in the small window. But when I try to enter the scene in VR, I just get an infinite loading screen, and the console outputs this error:
Uncaught (in promise) ReferenceError: dynCall is not defined
at onSessionStart (magnum-webxr.js:6534)
at onSessionStarted (magnum-webxr.js:6597)
onSessionStart @ magnum-webxr.js:6534
onSessionStarted @ magnum-webxr.js:6597
Promise.then (async)
Module.webxr_request_session_func @ magnum-webxr.js:6620
_webxr_request_session @ magnum-webxr.js:6638
$func216 @ magnum-webxr.wasm:0x6812
$func308 @ magnum-webxr.wasm:0x9c50
mouseEventHandlerFunc @ magnum-webxr.js:4677
jsEventHandler @ magnum-webxr.js:4499
I also get a similar error when I exit the session. I'm attempting to view this using port forwarding on a Quest 2, and the CMake commands I'm using are:
mkdir build-emscripten && cd build-emscripten
cmake ..
-DCMAKE_TOOLCHAIN_FILE="../toolchains/generic/Emscripten-wasm.cmake"
-DCMAKE_PREFIX_PATH="/home/tseppala/.emsdk/upstream/emscripten/system"
-DCMAKE_INSTALL_PREFIX=/mnt/h/CodeTests/MagServer
cmake --build .
cmake --build . --target install
Did I forget to include something in my build? Is this a problem with my Emscripten installation? Or am I just typing the wrong commands?
Any help would be greatly appreciated.
As mentioned in mosra/magnum#80, the object picking example is apparently working only on NVidia binary drivers -- on Mesa clicking objects does nothing but the scene is rendered correctly.
The error might be related to the behavior noted in #12 (after getting it to somewhat working state I couldn't pick any object).
https://magnum.graphics/showcase/audio/ doesn't play any audio on my end.
Tested on recent Chromium and Firefox (webgl1 enabled).
Also according to someone else:
I get this in Vivaldi's console:
The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page.
https://developer.chrome.com/blog/autoplay/
So, yeah, looks like some media policy thing.
I have no problems with compiling MagnumIntegration::ImGui but Imgui example can't builded.
All packages installed via vcpkg.
1> CMake generation started for configuration: 'x64-Debug'.
1> The toolchain file has changed (CMAKE_TOOLCHAIN_FILE).
1> Command line: "cmd.exe" /c ""C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_INSTALL_PREFIX:PATH="D:\Repositories\Magnum\magnum-examples\out\install\x64-Debug" -DVCPKG_TARGET_TRIPLET:STRING="x64-windows-static" -DWITH_BOX2D_EXAMPLE:BOOL="False" -DWITH_BULLET_EXAMPLE:BOOL="False" -DWITH_CUBEMAP_EXAMPLE:BOOL="False" -DWITH_AUDIO_EXAMPLE:BOOL="False" -DWITH_IMGUI_EXAMPLE:BOOL="True" -DWITH_MOUSEINTERACTION_EXAMPLE:BOOL="False" -DWITH_MOTIONBLUR_EXAMPLE:BOOL="False" -DWITH_PICKING_EXAMPLE:BOOL="False" -DWITH_PRIMITIVES_EXAMPLE:BOOL="False" -DWITH_SHADOWS_EXAMPLE:BOOL="False" -DWITH_TEXT_EXAMPLE:BOOL="False" -DWITH_TEXTUREDTRIANGLE_EXAMPLE:BOOL="False" -DWITH_TRIANGLE_EXAMPLE:BOOL="False" -DCMAKE_CXX_COMPILER:FILEPATH="c:/program files (x86)/microsoft visual studio/2019/community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe" -DCMAKE_C_COMPILER:FILEPATH="c:/program files (x86)/microsoft visual studio/2019/community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe" -DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "D:\Repositories\Magnum\magnum-examples" 2>&1"
1> Working directory: D:\Repositories\Magnum\magnum-examples\out\build\x64-Debug
1> [CMake] -- The CXX compiler identification is MSVC 19.22.27905.0
1> [CMake] -- Check for working CXX compiler: c:/program files (x86)/microsoft visual studio/2019/community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe
1> [CMake] -- Check for working CXX compiler: c:/program files (x86)/microsoft visual studio/2019/community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe -- works
1> [CMake] -- Detecting CXX compiler ABI info
1> [CMake] -- Detecting CXX compiler ABI info - done
1> [CMake] -- Detecting CXX compile features
1> [CMake] -- Detecting CXX compile features - done
1> [CMake] -- Found Corrade: C:/My/vcpkg/installed/x64-windows-static/include found components: Containers rc Utility
1> [CMake] -- Found Magnum: C:/My/vcpkg/installed/x64-windows-static/include
1> [CMake] -- LIB_SUFFIX variable is not defined. It will be autodetected now.
1> [CMake] -- You can set it manually with -DLIB_SUFFIX=<value> (64 for example)
1> [CMake] -- LIB_SUFFIX autodetected as '', libraries will be installed into D:/Repositories/Magnum/magnum-examples/out/install/x64-Debug/lib
1> [CMake] -- The C compiler identification is MSVC 19.22.27905.0
1> [CMake] -- Check for working C compiler: c:/program files (x86)/microsoft visual studio/2019/community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe
1> [CMake] -- Check for working C compiler: c:/program files (x86)/microsoft visual studio/2019/community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe -- works
1> [CMake] -- Detecting C compiler ABI info
1> [CMake] -- Detecting C compiler ABI info - done
1> [CMake] -- Detecting C compile features
1> [CMake] -- Detecting C compile features - done
1> [CMake] -- Found OpenGL: opengl32
1> [CMake] -- Found Magnum: C:/My/vcpkg/installed/x64-windows-static/include found components: GL
1> [CMake] CMake Error at modules/FindImGui.cmake:83 (get_target_property):
1> [CMake] get_target_property() called with non-existent target "imgui::imgui".
1> [CMake] Call Stack (most recent call first):
1> [CMake] C:/My/vcpkg/scripts/buildsystems/vcpkg.cmake:266 (_find_package)
1> [CMake] modules/FindMagnumIntegration.cmake:212 (find_package)
1> [CMake] C:/My/vcpkg/scripts/buildsystems/vcpkg.cmake:266 (_find_package)
1> [CMake] src/imgui/CMakeLists.txt:44 (find_package)
1> [CMake] -- Could NOT find ImGui (missing: ImGui_INCLUDE_DIR)
1> [CMake] -- Found MagnumIntegration: C:/My/vcpkg/installed/x64-windows-static/include found components: ImGui
1> [CMake] -- Found SDL2: optimized;C:/My/vcpkg/installed/x64-windows-static/lib/SDL2.lib;debug;C:/My/vcpkg/installed/x64-windows-static/debug/lib/SDL2d.lib
1> [CMake] -- Found Magnum: C:/My/vcpkg/installed/x64-windows-static/include found components: GL Sdl2Application
1> [CMake] -- Configuring incomplete, errors occurred!
1> [CMake] See also "D:/Repositories/Magnum/magnum-examples/out/build/x64-Debug/CMakeFiles/CMakeOutput.log".
1> [CMake]
1> cmd.exe /c ""C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_INSTALL_PREFIX:PATH="D:\Repositories\Magnum\magnum-examples\out\install\x64-Debug" -DVCPKG_TARGET_TRIPLET:STRING="x64-windows-static" -DWITH_BOX2D_EXAMPLE:BOOL="False" -DWITH_BULLET_EXAMPLE:BOOL="False" -DWITH_CUBEMAP_EXAMPLE:BOOL="False" -DWITH_AUDIO_EXAMPLE:BOOL="False" -DWITH_IMGUI_EXAMPLE:BOOL="True" -DWITH_MOUSEINTERACTION_EXAMPLE:BOOL="False" -DWITH_MOTIONBLUR_EXAMPLE:BOOL="False" -DWITH_PICKING_EXAMPLE:BOOL="False" -DWITH_PRIMITIVES_EXAMPLE:BOOL="False" -DWITH_SHADOWS_EXAMPLE:BOOL="False" -DWITH_TEXT_EXAMPLE:BOOL="False" -DWITH_TEXTUREDTRIANGLE_EXAMPLE:BOOL="False" -DWITH_TRIANGLE_EXAMPLE:BOOL="False" -DCMAKE_CXX_COMPILER:FILEPATH="c:/program files (x86)/microsoft visual studio/2019/community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe" -DCMAKE_C_COMPILER:FILEPATH="c:/program files (x86)/microsoft visual studio/2019/community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe" -DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "D:\Repositories\Magnum\magnum-examples" 2>&1" returned with exit code: 1
And this my try to integrate imgui to new project.
cmake_minimum_required (VERSION 3.5)
project ("SimpleGame")
find_package(Magnum REQUIRED)
find_package(MagnumIntegration REQUIRED ImGui)
if(CORRADE_TARGET_WINDOWS)
add_definitions("-DUNICODE" "-D_UNICODE")
endif()
if(CORRADE_TARGET_ANDROID)
find_package(Magnum REQUIRED AndroidApplication)
elseif(CORRADE_TARGET_EMSCRIPTEN)
find_package(Magnum REQUIRED EmscriptenApplication)
else()
find_package(Magnum REQUIRED Sdl2Application)
endif()
set_directory_properties(PROPERTIES CORRADE_USE_PEDANTIC_FLAGS ON)
add_executable (SimpleGame "SimpleGame.cpp")
target_link_libraries(SimpleGame PRIVATE
Magnum::Application
Magnum::GL
Magnum::Magnum
MagnumIntegration::ImGui)
1> CMake generation started for configuration: 'x64-Debug'.
1> The toolchain file has changed (CMAKE_TOOLCHAIN_FILE).
1> Command line: "cmd.exe" /c ""C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_INSTALL_PREFIX:PATH="C:\My\Projects\VS\SimpleGame\out\install\x64-Debug" -DVCPKG_TARGET_TRIPLET:STRING="x64-windows-static" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe" -DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "C:\My\Projects\VS\SimpleGame" 2>&1"
1> Working directory: C:\My\Projects\VS\SimpleGame\out\build\x64-Debug
1> [CMake] -- The C compiler identification is MSVC 19.22.27905.0
1> [CMake] -- The CXX compiler identification is MSVC 19.22.27905.0
1> [CMake] -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe
1> [CMake] -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe -- works
1> [CMake] -- Detecting C compiler ABI info
1> [CMake] -- Detecting C compiler ABI info - done
1> [CMake] -- Detecting C compile features
1> [CMake] -- Detecting C compile features - done
1> [CMake] -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe
1> [CMake] -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe -- works
1> [CMake] -- Detecting CXX compiler ABI info
1> [CMake] -- Detecting CXX compiler ABI info - done
1> [CMake] -- Detecting CXX compile features
1> [CMake] -- Detecting CXX compile features - done
1> [CMake] -- Found Corrade: C:/My/vcpkg/installed/x64-windows-static/include found components: Containers rc Utility
1> [CMake] -- Found Magnum: C:/My/vcpkg/installed/x64-windows-static/include
1> [CMake] -- LIB_SUFFIX variable is not defined. It will be autodetected now.
1> [CMake] -- You can set it manually with -DLIB_SUFFIX=<value> (64 for example)
1> [CMake] -- LIB_SUFFIX autodetected as '', libraries will be installed into C:/My/Projects/VS/SimpleGame/out/install/x64-Debug/lib
1> [CMake] -- Found OpenGL: opengl32
1> [CMake] -- Found Magnum: C:/My/vcpkg/installed/x64-windows-static/include found components: GL
1> [CMake] -- Found MagnumIntegration: C:/My/vcpkg/installed/x64-windows-static/include found components: ImGui
1> [CMake] -- Found Magnum: C:/My/vcpkg/installed/x64-windows-static/include found components: GL Sdl2Application
1> [CMake] -- Configuring done
1> [CMake] CMake Error at C:/My/vcpkg/scripts/buildsystems/vcpkg.cmake:169 (_add_executable):
1> [CMake] Target "SimpleGame" links to target "ImGui::ImGui" but the target was not
1> [CMake] found. Perhaps a find_package() call is missing for an IMPORTED target, or
1> [CMake] an ALIAS target is missing?
1> [CMake] Call Stack (most recent call first):
1> [CMake] SimpleGame/CMakeLists.txt:27 (add_executable)
1> [CMake] CMake Error at C:/My/vcpkg/scripts/buildsystems/vcpkg.cmake:169 (_add_executable):
1> [CMake] Target "SimpleGame" links to target "ImGui::ImGui" but the target was not
1> [CMake] found. Perhaps a find_package() call is missing for an IMPORTED target, or
1> [CMake] an ALIAS target is missing?
1> [CMake] Call Stack (most recent call first):
1> [CMake] SimpleGame/CMakeLists.txt:27 (add_executable)
1> [CMake] -- Generating done
1> [CMake] -- Build files have been written to: C:/My/Projects/VS/SimpleGame/out/build/x64-Debug
1> [CMake]
1> cmd.exe /c ""C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_INSTALL_PREFIX:PATH="C:\My\Projects\VS\SimpleGame\out\install\x64-Debug" -DVCPKG_TARGET_TRIPLET:STRING="x64-windows-static" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe" -DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "C:\My\Projects\VS\SimpleGame" 2>&1" returned with exit code: 1
Should be okay from Magnum side, the problem is that no browser is currently able to handle required WebGL 2 functionality:
RenderbufferFormat::RGBA8
/RenderbufferFormat::R8UI
(but textures do) -- possibly related: Bug 1048733 - WebGL2 - Implement Renderbuffer ObjectsTextureFormat::R8UI
for framebuffer attachment (says that the attachment is incomplete)Framebuffer::mapForRead()
with Framebuffer::ColorAttachment{1}
(but mapForDraw()
behaves okay)Framebuffer::blit()
is called without clearing the destination framebuffer before, the buffer is not updated at all (I might be doing this wrong, but works on desktop)More possibly related bugs:
From what I tested last time (things could be different now, though):
"WebGL 1.0"
renderer string for WebGL 2 contextsI am following this example:
https://doc.magnum.graphics/magnum/examples-primitives.html
I did set myself up with vcpkg...
MeshData.h doesn't seem to be valid and there are ...2D and ...3D suffixes to that header now.
Is this a known issue?
Hello,
When compiling the triangle example with -std=c++14 -fsanitize=address -fno-omit-frame-pointer -shared-libgcc
, the address sanitizer finds a problem upon application exit. This is using g++ (GCC) 6.1.1 20160501
.
Here's the full output:
Renderer: GeForce GTX 750 Ti/PCIe/SSE2 by NVIDIA Corporation
OpenGL version: 4.5.0 NVIDIA 364.19
Using optional features:
GL_ARB_ES2_compatibility
GL_ARB_direct_state_access
GL_ARB_get_texture_sub_image
GL_ARB_invalidate_subdata
GL_ARB_multi_bind
GL_ARB_robustness
GL_ARB_separate_shader_objects
GL_ARB_texture_storage
GL_ARB_texture_storage_multisample
GL_ARB_vertex_array_object
GL_EXT_direct_state_access
GL_EXT_texture_filter_anisotropic
GL_KHR_debug
Using driver workarounds:
amd-nv-no-forward-compatible-core-context
no-layout-qualifiers-on-old-glsl
nv-cubemap-inconsistent-compressed-image-size
nv-cubemap-broken-full-compressed-image-query
nv-compressed-block-size-in-bits
=================================================================
==32021==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 320 byte(s) in 2 object(s) allocated from:
#0 0x7f64bc903d58 in __interceptor_malloc /build/gcc-multilib/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:38
#1 0x7f64b4f3c99f in glXChooseFBConfig (/usr/lib/../lib/libGLX_nvidia.so.0+0x7f99f)
SUMMARY: AddressSanitizer: 320 byte(s) leaked in 2 allocation(s).
Process returned 1 (0x1) execution time : 4.470 s
When searching the web for related issues, it appears that this might be caused by not freeing the memory that is allocated by glXChooseFBConfig
.
Thanks for creating Magnum in the first place, it looks promising!
Cheers,
Alexander F Rødseth
PS. libcorrade and libmagnum are now official Arch Linux packages. Please let me know if there should be any issues with the packaging. :)
Hello,
I'm trying to change the model from the viewer example but I couldn't find a way to create my own glb file with blender... The glb file I exported from blender is not working, the error is:
Opening file ../../magnum-examples/src/viewer/out.glb Trade::AbstractImporter::openFile(): cannot open file ../../magnum-examples/src/viewer/out.glb
I tried re building the example with the following line modified in the CMakeLists.txt:
install(FILES out.glb DESTINATION ${MAGNUM_DATA_INSTALL_DIR}/examples/viewer)
In the magnum installation's plugins I checked:
-DWITH_ASSIMPIMPORTER=ON \ -DWITH_DDSIMPORTER=ON \ -DWITH_STBIMAGEIMPORTER=ON \ -DWITH_STBTRUETYPEFONT=ON \ -DWITH_TINYGLTFIMPORTER=ON
Am I doing something wrong ?
Hello,
Sorry if this not the correct place to ask this as I could not find a Magnum Slack channel or Discord server so I am not sure where the Magnum user community is located.
I am wondering if there are any examples of using the mouse in a wasm seen to grab an object and move just the object around to different positions and releasing the object?
The closest thing that I found was an Object Picking demo:
https://doc.magnum.graphics/magnum/examples-picking.html
but it seemed only to allow you to select an object but not move that single object to a new position within the scene.
I'm on Windows 10 64-bit compiling with nuwen MinGW GCC 5.3, and my build script looks like this.
Every time I close the application, whether by pressing escape or by standard means, it crashes. This is the entire output from the application:
AL lib: (WW) UpdateDeviceParams: SSE performs best with multiple of 4 update sizes (882)
Audio Renderer: OpenAL Soft by OpenAL Community
OpenAL version: 1.1 ALSOFT 1.17.2
Renderer: AMD Radeon(TM) R7 Graphics by ATI Technologies Inc.
OpenGL version: 4.5.13416 Compatibility Profile Context 15.300.1025.1001
Using optional features:
GL_ARB_ES2_compatibility
GL_ARB_direct_state_access
GL_ARB_get_texture_sub_image
GL_ARB_invalidate_subdata
GL_ARB_multi_bind
GL_ARB_separate_shader_objects
GL_ARB_texture_storage
GL_ARB_texture_storage_multisample
GL_ARB_vertex_array_object
GL_EXT_direct_state_access
GL_EXT_texture_filter_anisotropic
GL_KHR_debug
Using driver workarounds:
amd-nv-no-forward-compatible-core-context
no-layout-qualifiers-on-old-glsl
Hrtf status: Audio::Context::HrtfStatus::UnsupportedFormat
Hrtf enabled: false
Hrtf specifier:
Running it in GDB just gives Program received signal SIGSEGV, Segmentation fault.
and a corrupt stack frame.
The code:
if(meshData->hasAttribute(Trade::MeshAttribute::Normal))
flags |= MeshTools::CompileFlag::GenerateFlatNormals;
seems backwards, as we'd only want to generate normals if none were present in the mesh data.
This would need to be fixed in the example webpage as well.
I tried building the examples and get the following error:
[ 50%] Building CXX object CMakeFiles/magnum-viewer.dir/ViewerExample.cpp.o
/home/jerry/Desktop/Projects/habitat/magnum-examples/src/viewer/ViewerExample.cpp:34:38: fatal error: Corrade/Utility/DebugStl.h: No such file or directory
compilation terminated.
CMakeFiles/magnum-viewer.dir/build.make:62: recipe for target 'CMakeFiles/magnum-viewer.dir/ViewerExample.cpp.o' failed
make[2]: *** [CMakeFiles/magnum-viewer.dir/ViewerExample.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/magnum-viewer.dir/all' failed
make[1]: *** [CMakeFiles/magnum-viewer.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
I have corrade installed using sudo ap-get install corrade corrade-dev
.
Hello guys,
after the last update to magnum "master" I got compilation errors If I build examples.
Did something change for magnum linking? This came after last pull. There is a ton of undefined types. Or I did something wrong?
example of the error:
e:\git\magnum-examples\src\shadows\shadowsexample.cpp(290): error C2027: use of undefined type 'Magnum::Math::Color3<Magnum::Float>'
My build script (tested Windows build):
https://github.com/janbajana/script-helpers/blob/master/cmake-scripts/setup-magnum-examples-build.sh
Hi,
I don't know if I've done something wrong, most likely have, but I'm trying to build this repo after using VCPKG.
I used VCPKG to install the magnum packages and used this command and installed the following libraries and cloned this repo:
./vcpkg install --head corrade magnum magnum-integration imgui
I set CMAKE_TOOLCHAIN_FILE to my VCPKG cmake file in build systems (vcpkg/scripts/buildsystems/vcpkg.cmake) and built the project with only the WITH_IMGUI_EXAMPLE
set to ON.
However, after attempting a build, my CMake returns this:
main] Building folder: magnum-examples-master-2
[build] Starting build
[proc] Executing command: /usr/local/bin/cmake --build ~/Downloads/magnum-examples-master/build --config Debug --target all -j 14 --
[build] -- Found Magnum: ~/vcpkg/installed/x64-osx/include
[build] -- Found Corrade: ~/vcpkg/installed/x64-osx/include found components: Containers rc Main
[build] -- Found Corrade: ~/vcpkg/installed/x64-osx/include found components: Containers rc Utility
[build] -- Found Magnum: ~/vcpkg/installed/x64-osx/include found components: GL
[build] -- Found Magnum: ~/vcpkg/installed/x64-osx/include found components: GL Shaders
[cmake] -- Found ImGui: ~/vcpkg/installed/x64-osx/include
[build] CMake Error at /usr/local/Cellar/cmake/3.21.3_1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
[build] Could NOT find MagnumIntegration (missing: ImGui)
[build]
[build] Reason given by package: ImGui is not built by default. Make sure you enabled WITH_IMGUI when building Magnum Integration.
[build]
[build] Call Stack (most recent call first):
[build] /usr/local/Cellar/cmake/3.21.3_1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
[build] modules/FindMagnumIntegration.cmake:329 (find_package_handle_standard_args)
[build] ~/vcpkg/scripts/buildsystems/vcpkg.cmake:786 (_find_package)
[build] src/imgui/CMakeLists.txt:47 (find_package)
[build]
[build]
[build] -- Configuring incomplete, errors occurred!
[build] See also "~/Downloads/magnum-examples-master/build/CMakeFiles/CMakeOutput.log".
[build] make: *** [cmake_check_build_system] Error 1
[build] Build finished with exit code 2
Could someone help me understand what I've done wrong. As you can tell I'm using Clang as my compiler and I'm currently running macOS.
Thanks,
George
From #41 (comment).
When building with vcpkg (e.g. x64-windows triplet), you can usually just run the application and it "just works", because all the dependency DLLs are automatically copied to the target output folder.
This works well for all dynamic libraries (e.g. MagnumPlugins::FreetypeFont
), but not for Sdl2Application, which is always linked statically.
Since the executable is a dynamic library itself, I would expect it to work anyway, but that is maybe not how vcpkg works.
@mosra You may assign me, I will have a look at this in near future.
Hi,
I build webxr for emscripten in ubuntu, and generated :
EmscriptenApplication.js
magnum-webxr.html
magnum-webxr.js
magnum-webxr.wasm
WebApplication.css
I setup a server using python SimpleHTTPServer and access the html with my PC browser,
I could see a image in the browser but there's error log in console:WebXR unsupported in this browser
I tried it in chromium and Edge, they have the same issue.
my Chromium version is 83.0.4103.116(正式版本) (32 位)
Have anybody met this kind of issue? any help will be appreciated!
At least on FF 62.0.3 (Objects do not change color when clicked.)
Updated to 63.0 (64-bit); same behavior.
Works fine on Chrome
Bullet example fail to link with the following error:
Linking CXX executable bullet
CMakeFiles/bullet.dir/BulletExample.o: In function `Magnum::SceneGraph::AbstractFeature<3u, float>::AbstractFeature<Magnum::SceneGraph::Object<Magnum::SceneGraph::BasicMatrixTransformation3D<float> >, void>(Magnum::SceneGraph::Object<Magnum::SceneGraph::BasicMatrixTransformation3D<float> >&)':
BulletExample.cpp:(.text._ZN6Magnum10SceneGraph15AbstractFeatureILj3EfEC2INS0_6ObjectINS0_27BasicMatrixTransformation3DIfEEEEvEERT_[_ZN6Magnum10SceneGraph15AbstractFeatureILj3EfEC5INS0_6ObjectINS0_27BasicMatrixTransformation3DIfEEEEvEERT_]+0x1f): undefined reference to `Magnum::SceneGraph::AbstractFeature<3u, float>::AbstractFeature(Magnum::SceneGraph::AbstractObject<3u, float>&)'
collect2: error: ld returned 1 exit status
Compiler (GCC 4.7) was called like that:
/usr/bin/c++ -std=c++0x -Wall -Wextra -Wold-style-cast -Winit-self -Werror=return-type -Wmissing-declarations -pedantic -fvisibility=hidden -Wzero-as-null-pointer-constant -Wdouble-promotion CMakeFiles/bullet.dir/BulletExample.o -o bullet -L/usr/local/lib -rdynamic /usr/local/lib/libMagnum.so /usr/local/lib/libCorradeUtility.so /usr/local/lib/libCorradePluginManager.so /usr/local/lib/libCorradeUtility.so -ldl -lGL /usr/local/lib/libMagnumBulletIntegration.so -lBulletDynamics -lBulletCollision -lLinearMath -lBulletSoftBody /usr/local/lib/libMagnumDebugTools.so /usr/local/lib/libMagnumSceneGraph.so /usr/local/lib/libMagnumShaders.so /usr/local/lib/libMagnumShapes.so /usr/local/lib/libMagnumGlutApplication.a -lglut -lXmu -lXi /usr/local/lib/libCorradePluginManager.so -ldl -lGL /usr/local/lib/libMagnumBulletIntegration.so -lBulletDynamics -lBulletCollision -lLinearMath -lBulletSoftBody /usr/local/lib/libMagnumDebugTools.so /usr/local/lib/libMagnumSceneGraph.so /usr/local/lib/libMagnumShaders.so /usr/local/lib/libMagnumShapes.so /usr/local/lib/libMagnumGlutApplication.a -lglut -lXmu -lXi -Wl,-rpath,/usr/local/lib
Looks similar to magnum-bootstrap
issue 3
EDIT: the issue was that libmagnum
was compiled with clang
with the sample was compiled with gcc
. Using the same compiler for both solved the issue.
The primitives
example compiles and executes without errors, but display a grey empty background (no cube displayed).
Output of magnum-info
: http://code.solusipse.net/0hrk/
I have aur/libdart 6.9.2-1 installed.
==> Making package: magnum-examples dev-1 (četvrtak, 28. svibnja 2020. 23:45:36 CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
==> Extracting sources...
==> Removing existing $pkgdir/ directory...
==> Starting build()...
-- Found Corrade: /usr/include found components: Containers rc Utility
-- Found Magnum: /usr/include
-- Found Corrade: /usr/include found components: Containers rc Main
-- Found Corrade: /usr/include found components: Containers rc Utility PluginManager
-- Found Magnum: /usr/include found components: Trade GL MeshTools Primitives Shaders Sdl2Application
-- Found Corrade: /usr/include found components: Containers rc Main
-- Found Corrade: /usr/include found components: Containers rc Utility PluginManager
-- Found Magnum: /usr/include found components: Trade MeshTools Primitives SceneGraph Shaders GL DebugTools Sdl2Application
-- Found Corrade: /usr/include found components: Containers rc Main
-- Found Corrade: /usr/include found components: Containers rc Utility PluginManager
-- Found Magnum: /usr/include found components: GL Shaders Trade Sdl2Application
-- Found Corrade: /usr/include found components: Containers rc Utility Interconnect
-- Found Corrade: /usr/include found components: Containers rc Utility PluginManager
-- Found Magnum: /usr/include found components: TextureTools GL Text
-- Found Corrade: /usr/include found components: Containers rc Main
-- Found Corrade: /usr/include found components: Containers rc Utility PluginManager
-- Found Magnum: /usr/include found components: Trade GL Audio MeshTools Primitives SceneGraph Shaders Sdl2Application
-- Found Corrade: /usr/include found components: Containers rc Main
-- Found Corrade: /usr/include found components: Containers rc Utility PluginManager
-- Found Magnum: /usr/include found components: Trade GL MeshTools Primitives SceneGraph Sdl2Application Shaders
-- Found Corrade: /usr/include found components: Containers rc Main
-- Found Corrade: /usr/include found components: Containers rc Utility PluginManager
-- Found Corrade: /usr/include found components: Containers rc Utility
-- Found Magnum: /usr/include found components: GL SceneGraph Shaders
-- Found MagnumIntegration: /usr/include found components: Bullet
-- Found Corrade: /usr/include found components: Containers rc Main
-- Found Corrade: /usr/include found components: Containers rc Utility PluginManager
-- Found Magnum: /usr/include found components: Trade GL MeshTools Primitives SceneGraph Sdl2Application
-- Found DART: /usr/include (Required is at least version "6.0.0") found components: dart missing components: io-urdf utils-urdf
CMake Error at src/dart/CMakeLists.txt:47 (message):
DART version >= 6 and DART urdf library are required for this example!
-- Configuring incomplete, errors occurred!
See also "/home/marin/magnum-root/magnum-examples/build/CMakeFiles/CMakeOutput.log".
See also "/home/marin/magnum-root/magnum-examples/build/CMakeFiles/CMakeError.log".
==> ERROR: A failure occurred in build().
Aborting...
It fails to find io-urdf / utils-urdf components. Not sure are those specific to dart library or standalone packages (couldn't find them on aur). I excluded this example from build for now...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.