public bool CreateBlank(int width, int height, SDL.SDL_TextureAccess access) { //Create uninitialized texture texturePtr = SDL.SDL_CreateTexture(rendererPtr, SDL.SDL_PIXELFORMAT_RGBA8888, (int)access, width, height); if (texturePtr == IntPtr.Zero) { Debug.Print($"Unable to create blank texture! SDL Error: {SDL.SDL_GetError()}\n"); } else { Width = width; Height = height; } return(texturePtr != IntPtr.Zero); }
/// <summary> /// Create a blank texture. /// </summary> public Texture(Renderer renderer, int width, int height, SDL.SDL_TextureAccess access) { IntPtr texture = SDL.SDL_CreateTexture( renderer.RenPtr, SDL.SDL_PIXELFORMAT_RGBA8888, (int)access, width, height ); if (texture == IntPtr.Zero) { throw new SDLException("SDL_CreateTexture"); } TexPtr = texture; }
public IntPtr CreateTexture(uint format, SDL.SDL_TextureAccess access, int width, int height) { return(SDL.SDL_CreateTexture(_sdlRenderer, format, (int)access, width, height)); }
public SDLTexture(SDLRenderer Renderer, ref SDL.SDL_PixelFormat Format, SDL.SDL_TextureAccess Access, int W, int H) { myPtr = SDL.SDL_CreateTexture(Renderer.Ptr, Format.format, (int)Access, W, H); CheckPtr(); }