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-06-04 Cleanup: strip trailing space in GPU moduleCampbell Barton
2018-05-07Cleanup: rename char/float conversion functionsCampbell Barton
- FTOCHAR -> unit_float_to_uchar_clamp - F3TOCHAR3 -> unit_float_to_uchar_clamp_v3 (swap args) - F4TOCHAR4 -> unit_float_to_uchar_clamp_v4 (swap args) - FTOUSHORT -> unit_float_to_ushort_clamp - USHORTTOUCHAR -> unit_ushort_to_uchar
2018-04-19Cleanup: styleCampbell Barton
2018-02-15Cleanup: use '_len' instead of '_size' w/ BLI APICampbell Barton
- When returning the number of items in a collection use BLI_*_len() - Keep _size() for size in bytes. - Keep _count() for data structures that don't store length (hint this isn't a simple getter). See P611 to apply instead of manually resolving conflicts.
2018-01-16Sculpting: Fix uninitialized color being left for smooth meshes with hidden maskSergey Sharybin
2018-01-16Sculpting: Fix for "Hide Mask" does not work with multiresSergey Sharybin
2018-01-15Sculpting: Sdd an option to hide mask in viewportSergey Sharybin
Brushes themselves are still affected by the mask, but the viewport is not showing the mask. This way it's easier to see details while sculpting. Studio request by Julien Kaspar
2018-01-15GPU buffers: Use bitflag to whether we want to show diffuse colorSergey Sharybin
Those fine-tuning bits will be extended soon, so makes sense to start using some more verbose flag names when calling functions.
2017-09-29Vertex Paint: Alpha SupportCampbell Barton
GSOC 2017 by Darshan Kadu, see: D2859. This is a partial merge of some of the features from the soc-2017-vertex_paint branch. - Alpha painting & drawing. - 10 new color blending modes. - Support for vertex select in vertex paint mode.
2017-08-01Cleanup: use static vars where appropriateCampbell Barton
2017-05-11Cleanup: GPU PBVH namingCampbell Barton
Use GPU_pbvh prefix.
2017-05-11Sculpt Drawing: reduce redundant color conversionCampbell Barton
Also replace macro with for loop.
2017-04-12Cleanup: use lowercase gpu prefix for static funcsCampbell Barton
This was mostly followed already.
2016-07-14Cleanup: comment blocksCampbell Barton
2016-07-06Cleanup: redundant 4th index in sculpt PBVHCampbell Barton
Since moving to MLoopTri this is no longer needed.
2016-06-09GPU: avoid multiple bind calls in GPU_draw_pbvh_buffersCampbell Barton
Also add utility functions: GPU_basic_shader_bind_enable/disable so we don't have to get the previous state every time and manipulate it
2016-06-09Flat shading for basic shaderAlexander Romanov
The purpose of the patch is to replace deprecated glShadeModel. To decrease glShadeModel calls I've set GL_SMOOTH by default Reviewers: merwin, brecht Reviewed By: brecht Subscribers: blueprintrandom, Evgeny_Rodygin, AlexKowel, yurikovelenov Differential Revision: https://developer.blender.org/D1958
2016-06-08Cleanup: GPU headersCampbell Barton
2016-06-02Fix T47637: Multiple multires objects in Sculpt mode make blender crash.Bastien Montagne
That was a nice and funny hunt, albeit rather time consumming! To summarize, so far code was using a static global gpu_buffer for pbvh vbo drawing of 'grid' types (multires mostly?). There were two issues here: 1) Global gpu buffer was assigned to GPU_PBVH_Buffers->index_buf, but then nearly no check was done when freeing that buffer, to ensure we were not freeing the global one (not totally sure this one was actually causing any issue, but was bad and unsafe anyway). Was solved by adding a flag to GPU_PBVH_Buffers to indicate when we are using some 'common' buffer here, which freeing is handled separately. 2) Main issue: if several multires objects in sculpt mode with different grid size were present simultaneously, the global gpu buffer had to be resized for each object draw (i.e., freed and re-allocated), but then the pbvh nodes from other objects storing freed reference to that global buffer had no way to know that it had been freed, which was causing the segfault & crash. Was solved by getting rid of that global buffer, and instead allocating one 'grid_commmon_gpu_buffer' per pbvh. Told ya baby, globals are *PURE EVIL*!
2016-05-31Properly handle vertex color color space for Cycles GLSLSergey Sharybin
A bit tricky, need to pass additional information about what the attribute is and how to deal with it. BI path stays unchanged, just to make things simplier for now. Fixes T48555: Cycles GLSL- Incorrect Vertex Color results from Attribute node
2016-05-23Support Vertex Color in GLSL viewport for CyclesSergey Sharybin
The title says it all actually. Added special custom data type, because we don't know in advance whether we're referencing UV or Color layer. Also made it so vertex attributes are normalized. TODO: Border render in viewport ignores the normalization of the attribute array for some reason, will be looked into still. Reviewers: mont29, brecht, campbellbarton Reviewed By: brecht, campbellbarton Differential Revision: https://developer.blender.org/D2022
2016-01-22OpenGL: fewer state changes for wireframe PBVHMike Erwin
Wireframe drawing doesn’t use the following GL state, so don’t update these: - ShadeModel - NormalPointer - ColorPointer Normal & color data are still uploaded as part of the interleaved VBO, but those attributes are disabled for wireframe.
2016-01-09Cleanup: style, gpu moduleCampbell Barton
2016-01-02GPU buffers: Add update functionality for existing buffers.Antony Riakiotakis
Only used for color for now, but we need this for any kind of buffer updates actually. This should get rid of some allocation/deallocation, making vertex painting a bit faster.
2015-12-06OpenGL: rename simple shader to basic shader.Brecht Van Lommel
2015-12-06OpenGL: isolate fixed function lighting in simple shader code.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D1645
2015-11-28Fix possible hang on buffer allocation failure. Reported by coverityAntony Riakiotakis
scan, thanks...errr.
2015-11-26Cleanup: warningsCampbell Barton
2015-11-26cleanup: C99 and vertex array commentsMike Erwin
GPU_buffer no longer has a fallback to client vertex arrays, so remove comments about it. Changed a few internal structs/function interfaces to use bool where appropriate. Use for-loop scope and flexible declaration placement. PBVH does the same thing but needs ~150 fewer lines to do it! The change to BLI_ghashIterator_init is admittedly hackish but makes GHASH_ITER_INDEX nicer to use.
2015-11-26OpenGL: remove unused VBO_DISABLED from PBVHMike Erwin
Was almost certainly being compiled out anyway, but now we don’t have to read it!
2015-11-22Remove vertex array support from GPUBuffers. Remove USER_DISABLE_VBO. AllAntony Riakiotakis
GPUBuffer rendering is now done using vertex buffers. Vertex arrays are completely removed from GL 3.2 core profile, so we'll have to do this change at some point anyway. This commit, though big, is not modifying blender in any way. Use should be exactly as if the vetex buffer option is constantly on.
2015-11-22OpenGL: bump gpu_buffers to GL 2.1Mike Erwin
simple stuff! - remove ARB suffix from core functions & enums - remove checks for core features (VBOs, generic attribs) - keep checks for non-core features (draw elements base vertex)
2015-09-16Get rid of leftover from refactor of VBO code. Thanks to severin forAntony Riakiotakis
noticing
2015-08-06Cleanup: whitespace, unused varCampbell Barton
2015-08-04Fix fast navigate winding being incorrect (apparent when backfaceAntony Riakiotakis
culling was on)
2015-08-03Multires sculpting drawing optimization:Antony Riakiotakis
Use OpenGL 3.2 extension ARB_draw_elements_base_vertex, which allows us to add offset in index buffer indices automatically. This should reduce the number of draw calls significantly. We may have some errors on the Mac with VBO setting off. OSX OpenGL extensions don't play well with vertex arrays. Will test that more later. We might also use a full element buffer here, like we do when hiding some quads, but this approach keeps the memory savings intended originally.
2015-08-03Fix T45654 fast navigate artifacts.Antony Riakiotakis
Was overdrawing the buffer, in case of fast drawing just use one draw call. Should also make performance quite smoother. Note: Just discovered we are doing one draw call - per grid - in multires apparently to keep reusing the same element buffer. This is horribly, dreadfully slow and will check about fixing it later.
2015-07-31Use polygon normals for sculpt drawingCampbell Barton
Wasn't working correctly since using MLoopTri, this is improved over 2.75 which only handled tris & quads.
2015-07-25Convert CCGSubsurf VBO system to also sort hidden and visible faces.Antony Riakiotakis
It's not actually used during drawing though.
2015-07-25GPU buffer materials:Antony Riakiotakis
Separate and reuse some shared code. Also avoid counting for information we already know, such as total loop triangles etc.
2015-07-24Fix T45541 crash when mixing flat and smooth shaded faces in sculptAntony Riakiotakis
mode. Issue from looptri merge.
2015-07-23Subsurf: Optimize edge drawing, now it uses VBOs.Antony Riakiotakis
Also the refactor exposed an error where we requested too much memory from the video memory in general for all mesh types. Now we are back to normal :)
2015-07-21Try to remap buffer before rejecting.Antony Riakiotakis
I suspect code here can be cleaned up but for now try this. Alternatively we can check for errors around buffer allocation but this needs bigger changes.
2015-07-21Failure to alllocate vertex buffer would not fall back to vertex arrayAntony Riakiotakis
properly. This should fix failure to use vertex arrays in OSX with high polycounts. Note this will not suffice as a fix when we move to VBOs exclusively (GL 3+), we'll have to think of some way to separate huge meshes to many VBOs.
2015-07-20Fix recent own stupidity with indexed sculpt drawing.Antony Riakiotakis
2015-07-20Use abstraction to unbind buffers, should avoid crashes in systems thatAntony Riakiotakis
don't support VBOs. Exposed by initialization error in GLEW, which should be fixed seperately.
2015-07-17Fix no longer being possible to display a suzanne with 8 levels ofAntony Riakiotakis
subdivision. Classic integet overflow/size_t substitution case. Machines are getting powerful enough to easily expose these kinds of error now.
2015-07-16Add tessellation data to DerivedMesh (LoopTri)Campbell Barton
This stores loop indices into the loop array giving easier acess to data such as vertex-colors and UV's, removing the need to store an MFace duplicate of custom-data. This doesn't yet move all internal code from MFace to LoopTri just yet. Only applies to: - opengl drawing - sculpting (pbvh) - vertex/weight paint Thanks to @psy-fi for review, fixes and improvements to drawing!
2015-07-16Sculpt draw code:Antony Riakiotakis
Remove legacy code completely, now dyntopo, multires et al even work on GL 1.1 for really hardcore users :p Real purpose here though is to be able to have fast multires drawing even with VBO off, since it requires using indices for vertex buffers. Also made own code elf puke an eaten normal update function which made multires not update normals in solid mode...sorry.
2015-07-15 VBO offscreen selection drawing, cdderivedmeshAntony Riakiotakis
Get rid of legacy drawing, it's only used for selection, in which case we can prepare a temporary color buffer and draw at once. Code is not complete here because we still redundantly set the draw color in the draw function and don't ommit hidden faces automatically. Still it works 100% without immediate mode now.