Commit Graph

411 Commits

Author SHA1 Message Date
Mitchell Stokes
df9d6737b9 BGE code cleanup: Removing OpenGL and bf_gpu code from KX_LightObject
The ultimate goal is to only allow the rasterizer to handle OpenGL and bf_gpu
calls. This commit creates a RAS_ILightObject interface and a RAS_OpenGLLight
implementation.
2014-03-27 22:32:06 -07:00
Mitchell Stokes
9d244e0ad7 Code cleanup: Removing KX_KetsjiEngine::m_drawingmode
The rasterizer is already handling this, and there is
no need to duplicate the data.
2014-03-24 20:11:11 -07:00
Mitchell Stokes
e02b9c8a45 BGE: Adding support for the Cast Only material option.
Note: This does not add support for the option in the viewport.
2014-03-19 23:57:49 -07:00
Mitchell Stokes
eedde311bb Fix T36566: 2D filters broken in the Blenderplayer when using side by side stereo
GPC_Canvas::GetWindowArea() and KX_BlenderCanvas::GetWindowArea() are tracking two
different things. The 2d filter system doesn't actually need the window area and
can get by just using the viewport dimensions, which it now does. The GetWindowArea()
mess should probably be cleaned up.
2014-03-19 23:02:11 -07:00
Campbell Barton
37381ef492 BGE: correct for last commit 2014-02-03 21:41:36 +11:00
Campbell Barton
1dc1d92dab Code cleanup: white space and cmake was broken on all platforms 2014-02-03 13:56:34 +11:00
Campbell Barton
51c32ac199 Revert "Fix T37920: BGE LibLoad failed for meshes with no materials"
This reverts commit 6a473305af22468abfc4c4f8f3002dc0a97fffd7.

