Commit Graph

2857 Commits

Author SHA1 Message Date
Mitchell Stokes
64c346ed1e BGE Rasterizer Cleanup: The Blenderplayer now loads the monospace font so it can properly draw the framerate and profile display. 2013-11-04 19:22:15 +00:00
Mitchell Stokes
fb94a53978 BGE Rasterizer Cleanup: Cleaning up some includes. 2013-11-04 19:22:10 +00:00
Mitchell Stokes
0cec5c63da BGE Rasterizer Cleanup: Removing the Singletexture material mode. More conversion code will probably be needed. 2013-11-04 19:21:50 +00:00
Mitchell Stokes
a35e9daaef BGE Rasterizer Cleanup: Moving the RAS_OpenGLRasterizer::ApplyLights() code into RAS_OpenGLRasterizer::ProcessLighting(). 2013-11-04 19:21:37 +00:00
Mitchell Stokes
c1e617d26b BGE Rasterizer Cleanup: Removing the need to reference KX_BlenderMaterial or KX_PolygonMaterial in RAS_OpenGLRasterizer. 2013-11-04 19:21:32 +00:00
Mitchell Stokes
5348682f3a BGE Rasterizer Cleanup: Getting rid of the BL_Material.h include in RAS_OpenGLRasterizer.cpp. 2013-11-04 19:21:25 +00:00
Mitchell Stokes
e2c91b570d BGE Rasterizer Cleanup: Getting rid of RAS_IRasterizer::RenderText(), and just adding the code to IndexPrimitives_3DText(), which is the only function that uses RenderText(). 2013-11-04 19:21:21 +00:00
Mitchell Stokes
a565e34c39 BGE Rasterizer Cleanup: Removing KX_BlenderGL since it was mostly one-line functions used by KX_BlenderCanvas. KX_BlenderCanvas now just calls those functions directly. 2013-11-04 19:21:16 +00:00
Mitchell Stokes
cf9fe8f329 BGE Rasterizer Cleanup: Removing RAS_IRenderTools and moving the functionality to RAS_IRasterizer. RAS_OpenGLRasterizer is a bit of a mess now with references to Ketsji and other modules it shouldn't be accessing. 2013-11-04 19:21:07 +00:00
Campbell Barton
fc618bbcbf fix for possible leak in the expression controller find identifier. 2013-11-02 05:18:31 +00:00
Campbell Barton
59cdb0d65d fix memory leak with navmesh 2013-11-02 04:22:08 +00:00
Sergej Reich
692693b92f Remove duplicate cmake enries in game engine and compositor 2013-10-25 11:00:16 +00:00
Campbell Barton
830974bc1e fix [#37032] Blener crashes when parent to new object 2013-10-10 20:56:27 +00:00
Campbell Barton
afab39b9d6 code cleanup: use const's for static arrays 2013-10-10 20:22:17 +00:00
Campbell Barton
23440884fe fix for casting shadows of scaled objects was made to X_BlenderRenderTools.cpp but not to GPC_RenderTools.cpp. 2013-10-07 12:14:59 +00:00
Campbell Barton
11087d4a82 remove minor differences between these 2 files which are almost exact duplicates (tsk tsk!) 2013-10-07 12:12:59 +00:00
Campbell Barton
024539b974 revert r58693. patch [#36233], caused regression (bug report [#36959]). 2013-10-07 11:51:59 +00:00
Campbell Barton
43217da6d9 set mempool debug in the game-engine-player too. also remove redundant mempool includes. 2013-10-03 16:34:00 +00:00
Brecht Van Lommel
eaf354e222 Fix related to #36319: restore SDL_VIDEODRIVER=dummy environment variable, it
seems that somehow not having this is causing keyboard events to be caught by
SDL. This was removed because it broke addons that could use SDL, now set the
environment variable only temporary during SDL initialization.

This may have been causing issues with keyboard events getting missed in the
game engine, but I couldn't confirm the issue here.
2013-09-23 14:48:28 +00:00
Mitchell Stokes
cc414943e8 BGE: Fixing a typo in the collision API that was found by agoose77. 2013-09-17 21:00:19 +00:00
Mitchell Stokes
6365678109 BGE: Adding a Python collision API. The initial patch was provided by agoose77, with some edits by me.
KX_GameObject now has a collisionCallbacks list which is a list of callables that are called when a collision occurs. The callables will be called with an argument that contains a reference to the other object involved in the collision (i.e., not self).
2013-09-14 02:02:58 +00:00
Daniel Stokes
494687908c BGE: Potential fix for [#35522] Broken game engine compatibility since 2.66a on some ATI cards?
Disabling display lists for legacy ATI cards since they don't support display lists well.

Also removing an unused variable from the display list rasterizer.
2013-09-11 23:24:45 +00:00
Campbell Barton
108a4c41c4 code cleanup: warnings and redundant checks. 2013-09-08 20:25:31 +00:00
Daniel Stokes
6cc3aec8bc Fixing a problem with variance shadow maps blurring out on transparent receivers in the Game Engine reported by Sam Cameron on the IRC.
Also correcting some slight blurring over time by making sure the color buffer is cleared for shadows.
2013-09-05 22:05:52 +00:00
Mitchell Stokes
eea0b16888 BGE: Removing an unused rendertools argument from BL_ConvertActuators(). 2013-09-05 04:19:05 +00:00
Mitchell Stokes
b9b806e0a0 BGE: Removing the touch sensor and converting all touch sensors to collision sensors. 2013-09-04 22:14:14 +00:00
Mitchell Stokes
07e655dfa6 Cleaning up some prints related to SDL. 2013-08-29 22:48:37 +00:00
Mitchell Stokes
f62fabca3d Allowing the BGE to build with SDL2. I'm not sure if this is the correct fix yet, but at least it builds. 2013-08-29 22:48:27 +00:00
Campbell Barton
4d2b50ad74 remove unused function. also typo 2013-08-27 23:34:16 +00:00
Mitchell Stokes
f7388c1f2e BGE: Cleaning up the vsync code a little. 2013-08-26 08:14:52 +00:00
Campbell Barton
2889448b94 blenderplayer builds again 2013-08-25 21:24:16 +00:00
Campbell Barton
5be5ad039d patch [#36503] BGE Python - Radar and Ray sensor wrong AXIS constants wrong defined
from Jorge Bernal (lordloki)
2013-08-20 13:13:30 +00:00
Bastien Montagne
16ed997d21 Fix build with GE and WITH_CXX_GUARDEDALLOC enabled… 2013-08-19 15:02:28 +00:00
Sergey Sharybin
c0f8e15295 Speedup for guarded allocator
- Re-arrange locks, so no actual memory allocation
  (which is relatively slow) happens from inside
  the lock. operation system will take care of locks
  which might be needed there on it's own.

- Use spin lock instead of mutex, since it's just
  list operations happens from inside lock, no need
  in mutex here.

- Use atomic operations for memory in use and total
  used blocks counters.

This makes guarded allocator almost the same speed
as non-guarded one in files from Tube project.

There're still MemHead/MemTail overhead which might
be bad for CPU cache utilization
2013-08-19 10:51:40 +00:00
Sergey Sharybin
9f7961b6b1 Optimization and threading fix for shapekeys weights calculation
This commit fixes two different issues, which were caused by
how weights are being calculated for relative shapekeys.

Weights for key block used to saved in KeyBlock DNA structure,
which lead to situations when different objects could start
writing to the same weights array if they're sharing the same
key datablock.

Solved this in a way so weights are never stored in KeyBlock
and being passed to shapekeys routines as an array of pointers.
This way weights are still computed run-time (meaning they're
calculated before shapekey evaluation and freed afterwards).

This required some changes to GameEngine as well, to make it
never cache weights in the key blocks.

Another aspect of this commit makes it so weight for a given
vertex group is only computed once. So if multiple key blocks
are using the same influence vertex group, they'll share the
same exact weights array. This gave around 1.7x speedup in
test chinchilla file which is close enough to if we've been
caching weights permanently in DNA (test machine is dual-code
4 threads laptop, speedup measured in depsgraph_mt branch,
trunk might be not so much high speedup).

Some further speed is optimization possible, but it could be
done later as well.

Thanks Brecht for idea of how the things might be solved in
really clear way.

--
svn merge -r58786:58787  ^/branches/soc-2013-depsgraph_mt
2013-08-19 10:36:39 +00:00
Sergey Sharybin
beffaa293e Made modifiers_getVirtualModifierList safe for threading
Move static variables to context filling in by this fcuntion
and owned by a callee function. This ensures no conflicts
between threads happens because of static variables used in
this function.

Also moved modifier types and virtual modifiers data to a
function called from creator. This is needed to be sure all
the information is properly initialied to the time when
threads starts to use this data.

--
svn merge -r57899:57900 ^/branches/soc-2013-depsgraph_mt
2013-08-19 09:05:34 +00:00
Campbell Barton
47c23750e8 style cleanup: indent/whitespace 2013-08-19 01:48:44 +00:00
Brecht Van Lommel
a2541508ac Fix a few compiler warnings reported by clang. 2013-08-18 14:15:51 +00:00
Mitchell Stokes
82c845425f BGE: Adding partial support for LibLoaded lights with GLSL materials.
Any GLSL materials loaded after lights are LibLoaded will now use the lights in
heir shaders. This includes materials loaded from the same scene as the LibLoaded
lights. We could later add a new flag to LibLoad to recompile all existing shaders,
but this commit should offer a lot more flexibility as is.
2013-08-17 04:37:25 +00:00
Mitchell Stokes
51bca0d7dc BGE: Flipping vsync constants so VSYNC_ON is 0.
This will make transitions from older versions of Blender easier since VSYNC_ON
will be the default. This could have been changed in a do_version, but the vsync
code has yet to see an official release, so I figured this would be a bit nicer.
Also, this makes VSYNC_ON the default for new scenes as well.
2013-08-17 02:06:45 +00:00
Mitchell Stokes
196d30e004 BGE: The Action Actuator can now make use of additive blending. 2013-08-14 23:32:00 +00:00
Mitchell Stokes
9afae77fed BGE: Finally adding support for additive layer blending.
Currently this is only for the Python API. The logic brick will be updated in a future commit.
2013-08-14 23:31:49 +00:00
Joerg Mueller
c8f75fb5b1 Adding a new state for sound handles in audaspace: stopped.
Now sounds that stopped playing but are still kept in the device can be differentiated from paused sounds with this state.
This should also fix the performance issues mentioned in [#36466] End of SequencerEntrys not set correctly.
Please test if sound pausing, resuming and stopping works fine in the BGE and sequencer, my tests all worked fine, but there might be a use case that needs some fixing.
2013-08-14 21:21:00 +00:00
Dalai Felinto
eccde9f72a BGE Dome: bugfix - Warp Mesh not working
Fix: to swap the drawing order for the warp mesh polygon
The code was drawing CW instead of CCW.

It would work in some cases where the drawing flags would allow for the
back faces to be visible.

More specifically the alternative fix were:
glDisable ( GL_CULL_FACE );
glFrontFace( GL_CW );

Bug originally reported in the small_planetarium mailing list.
This bug fix was a comissioned job by a group who prefer not to be
credited. Thanks regardless.
2013-08-14 02:59:09 +00:00
Mitchell Stokes
851627f6e0 BGE: Updating the bge.logic.expandPath() documentation to better reflect its current behavior. 2013-08-13 07:48:07 +00:00
Mitchell Stokes
d23b383af0 BGE: Adding a GPU Latency profile category to represent the CPU time spent waiting on the graphics card. 2013-08-13 03:09:58 +00:00
Mitchell Stokes
3627541894 BGE: Fixing the memory leaks reported when the BlenderPlayer exits.
They were caused by not having a free_windowmanager_cb set and by not having registered SpaceTypes, which meant data allocated for thosse SpaceTypes could not be freed. These were solved by defining a free_windowmanager_cb for the player that just frees wmWindows, and by making sure we only allocate memory for registered SpaceTypes.
2013-08-10 21:17:46 +00:00
Daniel Stokes
d17bf45842 As requested by Mitchell Stokes, reverting r58837 as it is causing some problems with the embedded game engine's python execution. 2013-08-10 01:29:23 +00:00
Daniel Stokes
29c8e4512c Adding a fov attribute to KX_Camera. This attribute converts the field of view value and uses it to set lens. 2013-08-07 05:24:47 +00:00
Daniel Stokes
3c8cdb8c68 BGE Fix [#33215] KX_MeshProxy.transformUV() argument ValueError 2013-08-06 21:52:05 +00:00