some final helper method overload additions
This commit is contained in:
parent
0f23d2739b
commit
aca31c6b01
|
@ -60,6 +60,27 @@ namespace PortableGL
|
|||
return texture;
|
||||
}
|
||||
|
||||
public bool glGetBoolean(int pname)
|
||||
{
|
||||
bool parameter = false;
|
||||
glGetBooleanv(pname, ref parameter);
|
||||
return parameter;
|
||||
}
|
||||
|
||||
public float glGetFloat(int pname)
|
||||
{
|
||||
float parameter = 0.0f;
|
||||
glGetFloatv(pname, ref parameter);
|
||||
return parameter;
|
||||
}
|
||||
|
||||
public int glGetInteger(int pname)
|
||||
{
|
||||
int parameter = 0;
|
||||
glGetIntegerv(pname, ref parameter);
|
||||
return parameter;
|
||||
}
|
||||
|
||||
public string glGetActiveAttrib(int program, int index, out int size, out int type)
|
||||
{
|
||||
int length = glGetProgramiv(program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH);
|
||||
|
|
|
@ -187,6 +187,14 @@ namespace PortableGL
|
|||
}
|
||||
}
|
||||
|
||||
public unsafe void glGetBooleanv(int pname, ref bool parameters)
|
||||
{
|
||||
fixed (void *ptr = ¶meters)
|
||||
{
|
||||
glGetBooleanv(pname, new IntPtr((long)ptr));
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe void glGetFloatv(int pname, float[] parameters)
|
||||
{
|
||||
fixed (void *ptr = parameters)
|
||||
|
@ -211,6 +219,14 @@ namespace PortableGL
|
|||
}
|
||||
}
|
||||
|
||||
public unsafe void glGetIntegerv(int pname, ref int parameters)
|
||||
{
|
||||
fixed (void *ptr = ¶meters)
|
||||
{
|
||||
glGetIntegerv(pname, new IntPtr((long)ptr));
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe void glGetActiveAttrib(int program, int index, int bufSize, out int length, out int size, out int type, StringBuilder name)
|
||||
{
|
||||
fixed (int* lengthPtr = &length,
|
||||
|
|
Reference in a new issue