Blender Git Loki

Blender Git "temp_viewport_fx_merge" branch commits.

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.
May 11, 2015, 16:02 (GMT)
Use stubs for glrecti/glrectf to make sure the matrix stacks have been
May 11, 2015, 15:44 (GMT)
Merge branch 'master' into temp_viewport_fx_merge
May 11, 2015, 09:33 (GMT)
Merge branch 'master' into temp_viewport_fx_merge

April 20, 2015, 09:01 (GMT)
Merge branch 'master' into temp_viewport_fx_merge

April 14, 2015, 20:15 (GMT)
Blender displays fine again without errors, using the custom matrix

Still need to replace glRect calls to completely fix it probably.

This still does not use the soc API properly.
April 14, 2015, 18:03 (GMT)
Hello non crashy world! Still not 100% correct but at least now it fires

Issue was getting matrices from GL instead of own matrix stack
April 14, 2015, 16:08 (GMT)
Trying to solve text crash issues
April 14, 2015, 13:23 (GMT)
Substitute draw calls with a wrapper to make sure current matrix stack
April 14, 2015, 12:13 (GMT)
Merge branch 'master' into temp_viewport_fx_merge

April 10, 2015, 09:29 (GMT)
Merge branch 'master' into temp_viewport_fx_merge

Also tried to use gpuMatrix calls where possible in new code
- might have missed a few places.

April 3, 2015, 16:04 (GMT)
Matrix API: explicitly set the matrix we tweak - much clearer this way and
we may even use explicit stacks in the future.
April 3, 2015, 13:51 (GMT)
No declarations in for-loops and warning fixes for matrix pointers
April 2, 2015, 00:28 (GMT)
fix another Mac crasher

According to LLDB everything we pass to glVertexPointer and
glDrawElements seems perfectly OK, but for some reason it crashes in
the driver.

With this change I was finally able to run this branch! Until sync-ing
with today??s matrix module.
April 2, 2015, 00:18 (GMT)
move glColor outside loop

instead of repeatedly setting the same color
April 2, 2015, 00:15 (GMT)

no functional change
April 2, 2015, 00:13 (GMT)
fix VAOs on Mac legacy context

Was causing crash on launch.

GLEW gives us glBindVertexArray and friends but sets them to NULL,
since Apple uses GL_APPLE_vertex_array_object instead of
GL_ARB_vertex_array_object. The ARB version evolved from the APPLE
version and they??re used in exactly the same way, so I aliased them to
keep our VAO code simple.
April 1, 2015, 18:54 (GMT)
Matrix module: substitution WIP.

Warning - don't open blender up or it will hang your computer
April 1, 2015, 18:54 (GMT)
Small cleanup
April 1, 2015, 18:25 (GMT)
more minor cleanup
Tehnyt: Miika HämäläinenViimeksi p?ivitetty: 07.11.2014 14:18 MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021