nv-sgl 0.6.0__cp313-cp313-win_amd64.whl
Sign up to get free protection for your applications and to get access to all the features.
- include/tevclient.h +393 -0
- nv_sgl-0.6.0.dist-info/LICENSE +29 -0
- nv_sgl-0.6.0.dist-info/METADATA +21 -0
- nv_sgl-0.6.0.dist-info/RECORD +142 -0
- nv_sgl-0.6.0.dist-info/WHEEL +5 -0
- nv_sgl-0.6.0.dist-info/top_level.txt +1 -0
- sgl/__init__.py +15 -0
- sgl/__init__.pyi +6738 -0
- sgl/d3d12/D3D12Core.dll +0 -0
- sgl/d3d12/d3d12SDKLayers.dll +0 -0
- sgl/dxcompiler.dll +0 -0
- sgl/dxil.dll +0 -0
- sgl/gfx.dll +0 -0
- sgl/include/sgl/app/app.h +113 -0
- sgl/include/sgl/core/bitmap.h +302 -0
- sgl/include/sgl/core/crypto.h +89 -0
- sgl/include/sgl/core/data_type.h +46 -0
- sgl/include/sgl/core/dds_file.h +103 -0
- sgl/include/sgl/core/enum.h +201 -0
- sgl/include/sgl/core/error.h +161 -0
- sgl/include/sgl/core/file_stream.h +77 -0
- sgl/include/sgl/core/file_system_watcher.h +141 -0
- sgl/include/sgl/core/format.h +36 -0
- sgl/include/sgl/core/fwd.h +90 -0
- sgl/include/sgl/core/hash.h +45 -0
- sgl/include/sgl/core/input.h +522 -0
- sgl/include/sgl/core/logger.h +214 -0
- sgl/include/sgl/core/macros.h +184 -0
- sgl/include/sgl/core/maths.h +45 -0
- sgl/include/sgl/core/memory_mapped_file.h +112 -0
- sgl/include/sgl/core/memory_mapped_file_stream.h +32 -0
- sgl/include/sgl/core/memory_stream.h +74 -0
- sgl/include/sgl/core/object.h +683 -0
- sgl/include/sgl/core/platform.h +239 -0
- sgl/include/sgl/core/plugin.h +331 -0
- sgl/include/sgl/core/resolver.h +39 -0
- sgl/include/sgl/core/short_vector.h +141 -0
- sgl/include/sgl/core/static_vector.h +111 -0
- sgl/include/sgl/core/stream.h +54 -0
- sgl/include/sgl/core/string.h +276 -0
- sgl/include/sgl/core/struct.h +360 -0
- sgl/include/sgl/core/thread.h +28 -0
- sgl/include/sgl/core/timer.h +52 -0
- sgl/include/sgl/core/traits.h +15 -0
- sgl/include/sgl/core/type_utils.h +19 -0
- sgl/include/sgl/core/window.h +177 -0
- sgl/include/sgl/device/agility_sdk.h +24 -0
- sgl/include/sgl/device/blit.h +88 -0
- sgl/include/sgl/device/buffer_cursor.h +162 -0
- sgl/include/sgl/device/command.h +539 -0
- sgl/include/sgl/device/cuda_api.h +766 -0
- sgl/include/sgl/device/cuda_interop.h +39 -0
- sgl/include/sgl/device/cuda_utils.h +107 -0
- sgl/include/sgl/device/cursor_utils.h +129 -0
- sgl/include/sgl/device/device.h +668 -0
- sgl/include/sgl/device/device_resource.h +37 -0
- sgl/include/sgl/device/fence.h +91 -0
- sgl/include/sgl/device/formats.h +330 -0
- sgl/include/sgl/device/framebuffer.h +85 -0
- sgl/include/sgl/device/fwd.h +164 -0
- sgl/include/sgl/device/helpers.h +20 -0
- sgl/include/sgl/device/hot_reload.h +75 -0
- sgl/include/sgl/device/input_layout.h +74 -0
- sgl/include/sgl/device/kernel.h +69 -0
- sgl/include/sgl/device/memory_heap.h +155 -0
- sgl/include/sgl/device/native_formats.h +342 -0
- sgl/include/sgl/device/native_handle.h +73 -0
- sgl/include/sgl/device/native_handle_traits.h +65 -0
- sgl/include/sgl/device/pipeline.h +138 -0
- sgl/include/sgl/device/print.h +45 -0
- sgl/include/sgl/device/python/cursor_utils.h +853 -0
- sgl/include/sgl/device/query.h +52 -0
- sgl/include/sgl/device/raytracing.h +84 -0
- sgl/include/sgl/device/reflection.h +1254 -0
- sgl/include/sgl/device/resource.h +705 -0
- sgl/include/sgl/device/sampler.h +57 -0
- sgl/include/sgl/device/shader.h +516 -0
- sgl/include/sgl/device/shader_cursor.h +85 -0
- sgl/include/sgl/device/shader_object.h +94 -0
- sgl/include/sgl/device/shader_offset.h +67 -0
- sgl/include/sgl/device/shared_handle.h +12 -0
- sgl/include/sgl/device/slang_utils.h +54 -0
- sgl/include/sgl/device/swapchain.h +74 -0
- sgl/include/sgl/device/types.h +782 -0
- sgl/include/sgl/math/colorspace.h +56 -0
- sgl/include/sgl/math/constants.h +7 -0
- sgl/include/sgl/math/float16.h +146 -0
- sgl/include/sgl/math/matrix.h +6 -0
- sgl/include/sgl/math/matrix_math.h +746 -0
- sgl/include/sgl/math/matrix_types.h +207 -0
- sgl/include/sgl/math/python/primitivetype.h +33 -0
- sgl/include/sgl/math/quaternion.h +6 -0
- sgl/include/sgl/math/quaternion_math.h +484 -0
- sgl/include/sgl/math/quaternion_types.h +83 -0
- sgl/include/sgl/math/ray.h +47 -0
- sgl/include/sgl/math/scalar_math.h +249 -0
- sgl/include/sgl/math/scalar_types.h +107 -0
- sgl/include/sgl/math/vector.h +6 -0
- sgl/include/sgl/math/vector_math.h +1796 -0
- sgl/include/sgl/math/vector_types.h +336 -0
- sgl/include/sgl/python/nanobind.h +489 -0
- sgl/include/sgl/python/py_doc.h +11600 -0
- sgl/include/sgl/python/sgl_ext_pch.h +8 -0
- sgl/include/sgl/sgl.h +21 -0
- sgl/include/sgl/sgl_pch.h +6 -0
- sgl/include/sgl/stl/bit.h +377 -0
- sgl/include/sgl/tests/testing.h +54 -0
- sgl/include/sgl/ui/fwd.h +34 -0
- sgl/include/sgl/ui/imgui_config.h +43 -0
- sgl/include/sgl/ui/ui.h +71 -0
- sgl/include/sgl/ui/widgets.h +918 -0
- sgl/include/sgl/utils/python/slangpy.h +366 -0
- sgl/include/sgl/utils/renderdoc.h +50 -0
- sgl/include/sgl/utils/slangpy.h +153 -0
- sgl/include/sgl/utils/tev.h +93 -0
- sgl/include/sgl/utils/texture_loader.h +106 -0
- sgl/math/__init__.pyi +5083 -0
- sgl/platform/__init__.pyi +102 -0
- sgl/renderdoc/__init__.pyi +51 -0
- sgl/sgl.dll +0 -0
- sgl/sgl_ext.cp313-win_amd64.pyd +0 -0
- sgl/shaders/nvapi/nvHLSLExtns.h +2315 -0
- sgl/shaders/nvapi/nvHLSLExtnsInternal.h +758 -0
- sgl/shaders/nvapi/nvShaderExtnEnums.h +142 -0
- sgl/shaders/sgl/device/blit.slang +93 -0
- sgl/shaders/sgl/device/nvapi.slang +5 -0
- sgl/shaders/sgl/device/nvapi.slangh +7 -0
- sgl/shaders/sgl/device/print.slang +445 -0
- sgl/shaders/sgl/math/constants.slang +4 -0
- sgl/shaders/sgl/math/ray.slang +29 -0
- sgl/shaders/sgl/ui/imgui.slang +49 -0
- sgl/slang-glslang.dll +0 -0
- sgl/slang-llvm.dll +0 -0
- sgl/slang-rt.dll +0 -0
- sgl/slang.dll +0 -0
- sgl/slangpy/__init__.pyi +268 -0
- sgl/tev/__init__.pyi +108 -0
- sgl/tevclient.lib +0 -0
- sgl/thread/__init__.pyi +4 -0
- sgl/ui/__init__.pyi +1118 -0
- share/cmake/tevclient/tevclient-config-release.cmake +19 -0
- share/cmake/tevclient/tevclient-config.cmake +108 -0
@@ -0,0 +1,106 @@
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
2
|
+
|
3
|
+
#pragma once
|
4
|
+
|
5
|
+
#include "sgl/device/fwd.h"
|
6
|
+
#include "sgl/device/resource.h"
|
7
|
+
|
8
|
+
#include "sgl/core/fwd.h"
|
9
|
+
#include "sgl/core/object.h"
|
10
|
+
|
11
|
+
#include <filesystem>
|
12
|
+
|
13
|
+
namespace sgl {
|
14
|
+
|
15
|
+
/**
|
16
|
+
* \brief Utility class for loading textures from bitmaps and image files.
|
17
|
+
*/
|
18
|
+
class SGL_API TextureLoader : public sgl::Object {
|
19
|
+
SGL_OBJECT(TextureLoader)
|
20
|
+
public:
|
21
|
+
TextureLoader(ref<Device> device);
|
22
|
+
~TextureLoader();
|
23
|
+
|
24
|
+
struct SGL_API Options {
|
25
|
+
/// Load 8/16-bit integer data as normalized resource format.
|
26
|
+
bool load_as_normalized{true};
|
27
|
+
/// Use \c Format::rgba8_unorm_srgb format if bitmap is 8-bit RGBA with sRGB gamma.
|
28
|
+
bool load_as_srgb{true};
|
29
|
+
/// Extend RGB to RGBA if RGB texture format is not available.
|
30
|
+
bool extend_alpha{true};
|
31
|
+
/// Allocate mip levels for the texture.
|
32
|
+
bool allocate_mips{false};
|
33
|
+
/// Generate mip levels for the texture.
|
34
|
+
bool generate_mips{false};
|
35
|
+
/// Resource usage flags for the texture.
|
36
|
+
/// \c ResourceUsage::render_target will be added automatically if \c generate_mips is true.
|
37
|
+
ResourceUsage usage{ResourceUsage::shader_resource};
|
38
|
+
|
39
|
+
Options();
|
40
|
+
};
|
41
|
+
|
42
|
+
/**
|
43
|
+
* \brief Load a texture from a bitmap.
|
44
|
+
*
|
45
|
+
* \param bitmap Bitmap to load.
|
46
|
+
* \param options Texture loading options.
|
47
|
+
* \return New texture object.
|
48
|
+
*/
|
49
|
+
ref<Texture> load_texture(const Bitmap* bitmap, std::optional<Options> options = {});
|
50
|
+
|
51
|
+
/**
|
52
|
+
* \brief Load a texture from an image file.
|
53
|
+
*
|
54
|
+
* \param path Image file path.
|
55
|
+
* \param options Texture loading options.
|
56
|
+
* \return New texture object.
|
57
|
+
*/
|
58
|
+
ref<Texture> load_texture(const std::filesystem::path& path, std::optional<Options> options = {});
|
59
|
+
|
60
|
+
/**
|
61
|
+
* \brief Load textures from a list of bitmaps.
|
62
|
+
*
|
63
|
+
* \param bitmaps Bitmaps to load.
|
64
|
+
* \param options Texture loading options.
|
65
|
+
* \return List of new of texture objects.
|
66
|
+
*/
|
67
|
+
std::vector<ref<Texture>> load_textures(std::span<const Bitmap*> bitmaps, std::optional<Options> options = {});
|
68
|
+
|
69
|
+
/**
|
70
|
+
* \brief Load textures from a list of image files.
|
71
|
+
*
|
72
|
+
* \param paths Image file paths.
|
73
|
+
* \param options Texture loading options.
|
74
|
+
* \return List of new texture objects.
|
75
|
+
*/
|
76
|
+
std::vector<ref<Texture>>
|
77
|
+
load_textures(std::span<std::filesystem::path> paths, std::optional<Options> options = {});
|
78
|
+
|
79
|
+
/**
|
80
|
+
* \brief Load a texture array from a list of bitmaps.
|
81
|
+
*
|
82
|
+
* All bitmaps need to have the same format and dimensions.
|
83
|
+
*
|
84
|
+
* \param bitmaps Bitmaps to load.
|
85
|
+
* \param options Texture loading options.
|
86
|
+
* \return New texture array object.
|
87
|
+
*/
|
88
|
+
ref<Texture> load_texture_array(std::span<const Bitmap*> bitmaps, std::optional<Options> options = {});
|
89
|
+
|
90
|
+
/**
|
91
|
+
* \brief Load a texture array from a list of image files.
|
92
|
+
*
|
93
|
+
* All images need to have the same format and dimensions.
|
94
|
+
*
|
95
|
+
* \param paths Image file paths.
|
96
|
+
* \param options Texture loading options.
|
97
|
+
* \return New texture array object.
|
98
|
+
*/
|
99
|
+
ref<Texture> load_texture_array(std::span<std::filesystem::path> paths, std::optional<Options> options = {});
|
100
|
+
|
101
|
+
private:
|
102
|
+
ref<Device> m_device;
|
103
|
+
ref<Blitter> m_blitter;
|
104
|
+
};
|
105
|
+
|
106
|
+
} // namespace sgl
|