Ejemplo n.º 1
0
 /// <summary>
 /// Specifies the reference value and the comparison function for the alpha test, which discards fragments
 /// depending on the outcome of a comparison between an incoming fragment's alpha value and a constant
 /// reference value. The comparison is performed only if alpha testing is enabled.
 /// </summary>
 /// <param name="func">Specifies the alpha comparison function.</param>
 /// <param name="value">Specifies the reference value that incoming alpha values are compared to. This value is clamped to the range [0, 1], where 0 represents the lowest possible alpha value and 1 the highest possible value. The initial reference value is 0.</param>
 public static void glAlphaFunc(Constants.GLAlphaFunc func, float value)
 {
     switch (Environment.OSVersion.Platform)
     {
         case PlatformID.MacOSX:
             break;
         case PlatformID.Unix:
             Linux.Methods.glAlphaFunc(func, value);
             return;
         case PlatformID.Win32NT:
         case PlatformID.Win32S:
         case PlatformID.Win32Windows:
         case PlatformID.WinCE:
             Windows.Methods.glAlphaFunc(func, value);
             return;
         case PlatformID.Xbox:
             break;
     }
     throw new PlatformNotSupportedException();
 }
Ejemplo n.º 2
0
 public static void glMaterialf(Constants.GLFace face, int pname, float param)
 {
     switch (Environment.OSVersion.Platform)
     {
     case PlatformID.MacOSX:
         break;
     case PlatformID.Unix:
         Linux.Methods.glMaterialf(face, pname, param);
         return;
     case PlatformID.Win32NT:
     case PlatformID.Win32S:
     case PlatformID.Win32Windows:
     case PlatformID.WinCE:
         Windows.Methods.glMaterialf(face, pname, param);
         return;
     case PlatformID.Xbox:
         break;
     }
     throw new PlatformNotSupportedException ();
 }
Ejemplo n.º 3
0
 public static bool glIsEnabled(Constants.GLCapabilities capability)
 {
     switch (Environment.OSVersion.Platform)
     {
         case PlatformID.MacOSX:
             break;
         case PlatformID.Unix:
             return Linux.Methods.glIsEnabled(capability);
         case PlatformID.Win32NT:
         case PlatformID.Win32S:
         case PlatformID.Win32Windows:
         case PlatformID.WinCE:
             return Windows.Methods.glIsEnabled(capability);
         case PlatformID.Xbox:
             break;
     }
     throw new PlatformNotSupportedException();
 }
Ejemplo n.º 4
0
 public static void glHint(Constants.GLHintTarget target, Constants.GLHintMode mode)
 {
     switch (Environment.OSVersion.Platform)
     {
         case PlatformID.MacOSX:
             break;
         case PlatformID.Unix:
             Linux.Methods.glHint(target, mode);
             return;
         case PlatformID.Win32NT:
         case PlatformID.Win32S:
         case PlatformID.Win32Windows:
         case PlatformID.WinCE:
             Windows.Methods.glHint(target, mode);
             return;
         case PlatformID.Xbox:
             break;
     }
     throw new PlatformNotSupportedException();
 }
Ejemplo n.º 5
0
 public static void glFrontFace(Constants.GLFaceOrientation orientation)
 {
     switch (Environment.OSVersion.Platform)
     {
         case PlatformID.MacOSX:
             break;
         case PlatformID.Unix:
             Linux.Methods.glFrontFace(orientation);
             return;
         case PlatformID.Win32NT:
         case PlatformID.Win32S:
         case PlatformID.Win32Windows:
         case PlatformID.WinCE:
             Windows.Methods.glFrontFace(orientation);
             return;
         case PlatformID.Xbox:
             break;
     }
     throw new PlatformNotSupportedException();
 }
Ejemplo n.º 6
0
 public static void glTexParameter(Constants.TextureParameterTarget target, Constants.TextureParameterName pname, int param)
 {
     switch (Environment.OSVersion.Platform)
     {
         case PlatformID.MacOSX:
             break;
         case PlatformID.Unix:
             Linux.Methods.glTexParameteri(target, pname, param);
             return;
         case PlatformID.Win32NT:
         case PlatformID.Win32S:
         case PlatformID.Win32Windows:
         case PlatformID.WinCE:
             Windows.Methods.glTexParameteri(target, pname, param);
             return;
         case PlatformID.Xbox:
             break;
     }
     throw new PlatformNotSupportedException();
 }
Ejemplo n.º 7
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="target">Specifies the target texture.</param>
 /// <param name="level">Specifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.</param>
 /// <param name="internalFormat">Specifies the number of color components in the texture.</param>
 /// <param name="width">Specifies the width of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be ((2^n +  2) * border) for some integer n. All implementations support texture images that are at least 64 texels wide.</param>
 /// <param name="height">Specifies the height of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be ((2^m + 2) * border) for some integer m. All implementations support texture images that are at least 64 texels high.</param>
 /// <param name="border">Specifies the width of the border. Must be either 0 or 1.</param>
 /// <param name="format">Specifies the format of the pixel data.</param>
 /// <param name="type">Specifies the data type of the pixel data.</param>
 /// <param name="pixelData">Specifies a pointer to the image data in memory.</param>
 public static void glTexImage2D(TextureTarget target, int level, Constants.GLTextureInternalFormat internalFormat, int width, int height, int border, Constants.GLTextureFormat format, Constants.GLTextureType type, IntPtr pixelData)
 {
     switch (Environment.OSVersion.Platform)
     {
         case PlatformID.MacOSX:
             break;
         case PlatformID.Unix:
             Linux.Methods.glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixelData);
             return;
         case PlatformID.Win32NT:
         case PlatformID.Win32S:
         case PlatformID.Win32Windows:
         case PlatformID.WinCE:
             Windows.Methods.glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixelData);
             return;
         case PlatformID.Xbox:
             break;
     }
     throw new PlatformNotSupportedException();
 }
Ejemplo n.º 8
0
 public static void glBlendFunc(Constants.GLBlendFunc sourceFactorMode, Constants.GLBlendFunc destinationFactorMode)
 {
     switch (Environment.OSVersion.Platform)
     {
         case PlatformID.MacOSX:
             break;
         case PlatformID.Unix:
             Linux.Methods.glBlendFunc(sourceFactorMode, destinationFactorMode);
             return;
         case PlatformID.Win32NT:
         case PlatformID.Win32S:
         case PlatformID.Win32Windows:
         case PlatformID.WinCE:
             Windows.Methods.glBlendFunc(sourceFactorMode, destinationFactorMode);
             return;
         case PlatformID.Xbox:
             break;
     }
     throw new PlatformNotSupportedException();
 }