Fix misuse of glTexImage2D (again).
This was originally changed in 74aa80b6
, but the fix broke stipping
because it incorrectly changed the logic. Revert that, and just make
the textures smaller instead.
This commit is contained in:
parent
2fe17a46c2
commit
e74137dc67
@ -388,9 +388,10 @@ GLuint Generate(const std::vector<double> &pattern) {
|
|||||||
|
|
||||||
GLint size;
|
GLint size;
|
||||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &size);
|
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &size);
|
||||||
RgbaColor *textureData = new RgbaColor[size];
|
size /= 2;
|
||||||
|
|
||||||
int mipCount = (int)log2(size);
|
RgbaColor *textureData = new RgbaColor[size];
|
||||||
|
int mipCount = (int)log2(size) + 1;
|
||||||
for(int mip = 0; mip < mipCount; mip++) {
|
for(int mip = 0; mip < mipCount; mip++) {
|
||||||
int dashI = 0;
|
int dashI = 0;
|
||||||
double dashT = 0.0;
|
double dashT = 0.0;
|
||||||
@ -423,8 +424,8 @@ GLuint Generate(const std::vector<double> &pattern) {
|
|||||||
textureData);
|
textureData);
|
||||||
size /= 2;
|
size /= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
delete []textureData;
|
delete []textureData;
|
||||||
|
|
||||||
return texture;
|
return texture;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user