2015-05-23 22:55:12 -06:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2015-05-17 17:08:10 -06:00
|
|
|
// Licensed under GPLv2+
|
2013-04-17 21:09:55 -06:00
|
|
|
// Refer to the license.txt file included.
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-02-10 11:54:46 -07:00
|
|
|
#pragma once
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2009-08-10 00:18:10 -06:00
|
|
|
#include <string>
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-09-07 19:06:58 -06:00
|
|
|
#include "Common/CommonTypes.h"
|
2014-11-27 15:53:11 -07:00
|
|
|
#include "VideoCommon/DataReader.h"
|
2014-06-05 09:55:21 -06:00
|
|
|
#include "VideoCommon/NativeVertexFormat.h"
|
2014-02-17 03:18:15 -07:00
|
|
|
|
2008-12-07 21:46:09 -07:00
|
|
|
namespace VertexLoaderManager
|
|
|
|
{
|
2008-12-25 14:44:56 -07:00
|
|
|
void Init();
|
|
|
|
void Shutdown();
|
2008-12-07 21:46:09 -07:00
|
|
|
|
|
|
|
void MarkAllDirty();
|
|
|
|
|
2014-12-09 00:35:04 -07:00
|
|
|
// Returns -1 if buf_size is insufficient, else the amount of bytes consumed
|
2015-01-31 01:23:50 -07:00
|
|
|
int RunVertices(int vtx_attr_group, int primitive, int count, DataReader src, bool skip_drawing, bool is_preprocess);
|
2008-12-07 21:46:09 -07:00
|
|
|
|
|
|
|
// For debugging
|
|
|
|
void AppendListToString(std::string *dest);
|
2014-06-05 09:55:21 -06:00
|
|
|
|
2014-07-25 17:10:44 -06:00
|
|
|
NativeVertexFormat* GetCurrentVertexFormat();
|
2015-05-29 06:42:45 -06:00
|
|
|
|
|
|
|
// Resolved pointers to array bases. Used by vertex loaders.
|
|
|
|
extern u8 *cached_arraybases[12];
|
|
|
|
void UpdateVertexArrayPointers();
|
2015-06-01 11:58:27 -06:00
|
|
|
|
|
|
|
// Position cache for zfreeze (3 vertices, 4 floats each to allow SIMD overwrite).
|
|
|
|
// These arrays are in reverse order.
|
|
|
|
extern float position_cache[3][4];
|
|
|
|
extern u32 position_matrix_index[3];
|
2014-09-11 11:00:40 -06:00
|
|
|
}
|
2008-12-07 21:46:09 -07:00
|
|
|
|