Mercurial > games > semicongine
comparison semiconginev2/rendering.nim @ 1242:e8b3dc80e48e
add: PNG loading and tests for it
| author | sam <sam@basx.dev> |
|---|---|
| date | Mon, 22 Jul 2024 15:53:32 +0700 |
| parents | 42eeb59f3a43 |
| children | 01e9f41d35b1 |
comparison
equal
deleted
inserted
replaced
| 1241:a0ed1a918fda | 1242:e8b3dc80e48e |
|---|---|
| 83 var fullscreen: bool | 83 var fullscreen: bool |
| 84 | 84 |
| 85 type | 85 type |
| 86 # type aliases | 86 # type aliases |
| 87 SupportedGPUType = float32 | float64 | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | TVec2[int32] | TVec2[int64] | TVec3[int32] | TVec3[int64] | TVec4[int32] | TVec4[int64] | TVec2[uint32] | TVec2[uint64] | TVec3[uint32] | TVec3[uint64] | TVec4[uint32] | TVec4[uint64] | TVec2[float32] | TVec2[float64] | TVec3[float32] | TVec3[float64] | TVec4[float32] | TVec4[float64] | TMat2[float32] | TMat2[float64] | TMat23[float32] | TMat23[float64] | TMat32[float32] | TMat32[float64] | TMat3[float32] | TMat3[float64] | TMat34[float32] | TMat34[float64] | TMat43[float32] | TMat43[float64] | TMat4[float32] | TMat4[float64] | 87 SupportedGPUType = float32 | float64 | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | TVec2[int32] | TVec2[int64] | TVec3[int32] | TVec3[int64] | TVec4[int32] | TVec4[int64] | TVec2[uint32] | TVec2[uint64] | TVec3[uint32] | TVec3[uint64] | TVec4[uint32] | TVec4[uint64] | TVec2[float32] | TVec2[float64] | TVec3[float32] | TVec3[float64] | TVec4[float32] | TVec4[float64] | TMat2[float32] | TMat2[float64] | TMat23[float32] | TMat23[float64] | TMat32[float32] | TMat32[float64] | TMat3[float32] | TMat3[float64] | TMat34[float32] | TMat34[float64] | TMat43[float32] | TMat43[float64] | TMat4[float32] | TMat4[float64] |
| 88 Gray = TVec1[uint8] | |
| 89 RGBA = TVec4[uint8] | |
| 90 PixelType = Gray | RGBA | |
| 91 | 88 |
| 92 # shader related types | 89 # shader related types |
| 93 DescriptorSet*[T: object] = object | 90 DescriptorSet*[T: object] = object |
| 94 data*: T | 91 data*: T |
| 95 vk: array[INFLIGHTFRAMES.int, VkDescriptorSet] | 92 vk: array[INFLIGHTFRAMES.int, VkDescriptorSet] |
| 118 size: uint64 | 115 size: uint64 |
| 119 rawPointer: pointer # if not nil, buffer is using mapped memory | 116 rawPointer: pointer # if not nil, buffer is using mapped memory |
| 120 offsetNextFree: uint64 | 117 offsetNextFree: uint64 |
| 121 memoryOffset: uint64 | 118 memoryOffset: uint64 |
| 122 memory: VkDeviceMemory | 119 memory: VkDeviceMemory |
| 123 Image*[T: PixelType] = object | |
| 124 width*: uint32 | |
| 125 height*: uint32 | |
| 126 interpolation*: VkFilter = VK_FILTER_LINEAR | |
| 127 data*: seq[T] | |
| 128 vk*: VkImage | |
| 129 imageview*: VkImageView | |
| 130 sampler*: VkSampler | |
| 131 isRenderTarget*: bool = false | |
| 132 samples*: VkSampleCountFlagBits = VK_SAMPLE_COUNT_1_BIT | |
| 133 GPUArray*[T: SupportedGPUType, TBuffer: static BufferType] = object | 120 GPUArray*[T: SupportedGPUType, TBuffer: static BufferType] = object |
| 134 data*: seq[T] | 121 data*: seq[T] |
| 135 buffer*: Buffer | 122 buffer*: Buffer |
| 136 offset*: uint64 | 123 offset*: uint64 |
| 137 GPUValue*[T: object, TBuffer: static BufferType] = object | 124 GPUValue*[T: object, TBuffer: static BufferType] = object |
