void DeviceContext::Bind(const IndexBuffer& ib, NativeFormat::Enum indexFormat, unsigned offset) { // (it seems that index formats are always 16 bit for OpenGLES?) assert(indexFormat == NativeFormat::R16_UINT); assert(offset == 0); // (not supported currently... But we could safe it up for the draw call) glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, (GLuint)ib.GetUnderlying()); }
void DeviceContext::Bind(const IndexBuffer& ib, NativeFormat::Enum indexFormat, unsigned offset) { _underlying->IASetIndexBuffer(ib.GetUnderlying(), AsDXGIFormat(indexFormat), offset); }