Exemple #1
0
 internal Texture(IntPtr ptr)
 {
     TexturePtr = SDL_CreateTextureFromSurface(Graphics.RendererPtr, ptr);
     SDL_FreeSurface(ptr);
     texture = SDL_Texture.FromPointer(TexturePtr);
     texture = SDL_Texture.FromPointer(TexturePtr);
 }
Exemple #2
0
 public Texture(string file)
 {
     this.file  = file;
     TexturePtr = TextureManager.LoadTexture(file);
     texture    = SDL_Texture.FromPointer(TexturePtr);
 }
Exemple #3
0
 public Texture(int width, int height)
 {
     TexturePtr = SDL_CreateTexture(Graphics.RendererPtr, (uint)PixelFormat.ARGB8888, (int)TextureAccess.TARGET, width, height);
     texture    = SDL_Texture.FromPointer(TexturePtr);
 }