Download third_party/ktx-src/tests/loadtests/glloadtests/shader-based/EncodeTexture.h from kimjunhan/vkgs-sim: direct link, hf CLI and curl.
- Browser
- Download file 1.79 kB
-
https://huggingface.co/kimjunhan/vkgs-sim/resolve/main/third_party/ktx-src/tests/loadtests/glloadtests/shader-based/EncodeTexture.h
- Command line
-
hf download hf://kimjunhan/vkgs-sim/third_party/ktx-src/tests/loadtests/glloadtests/shader-based/EncodeTexture.h
-
curl -L -o EncodeTexture.h https://huggingface.co/kimjunhan/vkgs-sim/resolve/main/third_party/ktx-src/tests/loadtests/glloadtests/shader-based/EncodeTexture.h
1.79 kB
| /* -*- tab-width: 4; -*- */ | |
| /* vi: set sw=2 ts=4 expandtab: */ | |
| /* | |
| * Copyright 2018-2022 Mark Callow. | |
| * SPDX-License-Identifier: Apache-2.0 | |
| */ | |
| /** | |
| * @file | |
| * @brief GLLoadTestSample derived class for encoding a texture and texturing a cube with it. | |
| * | |
| * @author Mark Callow, github.com/MarkCallow. | |
| */ | |
| class EncodeTexture : public GL3LoadTestSample { | |
| public: | |
| EncodeTexture(uint32_t width, uint32_t height, | |
| const char* const szArgs, | |
| const std::string sBasePath); | |
| ~EncodeTexture(); | |
| virtual void resize(uint32_t width, uint32_t height); | |
| virtual void run(uint32_t msTicks); | |
| //virtual void getOverlayText(GLTextOverlay *textOverlay); | |
| static LoadTestSample* | |
| create(uint32_t width, uint32_t height, | |
| const char* const szArgs, const std::string sBasePath); | |
| protected: | |
| void processArgs(std::string sArgs); | |
| GLuint gnTexture; | |
| GLuint gnTexProg; | |
| GLuint gnVao; | |
| GLuint gnVbo[2]; | |
| GLint gulMvMatrixLocTP; | |
| GLint gulPMatrixLocTP; | |
| GLint gulSamplerLocTP; | |
| bool bInitialized; | |
| ktx_transcode_fmt_e transcodeTarget; | |
| enum encode_fmt_e { EF_ASTC = 1, EF_ETC1S = 2, EF_UASTC = 3 }; | |
| friend std::ostream& operator<<(std::ostream& os, encode_fmt_e format); | |
| encode_fmt_e encodeTarget; | |
| }; | |
| inline std::ostream& operator<<(std::ostream& os, EncodeTexture::encode_fmt_e format) | |
| { | |
| switch (format) { | |
| case EncodeTexture::EF_ASTC: | |
| os << "astc"; | |
| break; | |
| case EncodeTexture::EF_ETC1S: | |
| os << "etc1s"; | |
| break; | |
| case EncodeTexture::EF_UASTC: | |
| os << "uastc"; | |
| break; | |
| } | |
| return os; | |
| } | |