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
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-29Cleanup: replace attrib w/ attrCampbell Barton
Also rename GPUVertexAttribs to GPUVertAttrLayers, avoids confusion with GPUVertAttr which isn't closely related.
2019-01-23Cleanup: use eGPU prefix for GPU enum typesCampbell Barton
2019-01-17GPU: Rename GPU_shader_get_uniform to GPU_shader_get_uniform_ensureClément Foucault
This is in order to make the API more multithread friendly inside the draw manager. GPU_shader_get_uniform will only serve to query the shader interface and not do any GL call, making it threadsafe. For now it only print a warning if the uniform was not queried before.
2018-10-09Cleanup: namingCampbell Barton
- immAttrib* -> immAttr* - immSkipAttrib -> immAttrSkip Term 'attr' is a convention for GPU module.
2018-10-09Cleanup: namingCampbell Barton
2018-09-12Cleanup: use uint/uchar types in GPUCampbell Barton
2018-08-17Fix T55722 : Blender 2.8 crashes on startup on old Nvidia cardsClément Foucault
2018-07-19GPU: Add GC to FBOs and UBOs and centralize all GCsClément Foucault
GPUFrameBuffers were being free when no context was attached or in the wrong gl context. This make sure this does not happen again. You can now safely free any gl resource from any thread (well as long as it's not used anymore!).
2018-07-19Cleanup: styleCampbell 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
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-04-05Fix T50976: Blender UI problems with certain theme files.Bastien Montagne
Core of the issue was that some of our Theme colors are RGB-only, but were loaded as RGBA. Note that tracking all possible cases is pretty impossible, so we'll have to tackle those as they get reported am afraid.
2017-01-16Updating outliner_draw_struct_marks to retained modeMike Erwin
Had to add a few utility functions to replace existing functions. Let me know if these are duplicates. Reviewers: merwin Reviewed By: merwin Tags: #bf_blender_2.8 Maniphest Tasks: T49043 Differential Revision: https://developer.blender.org/D2434
2016-12-14OpenGL: another way to set uniform theme colorMike Erwin
2016-10-20Gawain: closer integration of immediate mode & matrix APIsMike Erwin
- any shader program can use matrix state (not only built-in shaders) - you can mix matrix & begin/end calls, and the bound shader will use the latest matrix state Part of T49450 & T49043
2016-10-17OpenGL: new immUniformThemeColorShadeAlpha functionMike Erwin
Plus some naming cleanup. Supports T49043
2016-10-13more theme color functions: UI_GetThemeColorBlendShade4fv, ↵Dalai Felinto
immUniformThemeColorBlendShade
2016-10-13gawain/immediate mode: new util functions for color uniformsDalai Felinto
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-15Extend Gawain to use Blender's built-in shadersMike Erwin
Was already done for immediate mode, but rearranged code to make a clean separation. Cleaned up #includes for code that uses this feature. Added same for batched rendering.
2016-09-13Gawain: reorganize source codeMike Erwin
Put Gawain source code in a subfolder to make the boundary between the library and the rest of Blender clear. Changed Gawain’s license from Apache to Mozilla Public License. Has more essence of copyleft — closer to GPL but not as restrictive. Split immediate.c into several files so parts can be reused (adding more files soon…)
2016-09-06Gawain: add immBeginAtMostMike Erwin
immBegin requires us to know how many vertices will be drawn. Most times this is fine, but sometimes it can be tricky. Do we make the effort to count everything in one pass, then draw it in a second? immBeginAtMost makes this simple. Example: I'll draw at most 100 vertices. Supply only 6 verts and it draws only 6. Any unused space is reclaimed and given to the next immBegin.
2016-09-06Gawain: fix GL_POINTS in immediate modeMike Erwin
Was using GL_NONE to mean "no primitive" but GL_NONE and GL_POINTS are both defined as 0x0000. Introducing PRIM_NONE = 0xF which does not clash with any primitive types.
2016-08-27Gawain: convenience functions for uniform colorMike Erwin
Application code can pass ubytes, Gawain converts to float vec4 expected by shader. For now the conversion is simple linear. We can add sRGB support later if needed.
2016-08-20Gawain: more immediate mode functionsMike Erwin
Scanned Blender code for commonly used glVertex, glColor functions. Implemented immVertex, immAttrib versions of these to ease transition away from legacy OpenGL.
2016-08-17Gawain: add v functions to immediate modeMike Erwin
Legacy OpenGL has a matching Vertex3fv for every Vertex3f, and so on. Add something similar to Gawain, just for a few common functions. Might add more as the need arises.
2016-08-13Gawain: increase size of immediate mode bufferMike Erwin
New value of 4MB should handle our needs without taking up too many GPU resources. Old value of 1KB was for observing what happens when the buffer fills up and we need to flush and start a new one.
2016-08-11Gawain: allow partial vertex specificationMike Erwin
If you don’t specify a vertex’s color, it will use the color of the previous vertex. Similar for all other attributes. This matches the legacy behavior of glColor, glNormal, etc. *except* in Gawain the first vertex of each immBegin must be fully specified. There is no “current” color in the new system.
2016-08-11Gawain: tweak immediate mode APIMike Erwin
Should be simpler to use now. Made vertex format structure private. New immVertexFormat() function clears and returns the format. Devs can start with add_attrib(format...) and not have to clear it first. immBindProgram automatically packs the vertex format if needed. Updated 3D cursor drawing to use new API.
2016-08-10Gawain: fewer glEnable/DisableVertexAttribArray callsMike Erwin
Track previously enabled attrib locations so we can call OpenGL only when needed. Same result, fewer GL calls.
2016-08-10Gawain: map vertex format to shader inputsMike Erwin
glBindAttribLocation does not take effect until the program is re-linked. In other words I was doing it wrong! New code gets attrib locations from program, then remembers the attrib -> location mapping for subsequent draw calls. The program and VertexFormat are not modified (makes threading and reuse easier).
2016-08-10Gawain: fix compiler warningsMike Erwin
properly typed function parameters pointer casting & arithmetic ptrdiff_t formatting
2016-08-10OpenGL: invalidate buffers the modern wayMike Erwin
There are older ways to give OpenGL hints about buffer invalidation, but glInvalidateBufferData does exactly what we want. Use this function when OpenGL 4.3 is available (Windows and proprietary Linux drivers). Part of Gawain immediate mode.
2016-08-09Gawain: fix Windows build errorMike Erwin
MSVC is more strict than gcc or clang about pointer arithmetic. Also fixed pointer cast warnings.
2016-08-08Gawain: immediate mode set uniforms for active programMike Erwin
Start simple with vec4 uniforms. Add more later.
2016-08-07Gawain: legacy Mac VBO workaroundsMike Erwin
glMapBufferRange is a wonderful function that doesn’t exist on GL < 3.0. Use the APPLE_flush_buffer_range extension on Mac. It offers several of glMapBufferRange’s benefits. Use older “black arts” method to orphan VBOs when we are done with them. In modern OpenGL this behavior is more obvious. Add APPLE_flush_buffer_range to Mac requirements. Every GPU is supported. T49012
2016-08-07Gawain: legacy OpenGL compatibilityMike Erwin
Apple invented VAOs and exposes them via an extension in legacy GL. Other platforms use at least GL 3.0 which has VAOs built in. QUADS were removed from core profile but are useful for immediate-mode drawing. We’ll have to implement our own QUAD drawing before switching to core profile.
2016-08-07Gawain: fix VAO and VBO bindsMike Erwin
Immediate mode no longer leaves its internals bound after use. Part of transition from a simple prototype app to non-simple Blender, which has lots of other parts using OpenGL.
2016-08-07Gawain: flesh out immediate modeMike Erwin
More ways to send values via immAttrib: 2D float vectors 3 & 4 component ubytes (for colors mostly) New immVertex functions that act more like familiar glVertex. We’ll find a balance between making this API convenient and keeping it small. 2f and 3f are enough for now.
2016-08-04OpenGL: immediate mode work-alikeMike Erwin
Introducing an immediate mode drawing API that works with modern GL 3.2 core profile. I wrote and tested this using a core context on Mac. This is part of the Gawain library which is Apache 2 licensed. Be very careful not to pull other Blender code into these files. Modifications for the Blender integration: - prefix filenames to match rest of Blender’s GPU libs - include GPU_glew.h instead of <OpenGL/gl3.h> - disable thread-local vars until we figure out how best to do this