Пример #1
0
 /// <summary>
 /// This function sets the image for the currently binded texture.
 /// </summary>
 /// <param name="target">The type of texture, TEXTURE_2D or PROXY_TEXTURE_2D.</param>
 /// <param name="level">For mip-map textures, ordinary textures should be '0'.</param>
 /// <param name="internalformat">The format of the data you are want OpenGL to create, e.g  RGB16.</param>
 /// <param name="width">The width of the texture image (must be a power of 2, e.g 64).</param>
 /// <param name="height">The height of the texture image (must be a power of 2, e.g 32).</param>
 /// <param name="border">The width of the border (0 or 1).</param>
 /// <param name="format">The format of the data you are passing, e.g. RGBA.</param>
 /// <param name="type">The type of data you are passing, e.g GL_BYTE.</param>
 /// <param name="pixels">The actual pixel data.</param>
 public static void TexImage2D(TexImage2DTargets target, int level, TexImage2DFormats internalformat, int width, int height, int border, TexImage2DFormats format, TexImage2DTypes type, IntPtr pixels)
 {
     GL.TexImage2D((uint)target, level, (uint)internalformat, width, height, border, (uint)format, (uint)type, pixels);
 }
Пример #2
0
 /// <summary>
 /// This function sets the image for the currently binded texture.
 /// </summary>
 /// <param name="target">The type of texture, TEXTURE_2D or PROXY_TEXTURE_2D.</param>
 /// <param name="level">For mip-map textures, ordinary textures should be '0'.</param>
 /// <param name="internalformat">The format of the data you are want OpenGL to create, e.g  RGB16.</param>
 /// <param name="width">The width of the texture image (must be a power of 2, e.g 64).</param>
 /// <param name="height">The height of the texture image (must be a power of 2, e.g 32).</param>
 /// <param name="border">The width of the border (0 or 1).</param>
 /// <param name="format">The format of the data you are passing, e.g. RGBA.</param>
 /// <param name="type">The type of data you are passing, e.g GL_BYTE.</param>
 /// <param name="pixels">The actual pixel data.</param>
 public static void TexImage2D(TexImage2DTargets target, int level, TexImage2DFormats internalformat, int width, int height, int border, TexImage2DFormats format, TexImage2DTypes type, IntPtr pixels)
 {
     GL.TexImage2D((uint)target, level, (uint)internalformat, width, height, border, (uint)format, (uint)type, pixels);
 }