VenomEngine
Cross-Platform Modern Graphics Engine
Loading...
Searching...
No Matches
Texture.h
Go to the documentation of this file.
1
8
#pragma once
9
10
#include <
venom/common/plugin/graphics/Texture.h
>
11
12
#include <
venom/vulkan/Buffer.h
>
13
#include <
venom/vulkan/Image.h
>
14
#include <
venom/vulkan/ImageView.h
>
15
#include <
venom/vulkan/Sampler.h
>
16
17
namespace
venom
18
{
19
namespace
vulkan
20
{
21
22
class
VulkanTextureResource
:
public
vc::TextureResource
23
{
24
public
:
25
VulkanTextureResource
();
26
27
Image
image;
28
ImageView
imageView;
29
};
30
31
class
VulkanTexture
:
public
vc::TextureImpl
32
{
33
public
:
34
VulkanTexture
();
35
~VulkanTexture
();
36
37
static
VulkanTexture
* GetDummyTexture();
38
static
void
SetDummyTexture(
VulkanTexture
* texture);
39
40
vc::Error LoadImage(
unsigned
char
* pixels,
int
width,
int
height,
int
channels)
override
;
41
vc::Error LoadImageBGRA(
unsigned
char
* pixels,
int
width,
int
height,
int
channels)
override
;
42
vc::Error LoadImage(uint16_t * pixels,
int
width,
int
height,
int
channels)
override
;
43
vc::Error _InitDepthBuffer(
int
width,
int
height)
override
;
44
vc::Error _CreateAttachment(
int
width,
int
height,
int
imageCount, vc::ShaderVertexFormat format)
override
;
45
46
inline
bool
HasTexture()
const override
{
return
_resource && GetImage().GetVkImage() != VK_NULL_HANDLE; }
47
48
inline
const
Image
& GetImage()
const
{
return
_resource->As<
VulkanTextureResource
>()->image; }
49
inline
Image
& GetImage() {
return
_resource->As<
VulkanTextureResource
>()->image; }
50
inline
const
ImageView
& GetImageView()
const
{
return
_resource->As<
VulkanTextureResource
>()->imageView; }
51
inline
ImageView
& GetImageView() {
return
_resource->As<
VulkanTextureResource
>()->imageView; }
52
};
53
54
}
55
}
Buffer.h
Image.h
ImageView.h
Sampler.h
venom::common::TextureImpl
Definition
Texture.h:38
venom::common::TextureResource
Definition
Texture.h:25
venom::vulkan::Image
Definition
Image.h:18
venom::vulkan::ImageView
Definition
ImageView.h:18
venom::vulkan::VulkanTexture
Definition
Texture.h:32
venom::vulkan::VulkanTextureResource
Definition
Texture.h:23
Texture.h
venom
Contains the entirety of the code of the VenomEngine project.
Definition
Config.h:13
lib
vulkan
include
venom
vulkan
plugin
graphics
Texture.h
Generated by
1.12.0