case GL_DOUBLE:
return 8;
default:
- OS::DebugMessage("apitrace: warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, type);
+ os::log("apitrace: warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, type);
return 0;
}
}
numElems = 1;
break;
default:
- OS::DebugMessage("apitrace: warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, type);
+ os::log("apitrace: warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, type);
elemType = GL_NONE;
numElems = 0;
return;
}
}
} else {
- OS::DebugMessage("apitrace: warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, type);
+ os::log("apitrace: warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, type);
}
if (__element_array_buffer) {
static inline GLuint
__glDrawArraysIndirect_maxindex(const GLvoid *indirect) {
- OS::DebugMessage("apitrace: warning: %s: unsupported\n", __FUNCTION__);
+ os::log("apitrace: warning: %s: unsupported\n", __FUNCTION__);
return 0;
}
static inline GLuint
__glDrawElementsIndirect_maxindex(GLenum type, const GLvoid *indirect) {
- OS::DebugMessage("apitrace: warning: %s: unsupported\n", __FUNCTION__);
+ os::log("apitrace: warning: %s: unsupported\n", __FUNCTION__);
return 0;
}
channels = 4;
break;
default:
- OS::DebugMessage("apitrace: warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, target);
+ os::log("apitrace: warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, target);
return 0;
}
channels = 4;
break;
default:
- OS::DebugMessage("apitrace: warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, target);
+ os::log("apitrace: warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, target);
return 0;
}
case GL_CMYKA_EXT:
return 5;
default:
- OS::DebugMessage("apitrace: warning: %s: unexpected format GLenum 0x%04X\n", __FUNCTION__, format);
+ os::log("apitrace: warning: %s: unexpected format GLenum 0x%04X\n", __FUNCTION__, format);
return 0;
}
}
bits_per_pixel = 64;
break;
default:
- OS::DebugMessage("apitrace: warning: %s: unexpected type GLenum 0x%04X\n", __FUNCTION__, type);
+ os::log("apitrace: warning: %s: unexpected type GLenum 0x%04X\n", __FUNCTION__, type);
bits_per_pixel = 0;
break;
}
case GL_STENCIL:
return 1;
default:
- OS::DebugMessage("apitrace: warning: %s: unexpected buffer GLenum 0x%04X\n", __FUNCTION__, buffer);
+ os::log("apitrace: warning: %s: unexpected buffer GLenum 0x%04X\n", __FUNCTION__, buffer);
return 0;
}
}
}
+/*
+ * (key, value) attribute list, terminated by the given terminator.
+ */
+template<class T>
+static inline size_t
+__AttribList_size(const T *pAttribList, T terminator)
+{
+ size_t size = 0;
+
+ if (pAttribList) {
+ while (pAttribList[size] != terminator)
+ size += 2;
+ // terminator also counts
+ size++;
+ }
+
+ return size;
+}
+
+
#endif /* _GL_SIZE_HPP_ */