当前位置: 首页>>代码示例>>C#>>正文


C# GetPName类代码示例

本文整理汇总了C#中GetPName的典型用法代码示例。如果您正苦于以下问题:C# GetPName类的具体用法?C# GetPName怎么用?C# GetPName使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GetPName类属于命名空间,在下文中一共展示了GetPName类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Get

		public static void Get(GetPName pname, [Out] float[] data)
		{
			unsafe {
				fixed (float* p_data = data)
				{
					Debug.Assert(Delegates.pglGetFloatv != null, "pglGetFloatv not implemented");
					Delegates.pglGetFloatv((Int32)pname, p_data);
					CallLog("glGetFloatv({0}, {1})", pname, data);
				}
			}
			DebugCheckErrors();
		}
开发者ID:MagmaiKH,项目名称:OpenGL.Net,代码行数:12,代码来源:Gl.VERSION_1_0.cs

示例2: GetGLInfoDouble

 public static double GetGLInfoDouble(GetPName name)
 {
     double res;
     GL.GetDouble(name, out res);
     return res;
 }
开发者ID:LukaHorvat,项目名称:Electric,代码行数:6,代码来源:Firefly.cs

示例3: GetFloat

 public static void GetFloat(GetPName pname, out Matrix4 matrix)
 {
     unsafe
     {
         fixed (Matrix4* ptr = &matrix)
             GetFloat(pname, (float*)ptr);
     }
 }
开发者ID:SnowmanTackler,项目名称:OpenTK,代码行数:8,代码来源:Helper.cs

示例4: glGetIntegerv

		internal static extern void glGetIntegerv(GetPName pname, [OutAttribute] Int32* @params);
开发者ID:nagyist,项目名称:Pencil.Gaming,代码行数:1,代码来源:GLCore.cs

示例5: Analyze

        public void Analyze(GetPName pname, eType type)
        {
            bool result1b;
            int result1i;
            int[] result2i = new int[2];
            int[] result4i = new int[4];
            float result1f;
            Vector2 result2f;
            Vector4 result4f;
            string output;

            switch (type)
            {
                case eType.Boolean:
                    GL.GetBoolean(pname, out result1b);
                    output = pname + ": " + result1b;
                    break;
                case eType.Int:
                    GL.GetInteger(pname, out result1i);
                    output = pname + ": " + result1i;
                    break;
                case eType.IntEnum:
                    GL.GetInteger(pname, out result1i);
                    output = pname + ": " + (All)result1i;
                    break;
                case eType.IntArray2:
                    GL.GetInteger(pname, result2i);
                    output = pname + ": ( " + result2i[0] + ", " + result2i[1] + " )";
                    break;
                case eType.IntArray4:
                    GL.GetInteger(pname, result4i);
                    output = pname + ": ( " + result4i[0] + ", " + result4i[1] + " ) ( " + result4i[2] + ", " + result4i[3] + " )";
                    break;
                case eType.Float:
                    GL.GetFloat(pname, out result1f);
                    output = pname + ": " + result1f;
                    break;
                case eType.FloatArray2:
                    GL.GetFloat(pname, out result2f);
                    output = pname + ": ( " + result2f.X + ", " + result2f.Y + " )";
                    break;
                case eType.FloatArray4:
                    GL.GetFloat(pname, out result4f);
                    output = pname + ": ( " + result4f.X + ", " + result4f.Y + ", " + result4f.Z + ", " + result4f.W + " )";
                    break;
                default: throw new NotImplementedException();
            }

            ErrorCode err = GL.GetError();
            if (err != ErrorCode.NoError)
                Trace.WriteLine("Unsupported Token: " + pname);
            else
                Trace.WriteLine(output);

        }
开发者ID:RetroAchievements,项目名称:opentk,代码行数:55,代码来源:OpenGLDiagnostics.cs

示例6: GetVector2d

 internal static Vector2d GetVector2d(GetPName pname)
 {
     lock (doubleArray) {
         using (Lock())
             GL.GetDouble(pname, doubleArray);
         return new Vector2d(doubleArray);
     }
 }
开发者ID:Burton-Radons,项目名称:Alexandria,代码行数:8,代码来源:Device.cs

示例7: glGetDoublev

		internal static extern void glGetDoublev(GetPName pname, [OutAttribute] Double* @params);
开发者ID:nagyist,项目名称:Pencil.Gaming,代码行数:1,代码来源:GLCore.cs

示例8: GetInt32

        internal static int GetInt32(GetPName pname)
        {
            int result;

            try {
                using (Lock())
                    GL.GetInteger(pname, out result);
            } catch (Exception exception) {
                throw new InvalidOperationException("Exception thrown with GetInt32(GetPName." + pname + ")", exception);
            }

            return result;
        }
开发者ID:Burton-Radons,项目名称:Alexandria,代码行数:13,代码来源:Device.cs

示例9: GetDouble

 internal static double GetDouble(GetPName pname)
 {
     double result; using (Lock()) GL.GetDouble(pname, out result); return result;
 }
开发者ID:Burton-Radons,项目名称:Alexandria,代码行数:4,代码来源:Device.cs

示例10: GetGLInfoInt

 public static int GetGLInfoInt(GetPName name)
 {
     int res;
     GL.GetInteger(name, out res);
     return res;
 }
开发者ID:LukaHorvat,项目名称:Electric,代码行数:6,代码来源:Firefly.cs

示例11: GetGLInfoFloat

 public static float GetGLInfoFloat(GetPName name)
 {
     float res;
     GL.GetFloat(name, out res);
     return res;
 }
开发者ID:LukaHorvat,项目名称:Electric,代码行数:6,代码来源:Firefly.cs

示例12: GetIntegerv

 public static extern void GetIntegerv( GetPName pname, [Out]int[] @params );
开发者ID:werwolfby,项目名称:Managed-OpenGL,代码行数:1,代码来源:OpenGLNative.state-req.cs

示例13: Get

		public static void Get(GetPName pname, out float data)
		{
			unsafe {
				fixed (float* p_data = &data)
				{
					Debug.Assert(Delegates.pglGetFloatv != null, "pglGetFloatv not implemented");
					Delegates.pglGetFloatv((Int32)pname, p_data);
					LogFunction("glGetFloatv({0}, {1})", pname, data);
				}
			}
			DebugCheckErrors(null);
		}
开发者ID:rhynodegreat,项目名称:OpenGL.Net,代码行数:12,代码来源:Gl.VERSION_1_0.cs

示例14: glGetBooleanv

		internal static extern void glGetBooleanv(GetPName pname, [OutAttribute] bool* @params);
开发者ID:nagyist,项目名称:Pencil.Gaming,代码行数:1,代码来源:GLCore.cs

示例15: glGetFloatv

		internal static extern void glGetFloatv(GetPName pname, [OutAttribute] Single* @params);
开发者ID:nagyist,项目名称:Pencil.Gaming,代码行数:1,代码来源:GLCore.cs


注:本文中的GetPName类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。