2014-02-03 13:02:17 +00:00
|
|
|
// Copyright 2015 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#include "VideoBackends/Null/VertexManager.h"
|
2017-02-01 04:29:29 +00:00
|
|
|
|
2014-02-03 13:02:17 +00:00
|
|
|
#include "VideoCommon/IndexGenerator.h"
|
2017-02-01 04:29:29 +00:00
|
|
|
#include "VideoCommon/NativeVertexFormat.h"
|
2014-02-03 13:02:17 +00:00
|
|
|
#include "VideoCommon/VertexLoaderManager.h"
|
|
|
|
|
|
|
|
namespace Null
|
|
|
|
{
|
|
|
|
class NullNativeVertexFormat : public NativeVertexFormat
|
|
|
|
{
|
|
|
|
public:
|
2018-10-14 11:24:06 +00:00
|
|
|
NullNativeVertexFormat(const PortableVertexDeclaration& vtx_decl_) { vtx_decl = vtx_decl_; }
|
2014-02-03 13:02:17 +00:00
|
|
|
};
|
|
|
|
|
2017-02-18 08:14:30 +00:00
|
|
|
std::unique_ptr<NativeVertexFormat>
|
2014-02-03 13:02:17 +00:00
|
|
|
VertexManager::CreateNativeVertexFormat(const PortableVertexDeclaration& vtx_decl)
|
|
|
|
{
|
2018-10-14 11:24:06 +00:00
|
|
|
return std::make_unique<NullNativeVertexFormat>(vtx_decl);
|
2014-02-03 13:02:17 +00:00
|
|
|
}
|
|
|
|
|
2018-11-27 07:16:53 +00:00
|
|
|
void VertexManager::UploadUtilityUniforms(const void* uniforms, u32 uniforms_size)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-02-03 13:02:17 +00:00
|
|
|
VertexManager::VertexManager() : m_local_v_buffer(MAXVBUFFERSIZE), m_local_i_buffer(MAXIBUFFERSIZE)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
VertexManager::~VertexManager()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2018-11-27 07:16:53 +00:00
|
|
|
void VertexManager::ResetBuffer(u32 vertex_stride, bool cull_all)
|
2014-02-03 13:02:17 +00:00
|
|
|
{
|
2016-08-22 03:46:52 +00:00
|
|
|
m_cur_buffer_pointer = m_base_buffer_pointer = m_local_v_buffer.data();
|
|
|
|
m_end_buffer_pointer = m_cur_buffer_pointer + m_local_v_buffer.size();
|
2014-02-03 13:02:17 +00:00
|
|
|
IndexGenerator::Start(&m_local_i_buffer[0]);
|
|
|
|
}
|
|
|
|
|
2018-11-27 07:16:53 +00:00
|
|
|
void VertexManager::CommitBuffer(u32 num_vertices, u32 vertex_stride, u32 num_indices,
|
|
|
|
u32* out_base_vertex, u32* out_base_index)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void VertexManager::UploadConstants()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void VertexManager::DrawCurrentBatch(u32 base_index, u32 num_indices, u32 base_vertex)
|
2014-02-03 13:02:17 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2018-11-27 07:16:53 +00:00
|
|
|
} // namespace Null
|