Skip to content

Commit

Permalink
igl | Fix Tiny_MeshLarge for OpenGL
Browse files Browse the repository at this point in the history
Summary: Fixed `Tiny_MeshLarge` when compiling in OpenGL-only mode.

Reviewed By: pixelperfect3

Differential Revision: D50089383

fbshipit-source-id: 336814b3d3f5a9ca828145d31d83e633a39446fd
  • Loading branch information
corporateshark authored and facebook-github-bot committed Oct 9, 2023
1 parent 3f68328 commit 98b8f95
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions samples/desktop/Tiny/Tiny_MeshLarge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@
#define USE_OPENGL_BACKEND 1
#endif

#if USE_OPENGL_BACKEND
// for KTX textures
#define VK_FORMAT_R32G32B32A32_SFLOAT 109
#define VK_FORMAT_BC7_UNORM_BLOCK 145
#endif // USE_OPENGL_BACKEND

#if defined(__cpp_lib_format)
#include <format>
#define IGL_FORMAT std::format
Expand Down Expand Up @@ -2112,8 +2118,7 @@ void generateCompressedTexture(LoadedImage img) {

// Go over all generated mipmap and create a compressed texture

// Create ktx2 texture
// hard coded and support only BC7 format
// Create ktx2 texture hard coded and support only BC7 format
ktxTextureCreateInfo createInfo = {
.vkFormat = VK_FORMAT_BC7_UNORM_BLOCK,
.baseWidth = static_cast<uint32_t>(img.w),
Expand Down

0 comments on commit 98b8f95

Please sign in to comment.