public RenderTarget(int width, int height) : base(width, height) { if (ImageHandle == IntPtr.Zero) { var msg = $"Failed to create texture handle: {SDL2.SDL_GetError()}"; Log.Error(msg); throw new Exception(msg); } TargetHandle = SDL_gpu.GPU_LoadTarget(ImageHandle); if (TargetHandle == IntPtr.Zero) { var msg = $"Failed to create render target handle: {SDL2.SDL_GetError()}"; Log.Error(msg); throw new Exception(msg); } }
public RenderTarget(int width, int height) : base(width, height) { TargetHandle = SDL_gpu.GPU_LoadTarget(ImageHandle); }