m_log << TestLog::Message << "glGetBooleani_v(" << getGettableIndexedStateStr(target) << ", " << index << ", " << static_cast<const void*>(data) << ");" << TestLog::EndMessage;
m_gl.getBooleani_v(target, index, data);
if (m_enableLog)
- m_log << TestLog::Message << "// data = " << getBooleanPointerStr(data, 1) << TestLog::EndMessage;
+ m_log << TestLog::Message << "// data = " << getBooleanPointerStr(data, getIndexedQueryNumArgsOut(target)) << TestLog::EndMessage;
}
void CallLogWrapper::glGetBooleanv (glw::GLenum pname, glw::GLboolean *data)
m_log << TestLog::Message << "glGetInteger64i_v(" << getGettableIndexedStateStr(target) << ", " << index << ", " << data << ");" << TestLog::EndMessage;
m_gl.getInteger64i_v(target, index, data);
if (m_enableLog)
- m_log << TestLog::Message << "// data = " << getPointerStr(data, 1) << TestLog::EndMessage;
+ m_log << TestLog::Message << "// data = " << getPointerStr(data, getIndexedQueryNumArgsOut(target)) << TestLog::EndMessage;
}
void CallLogWrapper::glGetInteger64v (glw::GLenum pname, glw::GLint64 *data)
m_log << TestLog::Message << "glGetIntegeri_v(" << getGettableIndexedStateStr(target) << ", " << index << ", " << data << ");" << TestLog::EndMessage;
m_gl.getIntegeri_v(target, index, data);
if (m_enableLog)
- m_log << TestLog::Message << "// data = " << getPointerStr(data, 1) << TestLog::EndMessage;
+ m_log << TestLog::Message << "// data = " << getPointerStr(data, getIndexedQueryNumArgsOut(target)) << TestLog::EndMessage;
}
void CallLogWrapper::glGetIntegerv (glw::GLenum pname, glw::GLint *data)
}
}
+int getIndexedQueryNumArgsOut (int pname)
+{
+ switch(pname)
+ {
+ case GL_COLOR_WRITEMASK: return 4;
+ default: return 1;
+ }
+}
+
int getAttributeQueryNumArgsOut (int pname)
{
switch(pname)
"glGetFramebufferParameteriv": LogSpec({0: enum("FramebufferTarget"), 1: enum("FramebufferParameter")}, argOutPrints = {2: pointer(size = "1")}),
"glGetIntegerv": LogSpec({0: enum("GettableState")}, argOutPrints = {1: pointer(size = "getBasicQueryNumArgsOut(pname)")}),
"glGetInteger64v": LogSpec({0: enum("GettableState")}, argOutPrints = {1: pointer(size = "getBasicQueryNumArgsOut(pname)")}),
- "glGetIntegeri_v": LogSpec({0: enum("GettableIndexedState")}, argOutPrints = {2: pointer(size = "1")}),
- "glGetInteger64i_v": LogSpec({0: enum("GettableIndexedState")}, argOutPrints = {2: pointer(size = "1")}),
+ "glGetIntegeri_v": LogSpec({0: enum("GettableIndexedState")}, argOutPrints = {2:pointer(size = "getIndexedQueryNumArgsOut(target)")}),
+ "glGetInteger64i_v": LogSpec({0: enum("GettableIndexedState")}, argOutPrints = {2: pointer(size = "getIndexedQueryNumArgsOut(target)")}),
"glGetBooleani_v":
LogSpec(
{
2: voidPointer # last argument has type of GLboolean* (aka. char*). Prevent
# wrapper from attempting to print the argument as a C string.
},
- argOutPrints = {2: booleanPointer(size = "1")}),
+ argOutPrints = {2: booleanPointer(size = "getIndexedQueryNumArgsOut(target)")}),
"glGetInternalformativ": LogSpec({0: enum("InternalFormatTarget"), 1: enum("PixelFormat"), 2: enum("InternalFormatParameter")}, argOutPrints = {4: pointer(size = "bufSize")}),
"glGetMultisamplefv": LogSpec({0: enum("MultisampleParameter")}, argOutPrints = {2: pointer(size = "2")}),
"glGetPointerv": LogSpec({0: enum("PointerState")}, argOutPrints = {1: pointer(size = "1")}),
("PRIMITIVE_BOUNDING_BOX_EXT", 8),
]),
+ ("Indexed", [
+ ("COLOR_WRITEMASK", 4),
+ ]),
+
("Attribute", [
("CURRENT_VERTEX_ATTRIB", 4),
]),