Caused T38296, need to investigate this further but for now
better not leave blender in unstable state.
2014-01-23 00:50:01 +11:00
Benoit Bolsee
c7029f06d9 Add new BGE Stereo mode: 3DTV top-bottom.
This mode is designed for passive 3D TV: the viewport is split
horizontally - left eye above, right eye below - but the original camera
viewport is squashed in each half (with half the vertical resolution).
This is necessary to restore the aspect ratio in the 3D output because the TV expands each half to the full screen size.
2014-01-02 00:26:15 +01:00
Campbell Barton
6a473305af Fix T37920: BGE LibLoad failed for meshes with no materials 2013-12-30 15:49:13 +11:00
HG1
d94db03ac8 Style cleanup: BGE 2013-12-24 05:44:54 +11:00
Campbell Barton
d4a11388bf Code Cleanup: warnings 2013-11-22 11:30:40 +11:00
Campbell Barton
0c0bed3b16 Fix: Game Engine regression drawing text from recent cleanup 2013-11-20 00:01:20 +11:00
Thomas Dinges
cbbf6bfe25 * More fixes to make scons / Windows happy. :) 2013-11-04 22:33:02 +00:00
Bastien Montagne
93de84f267 Fix for recent BGE commits, when building with c++ guardedalloc. 2013-11-04 22:22:54 +00:00
Thomas Dinges
ee854a04fa * Fix blenfont scons include after recent GE changes.
Mitchell: Please check if these includes also need to be added in scons: https://projects.blender.org/scm/viewvc.php/trunk/blender/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt?root=bf-blender&r1=61087&r2=61086&pathrev=61087
2013-11-04 22:14:04 +00:00
Mitchell Stokes
efa40ea590 BGE: Fixing up a small issue from merging Rasterizer cleanup code. 2013-11-04 19:22:56 +00:00
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
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
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
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
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
Campbell Barton
4d2b50ad74 remove unused function. also typo 2013-08-27 23:34:16 +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
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
Campbell Barton
c3b9ec82d0 fix for strange error with BGE 2d filter code,
RAS_2DFilterManager::RenderFilters was casting an int to an unsigned int, then doing a subtraction which would give a negative number.
2013-08-03 23:40:15 +00:00
Mitchell Stokes
e131447582 BGE: Making sure m_drawingmode is initialized in the various RAS_Storage constructors. 2013-08-03 05:02:03 +00:00
Mitchell Stokes
29f8dfd37a BGE: Adding vsync control. Users can enable vsync, disable vsync, or use adaptive vsync via UI options in the render properties, or by using the new Python method bge.render.setVsync(). Win32 and X11 support are done via EXT_swap_control. Support for using EXT_swap_control on OS X still needs to be added to Ghost. 2013-07-29 22:31:32 +00:00
Mitchell Stokes
eb21bdd249 Merging changes from trunk r58091-58323. 2013-07-17 01:40:26 +00:00
Mitchell Stokes
5ba2f4367d BGE: adding a fix so 2D filters work properly with side-by-side stereoscopic rendering. 2013-07-15 22:44:48 +00:00
Campbell Barton
02ba328ca8 clang/cmake - quiet warnings for external libs and reference moto as a system include. 2013-07-15 08:26:16 +00:00
Campbell Barton
1f091fd234 add missing gpl headers 2013-07-02 09:47:22 +00:00
Campbell Barton
fad1da062d correct typos in comments. 2013-06-25 22:58:23 +00:00
Dalai Felinto
c72653cca0 BGE bugfix/patch "[#26075] game anaglyph colors are inverted" by Juha Maki-Kanto (kanttori)
Later I will try to find when this bug was introduced. But it's definitively broken in trunk.
2013-06-22 08:04:02 +00:00
Campbell Barton
9fb3d3e032 remove redundant includes from cmake and scons. 2013-05-30 02:16:22 +00:00
Campbell Barton
9cf6e305a9 split bge includes for scons onto their own lines (for easier merging) 2013-05-29 21:56:55 +00:00
Campbell Barton
225c5fee6b move BLO_sys_types.h -> BLI_sys_types.h (it had nothing todo with loading)
remove MEM_sys_types.h which was a duplicate.
2013-05-28 19:35:26 +00:00
Campbell Barton
6de829cb7a code cleanup: split scons includes onto multiple lines, reduce chance of include conflicts later on. 2013-05-20 18:42:28 +00:00
Mitchell Stokes
073d3ba5f7 BGE: Fix for [#34382] "Vertex position doesn't update when set through Python and "Cast Buffer Shadows" is disabled" reported by V.R. (rolle).
The BucketManager was assuming that all modified meshes were rendered when a render pass completed. However, materials that did not cast buffer shadows did not render during the shadow rendering step, and thus were never updated.
2013-05-10 05:13:16 +00:00
Campbell Barton
dee33e8097 fix [#34609] mesh.getVertex doesn't work as spected with poly.getMaterialIndex() and poly vertex indexes
revert r22906 (own old commit, was incorrectly trying to make vertex indices absolute)
2013-05-01 22:41:55 +00:00
Dalai Felinto
43998d6a38 BGE: Extend Framing Mode + Camera sensor
If the "Framing" mode is set to extend,
the camera frustrum changes when you
resizes the blenderplayer window.

Before this patch, there were no way to
control which part of the framing you want
to extend (vertical, horizontal or arbritary).

Now:
If the camera sensor fit is set to HORIZONTAL,
the horizontal field of view doesn't change.
If set to VERTICAL, the vertical fov doesn't change.

If set to AUTO the old behaviour takes place, arbitrarly
showing more of the horizontal or vertical field of view
depending on the aspect ratio of the window.

Test file:
https://svn.blender.org/svnroot/bf-blender/trunk/lib/tests/gameengine/framing_extend.blend

Bugfix supported by NF-UBC Nereus Program as part of the development
of OceanViz/NereusViz
2013-04-18 23:34:32 +00:00
Campbell Barton
3f7f07faf5 style cleanup 2013-04-18 01:52:38 +00:00
Mitchell Stokes
d2b14ed4f0 BGE: Adding mipmapping control to bge.render via bge.render.setMipmapping() and bge.render.getMipmapping(). 2013-04-14 00:40:24 +00:00
Mitchell Stokes
dbf4328f3f BGE: Adding a render.setFullScreen() and a render.getFullScreen() to allow fulscreening games via Python. 2013-04-13 21:09:02 +00:00
Mitchell Stokes
6297eb7da7 BGE: Cleaning up the VBO code to use RAS_TexVert more directly instead of copying out pieces. This also gets rid of MapBuffers, which isn't available in OpenGL ES. Scenes that require constant VBO updates (like my skeletal mesh stress test) are now 10~13% faster. 2013-04-05 01:28:38 +00:00
Campbell Barton
0874237358 code cleanup: bge warnings 2013-04-04 23:16:23 +00:00
Campbell Barton
ab41583bc2 style cleanup 2013-03-29 06:21:28 +00:00