Esempio n. 1
0
 public static void BindRenderbufferOES(RenderbufferTarget target, uint renderbuffer)
 {
     Debug.Assert(Delegates.pglBindRenderbufferOES != null, "pglBindRenderbufferOES not implemented");
     Delegates.pglBindRenderbufferOES((int)target, renderbuffer);
     LogCommand("glBindRenderbufferOES", null, target, renderbuffer);
     DebugCheckErrors(null);
 }
Esempio n. 2
0
 public static void RenderbufferStorage(RenderbufferTarget target, RenderbufferStorage internalformat, int width, int height)
 {
   if (GraphicsExtensions.UseArbFramebuffer)
     GL.RenderbufferStorage(target, internalformat, width, height);
   else
     GL.Ext.RenderbufferStorage(target, internalformat, width, height);
 }
Esempio n. 3
0
 public static void BindRenderbuffer(RenderbufferTarget target, uint renderbuffer)
 {
   if (GraphicsExtensions.UseArbFramebuffer)
     GL.BindRenderbuffer(target, renderbuffer);
   else
     GL.Ext.BindRenderbuffer(target, renderbuffer);
 }
Esempio n. 4
0
 public static void GetRenderbufferParameter(RenderbufferTarget target, RenderbufferParameterName pname, RenderbufferStorage internalformat, out int @params)
 {
   if (GraphicsExtensions.UseArbFramebuffer)
     GL.GetRenderbufferParameter(target, pname, out @params);
   else
     GL.Ext.GetRenderbufferParameter(target, pname, out @params);
 }
Esempio n. 5
0
 public static void RenderbufferStorageMultisample(RenderbufferTarget target, int samples, RenderbufferStorage internalformat, int width, int height)
 {
   if (GraphicsExtensions.UseArbFramebuffer)
     GL.RenderbufferStorageMultisample(target, samples, internalformat, width, height);
   else
     GL.Ext.RenderbufferStorageMultisample((ExtFramebufferMultisample) target, samples, (ExtFramebufferMultisample) internalformat, width, height);
 }
Esempio n. 6
0
 public static void RenderbufferStorageMultisampleAMD(RenderbufferTarget target, int samples, int storageSamples, InternalFormat internalformat, int width, int height)
 {
     Debug.Assert(Delegates.pglRenderbufferStorageMultisampleAdvancedAMD != null, "pglRenderbufferStorageMultisampleAdvancedAMD not implemented");
     Delegates.pglRenderbufferStorageMultisampleAdvancedAMD((int)target, samples, storageSamples, (int)internalformat, width, height);
     LogCommand("glRenderbufferStorageMultisampleAdvancedAMD", null, target, samples, storageSamples, internalformat, width, height);
     DebugCheckErrors(null);
 }
Esempio n. 7
0
 public static void RenderbufferStorageMultisampleCoverageNV(RenderbufferTarget target, int coverageSamples, int colorSamples, InternalFormat internalformat, int width, int height)
 {
     Debug.Assert(Delegates.pglRenderbufferStorageMultisampleCoverageNV != null, "pglRenderbufferStorageMultisampleCoverageNV not implemented");
     Delegates.pglRenderbufferStorageMultisampleCoverageNV((int)target, coverageSamples, colorSamples, (int)internalformat, width, height);
     LogCommand("glRenderbufferStorageMultisampleCoverageNV", null, target, coverageSamples, colorSamples, internalformat, width, height);
     DebugCheckErrors(null);
 }
 public static void RenderbufferStorageMultisampleAPPLE(RenderbufferTarget target, Int32 samples, InternalFormat internalformat, Int32 width, Int32 height)
 {
     Debug.Assert(Delegates.pglRenderbufferStorageMultisampleAPPLE != null, "pglRenderbufferStorageMultisampleAPPLE not implemented");
     Delegates.pglRenderbufferStorageMultisampleAPPLE((Int32)target, samples, (Int32)internalformat, width, height);
     LogCommand("glRenderbufferStorageMultisampleAPPLE", null, target, samples, internalformat, width, height);
     DebugCheckErrors(null);
 }
 public static void RenderbufferStorageOES(RenderbufferTarget target, InternalFormat internalformat, Int32 width, Int32 height)
 {
     Debug.Assert(Delegates.pglRenderbufferStorageOES != null, "pglRenderbufferStorageOES not implemented");
     Delegates.pglRenderbufferStorageOES((Int32)target, (Int32)internalformat, width, height);
     LogCommand("glRenderbufferStorageOES", null, target, internalformat, width, height);
     DebugCheckErrors(null);
 }
