Skip to content

Commit

Permalink
[render] remove useless distinctions between opengl and bgfx in some …
Browse files Browse the repository at this point in the history
…examples
  • Loading branch information
alemuntoni committed Jan 8, 2025
1 parent 3f7e7de commit bb5f55e
Show file tree
Hide file tree
Showing 23 changed files with 22 additions and 373 deletions.
8 changes: 4 additions & 4 deletions examples/render/01-viewer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

cmake_minimum_required(VERSION 3.24)

if (VCLIB_RENDER_BACKEND STREQUAL "bgfx")
add_subdirectory(bgfx)
if (TARGET vclib-3rd-qt)
add_subdirectory(qt)
endif()
if (VCLIB_RENDER_BACKEND STREQUAL "opengl2")
add_subdirectory(opengl2)
if (TARGET vclib-3rd-glfw)
add_subdirectory(glfw)
endif()
30 changes: 0 additions & 30 deletions examples/render/01-viewer/bgfx/CMakeLists.txt

This file was deleted.

File renamed without changes.
30 changes: 0 additions & 30 deletions examples/render/01-viewer/opengl2/CMakeLists.txt

This file was deleted.

37 changes: 0 additions & 37 deletions examples/render/01-viewer/opengl2/glfw/CMakeLists.txt

This file was deleted.

37 changes: 0 additions & 37 deletions examples/render/01-viewer/opengl2/qt/CMakeLists.txt

This file was deleted.

46 changes: 0 additions & 46 deletions examples/render/01-viewer/opengl2/qt/main.cpp

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ int main(int argc, char** argv)
// load and set up a drawable mesh
vcl::DrawableMesh<vcl::TriMesh> drawable = getDrawableMesh<vcl::TriMesh>();

drawable.color() = vcl::Color::Yellow;
drawable.updateBuffers();

auto mrs = drawable.renderSettings();
mrs.setSurfaceColorPerMesh();
mrs.setSurfaceShadingFlat();
drawable.setRenderSettings(mrs);

// add the drawable mesh to the scene
// the viewer will own **a copy** of the drawable mesh
tw.pushDrawableObject(drawable);
Expand Down
9 changes: 4 additions & 5 deletions examples/render/02-mesh-viewer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@

cmake_minimum_required(VERSION 3.24)

if (VCLIB_RENDER_BACKEND STREQUAL "bgfx")
add_subdirectory(bgfx)
endif()
if (VCLIB_RENDER_BACKEND STREQUAL "opengl2")
add_subdirectory(opengl2)
if (TARGET vclib-3rd-qt)
add_subdirectory(qt)
endif()


29 changes: 0 additions & 29 deletions examples/render/02-mesh-viewer/bgfx/CMakeLists.txt

This file was deleted.

29 changes: 0 additions & 29 deletions examples/render/02-mesh-viewer/opengl2/CMakeLists.txt

This file was deleted.

37 changes: 0 additions & 37 deletions examples/render/02-mesh-viewer/opengl2/qt/CMakeLists.txt

This file was deleted.

58 changes: 0 additions & 58 deletions examples/render/02-mesh-viewer/opengl2/qt/main.cpp

This file was deleted.

File renamed without changes.
7 changes: 6 additions & 1 deletion examples/render/03-viewer-with-text/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,10 @@
cmake_minimum_required(VERSION 3.24)

if (VCLIB_RENDER_BACKEND STREQUAL "bgfx")
add_subdirectory(bgfx)
if (TARGET vclib-3rd-qt)
add_subdirectory(qt)
endif()
if (TARGET vclib-3rd-glfw)
add_subdirectory(glfw)
endif()
endif()
Loading

0 comments on commit bb5f55e

Please sign in to comment.