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
2018-07-18GWN: Port to GPU module: Replace GWN prefix by GPUClément Foucault
2018-07-15GPU_matrix: use Blender's naming conventionsCampbell Barton
Thanks to @sergey for review
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-08-19Cleanup: remove unneeded includeCampbell Barton
Complicated using GPU_matrix from PyAPI.
2017-08-15Cleanup: use 'gwn' prefix for gawain filenamesCampbell Barton
Looking up names project wide or setting breakpoints wasn't so. Names like common.h or element.h are also too generic.
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-05-19Remove reference to WITH_GL_PROFILE_COREDalai Felinto
There is no more point of keep those around. ES20 may need special case when/if we dabble with it again. Meanwhile no point on polluting the code with this. (ghost still has reference for the PROFILE, but that's reasonable)
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-19Cleanup, indentation of preprocessorSergey Sharybin
2017-04-15Cleanup: GPU header guardsCampbell Barton
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-15Remove redundant declarationCampbell Barton
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 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: do not support legacy matrix when using core profileDalai Felinto
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-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-02-26OpenGL: replace gluProject and gluUnProject, and simplify surrounding code.Brecht Van Lommel
Part of T49042.
2017-02-14OpenGL immediate mode: added gpuRotate3f to GPU_matrixClément Foucault
2017-02-07OpenGL: add gpuMatrixUpdate_legacy functionMike Erwin
Marks matrix state as dirty so shader will use the latest values from glScale, glTranslate, etc. We'll remove this after transitioning 100% to the new matrix API, which handles this sort of thing automatically. Part of T49450
2016-10-24OpenGL: add NormalMatrix & inverse to new APIMike Erwin
Part of T49450
2016-10-20OpenGL: dirty bit for GPU matrix APIMike Erwin
Have matrices changed since the most recent bind? Part of T49450
2016-10-12OpenGL: matrix fixes & compatibilityMike Erwin
Was multiplying matrices backward, so concatenation was broken. Fixed! Also a way to mix legacy matrix stacks with the new library. Just during the transition! Anything within SUPPORT_LEGACY_MATRIX will go away after we switch to core profile. Part of T49450
2016-10-10OpenGL: plug new matrix system into shaders (WIP)Mike Erwin
Built-in shaders now use uniforms instead of legacy built-in matrices. So far I only hooked this up for new immediate mode. We use the same matrix naming convention as OpenGL, but without the gl_ prefix, e.g. gl_ModelView becomes ModelView. Right now it can skip the new matrix stack and use the legacy built-in matrices app-side. This will help us transition gradually from glMatrix functions to gpuMatrix functions. Still some work to do in gpuBindMatrices. See TODO comments in gpu_matrix.c for specifics.
2016-09-25overhaul gpuMatrix APIMike Erwin
Complete (for our needs) 2D & 3D transformation API. Should be easy to port legacy OpenGL matrix stack-based code to this. Still needs testing. Ported ortho, frustum, lookAt functions from Viewport FX (rB194998766c65). Kept plenty of Viewport FX code from previous commit. Stack API and 2D routines ported from Gawain. This version uses BLI_math library so everything is licensed under GPL instead of the usual MPL. Part of T49450
2016-09-22OpenGL: remove double precision matrix functionsMike Erwin
Proper fp64 is a GL 4.x feature. Pretending to support it in our API is just clutter.
2016-09-22OpenGL: matrix code from viewport-fxMike Erwin
Bringing over whole files from rB194998766c65