Esempio n. 10
0
        public static void RenderbufferStorageMultisample(RenderbufferTarget target, int samples,
                                                          RenderbufferStorage internalformat, Int32 width, Int32 height)
        {
            /*
             * https://www.khronos.org/opengles/sdk/docs/man3/docbook4/xhtml/glRenderbufferStorageMultisample.xml
             * samples must be must be less than or equal to
             *          the maximum number of samples supported for internalformat.
             *          (see glGetInternalformativ).
             */
            // GL.GetInternalformat( ImageTarget.Renderbuffer, SizedInternalFormat.Rgba8, InternalFormatParameter.Samples,1,out samples);
            // ErrorLog.WriteLine("sup" + support + "blit" + blit + "renderbuf" + renderbuffer + " samples" + samples);
            switch (renderbuffer)
            {
            case Fbosupport.Full:
                GL.RenderbufferStorageMultisample(target, samples, internalformat, width, height);
                return;

            case Fbosupport.EXT:
                GL.Ext.RenderbufferStorageMultisample(target, samples, internalformat, width, height);
                return;

            default:
                RenderbufferStorage(target, internalformat, width, height);
                break;
            }
            var err = GL.GetError();

            if (err != ErrorCode.NoError)
            {
                ErrorLog.WriteLine("RenderBufferStorageMultisample Error " + err);
            }
        }
 public static void BindRenderbufferEXT(RenderbufferTarget target, UInt32 renderbuffer)
 {
     Debug.Assert(Delegates.pglBindRenderbufferEXT != null, "pglBindRenderbufferEXT not implemented");
     Delegates.pglBindRenderbufferEXT((Int32)target, renderbuffer);
     LogCommand("glBindRenderbufferEXT", null, target, renderbuffer);
     DebugCheckErrors(null);
 }
Esempio n. 12
0
        public GLRenderbuffer(int width, int height, RenderbufferTarget renderbufferTarget = RenderbufferTarget.Renderbuffer, RenderbufferStorage renderbufferStorage = RenderbufferStorage.Rgba8)
            : base(GL.GenRenderbuffer())
        {
            RenderbufferTarget  = renderbufferTarget;
            RenderbufferStorage = renderbufferStorage;

            Resize(width, height);
        }
Esempio n. 13
0
 public static void GetRenderbufferParameteriv(RenderbufferTarget target, RenderbufferParam param, out int val)
 {
     unsafe
     {
         fixed(int *ptr = &val)
         {
             Delegates.GetRenderbufferParameterivEXT(target, param, ptr);
         }
     }
 }
Esempio n. 14
0
 public static void RenderbufferStorage(RenderbufferTarget target, RenderbufferStorage internalformat, int width, int height)
 {
     if (GraphicsExtensions.UseArbFramebuffer)
     {
         GL.RenderbufferStorage(target, internalformat, width, height);
     }
     else
     {
         GL.Ext.RenderbufferStorage(target, internalformat, width, height);
     }
 }
Esempio n. 15
0
 public static void RenderbufferStorageMultisample(RenderbufferTarget target, int samples, RenderbufferStorage internalformat, int width, int height)
 {
     if (GraphicsExtensions.UseArbFramebuffer)
     {
         GL.RenderbufferStorageMultisample(target, samples, internalformat, width, height);
     }
     else
     {
         GL.Ext.RenderbufferStorageMultisample((ExtFramebufferMultisample)target, samples, (ExtFramebufferMultisample)internalformat, width, height);
     }
 }
Esempio n. 16
0
 public static void BindRenderbuffer(RenderbufferTarget target, uint renderbuffer)
 {
     if (GraphicsExtensions.UseArbFramebuffer)
     {
         GL.BindRenderbuffer(target, renderbuffer);
     }
     else
     {
         GL.Ext.BindRenderbuffer(target, renderbuffer);
     }
 }
