Solve bug inverted but not good solution
This commit is contained in:
parent
e955b3829d
commit
dd1eff4f9e
@ -740,22 +740,22 @@ static int glnvg__renderCreateTexture(void* uptr, int type, int w, int h, int im
|
|||||||
|
|
||||||
if (imageFlags & NVG_IMAGE_GENERATE_MIPMAPS) {
|
if (imageFlags & NVG_IMAGE_GENERATE_MIPMAPS) {
|
||||||
if (imageFlags & NVG_IMAGE_NEAREST) {
|
if (imageFlags & NVG_IMAGE_NEAREST) {
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST);
|
|
||||||
} else {
|
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
|
||||||
|
} else {
|
||||||
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (imageFlags & NVG_IMAGE_NEAREST) {
|
if (imageFlags & NVG_IMAGE_NEAREST) {
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
|
||||||
} else {
|
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||||
|
} else {
|
||||||
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (imageFlags & NVG_IMAGE_NEAREST) {
|
if (imageFlags & NVG_IMAGE_NEAREST) {
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
|
||||||
} else {
|
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||||
|
} else {
|
||||||
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (imageFlags & NVG_IMAGE_REPEATX)
|
if (imageFlags & NVG_IMAGE_REPEATX)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user