Commit Graph

446 Commits

Author SHA1 Message Date
Brecht Van Lommel
24446906bc Use ALsizei/GLsizei to fix compile errors on mac / gcc 4.x. 2006-01-29 21:29:14 +00:00
Kent Mein
e544723e63 Fix some of Stealth Apprent's warnings/errors and some extra little stuff.
here is a quick summary...

Kent

intern/bsp/intern/BSP_CSGMesh_CFIterator.h
removed tri_index (unused variable)

intern/bsp/intern/CSG_BooleanOps.cpp
removed extra ;

intern/string/intern/STR_String.cpp
added <ctype.h>

source/blender/blenkernel/BKE_writeavi.h
moved things around so not doing forward declarations

source/blender/renderconverter/intern/convertBlenderScene.c
changed render.h to render_types.h

source/blender/src/blenderbuttons.c
source/blender/src/editgroup.c
source/blender/src/meshtools.c
added newline

source/gameengine/Ketsji/KX_KetsjiEngine.cpp
commented out include "PIL_time.h" code that requires it is commented out

reading blender/src/writeavicodec.c
(struct keyword to a couple of lines that needed it)
and added:
extern struct Render R;

blender/renderconverter/intern/convertBlenderScene.c
added extern Render R;
added #include "rendercore.h" to get rid of undeclared shade_material_loop
        (Not sure if this is right but it fixes it.
Did not fix this problem, is it alright to just pass NULL here or should we chan
ge it to something else:
        init_render_materials' : too few

gameengine/Physics/BlOde/OdePhysicsEnvironment.cpp
removed argument to dHashSpaceCreate
commented out dWorldQuickStep since it does not exist
2006-01-29 15:15:34 +00:00
Ton Roosendaal
4270cc96bc Orange: replaced obsolete IMB_rectop() with IMB_rectcpy() in game engine. 2006-01-28 16:43:00 +00:00
Erwin Coumans
e3512ab335 assert caused compile problems too :( 2006-01-18 06:48:28 +00:00
Erwin Coumans
5b8b745cba fixed an ordering issue caused by previous commit 2006-01-18 06:46:56 +00:00
Erwin Coumans
85c58bfa8a attempt to fix reported problems with glsl shader on OS X (and other platforms). instead of continuous printing errors, it should just print once, and delete the shaders.
also, disabled the asynchronous logicbrick update, it reportedly causes jitter.
2006-01-18 06:04:11 +00:00
Jean-Luc Peurière
77c4eef90b after much suffering, got GE build and work almost cleanly on Os X
(with make, need to confirm with scons)

after cleaning the changes are in fact minimal, but the situation
is still quite a bit hackish.

Game engine coders, there is also quite a number of warnings that
need to be fixed.

current situation is that everything seems to work, but GLSL shaders
spew a lot of errors on console and blender may crash on exit when
a GLSL shader was used. ARB stuff works fine.
2006-01-16 22:27:30 +00:00
Erwin Coumans
56489f4830 fixed a runtime problem with stl container usage, as reported on bf-committers mailing list 2006-01-16 19:34:52 +00:00
Erwin Coumans
6f3e593105 more graphics patches from Snailrose,
remove constraint fixed,
Bullet timestep now subdivides Blender game engine timestep, so it runs 60 hertz,
SphereShape reverted to old style, so no support for non-uniform scaled spheres for now,
2006-01-15 11:34:55 +00:00
Erwin Coumans
631979f909 renamed some variables to make the timing in the game engine less confusing+minor improvements in this area.
enabled game engine for scons
2006-01-12 06:30:01 +00:00
Erwin Coumans
a9e64286a9 overlooked IMB_imbuf.h was already included inside an extern "C" section. 2006-01-12 01:37:33 +00:00
Erwin Coumans
b9d99662d2 uncommented include "IMB_imbuf.h", it is needed? 2006-01-12 01:15:09 +00:00
Hans Lambermont
f4de95a5f6 At least FreeBSD needs to know where to find gl.h 2006-01-11 19:31:15 +00:00
Erwin Coumans
fbc977e48c attempt to avoid nameclashes (although it is already in a namespace) -> extension names renamed from glXXX to blXXX. 2006-01-11 13:31:45 +00:00
Erwin Coumans
b7be6620d6 applied patch from snailrose, related to multi-platform OpenGL extensions. 2006-01-10 06:34:42 +00:00
Kent Mein
17598faca1 Another small gameengine build tweak. Included a missing header directory.
I also provided a fix for tiff images.  (It was appending tif even if
it was already in the name, now it does it correctly)
(no more image.tif.tif)

Kent
2006-01-09 02:23:04 +00:00
Erwin Coumans
c94455c14d more linux game engine work. hopefully works now! 2006-01-08 09:37:15 +00:00
Erwin Coumans
88a8508b34 Got the armatures, GLSL shaders and other snailrose changes to work for Linux.
now attempting to get this in cvs :)
2006-01-08 09:11:17 +00:00
Erwin Coumans
9f429be173 removed testing code 2006-01-07 02:00:44 +00:00
Erwin Coumans
bed24bc299 more work to get armatures/blender materials to work under non-windows platforms 2006-01-07 00:14:37 +00:00
Erwin Coumans
0a252adb99 use relative paths to avoid including extra folder 2006-01-06 20:35:02 +00:00
Kent Mein
93f71e2d0c changed the size of some local vars for 64bit linux.
also added a newline at the end of the file to shut gcc up.

Kent
2006-01-06 15:29:11 +00:00
Erwin Coumans
4a641caddd fixed copy/paste bug in physicscontroller applyforce, and crashing radar sensor 2006-01-06 09:57:27 +00:00
Erwin Coumans
f3a76a1851 removed extra characters 2006-01-06 09:40:00 +00:00
Erwin Coumans
0002cd63a5 disable game engine and gameplayer for all platforms except windows.
Then after cvs is unfrozen, development can continue.
2006-01-06 09:02:53 +00:00
Kent Mein
dd3356f694 Added current directory to includes so it could find some headers.
(I still do not have the whole thing working but I'm stumped now and
figured this will save someone a little time)

Kent
2006-01-06 04:43:17 +00:00
Kent Mein
51368852ee Headerfile had wrong Capatalization.
Kent
2006-01-06 04:13:20 +00:00
Erwin Coumans
2e6d576182 Sorry to break the cvs-closed status, so if you really need to make a new 2.40 build, just disable the game engine if it doesn't compile for a platform. Again, sorry if this breaks non-windows platforms, but I hope people help to get this amazing fix working for all platforms. Armature-fixing contribution from Snailrose. Also lots of cool things from Snailrose and Lagan.
Armatures are back
Split screen
Double sided lightning
Ambient lighting
Alpha test
Material IPO support (one per object atm)
Blender materials
GLSL shaders - Python access
Up to three texture samplers from the material panel ( 2D & Cube map )
Python access to a second set of uv coordinates

See http://www.elysiun.com/forum/viewtopic.php?t=58057
2006-01-06 03:46:54 +00:00
Kent Mein
39fcd3586f Lots of stupid warning fixes:
Added newlines at end of a bunch of files that didn't have them.
removed a couple of unused variables and an extra ';'
(Also removed config.h crap from these files)

Kent
2006-01-05 23:10:54 +00:00
Erwin Coumans
71991cf41e Some rigidbody dynamics fixes (scaling again) to make Happy 2006 domino simulation to work.
See http://www.continuousphysics.com/ftp/pub/test/index.php?dir=blender/&file=happy_2006_blend.zip
For the baked dominos. Thanks to Tom M (LetterRip) for the blend.
2006-01-01 00:20:50 +00:00
Erwin Coumans
bab1b90edc more game engine bug-fixes, hooked up 'formfactor' as inertia tensor tweaker, friction/restitution, more scaling related fixes. 2005-12-31 21:59:56 +00:00
Erwin Coumans
9119b6e8a5 Fixed several bugs: python refcounting related and Bullet related (basic add/remove object support, bounding volume hierarchy). Added a few files, updated the Bullet scons. Vc6/7 Bullet projectfiles need to add a couple of files: 'Bullet/CollisionShapes/BvhTriangleMeshShape.cpp',
'Bullet/CollisionShapes/ConvexTriangleCallback.cpp',
'Bullet/CollisionShapes/EmptyShape.cpp',
'Bullet/CollisionShapes/OptimizedBvh.cpp',
'Bullet/CollisionShapes/TriangleCallback.cpp',
'Bullet/CollisionShapes/TriangleIndexVertexArray.cpp',
'Bullet/NarrowPhaseCollision/ManifoldContactAddResult.cpp'.
Sorry, no armatures fix yet.
2005-12-31 07:20:08 +00:00
Erwin Coumans
d59531226f Forgot to add 'ForgetReference' for game-python objects. 2005-12-20 09:13:06 +00:00
Jean-Luc Peurière
63d0e03bcf applying Volker Mische engine patch
correct bug #3594
2005-12-18 19:10:26 +00:00
Ton Roosendaal
0140c36df9 Cleanup & preparation commit for getting Armatures/Poses/Actions working
in the game engine again.

All files in source/gameengine/ I've committed below have a comment like
/* XXX note .... */
where something needs to be done. This is pretty straightforward for Erwin,
who has been notified in person too about this. :)
2005-11-29 12:45:18 +00:00
Erwin Coumans
e1c66eb145 applied the 64-bit pointer patch submitted by Ken Hughes 2005-11-28 06:51:54 +00:00
Erwin Coumans
fbee75fef3 fixed raysensor, hooked up a few more bullet method: force, torque etc, + 'local'. cosmetic change in physics-engine menu. 2005-11-11 05:02:14 +00:00
Erwin Coumans
dfce9d7d9b minor cleanup. Todo: Does 'testhandles' need to be called after every single ipo_insert_vert ? 2005-11-06 16:50:22 +00:00
Erwin Coumans
b7a465b437 when recording physics keyframes, always run at a fixed framerate (not variable/real-time) 2005-10-30 07:25:36 +00:00
Erwin Coumans
745fc2f9d0 updated SConstruct and Makefile so that if you compile the gameengine, is always enables bullet, independent of sumo/ode.
So for the 2.4 release, both bullet AND sumo will be enabled. You can choose in the world buttons which physics engine is active for a scene.

