Move Zfreeze code out individual backends into videoCommon

Also:
 * Implement support for per-vertex PosMatrixIndex
 * Only update zslope constant once when zfreeze is activated.
 * Added a bunch of comments.
This commit is contained in:
Scott Mansell
2015-01-24 03:15:09 +13:00
parent daf760b202
commit 5510c86b81
10 changed files with 59 additions and 40 deletions

View File

@ -109,7 +109,8 @@ public:
virtual void Initialize(const PortableVertexDeclaration &vtx_decl) = 0;
virtual void SetupVertexPointers() = 0;
u32 GetVertexStride() const { return vertex_stride; }
u32 GetVertexStride() const { return vtx_decl.stride; }
PortableVertexDeclaration GetVertexDeclaration() const { return vtx_decl; }
// TODO: move this under private:
u32 m_components; // VB_HAS_X. Bitmask telling what vertex components are present.
@ -118,5 +119,5 @@ protected:
// Let subclasses construct.
NativeVertexFormat() {}
u32 vertex_stride;
PortableVertexDeclaration vtx_decl;
};