Blender Git Loki

Git Commits -> Revision 1949987

June 19, 2016, 19:17 (GMT)
Painstakingly merge branch 'master' into temp_viewport_fx_merge

This branch will not make it into blender, however there are a few things that might be useful here for people who work on the viewport project and could be merged to master:

* Matrix stacks
There is working code for matrix stacks in gpu_matrix.c. Basically it works by overriding all draw calls with a special version that loads our custom stack in OpenGL. To refactor this out, coders should do this in three stages:

1) Inspect all calls to GPUBegin/GPUDraw*/GPURect* and only add one call to upload the matrices once to the relevant uniform of the shader, then substitute with the normal GL call.

2) Remove all hardcoded GL matrices from shaders. Shaders should use generic uniforms/uniform blocks for matrices

3) Do not use GL-style stacks. Actually stacks should be generic and local, not global. We do not care about a global projection/modelview etc matrix, rather we want to add matrix stacks locally in places where they are needed and upload those matrices to our shaders. The code can be generalized to do that by substituting the enum in the gpuMatrix* functions with a GPUMatrixStack* though it will be slightly tedious to do - like everything viewport related.

* GLU removal:

This branch also removes glu completely from blender by providing a helper library that handles drawing of some helper shapes. The way this is handled is not ideal, since it uses the GSOC code that is not the way we want to do things here, however it could be improved and made with a proper design.

There are some graphical glitches still here, but should be fixable.

Commit Details:

Full Hash: 194998766c651750acbc74049a7467b55169a641
Parent Commits: 7da189b, 942b98e

Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18 MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2019