aboutsummaryrefslogtreecommitdiff
path: root/src/Rendering/IndexBuffer.cpp
blob: d8854d3da200596d8e4e63169e714aa8b9057fe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "IndexBuffer.h"
#include "Renderer.h"
#include "Platform/OpenGL/OpenGLIndexBuffer.h"

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