LuaYard/Texture.h
Kiritow bc189b4951 完整重构
分离各SDL类的包装代码.
事件分发处理全部转移至Lua Init层. C层只提供获取事件的方法.
这样有助于提高性能,以及今后Coroutine scheduler的添加.
2019-08-25 00:09:28 +08:00

20 lines
394 B
C++

#pragma once
#include "LuaVM.h"
#include "SDL2/include/SDL.h"
#include <memory>
class Texture
{
public:
std::shared_ptr<SDL_Renderer> rnd;
std::shared_ptr<SDL_Texture> text;
int w;
int h;
Texture(const std::shared_ptr<SDL_Renderer>& exrnd, SDL_Texture* t);
static int close(lua_State* L);
static int create(lua_State* L, const std::shared_ptr<SDL_Renderer>& rnd, SDL_Texture* t);
};