From 86ae1a220e256540c61fc283e785a241fd306230 Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Sun, 13 Oct 2019 18:23:12 +0200 Subject: [PATCH] get texture --- include/IVideoDriver.h | 5 +++++ src/IVideoDriver.cpp | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/include/IVideoDriver.h b/include/IVideoDriver.h index 042ee6b..ea9ef51 100644 --- a/include/IVideoDriver.h +++ b/include/IVideoDriver.h @@ -22,6 +22,7 @@ #ifndef __C_IRR_I_VIDEO_DRIVER_H_INCLUDED__ #define __C_IRR_I_VIDEO_DRIVER_H_INCLUDED__ +#include "ITexture.h" #include "SColor.h" #include "SExposedVideoData.h" #include "rect.h" @@ -43,6 +44,10 @@ extern "C" { bool irr_video_IVideoDriver_endScene(irr_video_IVideoDriver* driver); + irr_video_ITexture* + irr_video_IVideoDriver_getTexture(irr_video_IVideoDriver* driver, + const char* filename); + #ifdef __cplusplus } #endif diff --git a/src/IVideoDriver.cpp b/src/IVideoDriver.cpp index 8f3edbc..cf703b6 100644 --- a/src/IVideoDriver.cpp +++ b/src/IVideoDriver.cpp @@ -62,4 +62,13 @@ extern "C" { { return ((irr::video::IVideoDriver*)driver)->endScene(); } + + irr_video_ITexture* + irr_video_IVideoDriver_getTexture(irr_video_IVideoDriver* driver, + const char* filename) + { + return (irr_video_ITexture*) + ((irr::video::IVideoDriver*)driver)->getTexture(filename); + } + } -- 2.39.5