diff options
| author | degasus <wickmarkus@web.de> | 2014-12-13 01:51:14 +0100 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2014-12-21 14:12:43 +0100 |
| commit | 809117102e1c8007345c48aba5eabfec9cff26ee (patch) | |
| tree | 72b2e6ce801a0daf3e67e73faf44889a6ad8bfdc /Source/Core/VideoBackends/Software | |
| parent | a71c8158d91c7ee0976b9b16eeba5ea3ac18ff99 (diff) | |
VideoCommon: split VertexLoaderBase from VertexLoader
Diffstat (limited to 'Source/Core/VideoBackends/Software')
| -rw-r--r-- | Source/Core/VideoBackends/Software/NativeVertexFormat.h | 8 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/Software/SWVertexLoader.cpp | 12 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/Software/SWVertexLoader.h | 6 |
3 files changed, 7 insertions, 19 deletions
diff --git a/Source/Core/VideoBackends/Software/NativeVertexFormat.h b/Source/Core/VideoBackends/Software/NativeVertexFormat.h index ad71e2caf9..c4f140cac4 100644 --- a/Source/Core/VideoBackends/Software/NativeVertexFormat.h +++ b/Source/Core/VideoBackends/Software/NativeVertexFormat.h @@ -7,14 +7,6 @@ #include "Common/ChunkFile.h" #include "VideoBackends/Software/Vec3.h" -#ifdef WIN32 -#define LOADERDECL __cdecl -#else -#define LOADERDECL -#endif - -typedef void (LOADERDECL *TPipelineFunction)(); - struct Vec4 { float x; diff --git a/Source/Core/VideoBackends/Software/SWVertexLoader.cpp b/Source/Core/VideoBackends/Software/SWVertexLoader.cpp index fecfb94abe..2523b5b01a 100644 --- a/Source/Core/VideoBackends/Software/SWVertexLoader.cpp +++ b/Source/Core/VideoBackends/Software/SWVertexLoader.cpp @@ -13,12 +13,8 @@ #include "VideoBackends/Software/TransformUnit.h" #include "VideoBackends/Software/XFMemLoader.h" -#include "VideoCommon/VertexLoader.h" -#include "VideoCommon/VertexLoader_Color.h" -#include "VideoCommon/VertexLoader_Normal.h" -#include "VideoCommon/VertexLoader_Position.h" -#include "VideoCommon/VertexLoader_TextCoord.h" -#include "VideoCommon/VertexManagerBase.h" +#include "VideoCommon/VertexLoaderBase.h" +#include "VideoCommon/VertexLoaderUtils.h" SWVertexLoader::SWVertexLoader() : m_VertexSize(0) @@ -42,8 +38,8 @@ void SWVertexLoader::SetFormat(u8 attributeIndex, u8 primitiveType) if (!m_CurrentLoader) { - m_CurrentLoader = new VertexLoader(g_main_cp_state.vtx_desc, g_main_cp_state.vtx_attr[m_attributeIndex]); - m_VertexLoaderMap[uid] = std::unique_ptr<VertexLoader>(m_CurrentLoader); + m_CurrentLoader = VertexLoaderBase::CreateVertexLoader(g_main_cp_state.vtx_desc, g_main_cp_state.vtx_attr[m_attributeIndex]); + m_VertexLoaderMap[uid] = std::unique_ptr<VertexLoaderBase>(m_CurrentLoader); } m_VertexSize = m_CurrentLoader->m_VertexSize; diff --git a/Source/Core/VideoBackends/Software/SWVertexLoader.h b/Source/Core/VideoBackends/Software/SWVertexLoader.h index fe4e5347ba..890d1fa52d 100644 --- a/Source/Core/VideoBackends/Software/SWVertexLoader.h +++ b/Source/Core/VideoBackends/Software/SWVertexLoader.h @@ -9,7 +9,7 @@ #include "VideoBackends/Software/CPMemLoader.h" #include "VideoBackends/Software/NativeVertexFormat.h" -#include "VideoCommon/VertexLoader.h" +#include "VideoCommon/VertexLoaderBase.h" class PointerWrap; class SetupUnit; @@ -28,9 +28,9 @@ class SWVertexLoader bool m_TexGenSpecialCase; - std::unordered_map<VertexLoaderUID, std::unique_ptr<VertexLoader>> m_VertexLoaderMap; + std::unordered_map<VertexLoaderUID, std::unique_ptr<VertexLoaderBase>> m_VertexLoaderMap; std::vector<u8> m_LoadedVertices; - VertexLoader* m_CurrentLoader; + VertexLoaderBase* m_CurrentLoader; u8 m_attributeIndex; u8 m_primitiveType; |
