Use NVG_IMAGE_NEAREST to no interpolate in image
This commit is contained in:
parent
61fb55ac19
commit
ee031a432c
@ -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_NEAREST) {
|
||||
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 {
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
|
||||
}
|
||||
} else {
|
||||
if (imageFlags & NVG_IMAGE_NEAREST) {
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
} else {
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
} else {
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
}
|
||||
}
|
||||
|
||||
if (imageFlags & NVG_IMAGE_NEAREST) {
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
} else {
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
} else {
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
}
|
||||
|
||||
if (imageFlags & NVG_IMAGE_REPEATX)
|
||||
|
Loading…
x
Reference in New Issue
Block a user