mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb/WebGL2: Implement drawRangeElements
This commit is contained in:
parent
2c13a2a68c
commit
8dcbe69eb6
|
|
@ -365,7 +365,7 @@ interface mixin WebGL2RenderingContextBase {
|
|||
undefined vertexAttribDivisor(GLuint index, GLuint divisor);
|
||||
undefined drawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount);
|
||||
undefined drawElementsInstanced(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei instanceCount);
|
||||
[FIXME] undefined drawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLintptr offset);
|
||||
undefined drawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLintptr offset);
|
||||
|
||||
// Multiple Render Targets
|
||||
undefined drawBuffers(sequence<GLenum> buffers);
|
||||
|
|
|
|||
|
|
@ -404,6 +404,14 @@ void WebGL2RenderingContextImpl::draw_elements_instanced(WebIDL::UnsignedLong mo
|
|||
needs_to_present();
|
||||
}
|
||||
|
||||
void WebGL2RenderingContextImpl::draw_range_elements(WebIDL::UnsignedLong mode, WebIDL::UnsignedLong start, WebIDL::UnsignedLong end, WebIDL::Long count, WebIDL::UnsignedLong type, WebIDL::LongLong offset)
|
||||
{
|
||||
m_context->make_current();
|
||||
m_context->notify_content_will_change();
|
||||
needs_to_present();
|
||||
glDrawRangeElements(mode, start, end, count, type, reinterpret_cast<void*>(offset));
|
||||
}
|
||||
|
||||
void WebGL2RenderingContextImpl::draw_buffers(Vector<WebIDL::UnsignedLong> buffers)
|
||||
{
|
||||
m_context->make_current();
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ public:
|
|||
void vertex_attrib_divisor(WebIDL::UnsignedLong index, WebIDL::UnsignedLong divisor);
|
||||
void draw_arrays_instanced(WebIDL::UnsignedLong mode, WebIDL::Long first, WebIDL::Long count, WebIDL::Long instance_count);
|
||||
void draw_elements_instanced(WebIDL::UnsignedLong mode, WebIDL::Long count, WebIDL::UnsignedLong type, WebIDL::LongLong offset, WebIDL::Long instance_count);
|
||||
void draw_range_elements(WebIDL::UnsignedLong mode, WebIDL::UnsignedLong start, WebIDL::UnsignedLong end, WebIDL::Long count, WebIDL::UnsignedLong type, WebIDL::LongLong offset);
|
||||
void draw_buffers(Vector<WebIDL::UnsignedLong> buffers);
|
||||
void clear_bufferfv(WebIDL::UnsignedLong buffer, WebIDL::Long drawbuffer, Float32List values, WebIDL::UnsignedLongLong src_offset);
|
||||
void clear_bufferiv(WebIDL::UnsignedLong buffer, WebIDL::Long drawbuffer, Int32List values, WebIDL::UnsignedLongLong src_offset);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user