本文整理汇总了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();
}
示例2: GetGLInfoDouble
public static double GetGLInfoDouble(GetPName name)
{
double res;
GL.GetDouble(name, out res);
return res;
}
示例3: GetFloat
public static void GetFloat(GetPName pname, out Matrix4 matrix)
{
unsafe
{
fixed (Matrix4* ptr = &matrix)
GetFloat(pname, (float*)ptr);
}
}
示例4: glGetIntegerv
internal static extern void glGetIntegerv(GetPName pname, [OutAttribute] Int32* @params);
示例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);
}
示例6: GetVector2d
internal static Vector2d GetVector2d(GetPName pname)
{
lock (doubleArray) {
using (Lock())
GL.GetDouble(pname, doubleArray);
return new Vector2d(doubleArray);
}
}
示例7: glGetDoublev
internal static extern void glGetDoublev(GetPName pname, [OutAttribute] Double* @params);
示例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;
}
示例9: GetDouble
internal static double GetDouble(GetPName pname)
{
double result; using (Lock()) GL.GetDouble(pname, out result); return result;
}
示例10: GetGLInfoInt
public static int GetGLInfoInt(GetPName name)
{
int res;
GL.GetInteger(name, out res);
return res;
}
示例11: GetGLInfoFloat
public static float GetGLInfoFloat(GetPName name)
{
float res;
GL.GetFloat(name, out res);
return res;
}
示例12: GetIntegerv
public static extern void GetIntegerv( GetPName pname, [Out]int[] @params );
示例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);
}
示例14: glGetBooleanv
internal static extern void glGetBooleanv(GetPName pname, [OutAttribute] bool* @params);
示例15: glGetFloatv
internal static extern void glGetFloatv(GetPName pname, [OutAttribute] Single* @params);