浏览代码

gallium: tweak coords in u_gen_mipmap code

tags/mesa_20090313
Michal Krol 17 年前
父节点
当前提交
c8c373514a
共有 1 个文件被更改,包括 8 次插入8 次删除
  1. 8
    8
      src/gallium/auxiliary/util/u_gen_mipmap.c

+ 8
- 8
src/gallium/auxiliary/util/u_gen_mipmap.c 查看文件

@@ -773,23 +773,23 @@ set_vertex_data(struct gen_mipmap_state *ctx, float width, float height)
{
void *buf;

ctx->vertices[0][0][0] = 0.0f; /*x*/
ctx->vertices[0][0][1] = 0.0f; /*y*/
ctx->vertices[0][0][0] = -0.5f; /*x*/
ctx->vertices[0][0][1] = -0.5f; /*y*/
ctx->vertices[0][1][0] = 0.0f; /*s*/
ctx->vertices[0][1][1] = 0.0f; /*t*/

ctx->vertices[1][0][0] = width; /*x*/
ctx->vertices[1][0][1] = 0.0f; /*y*/
ctx->vertices[1][0][0] = width - 0.5f; /*x*/
ctx->vertices[1][0][1] = -0.5f; /*y*/
ctx->vertices[1][1][0] = 1.0f; /*s*/
ctx->vertices[1][1][1] = 0.0f; /*t*/

ctx->vertices[2][0][0] = width;
ctx->vertices[2][0][1] = height;
ctx->vertices[2][0][0] = width - 0.5f;
ctx->vertices[2][0][1] = height - 0.5f;
ctx->vertices[2][1][0] = 1.0f;
ctx->vertices[2][1][1] = 1.0f;

ctx->vertices[3][0][0] = 0.0f;
ctx->vertices[3][0][1] = height;
ctx->vertices[3][0][0] = -0.5f;
ctx->vertices[3][0][1] = height - 0.5f;
ctx->vertices[3][1][0] = 0.0f;
ctx->vertices[3][1][1] = 1.0f;


正在加载...
取消
保存