mirror of https://github.com/inolen/redream.git
fix filter mode calculation
This commit is contained in:
parent
7c2cdfbb56
commit
18232d86d2
|
@ -20,6 +20,7 @@ enum PixelFormat {
|
|||
enum FilterMode {
|
||||
FILTER_NEAREST,
|
||||
FILTER_BILINEAR,
|
||||
NUM_FILTER_MODES,
|
||||
};
|
||||
|
||||
enum WrapMode {
|
||||
|
|
|
@ -129,7 +129,7 @@ TextureHandle GLBackend::RegisterTexture(PixelFormat format, FilterMode filter,
|
|||
glGenTextures(1, &gltex);
|
||||
glBindTexture(GL_TEXTURE_2D, gltex);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
|
||||
filter_funcs[filter * mipmaps]);
|
||||
filter_funcs[mipmaps * NUM_FILTER_MODES + filter]);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter_funcs[filter]);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, wrap_modes[wrap_u]);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, wrap_modes[wrap_v]);
|
||||
|
|
Loading…
Reference in New Issue