Posted October 27, 2020 by Oblerion Studio
IMGCOMP* loadIMGCOMP(std::vector<std::vector<SDL_Color>> tab,SDL_Renderer* renderer) void drawIMGCOMP(IMGCOMP* img ,SDL_Renderer* renderer) void drawIMGCOMP(IMGCOMP* img,int x,int y,SDL_Renderer* renderer) void drawIMGCOMP(IMGCOMP* img ,int px,int py,int pw,int ph,SDL_Renderer* renderer) struct IMGCOMP { SDL_Texture* texture; SDL_Rect rect; };
//rect.x , rect.y , rect.w , rect.h --> x , y , width and height of texture
IMGCOMP is type , you can load with loadIMGCOMP() with pixel data and renderer.
use drawIMGCOMP() for draw image on screen.