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