Download third_party/ktx-src/tests/loadtests/glloadtests/shader-based/GL3LoadTestSample.h from kimjunhan/vkgs-sim: direct link, hf CLI and curl.
- Browser
- Download file 2.34 kB
-
https://huggingface.co/kimjunhan/vkgs-sim/resolve/main/third_party/ktx-src/tests/loadtests/glloadtests/shader-based/GL3LoadTestSample.h
- Command line
-
hf download hf://kimjunhan/vkgs-sim/third_party/ktx-src/tests/loadtests/glloadtests/shader-based/GL3LoadTestSample.h
-
curl -L -o GL3LoadTestSample.h https://huggingface.co/kimjunhan/vkgs-sim/resolve/main/third_party/ktx-src/tests/loadtests/glloadtests/shader-based/GL3LoadTestSample.h
2.34 kB
| /* -*- tab-width: 4; -*- */ | |
| /* vi: set sw=2 ts=4 expandtab: */ | |
| /* | |
| * Copyright 2017-2020 Mark Callow, <khronos at callow dot im>. | |
| * SPDX-License-Identifier: Apache-2.0 | |
| */ | |
| class GL3LoadTestSample : public LoadTestSample { | |
| public: | |
| typedef uint64_t ticks_t; | |
| GL3LoadTestSample(uint32_t width, uint32_t height, | |
| const char* const /*szArgs*/, | |
| const std::string sBasePath) | |
| : LoadTestSample(width, height, sBasePath) | |
| { | |
| } | |
| virtual ~GL3LoadTestSample() { } | |
| virtual int doEvent(SDL_Event* event) { return LoadTestSample::doEvent(event); }; | |
| virtual void resize(uint32_t width, uint32_t height) = 0; | |
| virtual void run(uint32_t msTicks) = 0; | |
| //virtual void getOverlayText(TextOverlay *textOverlay) { }; | |
| typedef LoadTestSample* (*PFN_create)(uint32_t width, uint32_t height, | |
| const char* const szArgs, | |
| const std::string sBasePath); | |
| protected: | |
| using ShaderSource = std::vector<const GLchar*>; | |
| virtual void keyPressed(uint32_t /*keyCode*/) { } | |
| virtual void viewChanged() { } | |
| static bool contextSupportsSwizzle(); | |
| std::string ktxfilename; | |
| int externalFile = 0; | |
| struct compressedTexFeatures { | |
| bool astc_ldr; | |
| bool astc_hdr; | |
| bool bc6h; | |
| bool bc7; | |
| bool etc1; | |
| bool etc2; | |
| bool bc3; | |
| bool pvrtc1; | |
| bool pvrtc_srgb; | |
| bool pvrtc2; | |
| bool rgtc; | |
| }; | |
| static void determineCompressedTexFeatures(compressedTexFeatures& features); | |
| static GLint framebufferColorEncoding(); | |
| void loadMesh(std::string filename, glMeshLoader::MeshBuffer& meshBuffer, | |
| std::vector<glMeshLoader::VertexLayout> vertexLayout, | |
| float scale); | |
| static void makeShader(GLenum type, ShaderSource& source, GLuint* shader); | |
| static void makeShader(GLenum type, const GLchar* const source, | |
| GLuint* shader); | |
| static void makeProgram(GLuint vs, GLuint fs, GLuint* program); | |
| }; | |