mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 10:30:08 +01:00
mesa: Change parameter to _mesa_set_viewport to float
This matches the expectations of GL_ARB_viewport_array and the storage type where the values will land. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
91ad851876
commit
a4bc73f7ba
2 changed files with 9 additions and 8 deletions
|
|
@ -35,12 +35,13 @@
|
|||
#include "viewport.h"
|
||||
|
||||
static void
|
||||
set_viewport_no_notify(struct gl_context *ctx, unsigned idx, GLint x, GLint y,
|
||||
GLsizei width, GLsizei height)
|
||||
set_viewport_no_notify(struct gl_context *ctx, unsigned idx,
|
||||
GLfloat x, GLfloat y,
|
||||
GLfloat width, GLfloat height)
|
||||
{
|
||||
/* clamp width and height to the implementation dependent range */
|
||||
width = MIN2(width, (GLsizei) ctx->Const.MaxViewportWidth);
|
||||
height = MIN2(height, (GLsizei) ctx->Const.MaxViewportHeight);
|
||||
width = MIN2(width, (GLfloat) ctx->Const.MaxViewportWidth);
|
||||
height = MIN2(height, (GLfloat) ctx->Const.MaxViewportHeight);
|
||||
|
||||
ctx->ViewportArray[idx].X = x;
|
||||
ctx->ViewportArray[idx].Width = width;
|
||||
|
|
@ -121,8 +122,8 @@ _mesa_Viewport(GLint x, GLint y, GLsizei width, GLsizei height)
|
|||
* \param height height of the viewport rectangle.
|
||||
*/
|
||||
void
|
||||
_mesa_set_viewport(struct gl_context *ctx, unsigned idx, GLint x, GLint y,
|
||||
GLsizei width, GLsizei height)
|
||||
_mesa_set_viewport(struct gl_context *ctx, unsigned idx, GLfloat x, GLfloat y,
|
||||
GLfloat width, GLfloat height)
|
||||
{
|
||||
set_viewport_no_notify(ctx, idx, x, y, width, height);
|
||||
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ _mesa_Viewport(GLint x, GLint y, GLsizei width, GLsizei height);
|
|||
|
||||
|
||||
extern void
|
||||
_mesa_set_viewport(struct gl_context *ctx, unsigned idx, GLint x, GLint y,
|
||||
GLsizei width, GLsizei height);
|
||||
_mesa_set_viewport(struct gl_context *ctx, unsigned idx, GLfloat x, GLfloat y,
|
||||
GLfloat width, GLfloat height);
|
||||
|
||||
|
||||
extern void GLAPIENTRY
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue