Exemplo n.º 1
0
        private static void Load_VERSION_4_2()
        {
            DrawArraysInstancedBaseInstance              = GetAddress <glDrawArraysInstancedBaseInstance>("glDrawArraysInstancedBaseInstance");
            _DrawElementsInstancedBaseInstance           = GetAddress <glDrawElementsInstancedBaseInstance>("glDrawElementsInstancedBaseInstance");
            _DrawElementsInstancedBaseVertexBaseInstance = GetAddress <glDrawElementsInstancedBaseVertexBaseInstance>("glDrawElementsInstancedBaseVertexBaseInstance");
            GetInternalformati             = GetAddress <glGetInternalformati>("glGetInternalformativ");
            GetInternalformativ            = GetAddress <glGetInternalformativ>("glGetInternalformativ");
            GetActiveAtomicCounterBufferi  = GetAddress <glGetActiveAtomicCounterBufferi>("glGetActiveAtomicCounterBufferiv");
            GetActiveAtomicCounterBufferiv = GetAddress <glGetActiveAtomicCounterBufferiv>("glGetActiveAtomicCounterBufferiv");
            BindImageTexture = GetAddress <glBindImageTexture>("glBindImageTexture");
            MemoryBarrier    = GetAddress <glMemoryBarrier>("glMemoryBarrier");
            TexStorage1D     = GetAddress <glTexStorage1D>("glTexStorage1D");
            TexStorage2D     = GetAddress <glTexStorage2D>("glTexStorage2D");
            TexStorage3D     = GetAddress <glTexStorage3D>("glTexStorage3D");
            DrawTransformFeedbackInstanced       = GetAddress <glDrawTransformFeedbackInstanced>("glDrawTransformFeedbackInstanced");
            DrawTransformFeedbackStreamInstanced = GetAddress <glDrawTransformFeedbackStreamInstanced>("glDrawTransformFeedbackStreamInstanced");

            VERSION_4_2 = VERSION_4_1 && DrawArraysInstancedBaseInstance != null && _DrawElementsInstancedBaseInstance != null &&
                          _DrawElementsInstancedBaseVertexBaseInstance != null && GetInternalformati != null && GetInternalformativ != null &&
                          GetActiveAtomicCounterBufferi != null && GetActiveAtomicCounterBufferiv != null && BindImageTexture != null &&
                          MemoryBarrier != null && TexStorage1D != null && TexStorage2D != null && TexStorage3D != null &&
                          DrawTransformFeedbackInstanced != null && DrawTransformFeedbackStreamInstanced != null;
        }
Exemplo n.º 2
0
 /// <summary>
 /// bind a level of a texture to an image unit(a uniform image2D in compute shader).
 /// <para>for more information check http://www.unix.com/man-page/debian/3g/GLBINDIMAGETEXTURE/</para>
 /// </summary>
 /// <param name="unit">Specifies the index of the image unit to which to bind the texture.<para>a uniform image2D variable's location.</para></param>
 /// <param name="texture">Specifies the name of the texture to bind to the image unit.<para>texture's id from glGenTexture().</para></param>
 /// <param name="level">Specifies the level of the texture that is to be bound.</param>
 /// <param name="layered">Specifies whether a layered texture binding is to be established.</param>
 /// <param name="layer">If <paramref name="layered"/>​ is false, specifies the layer of texture​ to be bound to the image unit. Ignored otherwise.</param>
 /// <param name="access">Specifies a token indicating the type of access that will be performed on the image.<para>OpenGL.GL_READ_ONLY, OpenGL.GL_WRITE_ONLY, OpenGL.GL_READ_WRITE etc.</para></param>
 /// <param name="format">Specifies the format that the elements of the image will be treated as for the purposes of formatted stores.<para>OpenGL.GL_RGBA32F etc.</para></param>
 public static void BindImageTexture(uint unit, uint texture, int level, bool layered, int layer, uint access, uint format)
 {
     if (bindImageTexture == null)
     { bindImageTexture = OpenGL.GetDelegateFor<OpenGL.glBindImageTexture>(); }
     bindImageTexture(unit, texture, level, layered, layer, access, format);
 }