mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-21 14:06:45 +00:00
Refactor viewport to have X/Y separate members instead of TopLeft[2]
This commit is contained in:
@@ -191,20 +191,20 @@ struct SO
|
||||
|
||||
struct Viewport
|
||||
{
|
||||
Viewport() : Width(0.0f), Height(0.0f), MinDepth(0.0f), MaxDepth(0.0f), Enabled(false)
|
||||
Viewport()
|
||||
: X(0.0f), Y(0.0f), Width(0.0f), Height(0.0f), MinDepth(0.0f), MaxDepth(0.0f), Enabled(false)
|
||||
{
|
||||
TopLeft[0] = 0.0f;
|
||||
TopLeft[1] = 0.0f;
|
||||
}
|
||||
Viewport(float TX, float TY, float W, float H, float MN, float MX, bool en)
|
||||
: Width(W), Height(H), MinDepth(MN), MaxDepth(MX), Enabled(en)
|
||||
: X(TX), Y(TY), Width(W), Height(H), MinDepth(MN), MaxDepth(MX), Enabled(en)
|
||||
{
|
||||
TopLeft[0] = TX;
|
||||
TopLeft[1] = TY;
|
||||
}
|
||||
float TopLeft[2];
|
||||
float Width, Height;
|
||||
float MinDepth, MaxDepth;
|
||||
float X;
|
||||
float Y;
|
||||
float Width;
|
||||
float Height;
|
||||
float MinDepth;
|
||||
float MaxDepth;
|
||||
bool32 Enabled;
|
||||
};
|
||||
|
||||
|
||||
@@ -220,20 +220,17 @@ struct Streamout
|
||||
|
||||
struct Viewport
|
||||
{
|
||||
Viewport() : Width(0.0f), Height(0.0f), MinDepth(0.0f), MaxDepth(0.0f)
|
||||
{
|
||||
TopLeft[0] = 0.0f;
|
||||
TopLeft[1] = 0.0f;
|
||||
}
|
||||
Viewport() : X(0.0f), Y(0.0f), Width(0.0f), Height(0.0f), MinDepth(0.0f), MaxDepth(0.0f) {}
|
||||
Viewport(float TX, float TY, float W, float H, float MN, float MX)
|
||||
: Width(W), Height(H), MinDepth(MN), MaxDepth(MX)
|
||||
: X(TX), Y(TY), Width(W), Height(H), MinDepth(MN), MaxDepth(MX)
|
||||
{
|
||||
TopLeft[0] = TX;
|
||||
TopLeft[1] = TY;
|
||||
}
|
||||
float TopLeft[2];
|
||||
float Width, Height;
|
||||
float MinDepth, MaxDepth;
|
||||
float X;
|
||||
float Y;
|
||||
float Width;
|
||||
float Height;
|
||||
float MinDepth;
|
||||
float MaxDepth;
|
||||
};
|
||||
|
||||
struct Scissor
|
||||
|
||||
Reference in New Issue
Block a user