43 vc::Error LoadImageFromFile(
const char * path);
44 vc::Error LoadImage(
const char * path,
int id,
char * bgraData,
unsigned int width,
unsigned int height);
45 vc::Error InitDepthBuffer(
int width,
int height);
46 vc::Error CreateAttachment(
int width,
int height,
int imageCount, vc::ShaderVertexFormat format);
48#ifdef VENOM_BINDLESS_TEXTURES
49 inline int GetTextureID()
const {
return _GetResourceToCache()->As<
TextureResource>()->GetTextureID(); }
51 virtual bool HasTexture()
const = 0;
53 virtual vc::Error LoadImage(
unsigned char * pixels,
int width,
int height,
int channels) = 0;
54 virtual vc::Error LoadImageBGRA(
unsigned char * pixels,
int width,
int height,
int channels) = 0;
55 virtual vc::Error LoadImage(uint16_t * pixels,
int width,
int height,
int channels) = 0;
56 inline void SetTexturePeakLuminance(
float peakLuminance) { __luminance = peakLuminance; }
57 inline const float & GetTexturePeakLuminance()
const {
return __luminance; }
59 virtual vc::Error _InitDepthBuffer(
int width,
int height) = 0;
60 virtual vc::Error _CreateAttachment(
int width,
int height,
int imageCount, vc::ShaderVertexFormat format) = 0;
63 void __CreateDummyTexture();
84 Texture(
const char * path,
int id,
char * bgraData,
unsigned int width,
unsigned int height);
87 inline vc::Error LoadImageFromFile(
const char * path) {
return _impl->As<
TextureImpl>()->LoadImageFromFile(path); }
88 inline vc::Error LoadImage(
const char * path,
int id,
char * bgraData,
unsigned int width,
unsigned int height) {
return _impl->As<
TextureImpl>()->LoadImage(path,
id, bgraData, width, height); }
89 inline vc::Error InitDepthBuffer(
int width,
int height) {
return _impl->As<
TextureImpl>()->InitDepthBuffer(width, height); }
90 inline vc::Error CreateAttachment(
int width,
int height,
int imageCount, vc::ShaderVertexFormat format) {
return _impl->As<
TextureImpl>()->CreateAttachment(width, height, imageCount, format); }
91 inline bool HasTexture()
const {
return _impl->As<
TextureImpl>()->HasTexture(); }
92#ifdef VENOM_BINDLESS_TEXTURES
93 inline int GetTextureID()
const {
return _impl->As<
TextureImpl>()->GetTextureID(); }
97 inline void __CreateDummyTexture() { _impl->As<
TextureImpl>()->__CreateDummyTexture(); }