Commit 705fed33eaf60341b6ebc7c0d202dab3f18543a8
- Diff rendering mode:
- inline
- side by side
src/mesa/drivers/common/meta.c
(7 / 4)
|   | |||
| 2135 | 2135 | const struct gl_texture_object *texObj; | |
| 2136 | 2136 | const struct gl_texture_image *texImage; | |
| 2137 | 2137 | GLfloat s, t, s1, t1; | |
| 2138 | GLuint tw, th; | ||
| 2138 | 2139 | ||
| 2139 | 2140 | if (!ctx->Texture.Unit[i]._ReallyEnabled) { | |
| 2140 | 2141 | GLuint j; | |
| … | … | ||
| 2148 | 2148 | ||
| 2149 | 2149 | texObj = ctx->Texture.Unit[i]._Current; | |
| 2150 | 2150 | texImage = texObj->Image[0][texObj->BaseLevel]; | |
| 2151 | tw = texImage->Width2; | ||
| 2152 | th = texImage->Height2; | ||
| 2151 | 2153 | ||
| 2152 | s = texObj->CropRect[0] / texImage->Width2; | ||
| 2153 | t = texObj->CropRect[1] / texImage->Height2; | ||
| 2154 | s1 = (texObj->CropRect[0] + texObj->CropRect[2]) / texImage->Width2; | ||
| 2155 | t1 = (texObj->CropRect[1] + texObj->CropRect[3]) / texImage->Height2; | ||
| 2154 | s = (GLfloat) texObj->CropRect[0] / tw; | ||
| 2155 | t = (GLfloat) texObj->CropRect[1] / th; | ||
| 2156 | s1 = (GLfloat) (texObj->CropRect[0] + texObj->CropRect[2]) / tw; | ||
| 2157 | t1 = (GLfloat) (texObj->CropRect[1] + texObj->CropRect[3]) / th; | ||
| 2156 | 2158 | ||
| 2157 | 2159 | verts[0].st[i][0] = s; | |
| 2158 | 2160 | verts[0].st[i][1] = t; |
Comments
Add a new comment:
Login or create an account to post a comment
Add your comment
Please log in to comment

