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
|
|
|
}
|
|
|
|
|
|
|
|
VertexManager::VertexManager() : m_local_v_buffer(MAXVBUFFERSIZE), m_local_i_buffer(MAXIBUFFERSIZE)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
VertexManager::~VertexManager()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void VertexManager::ResetBuffer(u32 stride)
|
|
|
|
{
|
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]);
|
|
|
|
}
|
|
|
|
|
2016-12-28 00:37:41 +00:00
|
|
|
void VertexManager::vFlush()
|
2014-02-03 13:02:17 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace
|