LukasBanana / LLGL

Low Level Graphics Library (LLGL) is a thin abstraction layer for the modern graphics APIs OpenGL, Direct3D, Vulkan, and Metal
BSD 3-Clause "New" or "Revised" License
2.1k stars 139 forks source link

how to debug low level api ? #33

Closed CaichaoGitHub closed 5 years ago

CaichaoGitHub commented 5 years ago

i want to debug low level api while using clion, however , i found the target version of render system is loaded dynamically using dlopen , its possible to debug the OPENGL api ? 2019-03-05 11 23 31

LukasBanana commented 5 years ago

The debug layer (i.e. DbgRenderSystem) is always linked statically because it's part of the LLGL.lib and not another dynamically loaded library (like LLGL_OpenGL.lib for instance).

In VisualStudio, debugging dynamically loaded libraries is not a big deal, but if it doesn't work on your platform, just build the entire LLGL project as static lib (i.e. with the CMake option LLGL_BUILD_STATIC_LIB enabled). In this case, however, you can only build a single render system:

llgl-cmake-issue33

CaichaoGitHub commented 5 years ago

The debug layer (i.e. DbgRenderSystem) is always linked statically because it's part of the LLGL.lib and not another dynamically loaded library (like LLGL_OpenGL.lib for instance).

In VisualStudio, debugging dynamically loaded libraries is not a big deal, but if it doesn't work on your platform, just build the entire LLGL project as static lib (i.e. with the CMake option LLGL_BUILD_STATIC_LIB enabled). In this case, however, you can only build a single render system:

llgl-cmake-issue33

i build llg in static lib and it worked , thanks ,