Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-07-19Fix T66937: Blank view on navigation with auto-deph & large clip-endCampbell Barton
2020-07-18Cleanup: spellingCampbell Barton
2020-07-18Cleanup: GPU: rename bglPolygonOffset to GPU_polygon_offsetClément Foucault
And move it to GPU module.
2020-06-04GPUShaderInterface: Change builtin array to array of location/bindClément Foucault
This reduce the base size of the shaderinterface from 400 to 136 bytes. Improves memory usage and cache coherency when querying a lot of uniforms at once.
2020-02-04GPU: add projection matrix function to set only near/far clippingCampbell Barton
Useful when UI code needs to extend the clipping range.
2019-12-19Fix T71795: Unproject with high clipping range sometimes results in nansmano-wii
Differential Revision: https://developer.blender.org/D6311
2019-08-14Manage GPU_matrix stacks per GPUContextJulian Eisel
Previously, we had one global `GPU_matrix` stack, so the API was not thread safe. This patch makes the stack be per `GPUContext`, effectively making it local per thread (`GPUContext` is located in thread local storage). Reviewed By: brecht Differential Revision: https://developer.blender.org/D5405
2019-07-07Cleanup: spellingCampbell Barton
2019-06-22GPU_matrix: Add GPU_matrix_unproject_precalcCampbell Barton
Pre-calculates values needed for unprojecting to avoid a matrix invert and extracting projection matrix dimensions for every call to GPU_matrix_unproject. Use for gizmo selection drawing.
2019-05-15GPU: Add a matrix unproject function that takes an inverted matrixCampbell Barton
This is normally already calculated so add a version that takes the inverted matrix.
2019-04-18Cleanup: comment blocksCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-03-22Style: describe code using comments instead of preprocessing directives.mano-wii
2019-03-22GPU Matrix: Increase precision of GPU_matrix_unproject.mano-wii
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-01-26Cleanup: blank lines over doxy headersCampbell Barton
2019-01-06Cleanup: add trailing commas to structsCampbell Barton
Needed for clang formatting to workaround bug/limit, see: T53211
2018-09-12Cleanup: use uint/uchar types in GPUCampbell Barton
2018-07-18Cleanup: style for GPU moduleCampbell Barton
2018-07-18GWN: Port to GPU module: Replace GWN prefix by GPUClément Foucault
2018-07-18GWN: Port to GPU module: Move files to GPUClément Foucault
This does not include all the struct and type renaming. Only files were renamed. gwn_batch.c/h was fusioned with GPU_batch.c/h gwn_immediate.c/h was fusioned with GPU_immediate.c/h gwn_imm_util.c/h was fusioned with GPU_immediate_util.c/h
2018-07-15GPU_matrix: use Blender's naming conventionsCampbell Barton
Thanks to @sergey for review
2017-10-07Cleanup: style, duplicate includesCampbell Barton
2017-08-27Correct matrix stack assertCampbell Barton
2017-08-20Cleanup: move gawain header out of GPU_matrixCampbell Barton
Avoids requiring glew headers in Python API.
2017-08-20PyAPI: Add exceptions to stack push/popCampbell Barton
Raise exception when stack limits are reached.
2017-06-19Gawain API naming refactorCampbell Barton
Use consistent prefix for gawain API names as well as some abbreviations to avoid over-long names, see: D2678
2017-05-19Remove reference to SUPPORT_LEGACY_MATRIXDalai Felinto
Since the change to core profile this is no longer supported.
2017-04-27Fix gpuScaleUniform (caused strange pose-bone size)Campbell Barton
2017-04-20Fix T51251: Armature/Normal-button scaled twiceCampbell Barton
2017-04-19Get rid of glMatrixMode callsSergey Sharybin
With the explicit calls we don't need to worry about current state outside of the GPU module now. In fact. we don't need to worry about current matrix mode in core profile at all. Legacy OpenGL now has some code which ensures current matrix mode when using explicit calls to push/pop matrix.
2017-04-19Fix node editor drawing when built with core profileSergey Sharybin
There are two major things in this commit. First one is to have proper stack for projection matrices. This is something what OpenGL specification grants to have at least 2 elements for and what is required to have for proper editor drawing without refactoring the way how we restore projection matrix. Supporting this stack have following advantages: - Our GPU stack is closer to OpenGL specs, making it easier to follow by other developers who are always familiar with OpenGL. - Makes it easier to port all editors to a new API. - Should help us getting rid of extra matrix push/pop added in various commits to 2.8 branch. The new API follows the following convention: - gpuPushMatrix/gpuPopMatrix ALWAYS deals with model view matrix and nothing more. While this name does not fully indicate that it's only model view matrix operator, it matches behavior of other matrix operations such as transform which also doesn't indicate what matrix type they are operating on. - Projection matrix has dedicated calls for push/pop which are gpuPushProjectionMatrix/gpuPopProjectionMatrix.
2017-04-16Gawain: remove 2D matrix uniforms from ShaderInterfaceMike Erwin
- remove 2D-specific variants of BuiltinUniform enum - rename remaining builtins to exclude "_3D" since they can be used by 2D or 3D shaders Follow up to D2626
2017-04-15GPU matrix: add back type checksCampbell Barton
Without this gpuGet functions would cast everything (no type or size checks and override const variables).
2017-04-15GPU Matrix API: clean up after 2D-3D unificationMike Erwin
See GPU_matrix.h & gpu_matrix.c for the important changes. Other files are mostly just updated to use the latest API. - remove unused functions, defines, enums, comments - remove "3D" from function names - init to Identity transform (otherwise empty stack) - gpuMatrixReset lets outside code return to initial state Part of T49450 Follow up to D2626 and 49fc9cff3b90
2017-04-14GPU Matrix API: Remove ModelView/Projection 3D suffixDalai Felinto
2017-04-14GPU Matrix API refactor: Stick to a single 4x4 stack for 2D and 3DDalai Felinto
* Brings us closer to core profile, all matrices are working, and apart from a problem with text drawing, Blender is working fine. * Reduce the coding overhead of having to setup/teardown when alternating between 2D and 3D drawing sessions. * Gives us fewer modes and states we need to keep track of. Unfortunatelly this also "rejects a fundamental change" the original design was trying to make - that 2D is different from 3D and deserves its own best implementation. That said, it is still aligned with the function API design as originally implemented (i.e., it still uses gpuTranslate2D, ...). Finally, if you build with core profile and this patch you get: https://developer.blender.org/F545352 [The text glitch is an unrelated issue]. Reviewers: merwin, sergey, brecht Differential Revision: https://developer.blender.org/D2626
2017-04-13OpenGL: implement 2D with 4x4 matricesMike Erwin
... even though 3x3 feels better. This is a compromise to get core profile up & running sooner. Eventually I'd like to finish the original 3x3 plans, but this commit will let us get on with other tasks. External API stays (almost) the same. Our GLSL shaders can use this without any changes. Part of T49450 and T51164
2017-04-13Gawain: use ShaderInterface to manage uniformsMike Erwin
This eliminates tons of glGetUniformLocation calls from the drawing loop. Vast majority of code can keep making the same function calls. They're just faster now! - Batch_Uniform* - immUniform* - gpuBindMatrices - and others
2017-03-27OpenGL: remove gpuMatrixBegin3D_legacy functionMike Erwin
It helped during the transition, but we don't need this anymore. Evolution of T49450
2017-03-27OpenGL: fix & enhance new matrix libMike Erwin
- init projection matrices with identity - fix copy/paste mistake in GetProjectionMatrix3D - add extra matrices needed by material GLSL Working toward T49450
2017-03-22OpenGL: use new API for persp & ortho projectionMike Erwin
Still using legacy GL within the GPU library itself, but we'll be able to switch soon. Part of T49450
2017-03-22OpenGL: fix new projection matrix APIMike Erwin
Now using the correct GL enum. Part of T49450
2017-03-22fix blenderplayer buildMike Erwin
GPU lib should not depend on editor (glutil) code.
2017-03-22OpenGL: add gpuLoadProjectionMatrix3D functionMike Erwin
Make an existing 4x4 matrix the current projection. Found a need for this while converting code to new API. Part of T49450
2017-03-22OpenGL: generic inputs for new matrix APIMike Erwin
For functions that expect a 4x4 matrix, you can pass in that, or array[16], or float*, or... Casting at each call site can get annoying, and obscures the logic. The C11 section still needs work, but the non-C11 macros help on the system I tested on (Mac/clang). Part of T49450
2017-03-21remove gpuMatrixUpdate_legacy functionMike Erwin
No longer needed since 231b5d96bbfd77253941dd37cc4929e4e119d706 tracks dirty state of legacy matrix stacks. Part of T49450
2017-03-21track dirty state of legacy matrix APIMike Erwin
This is used to send latest matrix values to shader when drawing. Previously handled by calling OpenGL matrix functions, followed by gpuMatrixUpdate_legacy. With this change that function is no longer needed. Part of T49450