Esempio n. 17
0
 public static void GetRenderbufferParameter(RenderbufferTarget target, RenderbufferParameterName pname, RenderbufferStorage internalformat, out int @params)
 {
     if (GraphicsExtensions.UseArbFramebuffer)
     {
         GL.GetRenderbufferParameter(target, pname, out @params);
     }
     else
     {
         GL.Ext.GetRenderbufferParameter(target, pname, out @params);
     }
 }
 public static void GetRenderbufferParameterOES(RenderbufferTarget target, RenderbufferParameterName pname, [Out] Int32[] @params)
 {
     unsafe
     {
         fixed(Int32 *p_params = @params)
         {
             Debug.Assert(Delegates.pglGetRenderbufferParameterivOES != null, "pglGetRenderbufferParameterivOES not implemented");
             Delegates.pglGetRenderbufferParameterivOES((Int32)target, (Int32)pname, p_params);
             LogCommand("glGetRenderbufferParameterivOES", null, target, pname, @params);
         }
     }
     DebugCheckErrors(null);
 }
Esempio n. 19
0
 public void FramebufferRenderbuffer(
     FramebufferTarget framebufferTarget,
     FramebufferAttachment attachment,
     RenderbufferTarget renderbufferTarget
     )
 {
     GL.FramebufferRenderbuffer(
         framebufferTarget,
         attachment,
         renderbufferTarget,
         renderBufferObject
         );
 }
Esempio n. 20
0
        public static void FramebufferRenderbuffer(FramebufferTarget target,
                                                   FramebufferAttachment attachment,
                                                   RenderbufferTarget renderbuffertarget, Int32 renderbuffer)
        {
            switch (support)
            {
            case Fbosupport.Full:
                GL.FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
                break;

            case Fbosupport.EXT:
                GL.Ext.FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
                break;
            }
        }
Esempio n. 21
0
        public static void BindRenderbuffer(RenderbufferTarget target, Int32 renderbuffer)
        {
            switch (support)
            {
            case Fbosupport.Full:
                GL.BindRenderbuffer(target, renderbuffer);
                return;

            case Fbosupport.EXT:
                GL.Ext.BindRenderbuffer(target, renderbuffer);
                return;

            default:
                throw new Exception("render buffer not supported");
            }
        }
Esempio n. 22
0
        public static void RenderbufferStorage(RenderbufferTarget target,
                                               RenderbufferStorage internalformat, Int32 width, Int32 height)
        {
            switch (support)
            {
            case Fbosupport.Full:
                GL.RenderbufferStorage(target, internalformat, width, height);
                return;

            case Fbosupport.EXT:
                GL.Ext.RenderbufferStorage(target, internalformat, width, height);
                return;

            default:
                throw new Exception("render buffer not supported");
            }
        }
Esempio n. 23
0
 /// <summary>
 /// Retrives renderbuffer parameters from current bound renderbuffer.
 /// </summary>
 /// <param name="pname">Paramenter name to retrive.</param>
 /// <param name="params">Result of query.</param>
 /// <param name="rTarget">Renderbuffer target with bound renderbuffer to query..</param>
 public static void GetRenderbufferParameteriv(RenderbufferParameters pname, int[] @params, RenderbufferTarget rTarget = RenderbufferTarget.Renderbuffer )
 {
     Delegates.glGetRenderbufferParameteriv(rTarget, pname, ref @params[0]);
 }
Esempio n. 24
0
 public abstract void RenderbufferStorage([Flow(FlowDirection.In)] RenderbufferTarget target, [Flow(FlowDirection.In)] InternalFormat internalformat, [Flow(FlowDirection.In)] uint width, [Flow(FlowDirection.In)] uint height);
Esempio n. 25
0
 public abstract void GetRenderbufferParameter([Flow(FlowDirection.In)] RenderbufferTarget target, [Flow(FlowDirection.In)] RenderbufferParameterName pname, [Count(Computed = "pname"), Flow(FlowDirection.Out)] out int @params);
Esempio n. 26
0
		public static void BindRenderbuffer(RenderbufferTarget target, uint renderbuffer)
		{
			glBindRenderbuffer deleg = BaseGraphicsContext.Current.Loader.Get<glBindRenderbuffer>();
			if (deleg != null)
				deleg(target, renderbuffer);
		}
