hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/src/rendering/index_buffer.cpp
blob: d4bd9c06aa9989bc8a8081fb9a8e7e7b5f5a94af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "index_buffer.h"
#include "renderer.h"
#include "platform/opengl/opengl_index_buffer.h"

namespace Donut 
{
    IndexBuffer* IndexBuffer::create(const uint32_t* indices, uint32_t count) 
    {
        switch (Renderer::get_api()) 
        {
            case RendererAPI::API::OpenGL:
                return new OpenGLIndexBuffer(indices, count);
            default:
                return nullptr;
        }
    }
};