Example #1
0
 private RenderTarget(Texture2D texture, TextureFormat format, SamplerFlags flags)
 {
     Handle           = GraphicsContext.CreateFrameBuffer(texture, format, flags);
     _internalTexture = texture;
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RenderTarget"/> struct.
 /// </summary>
 /// <param name="width">The width of the render target.</param>
 /// <param name="height">The height of the render target.</param>
 /// <param name="format">The format of the new surface.</param>
 /// <param name="flags">Texture sampling flags.</param>
 private RenderTarget(int width, int height, TextureFormat format, SamplerFlags flags)
 {
     Handle           = GraphicsContext.CreateFrameBuffer(width, height, format, flags);
     _internalTexture = new Texture2D(GraphicsContext.GetFrameBufferTexture(Handle, 0), width, height, false, false);
 }
Example #3
0
 public static void SetFrameBuffer(ushort view_id, FrameBufferHandle handle)
 {
     Bgfx.set_view_frame_buffer(view_id, handle);
 }
Example #4
0
 public static void DestroyFrameBuffer(FrameBufferHandle frame_buffer)
 {
     Bgfx.destroy_frame_buffer(frame_buffer);
 }
Example #5
0
 public static TextureHandle GetFrameBufferTexture(FrameBufferHandle frame_buffer, byte attachment)
 {
     return(Bgfx.get_texture(frame_buffer, attachment));
 }
Example #6
0
 private RenderTarget(Texture2D texture, TextureFormat format, TextureFlags flags)
 {
     handle = GraphicsContext.CreateFrameBuffer(texture, format, flags);
     internal_texture = texture;
 }