Exemplo n.º 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);
 }
Exemplo n.º 2
0
 public Texture(string file)
 {
     this.file  = file;
     TexturePtr = TextureManager.LoadTexture(file);
     texture    = SDL_Texture.FromPointer(TexturePtr);
 }
Exemplo n.º 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);
 }