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
2014-08-27Cleanup: remove _DEBUG define usageCampbell Barton
2014-07-21GSOC 2013 paintAntony Riakiotakis
Yep, at last it's here! There are a few minor issues remaining but development can go on in master after discussion at blender institute. For full list of features see: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.72/Painting Thanks to Sergey and Campbell for the extensive review and to the countless artists that have given their input and reported issues during development.
2014-05-05Attempt to solve T39950,Antony Riakiotakis
Avoid filling up buffers when total buffer triangles are zero. Better still would be to tag a node as hidden when doing recreation of the PBVH tree by checking for any visible elements. Original bug report probably has to do with OpenGL doing something funky but hidden nodes should be tagged as hidden to completely avoid iterating for painting. This is to be done in a later commit. Also some naming cleanup for consistency, GPU_build_pbvh_mesh_buffers to GPU_build_mesh_pbvh_buffers.
2014-05-01Add PBVH debug display, where we can see the PBVH node bounding boxes.Antony Riakiotakis
To enable enter debug value 14. Leaf nodes are green while container nodes are red.
2014-04-17Code cleanup: use boolsCampbell Barton
also rename BLI_omp_thread_count -> BLI_system_thread_count_omp
2014-04-09Code cleanup: ifdef unused linklist for GPU drawobject'sCampbell Barton
2014-04-08Dyntopo: replace GHash with GSet, saves some memoryCampbell Barton
2014-04-03Fix T39517,Antony Riakiotakis
Issue here is that "show diffuse" option does not respect its intended purpose which is to be used only for masking. There are a couple of caveats here: Dyntopo and multires -always- have mask data enabled, and thus as soon as one goes to dyntopo mode or adds a multires modifier he would get the default grey color instead. Matcaps would break when nodes asked for a diffuse material color (this was broken before too). Solved by adding global material state for when matcaps are enabled. Also matcaps don't always played well with VBOs off. Added a few more missing updates for mask operators to notify show_diffuse property as changed. This was also needed on rebuilding dyntopo pbvh. Also make zero mask color duller again after artist feedback.
2014-04-02Fix T39520, show diffuse not working in dyntopo.Antony Riakiotakis
Was marked as a todo in the code. This does not yet take care of correct display for multi material meshes, since it would need correct separation of faces during pbvh creation. Instead we just take material of first face in node and assume that the rest faces have the same. This will create some funky effects if one attempts to sculpt in this way. Note: This does not yet address T39517
2014-04-01Code cleanup: use bool instead of intSergey Sharybin
2014-04-01Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT defineCampbell Barton
2014-01-03Code clean-up change naming of gpu buffers used by pbvh to betterAntony Riakiotakis
reflect that. Previous name GPU_Buffers was very similar to GPU_Buffer, renamed to GPU_PBVH_Buffers
2013-08-26replace hashes with sets where possible.Campbell Barton
2013-08-09OpenGL VBO's: free VBO pool before redraw, otherwise this just holds onto memoryBrecht Van Lommel
after objects are deleted until another big object is added. There's no good reason to do this, or to think that our pool is somehow much faster than using the OpenGL API to allocate and free buffers.
2012-12-30Use GPU_Buffers to draw wireframe when in dynamic-topology sculpt modeNicholas Bishop
This adds an override to the CDDM edge drawing function that switches to GPU_Buffers drawing for PBVHes of type PBVH_BMESH. Within the GPU_Buffers code, glPolygonMode() is used to draw lines instead of faces.
2012-12-30Add GPU_buffers support for drawing dynamic topology nodesNicholas Bishop
The GPU interface for PBVH drawing gets a new pair of build/update buffers functions for drawing BMFaces and BMVerts. TODO: the diffuse color is hardcoded to 0.8 gray rather than using material color. TODO: only VBO drawing is implemented, no immediate mode.
2012-10-30Fix for own r51737.Bastien Montagne
Refactoring of draw code showed another problem: The MCol we want to draw may change without dm rebuild (e.g. when enabling solid textured option)! Also, choosing which MCol layer to use in GPU code is stupid, different draw modes use different layers/order of precedence! Solved this by adding a new colType parameter to GPU_color_setup, and removing any 'color choosing' code from gpu_buffers.c.
2012-10-29Complete fix for [#33002] Wrong vertex color.Bastien Montagne
Appart from the color glitch, there was several problems with vpaint: * "fast_update" mode was never on, because of wrong testing code; * drawing refresh during stroke in "fast_update" (i.e. no dm rebuild) mode was broken in VBO mode, because updated (tess data) mcol wasn't moved to colors GPUBuffer. Solved the later point by adding a new DM_DIRTY_MCOL_UPDATE_DRAW flag to DerivedMesh dirty var, which is set each time vpaint stroke directly update me->mcol, and forces GPU_color_setup() to refresh the gpu's colors buffer. Also got rid of the uggly GPU_color3_upload(), which basically did the same thing, but with an additional intermediate buffer !
2012-10-22Fix #32522: Object's diffuse color not showing in Sculpt ModeSergey Sharybin
Added option to display object's diffuse color multiplied by sculpting mask. This option could be found in Options panel of toolshelf when in sculpting mode. Thanks to Nicholas and Brecht for reviewing the patch!
2012-09-30Revert changes made to support diffuse color when sculptingSergey Sharybin
This changes are not stable enough and trying fix it could backfire in some other regressions which isn't wanted so much close to the release. This means objects will have gray color as diffuse which becomes darker in masked areas for 2.64. Proper fix is aimed for 2.65. This commit reverts 50827 and 50898.
2012-09-23Fix #32522: Object's diffuse color not showing in Sculpt ModeSergey Sharybin
It was missing since sculpting mask implementation. Now object's color would be multiplied by sculpt mask value. For VBOs it's done by storing final color in VertexBufferFormat and mimic behavior of setMaterial callback for getting current diffuse color. For non-VBOs diffuse color is getting from current OpenGL context.
2012-09-04fix for building on msvc2008 (also style cleanup)Campbell Barton
2012-05-11Add mask-drawing support to GPU_Buffers.Nicholas Bishop
This is the last commit of the sculpt masking merge. Documentation: http://wiki.blender.org/index.php/User:Nicholasbishop/PaintMasks Thanks to Brecht for reviewing! * For VBO, add color to the VertexBufferFormat structure as three unsigned bytes. Since mask elements are scalar the three color components are identical to eachother, but the fixed-function OpenGL pipeline requires colors to be either three or four components. * For the same reason, multires VBO drawing now copies into the VertexBufferFormat format as well. * Regression: material colors will not show up correctly now, masks colors are overriding. Not sure how to fix this nicely (would be much easier to fix if drawing with vertex shaders.) * Also, masks will only draw PBVH drawing, so only 'solid' drawing will work correctly with masks.
2012-05-11Replace hardcoded DMGridData structure with CCGElem/CCGKey.Nicholas Bishop
* Changes to DerivedMesh interface: DMGridData has been removed, getGridData() now returns an array of CCGElem pointers. Also added getGridKey() to initialize a CCGKey (implemented only by CCGDerivedMesh.) * PBVH: added BLI_pbvh_get_grid_key(). * A lot of code is affected, but mainly is just replacing DMGridData.co, DMGridData.no, and sizeof(DMGridData) with the CCG_*_elem functions, removing the reliance on grid elements of exactly six floats.
2012-03-14Skip hidden elements in PBVH iterator, raycast, and drawing.Nicholas Bishop
2012-03-11style cleanup, also remove unused externs.Campbell Barton
2012-03-09style cleanup: comment blocksCampbell Barton
2012-03-07Code cleanup: use typedefs for DerivedMesh drawing callbacks.Nicholas Bishop
There are still fairly bewildering set of callbacks being tossed around, but it's at least a little less verbose now.
2012-03-06Draw individual face's material and shading correctly in the PBVH.Nicholas Bishop
Previously, the shading and material was set once per PBVHNode when drawing. This is still the case, but PBVHNodes are now built to contain only one material and shading mode. This is done with an extra partitioning step; once the number of primitives in the node falls below the PBVH leaf limit, it's primitives are checked for matching materials. If more than one material or shading mode is present in the node, it is split and partitioned (partitioned by material rather than 3D location.) Given a sufficiently 'annoying' input, like a dense mesh with thousands of materials randomly scattered across it, this could greatly increase PBVH build time (since nodes might end up containing a single primitive), but in general this shouldn't come up. In order to support materials for grids, the CCGDM is building another grid array (of DMFaceMat structs). This could be used to replace CCGDM.faceFlag for some small memory savings (TODO).
2012-03-06Code cleanup: remove unused drawFacesColored from DerivedMesh.Nicholas Bishop
This function pointer isn't called anymore, so removing it and the cddm/ccgdm/gpu code associated with it.
2012-02-29Code Cleanup: remove non existing function declarations.Campbell Barton
added some missing functions too - which are not used yep but should be there for api completeness. * CDDM_set_mloop * CDDM_set_mpoly * BLI_mempool_count
2012-02-23Code cleanup: de-duplicate code in GPU_build_grid_buffers() with a macro.Nicholas Bishop
2012-02-23Code cleanup: don't use GHash for GPU_build_mesh_buffers().Nicholas Bishop
At the point where GPU_build_mesh_buffers is called, the face_vert_indices map has already been built; it contains the same data in an easier-to-access format.
2012-02-21Another fix for non-VBO flat-shading in sculpt mode, this time for ↵Nicholas Bishop
non-multires meshes. As with multires, this change calculates face normals rather than using vertex normals when the node is flat-shaded. Flat-shading with VBO on non-multires meshes is still wrong, but fixing that would require larger changes to our vertex buffers.
2012-02-21Remove call to GPU_update_mesh_buffers from GPU_build_mesh_buffers.Nicholas Bishop
Building the mesh buffers already gets the PBVH_UpdateDrawBuffers flag set, so this was double-updating the vertex buffer.
2012-01-02Remove some silly variable copies that stuck around from a previous refactor.Nicholas Bishop
2011-11-29remove header text:Campbell Barton
"The Blender Foundation also sells licenses for use in proprietary software under the Blender Licens" also remove NaN references from files that have been added since blender went opensource.
2011-11-05GPU BuffersNicholas Bishop
Small type cleanup, use `GPU_Buffers *' rather than `void *'. Should be no functional changes.
2011-10-23remove $Id: tags after discussion on the mailign list: ↵Campbell Barton
http://markmail.org/message/fp7ozcywxum3ar7n
2011-07-08== GPU Buffers ==Nicholas Bishop
This patch attempts to clean up and document the GPU buffers code. There are a few bug fixes as well. Patch reviewed here: http://codereview.appspot.com/4631052/ Summary: * Bugfix: make GPU_buffer_copy_normal convert from shorts to floats correctly, also fixed the use of cached face normal CustomData. * Bugfix: changed the `mat_nr' field of GPUBufferMaterial from char to short. * Changed color buffer setup to not alloc a temporary copy of color data, just passes the MCol data in directly. * Changed the GPU buffer pool code to make clearer what operates specifically on the global pool. * Lots of refactoring for GPU_drawobject_new; should operate mostly the same (except got rid of one unecessary allocation), just split into more functions and without macros now. * Converted some #defines into enumerations. * Made some stuff private, pulled out of header file. * Deleted unused function GPU_buffer_pool_free_unused(). * Removed GPU_interleaved_setup and related #defines. (I think this was used for editmode VBOs, but those were disabled.) * Added lots of comments. * Added a few comments in the code signed `--nicholas' to note places where I am unsure about design or usage, would be good to address these better. * Code formatting changed to be more consistent with the rest of Blender. * Renamed some fields and variables to be more consistent with Blender's naming conventions. * Renamed some fields and variables to use more descriptive names, e.g. renamed `redir' to `mat_orig_to_new'. * Removed print outs with DEBUG_VBO -- don't feel too strongly about this one, just not used elsewhere in Blender, could be easily added back if others disagree though. * Moved the PBVH drawing code down to the bottom of the file, before was sitting in the middle of the other VBO code
2011-02-21doxygen: entry for gpu, modifiers, nodes, python and renderNathan Letwory
2011-02-15added more code comments and removed some magic constantsLukas Steiblys
2010-12-03- added GCC warning -Wstrict-prototypesCampbell Barton
- fixed bug in paste material, exposed by stricter warnings. - removed/renamed various shadowed vars. - removed BGE lamp.colour, only allow lamp.color attribute.
2010-07-14Fix a few compile warnings and rename gpu_buffers.h to GPU_buffers.hBrecht Van Lommel
for consistency.