Esempio n. 27
0
 /// <summary>
 /// Binds the specified renderbuffer to the current framebuffer object.
 /// </summary>
 /// <param name="target"></param>
 /// <param name="Renderbuffer"></param>
 public static void BindRenderbuffer(uint Renderbuffer, RenderbufferTarget target = RenderbufferTarget.Renderbuffer )
 {
     Delegates.glBindRenderbuffer(target, Renderbuffer);
 }
 public static unsafe void GetRenderbufferParameter(this ExtFramebufferObject thisApi, [Flow(FlowDirection.In)] RenderbufferTarget target, [Flow(FlowDirection.In)] RenderbufferParameterName pname, [Count(Computed = "pname"), Flow(FlowDirection.Out)] Span <int> @params)
 {
     // SpanOverloader
     thisApi.GetRenderbufferParameter(target, pname, out @params.GetPinnableReference());
 }
Esempio n. 29
0
 /// <summary>
 /// Allocates a multisample renderbuffer storage with specific dimensions for currently bound renderbuffer.
 /// </summary>
 /// <param name="target">Renderbuffertarfet containg renderbuffer to create multisample storage for.</param>
 /// <param name="samples">Number of samples in multisample storage.</param>
 /// <param name="iformat">Format of renderbuffer.</param>
 /// <param name="width">Width of renderbuffer.</param>
 /// <param name="height">Height of renderbuffer.</param>
 public static void RenderbufferStorageMultisample(int samples, RenderbufferStorageFormat iformat, int width, int height, RenderbufferTarget target = RenderbufferTarget.Renderbuffer)
 {
     Delegates.glRenderbufferStorageMultisample(target, samples, iformat, width, height);
 }
Esempio n. 30
0
		public static void RenderbufferStorageMultisample(RenderbufferTarget target, int samples, RenderbufferStorage internalformat, int width, int height)
		{
			glRenderbufferStorageMultisample deleg = BaseGraphicsContext.Current.Loader.Get<glRenderbufferStorageMultisample>();
			if (deleg != null)
				deleg(target, samples, internalformat, width, height);
		}
 public partial void RenderbufferStorageMultisampleAdvance([Flow(FlowDirection.In)] RenderbufferTarget target, [Flow(FlowDirection.In)] uint samples, [Flow(FlowDirection.In)] uint storageSamples, [Flow(FlowDirection.In)] InternalFormat internalformat, [Flow(FlowDirection.In)] uint width, [Flow(FlowDirection.In)] uint height);
Esempio n. 32
0
 public static void RenderbufferStorage(RenderbufferTarget target, InternalPixelFormat format, uint width, uint height)
 {
     Delegates.RenderbufferStorageEXT(target, format, width, height);
 }
Esempio n. 33
0
 public partial void BindRenderbuffer([Flow(FlowDirection.In)] RenderbufferTarget target, [Flow(FlowDirection.In)] uint renderbuffer);
Esempio n. 34
0
        //framebuferparameteri

        /// <summary>
        /// Attaches a renderbuffer to the framebuffer bound at specified target.
        /// </summary>
        /// <param name="ftarget">Framebuffer target containg framebuffer to bind to.</param>
        /// <param name="attachment">Attachment point of framebuffer to bind as.</param>
        /// <param name="rtarget">Renderbuffer target.</param>
        /// <param name="Renderbuffer">Randerbuffer id to bind.</param>
        public static void FramebufferRenderbuffer(FramebufferTarget ftarget, FramebufferAttachmentType attachment, uint Renderbuffer, RenderbufferTarget rtarget = RenderbufferTarget.Renderbuffer )
        {
            Delegates.glFramebufferRenderbuffer(ftarget, attachment, rtarget, Renderbuffer);
        }
Esempio n. 35
0
 /// <summary>
 /// Retrives renderbuffer parameters from current bound renderbuffer.
 /// </summary>
 /// <param name="pname">Paramenter name to retrive.</param>
 /// <param name="rTarget">Renderbuffer target with bound renderbuffer to query..</param>
 /// <returns>Result of query.</returns>
 public static int GetRenderbufferParameteriv(RenderbufferParameters pname, RenderbufferTarget rTarget = RenderbufferTarget.Renderbuffer)
 {
     int tmp = 0;
     Delegates.glGetRenderbufferParameteriv(rTarget, pname, ref tmp);
     return tmp;
 }
