Example #1
0
        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);
 }
Example #3
0
 public IntPtr FindStandardFormat(FormatName format_name)
 {
     return(GlitzAPI.glitz_find_standard_format(Handle, format_name));
 }
Example #4
0
 public void SwapBuffers()
 {
     GlitzAPI.glitz_drawable_swap_buffers(Handle);
 }
Example #5
0
 public void UpdateSize(uint width, uint height)
 {
     GlitzAPI.glitz_drawable_update_size(Handle, width, height);
 }
Example #6
0
 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);
 }
Example #7
0
 public void TranslatePoint(ref Point src, ref Point dst)
 {
     GlitzAPI.glitz_surface_translate_point(Handle, ref src, ref dst);
 }
Example #8
0
 public void SetFilter(Filter filter, int[] @params)
 {
     GlitzAPI.glitz_surface_set_filter(Handle, filter, @params, @params.Length);
 }
Example #9
0
 public Status Unmap(BufferAccess access)
 {
     return(GlitzAPI.glitz_buffer_unmap(Handle));
 }
Example #10
0
 public IntPtr Map(BufferAccess access)
 {
     return(GlitzAPI.glitz_buffer_map(Handle, access));
 }
Example #11
0
 public Buffer(Drawable drawable, IntPtr data)
 {
     Handle = GlitzAPI.glitz_buffer_create_for_data(data);
     GlitzAPI.glitz_buffer_reference(Handle);
 }
Example #12
0
 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);
 }
Example #16
0
        //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);
        }
Example #17
0
 public void SetComponentAlpha(bool component_alpha)
 {
     GlitzAPI.glitz_surface_set_component_alpha(Handle, component_alpha);
 }
Example #18
0
 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);
 }
Example #19
0
 public void SetDither(bool dither)
 {
     GlitzAPI.glitz_surface_set_dither(Handle, dither);
 }
Example #20
0
 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);
 }
Example #21
0
 public Drawable(IntPtr handle)
 {
     this.Handle = handle;
     GlitzAPI.glitz_drawable_reference(Handle);
 }
Example #22
0
 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);
 }
Example #23
0
        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));
        }
Example #24
0
 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);
 }
Example #25
0
 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);
 }
Example #26
0
 public void Attach(Drawable drawable, DrawableBuffer buffer)
 {
     GlitzAPI.glitz_surface_attach(Handle, drawable.Handle, buffer);
 }
Example #27
0
 public void Finish()
 {
     GlitzAPI.glitz_drawable_flush(Handle);
 }
Example #28
0
 public void Detach()
 {
     GlitzAPI.glitz_surface_detach(Handle);
 }
Example #29
0
 public void Flush()
 {
     GlitzAPI.glitz_surface_flush(Handle);
 }
 public IntPtr GetProcAddress(string name)
 {
     return(GlitzAPI.glitz_context_get_proc_address(Handle, name));
 }