sorry if this breaks your builds!
2005-10-23 17:55:19 +00:00
Ton Roosendaal
28f0eeaf61 Ack! Recently the get_ipocurve was added in the game engine, for baking
physics. This creates very bad dependencies... tsk!

comments indicate it though;

//quick hack
//todo, before 2.38/2.40 release, Erwin

Hrms... :)
2005-10-10 18:57:55 +00:00
Chris Want
0a2b71a3a4 Getting blender to compile for IRIX, in particular:
IK: needed to change abs() to TNT::abs() (thanks brecht!)

Freetype: FT_ENCODING_UNICODE typecast to FT_CharMap (thanks intrr!)

header_image: missing include for liballoc stuff

Ketsji: needed to declare m_hitObject as public in KX_MouseFocusSensor.h.
This is probably the wrong thing to do, but KX_MouseFocusSensor.cpp
compilation fails on line 279 otherwise.
2005-09-14 21:50:37 +00:00
Erwin Coumans
207cbbd535 don't need Object.h 2005-08-23 16:50:53 +00:00
Erwin Coumans
056a33ac69 new game-menu option 'Record Game Physics to Ipo'
including implementation. hope it works, and doesn't break to much.
it bakes physics objects transform into ipo, every frame of the running gameengine.
When you disable and run the game again, it clears the ipo's again. just for physics objects at the moment.

(perhaps some better UI in the future?)
2005-08-23 13:16:02 +00:00
Erwin Coumans
43b59afebb more preparation for physics recording to ipo keyframes 2005-08-22 18:31:19 +00:00
Erwin Coumans
65a52fc419 - prepared for automatic game physics -> animation (ipo) conversion (this allows to use bullet for animation)
- default the m_edgecode to 65535, the wireframe was invisible. when is the edgecode available again ?
- added an extra condition, nearsensor is not yet working for bullet, but it crashed.
2005-08-22 15:47:56 +00:00
Ton Roosendaal
4065cdb550 Temporal; make compiling happy. :) 2005-08-21 14:39:08 +00:00
Chris Want
e0189e3a96 spack() is no longer used in the blender core, so I moved it to
this gameengine source file that depends on it.
2005-08-18 16:48:10 +00:00
Chris Want
4a50f5b593 Support for 'Bullet' in the Makefiles. Enable with:
export NAN_USE_BULLET=true

in environment, or in user-def.mk
2005-08-18 06:07:02 +00:00
Chris Want
f7914a2248 The name of an included header had the capitalization wrong, causing
problems on unix.
2005-08-18 06:04:50 +00:00
Erwin Coumans
c99c7fbcb3 some more fixes in the raycast/mouse over 2005-08-17 19:52:56 +00:00
Erwin Coumans
72d60d7b63 added the "mouse over any", makes the sensor more useful 2005-08-17 14:29:58 +00:00
Erwin Coumans
9537bfa121 now for the cigar... 2005-08-13 10:04:01 +00:00
Erwin Coumans
4d7089d19b these files missed the cvs commt yesterday, this should fix compilation problems 2005-08-13 08:05:48 +00:00
Kent Mein
841ddb4680 A couple of small fixes...
I removed config.h code from the files that had them.
effect.c had nested /* so cleaned that up...

added a newline to vector.c to shut gcc up ;)
buttons_editing.c had a possible unintalized var (height) so I gave
it a default value.

removed an unused var i in interface_draw.c
removed an unused var mti in outliner.c

in BL_SkinDeformer.cpp
commented out a call to bDeformGroup->data which no longer exists so it
compiles again.

Kent
2005-08-11 16:39:51 +00:00
Erwin Coumans
29f06ad76e some more work on bullet raycast 2005-08-08 17:08:42 +00:00
Erwin Coumans
66dc186fb6 fixed sphere shape, added non-uniform scaling (making it an ellipsoid)
removed bug-fixing comments
2005-08-05 22:10:27 +00:00
Erwin Coumans
b6d9fbf0db fixed the mouse-over sensor,
added raycast support for bullet (no triangle-mesh support, soon)
added python methods for 'getHitObject', getRayDirection, getHitPosition and getHitNormal for mouse over sensor,
which makes it easy for a shootout.blend demo :)
2005-08-05 17:00:32 +00:00
Erwin Coumans
210ab537ce improved deactivation, exposed more tweakable parameters to python,
fixed some copy/paste bug in inertia/inverse inertia.
colors in deactivation debug
2005-08-04 19:07:39 +00:00
Erwin Coumans
2cc6d565cb moved some hardcoded constants into tweaking tresholds
exposed those tresholds to python (more 'expert' settings)
2005-08-03 18:22:30 +00:00
Simon Clitherow
671235b69b Finalised support for compiling BULLET on linux.
Bullet is now off by default on all platforms until we get an OK
from Erwin. To enable it, change USE_PHYSICS to 'bullet' in your
config.opts.
2005-08-02 18:54:11 +00:00
Erwin Coumans
558b8daf67 added python binding for debugdraw,
tweaked friction, some more preparations but no real functionality added yet
2005-08-02 14:59:49 +00:00
Simon Clitherow
208da2a5d0 Added support for compiling BULLET with scons on windows
using bandoler's patch as a basis (thanks!).

A couple of notes:

-  This is for windows only, I did not have a chance to try linux yet.

-  SConscript for PHY_Bullet may need tweaking (plus support
 for other platforms), but at least it's in there :)

Any problems, shout :)
2005-08-01 21:19:41 +00:00
Erwin Coumans
49499c49be updated vc7 projectfiles so they work with bullet 2005-07-31 14:40:51 +00:00
Erwin Coumans
6eeaacde0a enable bullet for vc7 too by default (can be switched off easily) 2005-07-30 18:21:02 +00:00
Erwin Coumans
dad6ef9045 added physics-debugging
didn't check every single file, so might have broken some gameengine stuff, will fix it this weekend!
2005-07-29 18:14:41 +00:00
Erwin Coumans
7432e4485e >humm, .. this seems to define USE_BULLET for 1400 > _MSC_VER
>e.g.  my msvc6 and gcc in linux. right?
>BM

thanks bjornmose, is was a typo
(it only disabled bullet for Visual Studio 2006, which is not even in planning stage :)
Should be fixed now
2005-07-29 06:08:02 +00:00
Erwin Coumans
8f15f9805a got some "_1400 <= _MSC_VER" wrong, should be "_1400 < _MSC_VER"
Lets hope gcc doesn't define this :)
2005-07-27 09:47:08 +00:00
Erwin Coumans
411123b250 - added debug line drawing in gameengine (handy for debugging physics problems)
- added #ifdef for a visual studio 8 crashing problems
- added scaling and tolerances to triangle meshes
2005-07-27 09:30:53 +00:00
Erwin Coumans
701b9c21fd more preparations for bullet physics, and some eol issues with SCA_Joystick* 2005-07-18 05:41:00 +00:00
Erwin Coumans
7c9422111b another file behind the #USE_BULLET 2005-07-16 22:13:20 +00:00
Erwin Coumans
2d73b31aff preparation for bullet physics 2005-07-16 21:47:54 +00:00
Erwin Coumans
502c34ee49 added Bullet physics binding files 2005-07-16 10:15:31 +00:00
Ton Roosendaal
24c9dc7322 Commented out one more line to make debug version of engine compile, needed
because API for armatures changed.
2005-07-09 13:33:36 +00:00
Ton Roosendaal
d59894ac42 Old define in engine still... 2005-07-03 18:10:41 +00:00
Ton Roosendaal
28a1e8277b Result of 2 weeks of quiet coding work in Greece :)
Aim was to get a total refresh of the animation system. This
is needed because;
- we need to upgrade it with 21st century features
- current code is spaghetti/hack combo, and hides good design
- it should become lag-free with using dependency graphs

A full log, with complete code API/structure/design explanation
will follow, that's a load of work... so here below the list with
hot changes;

- The entire object update system (matrices, geometry) is now
  centralized. Calls to where_is_object and makeDispList are
  forbidden, instead we tag objects 'changed' and let the
  depgraph code sort it out
- Removed all old "Ika" code
- Depgraph is aware of all relationships, including meta balls,
  constraints, bevelcurve, and so on.
- Made depgraph aware of relation types and layers, to do smart
  flushing of 'changed' events. Nothing gets calculated too often!
- Transform uses depgraph to detect changes
- On frame-advance, depgraph flushes animated changes

Armatures;

Almost all armature related code has been fully built from scratch.
It now reveils the original design much better, with a very clean
implementation, lag free without even calculating each Bone more than
once. Result is quite a speedup yes!

Important to note is;

1) Armature is data containing the 'rest position'
2) Pose is the changes of rest position, and always on object level.
   That way more Objects can use same Pose. Also constraints are in Pose
3) Actions only contain the Ipos to change values in Poses.

- Bones draw unrotated now
- Drawing bones speedup enormously (10-20 times)
- Bone selecting in EditMode, selection state is saved for PoseMode,
  and vice-versa
- Undo in editmode
- Bone renaming does vertexgroups, constraints, posechannels, actions,
  for all users of Armature in entire file
- Added Bone renaming in NKey panel
- Nkey PoseMode shows eulers now
- EditMode and PoseMode now have 'active' bone too (last clicked)
- Parenting in EditMode' CTRL+P, ALT+P, with nice options!
- Pose is added in Outliner now, with showing that constraints are in
  the Pose, not Armature
- Disconnected IK solving from constraints. It's a separate phase now,
  on top of the full Pose calculations
- Pose itself has a dependency graph too, so evaluation order is lag free.

TODO NOW;

- Rotating in Posemode has incorrect inverse transform (Martin will fix)
- Python Bone/Armature/Pose API disabled... needs full recode too
  (wait for my doc!)
- Game engine will need upgrade too
- Depgraph code needs revision, cleanup, can be much faster!
  (But, compliments for Jean-Luc, it works like a charm!)
- IK changed, it now doesnt use previous position to advance to next
  position anymore. That system looks nice (no flips) but is not well
  suited for NLA and background render.

TODO LATER;

We now can do loadsa new nifty features as well; like:

- Kill PoseMode (can be option for armatures itself)
- Make B-Bones (Bezier, Bspline, like for spines)
- Move all silly button level edit to 3d window (like CTRL+I = add
  IK)
- Much better & informative drawing
- Fix action/nla editors
- Put all ipos in Actions (object, mesh key, lamp color)
- Add hooks
- Null bones
- Much more advanced constraints...


Bugfixes;

- OGL render (view3d header) had wrong first frame on anim render
- Ipo 'recording' mode had wrong playback speed
- Vertex-key mode now sticks to show 'active key', until frame change

-Ton-
2005-07-03 17:35:38 +00:00
Ton Roosendaal
205b6501a0 (Accidentally sent previous commit without message... is same stuff)
gcc4 error fixes for compiling in OSX Tiger

Also; make using python framework default in makefiles
2005-06-08 18:55:49 +00:00
Jean-Luc Peurière
f38e0686d9 new round of warning fixes. we are now down to 24 with Xcode on blender
alone with the following flags :
-Wall -Wno-char-subscripts -Wno-missing-braces.

the only one still worrying me is in rand.c line 57 :

rand.c:57: integer constant is too large for "long" type

but i have no clue about how correct cross-compiler and 32/64 bits friendly

see also my mail to commiter list for signed/unsigned issues
2005-06-04 16:22:50 +00:00
Kester Maddock
0dcba86c6b Added the docs & use Python booleans for physics reinstance. 2005-04-23 12:25:21 +00:00
Kester Maddock
10acf20645 Support reinstancing the physics mesh from Python. 2005-04-23 12:03:37 +00:00
Kester Maddock
32daf2cdc4 Fix lighting in game engine 2005-04-23 11:54:21 +00:00
Kester Maddock
2ac1ef13e2 Added bone parent relationship. 2005-04-23 11:36:44 +00:00
Stephen Swaney
621d218056 removed extra qualifier `SumoPHYCallbackBridge::' that was choking
gcc in c89 mode.  More potential breakage.
2005-04-22 16:17:27 +00:00
Kester Maddock
6c4ae1eb54 Patch: [ #2439 ] Makes objects react properly to deformations after a mesh replacement call.
from brian hayward (bthayward)

Detailed description:
 Currently, when an armature deformed object's mesh is replaced by the ReplaceMesh actuator, the new mesh fails to deform to the armature's movement.

 My patch fixes this by properly replacing the deform controller along with the mesh (when appropriete).

 For instance, if one had an animated character using any of the standard deformation techniques (armature, ipo, RVK, or AVK), that character's mesh would currently be prevented from changing mid-game. It could be replaced, but the new mesh would lack the controller which tells it how to deform. If one wanted to dynamiclly add a hat on top of the character's head, it would require storing a secondary prebuilt character (mesh, armature, logic, ect...) on another layer FOR EACH HAT the character could possibly wear, then swapping out the whole character when the hat change was desired. So if you had 4 possible hat/character combos, you would have 4 character meshes, 4 armatures, 4 sets of logic, and so on. I find this lack of flexibility to be unresonable.

 With my patch, one could accomplish the same thing mearly by making one version of the character in the main layer, and adding an invisible object atop the character's head (which is parented to the head bone). Then whenever it becomes desirable, one can replace the invisible object's mesh with the desirable hat's mesh, then make it visible. With my patch, the hat object would then continue to deform to the character's head regardless of which hat was currently being worn.

 *note 1*
 for armature/mesh deformations, the new mesh must have properly assigned vertex groups which match one or more of the bones of the target armature before the replaceMesh call is made. Otherwise the vertices won't react to the armature because they won't know how. (not sure if vertices can be scripted to change groups after the game has started)

 *note 2*
 The added processing time involved with replacing the object's deform controller is negligible.
2005-04-18 11:44:21 +00:00
Chris Want
6275dd5b14 Clean up for Makefiles: some of the directories were being printed
wrong (e.g., "/Fuzzics" and "/Joystick", and some of  the solid stuff).
This was particularly noticable during "make clean".
2005-04-09 22:40:34 +00:00
Kent Mein
7bb97ac815 Added OPENGL includes to this one as well.
Kent
2005-04-05 15:06:41 +00:00
Stephen Swaney
9b8a035718 add new file SumoPHYCallbackBridge.cpp to SConscript for SCons build. 2005-03-26 13:41:15 +00:00
Kent Mein
55af35d795 I'll break this commit into two sections in the moto files
I got rid of a few warnings about blah shadows a previous declaration.

In the gameengine files I fix the following:
	removed some unused vars
	removed dos style line breaks
	added newlines to last line in a couple of files to remove warnings.

Kent
2005-03-25 16:31:05 +00:00
Chris Burt
94839880d7 Quickly hacked together a fix for game engine compiling. There were two
missing files in Kester's new commits. This commit adds these two files so
that compiling can continue as it is intended to. Emilie M. found a
home for the files rather quickly, Ton recieived the files from Erwin via
email, and we all tested. Works great! Thanks to everyone that helped!
2005-03-25 14:57:25 +00:00
Kent Mein
b0ece214d9 added an #include <stdlib.h> to fix this:
KX_RayCast.h:92: error: `NULL' was not declared in this scope

Kent
2005-03-25 13:18:13 +00:00
Kester Maddock
c844aa265a Big patches:
Erwin Coumans: Abstract the physics engine
Charlie C: Joystick fixes
Me: Moved the ray cast (shadows, mouse sensor & ray sensor)
2005-03-25 10:33:39 +00:00
Kent Mein
af12eaae1f Reordered some of the includes to fix STL issues.
For details, see:
http://www.blender.org/modules.php?op=modload&name=phpBB2&file=viewtopic&t=5867

Kent
2005-03-22 13:34:31 +00:00
Jean-Luc Peurière
3ca88c4e7f ome more warnings cleaning 2005-03-14 20:10:22 +00:00
Kent Mein
ecf6de151c This commit reverses the OpenEXR specific stuff in the OpenEXR commit I
did last friday.  A patch will be available in the patches tracker
that will have the current stuff there until everything is working.

Kent
2005-03-14 14:56:40 +00:00
Kent Mein
a1919e6db4 Gernot Ziegler's patch to add OpenEXR support to blender.
To enable it you will need to download OpenEXR and install it.
For the Makefiles you will need to set WITH_OPENEXR=true
and set NAN_OPENEXR to point to where OpenEXR is installed.

For scons you'll need to remove config.opts to get the new options
so you can enable OpenEXR, I was not able to get blender to link
with scons so the scons stuff may need to be tweaked a little but
I think it should work.

For other platform managers  The OpenEXR stuff is similar to QUICKTIME
you need to define WITH_OPENEXR and setup the library stuff and
as you'll notice in this commit there are two extra files.

Kent
2005-03-11 20:16:14 +00:00
Jean-Luc Peurière
c78e44cdc5 big warning hunt commit
lot of casts, added prototypes, missing includes and some true errors
2005-03-09 19:45:59 +00:00
Kent Mein
427ff274a2 Joseph Gilbert's fixes for the linux2 build target.
Kent
2005-02-15 13:06:08 +00:00
Kester Maddock
09fdbdc744 Fix compile errors for MSVC 2005-02-15 10:02:19 +00:00
Simon Clitherow
4d17f9797c - updated MSVC 6 projectfiles.
-  removed 'using namespace std;' from SCA_Joystick.h
     (gave compile error on VC6).
2005-01-30 15:41:59 +00:00
Kent Mein
a238e7b9f4 Fix to get gcc 3.4.1 with scons working again. 2005-01-25 19:26:19 +00:00
Kent Mein
1b1ff7ea92 Fixed the Makefiles so the Joystick stuff works.
Kent
2005-01-24 16:16:50 +00:00
Kester Maddock
413e4f51a6 Make the KX_PolygonMaterial Python member variables writable. 2005-01-23 01:40:37 +00:00
Kester Maddock
d21b9be9a8 Don't delete the Python Controller's private dictionary between frames. 2005-01-23 01:38:41 +00:00
Kester Maddock
a1f0f165e4 Added Joystick sensor (from snailrose) 2005-01-23 01:36:29 +00:00
Kester Maddock
a572d196e6 Don't fail on mesh objects with no faces. 2005-01-22 23:46:54 +00:00
Kent Mein
d32f4a2851 Jacques patch to get things compiling on windows.
basically it returns NULL for two functions that had their entire body
commented out.

Kent
2005-01-19 12:53:47 +00:00
Kent Mein
f13bff1588 The non scons specific stuff for bug tracker bug #2131
Basically removed #include <iostream.h>
from some files that didn't need it (and I'm assuming it caused problems)

I'll leave the scons stuff for someone else to look at since I don't really
use it.

Kent
2005-01-18 14:17:44 +00:00
Stephen Swaney
c448aa60ca remove gcc compiler error using -pedantic flag:
comma at end of enumerator list

If this change causes problems, feel free to back it out.

I am trying to get gcc to complain about mixed declarations and
code since that breaks on platforms that only support C89/C90.
2005-01-16 17:59:23 +00:00
Kester Maddock
dd0d5c26fa Add an Python Material example 2005-01-16 06:27:12 +00:00
Kester Maddock
3b91ea4309 Unified KX_BlenderPolyMaterial & GPC_PolygonMaterial into KX_PolygonMaterial.
Make game engine materials use Zoffs in Materials.
Added Python material hooks.
2005-01-16 06:02:06 +00:00
Kester Maddock
5fcf39d2a5 Added getDistanceTo Python method (thanks Charlie C) 2005-01-16 05:55:04 +00:00
Kent Mein
48bc598658 More warning cleanups...
added a casts to:
   blender/blenlib/intern/BLI_memarena.c
   gameengine/Rasterizer/RAS_TexVert.cpp

Removed unused vars from:
   blender/python/api2_2x/vector.c
   gameengine/Ketsji/KX_PyMath.cpp gameengine/Ketsji/KX_Scene.cpp
   gameengine/Physics/Sumo/Fuzzics/src/SM_Object.cpp
   gameengine/Rasterizer/RAS_FramingManager.cpp
   gameengine/Rasterizer/RAS_Polygon.cpp
   gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp

Kent
2005-01-03 18:05:24 +00:00
Kester Maddock
183ee861e8 PyDoc updates 2004-12-29 01:39:34 +00:00
Kester Maddock
8e5ef105ae Make Python Matrix/Vector conversions more robust 2004-12-29 01:34:07 +00:00
Kester Maddock
c82614be2e Python methods for camera actuators (thanks snailrose) 2004-12-29 01:33:15 +00:00
Kester Maddock
52c53bc2c9 Set the sound system listener properties. 2004-12-29 01:31:17 +00:00
Kester Maddock
551806bce8 Set the physics scale on added objects. (Fix bug #1837) 2004-12-13 09:53:30 +00:00
Kester Maddock
5590c179f5 Fix the case when the physics system starves the logic & renderer of CPU time. If this happens, we reduce physics precision to maintain some framerate. 2004-12-06 11:15:50 +00:00
Kester Maddock
e54f51c462 Fix numerical precision issue in physics. Dividing by a number too close to zero would make the impulse response normal large hence the jittering. 2004-12-06 11:10:41 +00:00
Kester Maddock
85a8203cbc Set the default physics tic rate to 90 Hz 2004-12-06 11:01:42 +00:00
Kester Maddock
88e435a52a Don't try to interpolate from prop ipo actuators 2004-12-06 10:58:38 +00:00
Kester Maddock
ef971de66d Fix Action & IPO actuators: (Bugs #1921 & #1920) 2004-12-05 02:50:57 +00:00
Kester Maddock
ae8102c8d6 Update the physics engine: interpolate between frames so track to/camera actuators work properly. (bug #1816) 2004-12-04 09:51:04 +00:00
Kester Maddock
10e64fe4b4 Only do event processing for ipo actuators on frames. 2004-12-01 08:43:58 +00:00
Kester Maddock
d098d94372 Make objects lit by default if there is a light in the scene, and no other face information exists for that object. 2004-12-01 08:43:02 +00:00
Kester Maddock
8b9de908bb .scr patch (from Raymond Penners)
- The patch only alters files in: blender/source/gameengine/GamePlayer/ghost

- Any blenderplayer.exe (with the patch applied) can be renamed into
something.scr, and it will behave as a Windows screen saver.
(Right-click the .scr file, and select "Install". Then, it will appear
in the screen saver properties dialog part of the display settings,
including small preview et al).

- The screen saving functionality does not affect the executable when
it is NOT named .scr

- The screen saver automatically exits when the mouse/keyboard is
moved/pressed. There is no more need to wrap blenderplayer.exe into a
bat file and use python quit controllers, or whatever else is
suggested at http://download.blender.org/documentation/oldsite/oldsite.blender3d.org/181_Blender%20news%20haloParty.html

- It has been currently been tested to work Windows XP
2004-12-01 08:35:38 +00:00
Kent Mein
e7bd591842 Removed an unused variable and the autoconf config.h stuff.
(was hunting down why audio isn't working on solaris and figured
I'd clean up the warning)

Kent
2004-11-30 19:10:43 +00:00
Kester Maddock
9744ea8a36 Make the material colour the default colour for objects if textures & vertex colours are not available (instead of white) 2004-11-25 08:09:18 +00:00
Chris Want
12307b358d Making the C++ stuff work for the MipsPro 7.3 compiler.
Kester might want to check this for correctness
Kent might want to test if this breaks the Sun compile.
2004-11-23 23:04:30 +00:00
Kester Maddock
f8c2ce93b9 Fix for bug 1800: mouse over sensor doesn't work for ortho cameras.
The camera -> world transform wasn't being calculated properly for 'ortho' cameras: getOrigin()[2] should be scaled by 100 (like the render transform in KX_KetsjiEngine)
2004-11-23 10:10:21 +00:00
Kester Maddock
1092b98337 Fix for bug 1600: alpha sort doesn't work on linked (alt-d) objects 2004-11-22 11:49:35 +00:00
Kester Maddock
46fbe6b01e Fix for bugs: 1788 (forces) and 1799 (python delattr on game objects)
Use Polytope collision for faster mesh intersection tests, so SOLID can actually use that qhull lib now.
2004-11-22 10:19:19 +00:00
Ton Roosendaal
6ea962923a GamePlayer seems to be forced to quit pressing "end key".
The code to check for it was very weak... causing apple key to quit it too.
2004-11-10 15:04:13 +00:00
Kester Maddock
5bba5035b0 Fix for MSVC (thanks Simon) 2004-11-08 11:30:41 +00:00
Jean-Luc Peurière
8daff51e0f skip process serial number argument on os X
needed when starting player via drag & drop
2004-11-07 22:21:47 +00:00
Kester Maddock
f4efd433fa Fix fixed time (enable all frames) 2004-11-06 22:10:58 +00:00
Kester Maddock
9be296289c Update Python reference version number 2004-11-06 22:10:47 +00:00
Kester Maddock
cf407da719 Reorder update: do physics before logic, so logic doesn't get stale position data (eg for camera actuator) 2004-11-06 12:31:56 +00:00
Kester Maddock
38b993f787 Speed up the physics engine: hook the SOLID broad phase, so we can either reject the test or request the penetration depth test as necessary. Previously we were doing the penetration depth test, as well as SOLID's intersection test. 2004-11-06 04:58:10 +00:00
Kester Maddock
ce4b232f8c Fix the action actuator (bug #1699) 2004-11-06 04:53:41 +00:00
Kester Maddock
318fb94c4b Fix IPO actuator (Bug #1694) 2004-11-03 10:48:02 +00:00
Chris Want
8c0b126bc2 Related to gameplayer png bug: cygwin needs to find the zlib library
too. (Thanks Richie)
2004-10-28 17:29:03 +00:00
Ton Roosendaal
ae76eaf9cb Fix in Makefile for added png library 2004-10-26 21:33:47 +00:00
Kent Mein
06cb471269 Fix so it compiles on my machine....
Changed:
        row_pointers = new (png_bytep) [(GetHeight() * sizeof(png_bytep))];
to:
        row_pointers = new png_bytep [(GetHeight() * sizeof(png_bytep))];

Thanks emil....

Kent
2004-10-26 13:04:27 +00:00
Nathan Letwory
85c889108d add necessary include paths for scons needed after fix for screenshot. NOTE: GPC_Canvas.cpp doesn't compile with msvc7 currently! 2004-10-25 15:52:54 +00:00
Kester Maddock
e4d22a8021 Tweek the stereo settings: allow negative eye separation. 2004-10-24 23:50:44 +00:00
Kester Maddock
e398ad2c0e Do a complete physics timestep each step instead of some per frame 2004-10-24 23:48:04 +00:00
Kester Maddock
657eff7ed7 Port stereo stuff from tuhopuu2: anaglyph, vinterlace 2004-10-24 11:03:18 +00:00
Kester Maddock
6424bf6eb0 Fix makeScreenshot for blenderplayer 2004-10-24 10:42:31 +00:00
Nathan Letwory
6c8d048773 remove std:: to please msvc6 2004-10-16 18:50:23 +00:00
Nathan Letwory
333f0a29db Added #include <assert.h> so it compiles where assert() was used. 2004-10-16 18:13:00 +00:00
Kester Maddock
7b2567924b Switch fixed time system. Logic updates should now happen at 30Hz, physics at 60Hz. (By default, use Python to set.) Some actuators still run at framerate (IPO, Action) for nice smooth animation, and an excuse to buy high end hardware.
Keyboard sensors can now hook escape key.  Ctrl-Break can be used from within blender if you've forgotten an end game actuator.

Fixed a stupid bug preventing some actuators working (like TrackTo).
2004-10-16 11:41:50 +00:00
Kent Mein
0f5eae2c64 added -h to the commandline args to print usage.
Kent
2004-10-15 12:46:57 +00:00
Kent Mein
d5e1d1844a removed 3 unused vars.
Kent
2004-10-06 14:35:08 +00:00
Kent Mein
98a012865b Added Dump 3dView and Dump Screen to the File menu
with their shortcuts.

Kent
2004-09-29 16:27:12 +00:00
Kester Maddock
fd5f3e13d2 Convert and use actuators with no target object set.
Certain actuators (Add Object/Replace Mesh/Scene/Track To) used to always require a target, or they would not influence the scene.  If the actuator target is always set from Python, this could be annoying.
2004-09-19 01:33:08 +00:00
Kester Maddock
3d8a485fb9 Fixed PyObject_IsMT_Matrix 2004-09-18 06:03:15 +00:00
Stefan Gartner
ea8c97b44b fix typo in GameLogic documentation 2004-09-01 13:19:42 +00:00
Chris Want
95b9534d2b We don't use ODE anymore, so I commented out some lines that make it
required to build.
2004-08-26 22:42:44 +00:00
Kester Maddock
9bbc1e9c0a Clear the Python error flag between 'overloaded' Python methods. 2004-08-10 11:35:38 +00:00
Kester Maddock
47c5b8ff26 Fix blenderplayer command line option parsing.
Fix stereo rendering in vertex array mode.  Added sidebyside & anaglyph stereo modes.
2004-08-10 11:34:12 +00:00
Nathan Letwory
f1fdc6d608 Under certain circumstances a null-pointer could get dereferenced. Disabling 'dynamic' on an object was one of the situations. Now checking before using.
NULL->m_mass never works, of course :)

Ryan Showalter spotted and located the problem.
2004-08-01 09:00:36 +00:00
Kester Maddock
b453cd0715 Fix bug #1460: Camera IPOs Broken (Gameengine)
The camera IPO was not invalidating the cached projection matrix.
2004-07-22 00:26:34 +00:00
Kester Maddock
b6e0899607 Added support for cameras in Blender's Ortho mode. 2004-07-20 12:07:06 +00:00
Kester Maddock
baa2f99f07 Port Python updates from Tuhopuu2:
getType/setType to action/sound actuator (sgefant)
Use a more generic python -> math conversion.
2004-07-17 05:28:23 +00:00
Kester Maddock
90fb631526 Port a few rasterizer changes from tuhopuu2:
Up the max batch size.
Clean up some of the code - move code in headers to source files etc.
2004-07-17 05:23:17 +00:00
Kester Maddock
d5585a3589 Added the runtime fullscreen options. 2004-07-17 00:48:59 +00:00
Kent Mein
b07c5f2096 Bunch of small fixes for warnings and whatnot....
intern/SoundSystem/intern/SND_AudioDevice.cpp
   Initalized a var that could fall through with no value.

source/blender/readblenfile/intern/BLO_readblenfile.c
source/blender/src/space.c
intern/SoundSystem/intern/SND_Scene.cpp
source/gameengine/Converter/BL_MeshDeformer.cpp
        removed unused var's

intern/SoundSystem/openal/pthread_cancel.cpp
        fixed a nested /*

source/blender/imbuf/IMB_imbuf.h
        added static to the type returned for addzbufImBuf

source/blender/imbuf/intern/IMB_bmp.h
        had a wrong prototype

source/blender/src/view.c
        added newline at end of file.

source/blender/src/sequence.c
        removed unused var
        added #include <stdlib.h>  to avoid:
                 warning: implicit declaration of function `abs'
        initalized a var that could have been used without being set.

Kent
2004-07-16 14:45:06 +00:00
Chris Want
e926d392a8 OK, the game engine has been un-buildable on irix for long enough
-- I'm committing this change I had discussed on the mailing list
about a month ago.
2004-07-16 01:31:25 +00:00
Kester Maddock
7398803bf4 Fix to not create invalid bound shapes from non mesh objects (armatures). 2004-07-16 00:08:06 +00:00
Kester Maddock
c9b4585618 Switch to using floats instead of shorts for normal data - they're supposed to be faster.
Also use shorts instead of ints for the index data, since index arrays are limited anyhow.
2004-06-30 13:41:19 +00:00
Kester Maddock
4c53f38756 Minor Fixes:
Better use of booleans for python
#include fixes for Windows
Python Doc fixes
Use the farthest vertex as the face position when z sorting faces. (Camera is on -z axis!)
2004-06-26 09:15:41 +00:00
Kester Maddock
9fa857b5c7 Fix a compile error in data conversion: double declaration of some vertex attributes. 2004-06-23 12:13:09 +00:00
Kester Maddock
38de9559bc Fix for reflection mapping unlit faces: normals were not being sent, hence reflection maps weren't being rendered properly (bf-bug #1385)
Set the diffuse material colour - lighting brightness should match blender better. (bf-bug #1385)
2004-06-23 01:12:11 +00:00
Kester Maddock
942a68da07 Add the separate spec colour definitions! 2004-06-07 11:57:10 +00:00
Kester Maddock
c16444e624 Python updates:
Added scene module
2004-06-07 11:03:12 +00:00
Kester Maddock
b468bf726c Lighting updates:
Added specular after texture.
Added Light properties: Negative, No Diffuse, No Specular, Quad, Quad2
2004-06-07 11:01:31 +00:00
Kester Maddock
4b544c75c0 blenderplayer target for SCons.
Would someone on MacOSX please check the bundle creation.
2004-06-04 12:58:46 +00:00
Kester Maddock
44f45894c2 Miscellaneous Fixes:
Add Python Mapping method to CListValue
Fix Bernoulli bool distribution python method for random actuator
Fix Python IpoActuator methods setProperty and force acts local
Make data objects private
Better sort method for polygon materials - much easier to understand
2004-06-04 03:00:13 +00:00
Kester Maddock
4ff321d507 Fix bug #1334: Crash with Python/GameEngine when the script has syntax errors.
When Python compile fails (eg syntax errors) skip the execute stage.
2004-06-04 02:10:58 +00:00
Kester Maddock
976e3a1824 Updates to GamePython Reference.
Added Actuator documentation.
2004-06-02 12:43:27 +00:00
Kester Maddock
0dfc3a3b78 Use epydoc for generating game python reference (like the bpython guys) 2004-05-31 13:06:04 +00:00
Kester Maddock
d38329b5aa Added Python module for Lights.
Added attributes to the vertex class.
2004-05-30 11:09:46 +00:00
Kester Maddock
b97c77df2b Check for zero normal vectors in the clip planes (if eg Python has set a strange projection matrix)
Fix the transformation of the frustum bound sphere to world coordinates.
2004-05-30 11:04:26 +00:00
Kester Maddock
8253d3e041 Python fixes:
Reenabled the setScript/getScript methods for python controller bricks.
Set the ray source point to MouseFocusSensor.getRaySource works.
Added: Python -> MT_Quaternion
MT_Matrix4x4, MT_Matrix3x3, MT_Vector3, MT_Point3 -> Python

Correct transform of frustum bound sphere centre point to world coordinates
2004-05-26 12:09:17 +00:00
Kester Maddock
3dd18c5c34 Added an UpdateTransform callback from SceneGraph -> Physics.
Profiling revealed that the SceneGraph updated every physics object, whether it moved or not, even though the physics object was at the right place.  This would cause SOLID to go and update its bounding boxes, overlap tests etc.
This callback handles the special case (parented objects) where the physics scene needs to be informed of changes to the scenegraph.

Added Python attributes (mass, parent, visible, position, orientation, scaling) to the KX_GameObject module.
Make KX_GameObject use the KX_PyMath Python <-> Moto conversion.
2004-05-26 12:06:41 +00:00
Kester Maddock
e5cc9abceb Fix Bug #1309 Disabling Actor leaves Ghost, Dynamic and Rigid Body etc enabled.
Depth sorting for Transparent polygons.  Use ZTransp in Material buttons to enable.
This will cause an object's polygons to be sorted (back to front for alpha polygons, front to back for solid polygons.)
2004-05-26 12:01:08 +00:00
Kester Maddock
a96955efc2 Game Python Reference Manual.
This manual lists all the Python classes and modules for Game Objects, Sensor bricks, Controllers etc.
Missing: Actuator & Controller reference.
2004-05-24 07:49:50 +00:00
Kester Maddock
4551490dd4 near & far are reserved words on MSVC. Don't use them as variable names. 2004-05-21 14:09:18 +00:00
Kester Maddock
e957b12f0e Frustum sphere culling.
Do a sphere<->camera sphere and a sphere<->frustum before the box<->frustum test.
2004-05-21 09:21:15 +00:00
Kester Maddock
1217928e66 Fixes for Camera objects and python:
Normalise clip planes for sphere testing.
Do a frustum-sphere <-> sphere test
Reference count all python objects (!)
2004-05-21 09:18:42 +00:00
Kester Maddock
22883f9232 Query GL for max number of lights to use. 2004-05-21 08:56:05 +00:00
Kester Maddock
e78ef29a59 Depth sorting for alpha mesh objects.
- Mesh Objects are sorted by depth (based on object centre.)  Using object centre means the user has control over the sort.
- Polygons are not sorted.
- Polygons are not split.
- O(nlog(n))
2004-05-21 08:55:12 +00:00
Kester Maddock
fba0e401c9 Compiler portability fixes (MSVC 6) 2004-05-17 23:56:56 +00:00
Kester Maddock
5454280f6c Same again - change static const for MSVC++ 2004-05-17 09:06:54 +00:00
Kester Maddock
0f447ac5a8 Fix for MSVC .NET, which can't handle static const declarations in classes.
Make it static, and define in SM_Object.cpp
2004-05-17 08:31:35 +00:00
Kester Maddock
6f4272a200 Fix for bug 1245: Vertex Colours are wrong in GameBlender. 2nd try.
http://projects.blender.org/tracker/index.php?func=detail&aid=1245&group_id=9&atid=125

The member names of MCol are wrong, so we will convert to unsigned char* like the rest of blender.
2004-05-17 00:42:07 +00:00
Kester Maddock
bab6e5ce36 Cleanup unused/commented out code, compiler warnings, coding standards etc. 2004-05-16 13:10:10 +00:00
Kester Maddock
d5fde6c48b Added #!/usr/bin/python standard script identifier to the start of SConscript files.
Makes text editors identify SConscripts as Python, and syntax highlight properly.
2004-05-16 13:07:20 +00:00
Kester Maddock
2fd6e72851 Changed Python _getattr/_setattr methods to use const STR_String& instead of char* - makes using these methods much nicer. 2004-05-16 13:05:15 +00:00