Esempio n. 36
0
 public static void Unbind(RenderbufferTarget renderbufferTarget)
 {
     GL.BindRenderbuffer(renderbufferTarget, 0);
 }
 public static void FramebufferRenderbufferOES(FramebufferTarget target, FramebufferAttachment attachment, RenderbufferTarget renderbuffertarget, UInt32 renderbuffer)
 {
     Debug.Assert(Delegates.pglFramebufferRenderbufferOES != null, "pglFramebufferRenderbufferOES not implemented");
     Delegates.pglFramebufferRenderbufferOES((Int32)target, (Int32)attachment, (Int32)renderbuffertarget, renderbuffer);
     LogCommand("glFramebufferRenderbufferOES", null, target, attachment, renderbuffertarget, renderbuffer);
     DebugCheckErrors(null);
 }
Esempio n. 38
0
		public static IntPtr FramebufferRenderbuffer(FramebufferTarget target, FramebufferAttachment attachment, RenderbufferTarget renderbuffertarget, uint renderbuffer)
		{
			glFramebufferRenderbuffer deleg = BaseGraphicsContext.Current.Loader.Get<glFramebufferRenderbuffer>();
			if (deleg != null)
				return deleg(target, attachment, renderbuffertarget, renderbuffer);
			return default(IntPtr);
		}
Esempio n. 39
0
 /// <summary>
 /// Attaches a renderbuffer to a named framebuffer at a specified attachment point.
 /// </summary>
 /// <param name="FramebufferID">id of framebuffer to attach renderbuffer to.</param>
 /// <param name="attachment">Attachment point to attach renderbuffer to.</param>
 /// <param name="Renderbuffer">ID of renderbuffer to attach.</param>
 /// <param name="rtarget">Renderbuffer target type.</param>
 public static void NamedFramebufferRenderbufferEXT(uint FramebufferID, FramebufferAttachmentType attachment, uint Renderbuffer, RenderbufferTarget rtarget = RenderbufferTarget.Renderbuffer)
 {
     Delegates.glNamedFramebufferRenderbufferEXT(FramebufferID, attachment, rtarget, Renderbuffer);
 }
Esempio n. 40
0
 /// <summary>
 /// Attaches a renderbuffer to a named framebuffer at a specified attachment point.
 /// </summary>
 /// <param name="FramebufferID">id of framebuffer to attach renderbuffer to.</param>
 /// <param name="attachment">Attachment point to attach renderbuffer to.</param>
 /// <param name="Renderbuffer">ID of renderbuffer to attach.</param>
 /// <param name="rtarget">Renderbuffer target type.</param>
 public static void NamedFramebufferRenderbufferEXT(uint FramebufferID, FramebufferAttachmentType attachment, uint Renderbuffer, RenderbufferTarget rtarget = RenderbufferTarget.Renderbuffer)
 {
     Delegates.glNamedFramebufferRenderbufferEXT(FramebufferID, attachment, rtarget, Renderbuffer);
 }
Esempio n. 41
0
 public abstract void FramebufferRenderbuffer([Flow(FlowDirection.In)] FramebufferTarget target, [Flow(FlowDirection.In)] FramebufferAttachment attachment, [Flow(FlowDirection.In)] RenderbufferTarget renderbuffertarget, [Flow(FlowDirection.In)] uint renderbuffer);
Esempio n. 42
0
 public static void FramebufferRenderbuffer(FramebufferTarget target, FramebufferAttachment attachment, RenderbufferTarget renderbuffertarget, uint renderbuffer)
 {
   if (GraphicsExtensions.UseArbFramebuffer)
     GL.FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
   else
     GL.Ext.FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
 }
Esempio n. 43
0
 public abstract void BindRenderbuffer([Flow(FlowDirection.In)] RenderbufferTarget target, [Flow(FlowDirection.In)] uint renderbuffer);
 public abstract void RenderbufferStorageMultisampleCoverage([Flow(FlowDirection.In)] RenderbufferTarget target, [Flow(FlowDirection.In)] uint coverageSamples, [Flow(FlowDirection.In)] uint colorSamples, [Flow(FlowDirection.In)] InternalFormat internalformat, [Flow(FlowDirection.In)] uint width, [Flow(FlowDirection.In)] uint height);
Esempio n. 45
0
		public static void GetRenderbufferParameteriv(RenderbufferTarget target, RenderbufferParameterName pname, int[] parameters)
		{
			glGetRenderbufferParameteriv deleg = BaseGraphicsContext.Current.Loader.Get<glGetRenderbufferParameteriv>();
			if (deleg != null)
				deleg(target, pname, parameters);
		}