建档
This commit is contained in:
29
source/EngineFrame/Render/Texture.h
Normal file
29
source/EngineFrame/Render/Texture.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include <SDL.h>
|
||||
#include <string>
|
||||
#include "Tool/RefPtr.h"
|
||||
#include "Tool/RefObject.h"
|
||||
|
||||
class Texture : public RefObject
|
||||
{
|
||||
private:
|
||||
SDL_Texture *m_texture = nullptr;
|
||||
|
||||
public:
|
||||
VecSize TextureSize = {0, 0}; // 纹理大小
|
||||
VecPos TexturePos = {0, 0}; // 纹理位置
|
||||
VecSize TextureFramepos = {0, 0}; // 帧域宽高
|
||||
|
||||
public:
|
||||
Texture(/* args */);
|
||||
Texture(std::string PngPath);
|
||||
Texture(std::string imgPath, int Index);
|
||||
~Texture();
|
||||
|
||||
public:
|
||||
void SetBlendMode(SDL_BlendMode blendMode);
|
||||
// 获取混合模式
|
||||
SDL_BlendMode GetBlendMode();
|
||||
SDL_Texture *GetTexture(); // 获取纹理
|
||||
};
|
||||
Reference in New Issue
Block a user