libmirplatform:
LinearBuffer allocate_linear_buffer(); // returns ShmBuffer usually
Drivers could optionally override with their own:
LinearBuffer allocate_linear_buffer();
but it's generally not required or even recommended in most cases.
DirectFB:
LinearBuffer allocate_linear_buffer(); // might return a DirectFBBuffer
Renderers:
GL/GLES: Understands GLBuffer and LinearBuffer
Vulkan: Understands VkBuffer and LinearBuffer
Joe's cool software blitter: Understands LinearBuffer
New renderers are only required for new graphics languages, which are quite rare.
To illustrate that renderers and core need not change for new drivers/platforms:
class GLBuffer : public Buffer
class LinearBuffer : public Buffer // addressable with a stride etc
class VkBuffer : public Buffer
class ShmBuffer : public LinearBuffer
class DirectFBBuffer : public LinearBuffer
class GBMBuffer : public GLBuffer
class NvidiaGLBuffer : public GLBuffer
class NvidiaVkBuffer : public VkBuffer
class AndroidBuffer : public GLBuffer
Mesa driver: gl_buffer( ); // returns GBMBuffer
GLBuffer allocate_
Android driver: gl_buffer( ); // returns AndroidBuffer
GLBuffer allocate_
Nvidia driver: gl_buffer( ); // returns NvidiaGLBuffer vk_buffer( ); // returns NvidiaVkBuffer
GLBuffer allocate_
VkBuffer allocate_
libmirplatform: linear_ buffer( ); // returns ShmBuffer usually
LinearBuffer allocate_
Drivers could optionally override with their own: linear_ buffer( );
LinearBuffer allocate_
but it's generally not required or even recommended in most cases.
DirectFB: linear_ buffer( ); // might return a DirectFBBuffer
LinearBuffer allocate_
Renderers:
GL/GLES: Understands GLBuffer and LinearBuffer
Vulkan: Understands VkBuffer and LinearBuffer
Joe's cool software blitter: Understands LinearBuffer
New renderers are only required for new graphics languages, which are quite rare.