summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2015-11-21 10:32:07 +0100
committerdegasus <wickmarkus@web.de>2015-11-24 22:48:49 +0100
commitfc00598785fc02393864dd3521056d70086ee4b7 (patch)
treee058656173b1eaf7e7d13709c3cc024afb435dd8 /Source/Core/VideoCommon
parentdf799dd12466a319c5616027980db0dbcadaa7de (diff)
NativeVertexFormat: Inline Initialize in contructor
They were only called at once, so no need to seperate them. This also removes the only dereference of the NativeVertexFormat in VideoCommon, so backends may just return nullptr.
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/NativeVertexFormat.h1
-rw-r--r--Source/Core/VideoCommon/VertexLoaderManager.cpp3
-rw-r--r--Source/Core/VideoCommon/VertexManagerBase.h2
3 files changed, 2 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/NativeVertexFormat.h b/Source/Core/VideoCommon/NativeVertexFormat.h
index 0f48341deb..ff461a02fd 100644
--- a/Source/Core/VideoCommon/NativeVertexFormat.h
+++ b/Source/Core/VideoCommon/NativeVertexFormat.h
@@ -108,7 +108,6 @@ class NativeVertexFormat : NonCopyable
public:
virtual ~NativeVertexFormat() {}
- virtual void Initialize(const PortableVertexDeclaration &vtx_decl) = 0;
virtual void SetupVertexPointers() = 0;
u32 GetVertexStride() const { return vtx_decl.stride; }
diff --git a/Source/Core/VideoCommon/VertexLoaderManager.cpp b/Source/Core/VideoCommon/VertexLoaderManager.cpp
index 50f50cb78e..25c4c6adb0 100644
--- a/Source/Core/VideoCommon/VertexLoaderManager.cpp
+++ b/Source/Core/VideoCommon/VertexLoaderManager.cpp
@@ -152,8 +152,7 @@ static VertexLoaderBase* RefreshLoader(int vtx_attr_group, bool preprocess = fal
std::unique_ptr<NativeVertexFormat>& native = s_native_vertex_map[format];
if (!native)
{
- native.reset(g_vertex_manager->CreateNativeVertexFormat());
- native->Initialize(format);
+ native.reset(g_vertex_manager->CreateNativeVertexFormat(format));
}
loader->m_native_vertex_format = native.get();
}
diff --git a/Source/Core/VideoCommon/VertexManagerBase.h b/Source/Core/VideoCommon/VertexManagerBase.h
index 316bcd4123..26b02ae122 100644
--- a/Source/Core/VideoCommon/VertexManagerBase.h
+++ b/Source/Core/VideoCommon/VertexManagerBase.h
@@ -50,7 +50,7 @@ public:
static void Flush();
- virtual ::NativeVertexFormat* CreateNativeVertexFormat() = 0;
+ virtual NativeVertexFormat* CreateNativeVertexFormat(const PortableVertexDeclaration& vtx_decl) = 0;
static void DoState(PointerWrap& p);