{
float W = 0.5f * viewport.width;
float H = 0.5f * viewport.height;
- float X0 = viewport.x0 + W;
- float Y0 = viewport.y0 + H;
- float N = viewport.minZ;
- float F = viewport.maxZ;
+ float X0 = viewport.x + W;
+ float Y0 = viewport.y + H;
+ float N = viewport.minDepth;
+ float F = viewport.maxDepth;
float Z = F - N;
if(context->isDrawTriangle())
}
#endif
- void Renderer::setViewport(const Viewport &viewport)
+ void Renderer::setViewport(const VkViewport &viewport)
{
this->viewport = viewport;
}
float4 a2c3;
};
- struct Viewport
- {
- float x0;
- float y0;
- float width;
- float height;
- float minZ;
- float maxZ;
- };
-
class Renderer : public VertexProcessor, public PixelProcessor, public SetupProcessor
{
struct Task
void setVertexShaderConstantB(unsigned int index, const int *boolean, unsigned int count = 1);
// Viewport & Clipper
- void setViewport(const Viewport &viewport);
+ void setViewport(const VkViewport &viewport);
void setScissor(const Rect &scissor);
void setClipFlags(int flags);
void setClipPlane(unsigned int index, const float plane[4]);
Context *context;
Clipper *clipper;
Blitter *blitter;
- Viewport viewport;
+ VkViewport viewport;
Rect scissor;
int clipFlags;