dolphin/Source/Core/VideoCommon/IndexGenerator.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
831 B
C
Raw Normal View History

// Copyright 2008 Dolphin Emulator Project
2015-05-18 01:08:10 +02:00
// Licensed under GPLv2+
// Refer to the license.txt file included.
// This is currently only used by the DX backend, but it may make sense to
// use it in the GL backend or a future DX10 backend too.
#pragma once
#include "Common/CommonTypes.h"
class IndexGenerator
{
public:
2013-02-21 19:10:00 -06:00
// Init
2013-04-08 19:39:43 +02:00
static void Init();
static void Start(u16* Indexptr);
2013-02-21 19:10:00 -06:00
static void AddIndices(int primitive, u32 numVertices);
2018-11-27 17:16:53 +10:00
static void AddExternalIndices(const u16* indices, u32 num_indices, u32 num_vertices);
2013-02-21 19:10:00 -06:00
// returns numprimitives
static u32 GetNumVerts() { return base_index; }
static u32 GetIndexLen() { return (u32)(index_buffer_current - BASEIptr); }
static u32 GetRemainingIndices();
2014-01-16 13:56:20 +01:00
private:
static u16* index_buffer_current;
static u16* BASEIptr;
static u32 base_index;
};