protected virtual void Dispose(bool disposing) { if (Handle == IntPtr.Zero) { return; } Console.WriteLine("glitz_drawable_destroy"); GlitzAPI.glitz_drawable_destroy(Handle); Handle = IntPtr.Zero; }
public void MakeCurrent(Drawable drawable) { GlitzAPI.glitz_context_make_current(Handle, drawable.Handle); }
public IntPtr FindStandardFormat(FormatName format_name) { return(GlitzAPI.glitz_find_standard_format(Handle, format_name)); }
public void SwapBuffers() { GlitzAPI.glitz_drawable_swap_buffers(Handle); }
public void UpdateSize(uint width, uint height) { GlitzAPI.glitz_drawable_update_size(Handle, width, height); }
public Drawable(Drawable other, ref DrawableFormat format, uint width, uint height) { this.Handle = GlitzAPI.glitz_create_drawable(other.Handle, ref format, width, height); GlitzAPI.glitz_drawable_reference(Handle); }
public void TranslatePoint(ref Point src, ref Point dst) { GlitzAPI.glitz_surface_translate_point(Handle, ref src, ref dst); }
public void SetFilter(Filter filter, int[] @params) { GlitzAPI.glitz_surface_set_filter(Handle, filter, @params, @params.Length); }
public Status Unmap(BufferAccess access) { return(GlitzAPI.glitz_buffer_unmap(Handle)); }
public IntPtr Map(BufferAccess access) { return(GlitzAPI.glitz_buffer_map(Handle, access)); }
public Buffer(Drawable drawable, IntPtr data) { Handle = GlitzAPI.glitz_buffer_create_for_data(data); GlitzAPI.glitz_buffer_reference(Handle); }
public Buffer(Drawable drawable, IntPtr data, uint size, BufferHint hint) { Handle = GlitzAPI.glitz_buffer_create(drawable.Handle, data, size, hint); GlitzAPI.glitz_buffer_reference(Handle); }
public void ReadBuffer(DrawableBuffer buffer) { GlitzAPI.glitz_context_read_buffer(Handle, buffer); }
public void DrawBuffers(DrawableBuffer[] buffers) { GlitzAPI.glitz_context_draw_buffers(Handle, buffers, buffers.Length); }
public void BindTexture(TextureObject texture) { GlitzAPI.glitz_context_bind_texture(Handle, texture.Handle); }
//TODO: consider memory management /* * public void SetTransform (ref Transform transform) * { * GlitzAPI.glitz_surface_set_transform (Handle, ref transform); * } */ public void SetFill(Fill fill) { GlitzAPI.glitz_surface_set_fill(Handle, fill); }
public void SetComponentAlpha(bool component_alpha) { GlitzAPI.glitz_surface_set_component_alpha(Handle, component_alpha); }
public void SetClipRegion(int x_origin, int y_origin, Box[] box) { GlitzAPI.glitz_surface_set_clip_region(Handle, x_origin, y_origin, box, box.Length); }
public void SetDither(bool dither) { GlitzAPI.glitz_surface_set_dither(Handle, dither); }
public static void Composite(Operator op, Surface src, Surface mask, Surface dst, int x_src, int y_src, int x_mask, int y_mask, int x_dst, int y_dst, int width, int height) { GlitzAPI.glitz_composite(op, src.Handle, mask.Handle, dst.Handle, x_src, y_src, x_mask, y_mask, x_dst, y_dst, width, height); }
public Drawable(IntPtr handle) { this.Handle = handle; GlitzAPI.glitz_drawable_reference(Handle); }
public static void CopyArea(int op, Surface src, Surface dst, int x_src, int y_src, int width, int height, int x_dst, int y_dst) { GlitzAPI.glitz_copy_area(src.Handle, dst.Handle, x_src, y_src, width, height, x_dst, y_dst); }
public static Drawable CreatePbuffer(Drawable other, ref DrawableFormat format, uint width, uint height) { IntPtr Handle = GlitzAPI.glitz_create_pbuffer_drawable(other.Handle, ref format, width, height); return(new Drawable(Handle)); }
public Surface(Drawable drawable, IntPtr format, uint width, uint height, ulong mask, IntPtr attributes) { Handle = GlitzAPI.glitz_surface_create(drawable.Handle, format, width, height, mask, attributes); GlitzAPI.glitz_surface_reference(Handle); }
public void SwapBufferRegion(int x_origin, int y_origin, Box[] box) { GlitzAPI.glitz_drawable_swap_buffer_region(Handle, x_origin, y_origin, box, box.Length); }
public void Attach(Drawable drawable, DrawableBuffer buffer) { GlitzAPI.glitz_surface_attach(Handle, drawable.Handle, buffer); }
public void Finish() { GlitzAPI.glitz_drawable_flush(Handle); }
public void Detach() { GlitzAPI.glitz_surface_detach(Handle); }
public void Flush() { GlitzAPI.glitz_surface_flush(Handle); }
public IntPtr GetProcAddress(string name) { return(GlitzAPI.glitz_context_get_proc_address(Handle, name)); }