mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-01 18:42:40 +00:00
update to new render functions
This commit is contained in:
parent
285bc9171f
commit
6c8a8f9fe7
2 changed files with 4 additions and 4 deletions
|
@ -29,7 +29,7 @@ class FurnaceGUIRenderMetal: public FurnaceGUIRender {
|
||||||
bool lockTexture(FurnaceGUITexture* which, void** data, int* pitch);
|
bool lockTexture(FurnaceGUITexture* which, void** data, int* pitch);
|
||||||
bool unlockTexture(FurnaceGUITexture* which);
|
bool unlockTexture(FurnaceGUITexture* which);
|
||||||
bool updateTexture(FurnaceGUITexture* which, void* data, int pitch);
|
bool updateTexture(FurnaceGUITexture* which, void* data, int pitch);
|
||||||
FurnaceGUITexture* createTexture(bool dynamic, int width, int height);
|
FurnaceGUITexture* createTexture(bool dynamic, int width, int height, bool interpolate=true);
|
||||||
bool destroyTexture(FurnaceGUITexture* which);
|
bool destroyTexture(FurnaceGUITexture* which);
|
||||||
void setTextureBlendMode(FurnaceGUITexture* which, FurnaceGUIBlendMode mode);
|
void setTextureBlendMode(FurnaceGUITexture* which, FurnaceGUIBlendMode mode);
|
||||||
void setBlendMode(FurnaceGUIBlendMode mode);
|
void setBlendMode(FurnaceGUIBlendMode mode);
|
||||||
|
@ -43,7 +43,7 @@ class FurnaceGUIRenderMetal: public FurnaceGUIRender {
|
||||||
bool getOutputSize(int& w, int& h);
|
bool getOutputSize(int& w, int& h);
|
||||||
int getWindowFlags();
|
int getWindowFlags();
|
||||||
void preInit();
|
void preInit();
|
||||||
bool init(SDL_Window* win);
|
bool init(SDL_Window* win, int swapInterval);
|
||||||
void initGUI(SDL_Window* win);
|
void initGUI(SDL_Window* win);
|
||||||
void quitGUI();
|
void quitGUI();
|
||||||
bool quit();
|
bool quit();
|
||||||
|
|
|
@ -59,7 +59,7 @@ bool FurnaceGUIRenderMetal::updateTexture(FurnaceGUITexture* which, void* data,
|
||||||
return SDL_UpdateTexture(t->tex,NULL,data,pitch)==0;
|
return SDL_UpdateTexture(t->tex,NULL,data,pitch)==0;
|
||||||
}
|
}
|
||||||
|
|
||||||
FurnaceGUITexture* FurnaceGUIRenderMetal::createTexture(bool dynamic, int width, int height) {
|
FurnaceGUITexture* FurnaceGUIRenderMetal::createTexture(bool dynamic, int width, int height, bool interpolate) {
|
||||||
SDL_Texture* t=SDL_CreateTexture(sdlRend,SDL_PIXELFORMAT_ABGR8888,dynamic?SDL_TEXTUREACCESS_STREAMING:SDL_TEXTUREACCESS_STATIC,width,height);
|
SDL_Texture* t=SDL_CreateTexture(sdlRend,SDL_PIXELFORMAT_ABGR8888,dynamic?SDL_TEXTUREACCESS_STREAMING:SDL_TEXTUREACCESS_STATIC,width,height);
|
||||||
|
|
||||||
if (t==NULL) return NULL;
|
if (t==NULL) return NULL;
|
||||||
|
@ -118,7 +118,7 @@ void FurnaceGUIRenderMetal::preInit() {
|
||||||
priv=new FurnaceGUIRenderMetalPrivate;
|
priv=new FurnaceGUIRenderMetalPrivate;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FurnaceGUIRenderMetal::init(SDL_Window* win) {
|
bool FurnaceGUIRenderMetal::init(SDL_Window* win, int swapInterval) {
|
||||||
SDL_SetHint(SDL_HINT_RENDER_DRIVER,"metal");
|
SDL_SetHint(SDL_HINT_RENDER_DRIVER,"metal");
|
||||||
|
|
||||||
sdlRend=SDL_CreateRenderer(win,-1,SDL_RENDERER_ACCELERATED|SDL_RENDERER_PRESENTVSYNC|SDL_RENDERER_TARGETTEXTURE);
|
sdlRend=SDL_CreateRenderer(win,-1,SDL_RENDERER_ACCELERATED|SDL_RENDERER_PRESENTVSYNC|SDL_RENDERER_TARGETTEXTURE);
|
||||||
|
|
Loading…
Reference in a new issue