mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 11:30:11 +01:00
progs/glsl: change samplers.c to better test sampler/texture indexing
Now the left half is yellow and the right half is red, with the gradients going in opposite directions.
This commit is contained in:
parent
04d170794a
commit
f6d34c2058
1 changed files with 12 additions and 4 deletions
|
|
@ -211,11 +211,19 @@ InitTextures(void)
|
|||
for (y = 0; y < stripeSize; y++) {
|
||||
for (x = 0; x < size; x++) {
|
||||
GLint k = 4 * ((ypos + y) * size + x);
|
||||
if (x < size / 2) {
|
||||
texImage[k + 0] = intensity;
|
||||
texImage[k + 1] = intensity;
|
||||
texImage[k + 2] = 0;
|
||||
texImage[k + 3] = 255;
|
||||
}
|
||||
else {
|
||||
texImage[k + 0] = 255 - intensity;
|
||||
texImage[k + 1] = 0;
|
||||
texImage[k + 2] = 0;
|
||||
texImage[k + 3] = 255;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
glActiveTexture(GL_TEXTURE0 + s);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue