Commit Graph

18528 Commits

Author SHA1 Message Date
1065f9d6ed - apply spike crease bug fix to ccgsubsurf 2005-04-01 02:52:55 +00:00
4ef0170bfa - take out compile time conditional behavior of creasing for ccg
subsurf (always on)
 - bug fix, creasing wasn't evaluated properly after incremental change
2005-04-01 02:07:34 +00:00
bb29f12924 - potential fix for crash on amd64 2005-03-31 17:15:44 +00:00
9259ff35a4 - switch to drawing aging in and out of optimal mode
- switch to not using arena allocator in editmode for ccgsubsurf (memory
   doesn't get freed during incremental)
2005-03-31 16:54:47 +00:00
1ed8f77f6b - disable overriding color (to show aging) during selection drawing 2005-03-31 16:16:22 +00:00
cfbab6f6a4 - fix warnings for gcc
- some subsurf settings not correctly changed in editmode
2005-03-31 16:08:29 +00:00
9c91e1a954 - adapt caching check for G.editMesh->derived 2005-03-31 15:55:31 +00:00
f0a8a93292 - removed USE_CCGSUBSURF define (always on now)
- added G.editMesh->derived pointer... idea is to use this
   for mesh derived from editmesh instead of Mesh->derived (as the
   derived mesh tends to vary depending on what it came from).

   This part could be cleaner, also there may problems with it not
   being invalidated correctly.

 - And most importantly: In case people were beginning to worry all
   these edits were just crazy zr stuff, the big point comes about:
   Incremental subsurf calculation is now enabled. This gives massive
   speed improvements when editing a large mesh.

   For the eye-candy happy: try setting G.rt==52 before entering editmode
   and the edges and vertices (in optimal mode) will switch to displaying
   visually the age since a region has last been calculated. Lots of
   fun!
2005-03-31 15:44:05 +00:00
0d35a1dd1e - fix some signed/unsigned comparison warnings 2005-03-31 15:15:12 +00:00
84ccd0dcde - zero derived and decimated pointers on copy 2005-03-30 18:06:42 +00:00
cc4320e790 - added dlm->medge for displistmesh_from_mesh 2005-03-30 17:40:51 +00:00
489b38fa40 - Claims of speed improvement last night were slightly
overrated. Turns out there was a bug in recalc code where
   in editmode mesh was getting reevaluated all the time (because
   ob->disp doesn't get built in editmode). This should fix.
 - Fix some normal calculation/backwards face drawing
2005-03-30 17:32:23 +00:00
fef6e0012e - initial commit of a real (as in not just copying the DispListMesh)
DerivedMesh implementation of CCGSubSurf. Only used in editmode at
   the moment, and does not draw smooth normals correctly.
 - Just in its own this brings a rather large speedup for editing
   subsurfs.
2005-03-30 08:12:27 +00:00
e5d1411283 - add editedge and editface for displistmesh_from_editmesh 2005-03-30 06:39:55 +00:00
f8248b23a7 - fix another minor use of wrong mface bug 2005-03-30 06:24:34 +00:00
347619f501 - fix silly bug in mesh DerivedMesh tex drawing func (only was drawing
first face.
 - change DerivedMesh callback prototypes to help eliminate errors
2005-03-30 05:57:40 +00:00
cfd90889e2 - made some DerivedMesh drawing functions more generic (take callback
to determine if element should be drawn and to set draw options),
   which meant some could be combined - eases implementation of new
   DerivedMesh types and keeps more app specific logic out of DerivedMesh
   implementations.
2005-03-30 00:32:10 +00:00
70687a2e84 - removed dlm->flag 2005-03-29 17:20:28 +00:00
03e364aba6 - remove free_displist_by_type
- free derived mesh on freedisplist_object... bit of a hack but
   just to be safe. oh dependency graph where are you!
2005-03-29 17:10:07 +00:00
e229722d5b - added Mesh->derived and Mesh->decimated DerivedMesh pointers
- removed DL_MESH displist type!!!! Now store a DerivedMesh directly.
 - May still be some issues left having to do with releasing this
   at the right time (old code just splashed free_displist all
   over the place).
2005-03-29 16:43:39 +00:00
53437f9536 - it is possible to rotate with MetaBalls in edit mode now 2005-03-29 10:03:30 +00:00
ea92a56193 - simplify extverts handling 2005-03-29 07:58:56 +00:00
4a5a9f4e49 - added drawFacesTex function to DerivedMesh with implementations
- switched drawmesh.c to use new functions
 - WHEE! This is last such function that has to be written for the time
   being, and also effectively marks the end of DL_MESH! DispListMesh still
   hangs around as a kind of interchange format but should also die once
   DerivedMesh provides more intimate mesh access.

   DL_MESH (the displist type for DispListMesh) is still used to hold
   the DispListMesh, but that will die as soon as new subsurf switches to
   using a bonafide DerivedMesh implementation. There is also one silly
   usage for the decimator that is easy to kill.
 - Oh, and I also made potatoe mode draw mesh vertex colors - seemed to
   be more uniform behavior.
2005-03-29 07:51:00 +00:00
4c511daa88 - fix shadedisplist to use derivedmesh
- also a bug fix! Made subsurfs now use tface colors when shading
   displist.
2005-03-29 06:46:11 +00:00
2b82405829 - zero DispListMesh.{editedge,editface} on copy
- calc normals for mesh displistmesh's
2005-03-28 21:53:26 +00:00
67eaf69f3f - added mesh_get_derived_render
- cancelled previous commit to add RE_findTFAce, instead just added
   a MemArena to render struct... free'd at end of render, can be used
   to store other data as well
 - switch rendering to using DerivedMesh API... this is slightly more
   inefficient now because it is doing some unnecessary copying. Can
   be fixed by defining a DerivedMesh function to convert the object
   into a render object (on todo list)
2005-03-28 21:49:49 +00:00
f2d940aa1b - Bug fix, accidentally broke deform for non subsurfs. 2005-03-28 19:41:33 +00:00
c094d49ed0 Shameless intrusive commit in Daniels beloved project! :)
The dl->mesh pointer was used without checking dl... dunno what this call
exactly does, but it causes crashes here. Fixed with a if(NULL) check.
2005-03-28 17:17:51 +00:00
137432637f - add bad level call stubs for bglBegin/bglVertex3fv/bglEnd 2005-03-28 15:23:36 +00:00
cdd7e93566 - subsurf creation no longer needs extverts argument... removed 2005-03-28 08:43:24 +00:00
6a8fb8bf6c - added nors to DispListMesh (for face normals)... this is just to
avoid throwing them on later with addnormalsdisplist which is just
   silly and burdensome.
 - renamed displist_calc_vert_normals to displist_calc_normals
2005-03-28 08:17:51 +00:00
29aae3452e - added getMappedVertCoEM and drawMappedVertEM to DerivedMesh with
implementations (slightly redundant, could implement draw in terms
   of first... can be cleaned later)
 - switch to use of new APIs... all uses of EditVert->ssco are now
   clean (read: ready to die as soon as a proper DerivedMesh implementation
   is swapped in with ccgsubsurf)
2005-03-28 07:10:32 +00:00
8acfd730cf - added drawMapped{Verts,Edges,Faces}EMSelect calls to DerivedMesh with
implementations
 - updated drawobject selection code to use DerivedMesh (last DispListMesh
   usage in drawobject.c that needs to be replaced! Woot!)
 - interface could still be a lot cleaner, mostly calculating indices for
   the various things to pass to selection color routine is hacky.
2005-03-28 06:46:21 +00:00
09596b04a5 - added mesh_get_cage_derived (returns appropriate DerivedMesh
to be used as a cage - depends on ME_OPT_EDGE flag)
2005-03-28 05:58:43 +00:00
Stephen Swaney
51ca37b995 add new file DerivedMesh.c 2005-03-28 02:05:36 +00:00
57b1660420 - added DerivedMesh convertToDispListMesh function with implementations,
this is to ease migration.
 - updated particles and STL converter to use DerivedMesh interface. This
   is a bit wasteful at the moment, but these are not key performance areas.
   Can update once DerivedMesh has accessors for faces and face data.
2005-03-27 22:42:57 +00:00
e86d5ea498 - added drawMappedEdgeEM function to DerivedMesh with implementations
(draws single mapped edge)
 - updated editmesh code to use new interface (-2 DLM uses)
2005-03-27 22:14:57 +00:00
2a66e1d73f - added getNum{Verts,Faces} accessors to DerivedMesh with implementations
- updated edit.c to use DerivedMesh interface
2005-03-27 21:27:12 +00:00
818d76bdcb NOTE: New file to be added to project files
- add new DerivedMesh type, currently just encapsulates drawing
2005-03-27 20:34:18 +00:00
642012064b - everyone loves prototypes 2005-03-27 17:17:53 +00:00
9744f93f0c - one last CCG warning patch 2005-03-27 14:38:18 +00:00
61c9e1035c - more warning removal/cleanup for CCG, apparently GCC is not
happy about coercing (xxx**) to (void**) (sadly enough)
2005-03-27 14:37:00 +00:00
3c5a013c2e - get rid of some warnings in CCG code, thanks lukep 2005-03-27 14:17:28 +00:00
5c87aefa4b - integrated get_mvert_weight and color_temperature
into drawobject.c (just used for calculating weight
   map)
 - removed two_sided (replace with glLightModeli calls)
 - huge rewrite of drawobject.c for meshes, extracting simple
   drawing functions and then reworking to bring some order
   and clarity back to the code.

   A lot was changed here so it is likely I missed a few
   things in testing although I tried to be very careful.
   Please let me know if you find any changes in drawing.
2005-03-26 17:29:37 +00:00
9b40577d3a - made give_mesh_mvert static 2005-03-25 21:18:14 +00:00
8b69f0cfd9 Bug fix #2337
SHIFT+Z shaded view could display Shadeless overflows, due to lack of
clipping float to a char. :)
2005-03-23 22:19:51 +00:00
b264636469 Fix for bug #1444
- this changed creasing behavior at vertices with >2 adjacent creased
   edges. Hope no one minds (new behavior should be nicer).
2005-03-23 19:00:57 +00:00
1bbc60f63e Bug #2444
Jkey, for showing spare render page, didn't work when using ztransp
material, or buttons F5 open or shaded view.... quite strange eh!
Caused by init-render-material setting R.flag to use Ztransp render.
Globals causing havock yes...
2005-03-23 12:47:23 +00:00
Stephen Swaney
cda3383189 add files for Daniel Dunbar's new CCGSUBSURFLIB work to SCons build.
This commit *only* adds the new files.

Since this is an experimental feature, it is NOT enabled by default.

At the moment, you can turn it on by editing the toplevel SConstruct
file.  NOTE:  this is a hack.  it will be done properly later!

To enable this experimental feature,
add the following line after the line that starts with 'extra_flags = ['

    extra_flags.append( '-DUSE_CCGSUBSURFLIB' )
2005-03-22 07:45:20 +00:00
845ee1e4a1 - Hacked in blender style creasing support to new subsurfs.
I would like to have proper creasing (following what appears to be
the informal standard in the subdivision surface literature) but
I do not know when I will get to this or how complicated it will
be. With this patch CCGSubSurfs should now have the same capabilities
as regular subsurfs (barring possible bugs) and so replacing the
old implementation is a reasonable possibility.
2005-03-22 06:11:25 +00:00