Exemple #1
0
 public void TexImage2D(GLTextureTarget target, int level, GLPixelFormat internalFormat, int width, int height, int border, GLPixelFormat format, GLPixelType type, IntPtr data)
 {
     TKGL.TexImage2D((TextureTarget2d)target, level,
                     (TextureComponentCount)internalFormat, width, height, border,
                     (PixelFormat)format, (PixelType)type,
                     data);
 }
Exemple #2
0
 public static void glTexImage2D(
     TextureTarget target,
     int level,
     PixelInternalFormat internalFormat,
     uint width,
     uint height,
     int border,
     GLPixelFormat format,
     GLPixelType type,
     void *data) => p_glTexImage2D(target, level, internalFormat, width, height, border, format, type, data);
Exemple #3
0
 public static void glTexSubImage2D(
     TextureTarget target,
     int level,
     int xoffset,
     int yoffset,
     uint width,
     uint height,
     GLPixelFormat format,
     GLPixelType type,
     void *pixels) => p_glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
Exemple #4
0
 public void TexSubImage2D(GLTextureTarget target,
                           int level,
                           int xoffset,
                           int yoffset,
                           int width,
                           int height,
                           GLPixelFormat format,
                           GLPixelType type,
                           IntPtr data)
 {
 }
Exemple #5
0
 public void ReadPixels(int x, int y, int width, int height, GLPixelFormat format, GLPixelType type, byte[] buffer)
 {
     try
     {
         this.BeginFunc();
         this._gl.ReadPixels(x, y, width, height, format, type, buffer);
     }
     finally
     {
         this.EndFunc();
     }
 }
Exemple #6
0
 public void TexImage2D(GLTextureTarget target, int level, GLPixelFormat internalFormat, int width, int height, int border, GLPixelFormat format, GLPixelType type, global::System.IntPtr data)
 {
     try
     {
         this.BeginFunc();
         this._gl.TexImage2D(target, level, internalFormat, width, height, border, format, type, data);
     }
     finally
     {
         this.EndFunc();
     }
 }
Exemple #7
0
 public void TexSubImage2D(GLTextureTarget target,
                           int level,
                           int xoffset,
                           int yoffset,
                           int width,
                           int height,
                           GLPixelFormat format,
                           GLPixelType type,
                           IntPtr data)
 {
     TKGL.TexSubImage2D((TextureTarget2d)target, level,
                        xoffset, yoffset, width, height,
                        (PixelFormat)format, (PixelType)type,
                        data);
 }
Exemple #8
0
        private OpenTK.Matrix4 WorldMatrix; // r_world_matrix

        public GLDevice(OpenTK.GameWindow form, OpenTK.DisplayDevice openTKDevice)
            : base(typeof(GLDeviceDesc),
                   typeof(GLGraphics),
                   typeof(GLTextureAtlas),
                   typeof(GLModel),
                   typeof(GLModelDesc),
                   typeof(GLAliasModel),
                   typeof(GLAliasModelDesc),
                   typeof(GLTexture),
                   typeof(GLTextureDesc))
        {
            Form         = form;
            OpenTKDevice = openTKDevice;

            TextureFilters = new GLTextureFilter[]
            {
                new GLTextureFilter("GL_NEAREST", TextureMinFilter.Nearest, TextureMagFilter.Nearest),
                new GLTextureFilter("GL_LINEAR", TextureMinFilter.Linear, TextureMagFilter.Linear),
                new GLTextureFilter("GL_NEAREST_MIPMAP_NEAREST", TextureMinFilter.NearestMipmapNearest, TextureMagFilter.Nearest),
                new GLTextureFilter("GL_LINEAR_MIPMAP_NEAREST", TextureMinFilter.LinearMipmapNearest, TextureMagFilter.Linear),
                new GLTextureFilter("GL_NEAREST_MIPMAP_LINEAR", TextureMinFilter.NearestMipmapLinear, TextureMagFilter.Nearest),
                new GLTextureFilter("GL_LINEAR_MIPMAP_LINEAR", TextureMinFilter.LinearMipmapLinear, TextureMagFilter.Linear)
            };

            BlendModes = new GLTextureBlendMode[]
            {
                new GLTextureBlendMode("GL_MODULATE", TextureEnvMode.Modulate),
                new GLTextureBlendMode("GL_ADD", TextureEnvMode.Add),
                new GLTextureBlendMode("GL_REPLACE", TextureEnvMode.Replace),
                new GLTextureBlendMode("GL_DECAL", TextureEnvMode.Decal),
                new GLTextureBlendMode("GL_REPLACE_EXT", TextureEnvMode.ReplaceExt),
                new GLTextureBlendMode("GL_TEXTURE_ENV_BIAS_SGIX", TextureEnvMode.TextureEnvBiasSgix),
                new GLTextureBlendMode("GL_COMBINE", TextureEnvMode.Combine)
            };

            PixelFormats = new GLPixelFormat[]
            {
                new GLPixelFormat("GL_LUMINANCE", PixelFormat.Luminance),
                new GLPixelFormat("GL_RGBA", PixelFormat.Rgba),
                new GLPixelFormat("GL_RGB", PixelFormat.Rgb),
                new GLPixelFormat("GL_BGR", PixelFormat.Bgr),
                new GLPixelFormat("GL_BGRA", PixelFormat.Bgra),
                new GLPixelFormat("GL_ALPHA", PixelFormat.Alpha)
            };
        }
Exemple #9
0
 public void ReadPixels(int x, int y, int width, int height, GLPixelFormat format, GLPixelType type, byte[] buffer)
 {
     TKGL.ReadPixels(x, y, width, height, (PixelFormat)format, (PixelType)type, buffer);
 }
Exemple #10
0
 public static void ReadPixels(int x, int y, int width, int height, GLPixelFormat format, GLPixelType type, byte[] data)
 {
     GL._gl.ReadPixels(x, y, width, height, format, type, data);
 }
Exemple #11
0
 public static void TexSubImage2D(GLTextureTarget target, int level, int xoffset, int yoffset, int width, int height, GLPixelFormat format, GLPixelType type, global::System.IntPtr data)
 {
     GL._gl.TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, data);
 }
Exemple #12
0
 public static void TexImage2D(GLTextureTarget target, int level, GLPixelFormat internalFormat, int width, int height, int border, GLPixelFormat format, GLPixelType type, global::System.IntPtr data)
 {
     GL._gl.TexImage2D(target, level, internalFormat, width, height, border, format, type, data);
 }
Exemple #13
0
        public static void TexSubImage2D(GLTextureTarget target, int level, int xoffset, int yoffset, int width, int height, GLPixelFormat format, GLPixelType type, byte[] data)
        {
            if (data != null)
            {
                global::System.Runtime.InteropServices.GCHandle pin = global::System.Runtime.InteropServices.GCHandle.Alloc(data, global::System.Runtime.InteropServices.GCHandleType.Pinned);

                try
                {
                    GL._gl.TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pin.AddrOfPinnedObject());
                }
                finally
                {
                    pin.Free();
                }
            }
            else
            {
                GL._gl.TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, global::System.IntPtr.Zero);
            }
        }
Exemple #14
0
 public void TexImage2D(GLTextureTarget target, int level, GLPixelFormat internalFormat, int width, int height, int border, GLPixelFormat format, GLPixelType type, IntPtr data)
 {
 }
Exemple #15
0
 public void ReadPixels(int x, int y, int width, int height, GLPixelFormat format, GLPixelType type, byte[] buffer)
 {
 }