载入中...
搜索中...
未找到
Texture.h
浏览该文件的文档.
1#pragma once
2
3#include "graphics/Drawable.h"
4#include "graphics/Quad.h"
6#include <cstdint>
7#include <vector>
8
9namespace eve::graphics {
10
11class Graphics;
12
17class Texture : public Drawable {
18public:
20 ~Texture() override;
21
22 void draw(Graphics *gfx, const glm::mat4 &matrix) const override;
24 void drawOcclusion(Graphics *gfx, const glm::mat4 &matrix) const override;
25
26 int getWidth() const { return width; }
27 int getHeight() const { return height; }
28 int getPixelWidth() const { return pixelWidth; }
29 int getPixelHeight() const { return pixelHeight; }
30 int getMipmapCount() const { return mipmapCount; }
31 const TextureSampler &getSampler() const { return sampler; }
32
34 void *gpuHandle = nullptr;
35
36 int width = 0;
37 int height = 0;
38 int depth = 1;
39 int layers = 1;
40 int mipmapCount = 1;
41 int pixelWidth = 0;
42 int pixelHeight = 0;
44};
45
46} // namespace eve::graphics
Drawable base (textures, meshes, canvases).
Definition Drawable.h:17
GPU texture created via Graphics::newTexture. Owns GPU resources through an opaque backend handle.
Definition Texture.h:17
int getMipmapCount() const
Definition Texture.h:30
void draw(Graphics *gfx, const glm::mat4 &matrix) const override
Draws the object with the specified transformation matrix.
Definition Texture.cpp:17
const TextureSampler & getSampler() const
Definition Texture.h:31
void drawOcclusion(Graphics *gfx, const glm::mat4 &matrix) const override
Black silhouette using texture alpha (volumetric occlusion map).
Definition Texture.cpp:21
int getPixelWidth() const
Definition Texture.h:28
int getPixelHeight() const
Definition Texture.h:29
int getWidth() const
Definition Texture.h:26
TextureSampler sampler
Definition Texture.h:43
int getHeight() const
Definition Texture.h:27
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition AnimTrail.h:6
Sampler state for a Texture (filter, wrap, mip LOD, anisotropy). Defaults match historical engine beh...