Skip to content

Commit

Permalink
UPBGE: Set mipmap using linear filtering for blenderplayer.
Browse files Browse the repository at this point in the history
Blender is using by default mipmapping with linear filtering but blenderplayer
wasn't. To fix this lack, GPU_set_linear_mipmap is now called after the windows
construction in GPG_ghost.cpp.

In the same way the mipmap settings are now set for every kind of window creation:
window, fullscreen…

Fix issue #371.
  • Loading branch information
panzergame committed Jan 25, 2017
1 parent 90d8620 commit 17afca0
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions source/gameengine/GamePlayer/GPG_ghost.cpp
Expand Up @@ -1264,15 +1264,16 @@ int main(
else
window = startWindow(system, title, windowLeft, windowTop, windowWidth,
windowHeight, stereoWindow, alphaBackground);

if (SYS_GetCommandLineInt(syshandle, "nomipmap", 0)) {
GPU_set_mipmap(0);
}

GPU_set_anisotropic(U.anisotropic_filter);
GPU_set_gpu_mipmapping(U.use_gpu_mipmap);
}
}

if (SYS_GetCommandLineInt(syshandle, "nomipmap", 0)) {
GPU_set_mipmap(0);
}

GPU_set_anisotropic(U.anisotropic_filter);
GPU_set_gpu_mipmapping(U.use_gpu_mipmap);
GPU_set_linear_mipmap(true);
}

// This argc cant be argc_py_clamped, since python uses it.
Expand Down

0 comments on commit 17afca0

Please sign in to comment.