mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Renderer: Move cull mode to a rasterization state object
Also moves logic for primitive handling to VideoCommon.
This commit is contained in:
@ -9,19 +9,13 @@
|
||||
|
||||
#include "Common/CommonFuncs.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "VideoCommon/RenderState.h"
|
||||
|
||||
class DataReader;
|
||||
class NativeVertexFormat;
|
||||
class PointerWrap;
|
||||
struct PortableVertexDeclaration;
|
||||
|
||||
enum PrimitiveType
|
||||
{
|
||||
PRIMITIVE_POINTS,
|
||||
PRIMITIVE_LINES,
|
||||
PRIMITIVE_TRIANGLES,
|
||||
};
|
||||
|
||||
struct Slope
|
||||
{
|
||||
float dfdx;
|
||||
@ -51,6 +45,7 @@ public:
|
||||
// needs to be virtual for DX11's dtor
|
||||
virtual ~VertexManagerBase();
|
||||
|
||||
PrimitiveType GetCurrentPrimitiveType() const { return m_current_primitive_type; }
|
||||
DataReader PrepareForAdditionalData(int primitive, u32 count, u32 stride, bool cullall);
|
||||
void FlushData(u32 count, u32 stride);
|
||||
|
||||
@ -65,8 +60,6 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void vDoState(PointerWrap& p) {}
|
||||
PrimitiveType m_current_primitive_type = PrimitiveType::PRIMITIVE_POINTS;
|
||||
|
||||
virtual void ResetBuffer(u32 stride) = 0;
|
||||
|
||||
u8* m_cur_buffer_pointer = nullptr;
|
||||
@ -80,6 +73,7 @@ protected:
|
||||
void CalculateZSlope(NativeVertexFormat* format);
|
||||
|
||||
bool m_cull_all = false;
|
||||
PrimitiveType m_current_primitive_type = PrimitiveType::Points;
|
||||
|
||||
private:
|
||||
bool m_is_flushed = true;
|
||||
|
Reference in New Issue
Block a user