Commit 2e803b3e0b7fc2983469de21d186753dedd0bb4b
1 parent
c428cc2c
Changes required after some pixel formats were moved to the Public API in Core
Change-Id: I5e2222ce254b3164ed86dbee2b1a26dc101288f7
Showing
1 changed file
with
9 additions
and
11 deletions
examples/rendering-basic-pbr/ktx-loader.cpp
| ... | ... | @@ -19,8 +19,6 @@ |
| 19 | 19 | #include "ktx-loader.h" |
| 20 | 20 | |
| 21 | 21 | // EXTERNAL INCLUDES |
| 22 | -#include <dali/devel-api/images/pixel-devel.h> | |
| 23 | -#include <dali/devel-api/images/pixel-data-devel.h> | |
| 24 | 22 | #include <memory.h> |
| 25 | 23 | #include <stdio.h> |
| 26 | 24 | #include <stdint.h> |
| ... | ... | @@ -49,38 +47,38 @@ struct KtxFileHeader |
| 49 | 47 | /** |
| 50 | 48 | * Convert KTX format to Dali::Pixel::Format |
| 51 | 49 | */ |
| 52 | -bool ConvertPixelFormat(const uint32_t ktxPixelFormat, Dali::DevelPixel::Format& format) | |
| 50 | +bool ConvertPixelFormat(const uint32_t ktxPixelFormat, Dali::Pixel::Format& format) | |
| 53 | 51 | { |
| 54 | 52 | switch( ktxPixelFormat ) |
| 55 | 53 | { |
| 56 | 54 | case 0x93B0: // GL_COMPRESSED_RGBA_ASTC_4x4_KHR |
| 57 | 55 | { |
| 58 | - format = Dali::DevelPixel::COMPRESSED_RGBA_ASTC_4x4_KHR; | |
| 56 | + format = Dali::Pixel::COMPRESSED_RGBA_ASTC_4x4_KHR; | |
| 59 | 57 | break; |
| 60 | 58 | } |
| 61 | 59 | case 0x881B:// GL_RGB16F |
| 62 | 60 | { |
| 63 | - format = Dali::DevelPixel::RGB16F; | |
| 61 | + format = Dali::Pixel::RGB16F; | |
| 64 | 62 | break; |
| 65 | 63 | } |
| 66 | 64 | case 0x8815: // GL_RGB32F |
| 67 | 65 | { |
| 68 | - format = Dali::DevelPixel::RGB32F; | |
| 66 | + format = Dali::Pixel::RGB32F; | |
| 69 | 67 | break; |
| 70 | 68 | } |
| 71 | 69 | case 0x8C3A: // GL_R11F_G11F_B10F |
| 72 | 70 | { |
| 73 | - format = Dali::DevelPixel::RGB32F; | |
| 71 | + format = Dali::Pixel::RGB32F; | |
| 74 | 72 | break; |
| 75 | 73 | } |
| 76 | 74 | case 0x8D7C: // GL_RGBA8UI |
| 77 | 75 | { |
| 78 | - format = Dali::DevelPixel::RGBA8888; | |
| 76 | + format = Dali::Pixel::RGBA8888; | |
| 79 | 77 | break; |
| 80 | 78 | } |
| 81 | 79 | case 0x8D7D: // GL_RGB8UI |
| 82 | 80 | { |
| 83 | - format = Dali::DevelPixel::RGB888; | |
| 81 | + format = Dali::Pixel::RGB888; | |
| 84 | 82 | break; |
| 85 | 83 | } |
| 86 | 84 | default: |
| ... | ... | @@ -162,7 +160,7 @@ bool LoadCubeMapFromKtxFile( const std::string& path, CubeData& cubedata ) |
| 162 | 160 | header.pixelHeight = 1u; |
| 163 | 161 | } |
| 164 | 162 | |
| 165 | - Dali::DevelPixel::Format daliformat = DevelPixel::RGB888; | |
| 163 | + Dali::Pixel::Format daliformat = Pixel::RGB888; | |
| 166 | 164 | |
| 167 | 165 | ConvertPixelFormat(header.glInternalFormat, daliformat); |
| 168 | 166 | |
| ... | ... | @@ -185,7 +183,7 @@ bool LoadCubeMapFromKtxFile( const std::string& path, CubeData& cubedata ) |
| 185 | 183 | memcpy(img[face],imgPointer,byteSize); |
| 186 | 184 | imgSize[face] = byteSize; |
| 187 | 185 | imgPointer += byteSize; |
| 188 | - cubedata.img[face][mipmapLevel] = DevelPixelData::New( img[face], imgSize[face], header.pixelWidth , header.pixelHeight , daliformat, PixelData::FREE ); | |
| 186 | + cubedata.img[face][mipmapLevel] = PixelData::New( img[face], imgSize[face], header.pixelWidth , header.pixelHeight , daliformat, PixelData::FREE ); | |
| 189 | 187 | } |
| 190 | 188 | } |
| 191 | 189 | header.pixelHeight/=2u; | ... | ... |