mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:27:46 +00:00
LibGL: Add simple implementation of buffer objects
For now, buffers are only implemented on the LibGL side, however in the future buffer objects should be stored in LibGPU.
This commit is contained in:
parent
892006218a
commit
59df2e62ee
6 changed files with 170 additions and 10 deletions
|
@ -15,6 +15,7 @@
|
|||
#include <AK/Tuple.h>
|
||||
#include <AK/Variant.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibGL/Buffer/Buffer.h>
|
||||
#include <LibGL/NameAllocator.h>
|
||||
#include <LibGL/Tex/Texture.h>
|
||||
#include <LibGL/Tex/TextureUnit.h>
|
||||
|
@ -543,6 +544,12 @@ private:
|
|||
|
||||
// GL Extension string
|
||||
String m_extensions;
|
||||
|
||||
// Buffer objects
|
||||
NameAllocator m_buffer_name_allocator;
|
||||
HashMap<GLuint, RefPtr<Buffer>> m_allocated_buffers;
|
||||
RefPtr<Buffer> m_array_buffer;
|
||||
RefPtr<Buffer> m_element_array_buffer;
|
||||
};
|
||||
|
||||
ErrorOr<NonnullOwnPtr<GLContext>> create_context(Gfx::Bitmap&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue