Commit Graph

366 Commits

Author SHA1 Message Date
Ines Almeida
9bfdcc4d32 gameengine: removing addInitFromFrame hack 2015-02-21 12:16:20 +00:00
HG1
f1a65a9fab makeScreenshot - adding frame number to the filename 2015-02-21 12:16:20 +00:00
Sybren A. Stüvel
2b01b71339 Fix T43565: BGE removed unneeded if/else in BL_KetsjiEmbedStart 2015-02-10 21:28:18 +01:00
Bastien Montagne
31219415d6 Fix BGE compilation after recent renames in BKE_image (tsst...). 2015-01-24 14:57:57 +01:00
Campbell Barton
29d2c71117 Fix for bool flag use 2015-01-07 12:08:55 +11:00
Jason Wilkins
8d084e8c8f Ghost Context Refactor
https://developer.blender.org/D643
Separates graphics context creation from window code in Ghost so that they can vary separately.
2014-10-07 15:47:32 -05:00
Antony Riakiotakis
eb464eed57 Fix game engine not supporting material view.
Force textured view in that case. Also correct a few uses of the GLSL
flag in the viewport. Should only be relevant for textured viewport.
2014-09-23 20:40:27 +02:00
Campbell Barton
10af70cef8 Support for building without Python 2014-06-17 22:00:13 +10:00
Campbell Barton
2645660bed Correct last commit: workaround for BGE 2014-06-03 11:32:45 +10: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
Campbell Barton
3b71cab420 Fix T38110: GameEngine keyboard sensor ignores unicode characters 2014-01-23 14:58:04 +11: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
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
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
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
Mitchell Stokes
f7388c1f2e BGE: Cleaning up the vsync code a little. 2013-08-26 08:14:52 +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
Campbell Barton
78d69a1e15 code cleanup: replace strcpy with BLI_strncpy for fixed size strings, and correct some harmless but incorrect sizeof() use 2013-08-04 18:12:49 +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
Campbell Barton
1448499d70 patch [#36233] Fix Halo and Billboard Normal and Behavior
from Vitor Balbio (vitorbalbio)

Fixes billboard flipping (flipped normals and textures too)
2013-07-28 12:03:53 +00:00
Daniel Stokes
4f8fd8c68b BGE Fix [#18804] Shadow type faces cast onto invisible faces (non-GLSL)
Changing the RayHit method to ignore invisible faces
2013-07-25 23:42:20 +00:00
Campbell Barton
3ff3d1bc0f replace use of strcat() where the string offset is known.
also correct bad logic with converting a textblock to 3d-text, bytes-vs-number of chars wasn't handled right.
2013-07-23 12:49:30 +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
Mitchell Stokes
c3d70a9baf BGE: Fix for [#34185] "billboard scale problem in groups" reported by Tobias Lijsen (blenderhilfe).
Use world scaling instead of local scaling when billboarding so we get all inherited scaling.
2013-06-24 08:26:05 +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
Brecht Van Lommel
feeab1ad53 Fix #34997: when starting the game engine in one window and switching to a second
window, the game would stop drawing in the first and mess up the OpenGL state of
the second.

Also fixes glPushAttrib/glPopAttrib getting out of sync in some cases.
2013-04-18 16:28:39 +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
Campbell Barton
fcf137dbd7 style cleanup 2013-04-08 04:39:09 +00:00
Campbell Barton
0874237358 code cleanup: bge warnings 2013-04-04 23:16:23 +00:00
Brecht Van Lommel
d579ea2901 Fix #34863: bge.render.makeScreenshot from Blender was only saving PNG files,
while the docs said it followed the settings in the Output panel, other file
formats work now.

Benderplayer still only saves PNG now as documented, but I cleaned up the code
there to reuse existing imbuf functions rather than using own libpng code.
2013-04-04 14:00:31 +00:00
Campbell Barton
64d161de87 style cleanup:
also rename mesh_getVertexCos() --> BKE_mesh_vertexCos_get() to match curve function.
2013-03-26 07:29:01 +00:00
Campbell Barton
0807c976f4 code cleanup: rename BKE_mesh_to_curve_ex --> BKE_mesh_to_curve_nurblist,
also correct odd indentation.
2013-03-15 10:48:48 +00:00
Campbell Barton
c36f20a7d2 style cleanup 2013-03-08 04:00:06 +00:00
Brecht Van Lommel
4f3ca854e1 Fix various warnings with clang build, and adjust cmake clang warnings flags
to include a few more that gcc is using too.
2013-02-26 21:58:06 +00:00
Dalai Felinto
2ecf27f56f BGE projection code fix: old patch #28893 (to fix #28753) committed in rev.41131 changed the clipping for ortho camera from -far +far to +near +far. But also introduced this -far +far when using 3dviewport camera (which shouldn't). 2013-02-22 01:48:53 +00:00
Campbell Barton
9da4cab9fd style cleanup: comment format 2013-02-02 04:48:21 +00:00
Dalai Felinto
3a1ee13278 BGE Profile : visual feedback bars and improvements
You can see a screenshot of the funcionality here:
http://wiki.blender.org/index.php/Doc:2.6/manual/Game_Engine/Performance/Display/Framerate_and_Profile

This patch creates a bar-like graph to quickly allow the game dev to see the performance changes.
Also it changes the font to monospace (too allow ' ' padding) and reduced shadow border to
match the blenderplayer one.

Patch finalized and commited at Global Game Jam Vancouver (last one, time to sleep forever now)
2013-01-28 01:26:36 +00:00
Campbell Barton
69ddc5eb99 make bullet optional again 2013-01-23 07:26:39 +00:00
Campbell Barton
c2839bfe76 add option WITH_SYSTEM_BULLET to link against the bullet installation found on the system.
Note: this doesn't work yet for everything with latest stable bullet (2.81), need to look into why and likely apply some patches upstream.
However I managed to link blender by disabling some features, likely it can be made to work without too much trouble.
2013-01-03 00:23:52 +00:00
Mitchell Stokes
62b6303735 BGE: Fixing an assert with the canvas' GetViewPort(). bf_gpu was changing the viewport when handling shadow buffers. KX_LightObject::BindShadowBuffer() now updates the canvas with the new viewport information from bf_gpu. 2012-12-25 06:20:50 +00:00
Mitchell Stokes
a1c9241797 BGE: "Fix" for issue [#33663] "Objects Share Materials / Textures When Grouped In SingleTexture / MultiTexture Mode" reported by Josiah Lane (solarlune).
This commit adds a UI option in the Render properties to enable the new material caching in the converter. This caching can cause problems with Singletexture and Multitexture materials when texface is being used to handle materials. By default this option is enabled and users with broken games have two options:

  1) Fix up their materials so they are properly using textures
  2) Disable the material caching and take a speed hit during conversion time

Regardless of the setting, caching is always enabled for GLSL materials.
2012-12-24 03:13:53 +00:00
Sergey Sharybin
851cb9b345 Added support of J2K codec for Jpeg2000 writing
This codec is absolutely needed to generate DCP using OpenDCP,
before that external application to convert JP2 to J2K was used
which slowed down export a lot.

New codec is exposed to image format settings panel and called
Codec. Default one is JP2 which creates files with .jp2 extension,
new one is called J2K which creates with .j2c extension.

Other changes:
- Fixed avi jpeg warning which was treating as error here.
- Made it so extension is detecting from ImageFormatData instead
  of image file type, which makes it possible to have different
  extension for the same file type depending on it's settings.

  IRIS format should still be changed (depending on number of
  channels it'll be .bw, .rgb or .rgba extension)

- Default image format settings would be set from image buffer
  when re-saving it. Makes it possible to easily open .j2c file
  and save it using J2K codec (without this change it'll save as
  .jp2 using JP2 codec)
2012-12-23 13:57:09 +00:00
Campbell Barton
0ddc77f913 code cleanup: warnings 2012-12-19 01:48:54 +00:00
Mitchell Stokes
ef0473994b BGE: Some as of yet unmerged work I did in the Swiss branch. These changes include:
* Cleaning up the conversion code to avoid a per-face material conversion. Materials are now stored in buckets and only converted if a new material is found. This replaces some of Campbell's earlier work on the subject. His work wasn't as thorough, but it was much safer for a release.
  * Shaders are only compiled for LibLoaded materials once. Before they could be compiled twice, which could really slow things down.
  * Refactoring the rasterizer code to use a strategy design pattern to handle different geometry rendering methods such as immediate mode, vertex arrays and vertex buffer objects. VBOs are added, but they will be disabled in a following commit since they are still slower than vertex arrays with display lists. However, VBOs are still useful for mobile, so it's good to keep them around.
  * Better multi-uv support. The BGE should now be able to handle more than two UV layers, which should help it better match the viewport.
2012-12-18 20:56:25 +00:00
Bastien Montagne
ab2c273b12 Added GPL header to sconscripts!
Also changed shebang to '#!/usr/bin/env python', this is more portable across unixes...
2012-12-17 08:01:43 +00:00
Mitchell Stokes
5ce13d0c6c BGE: Fixing the double-click issue for mouse events too. The previous fix only fixed double-click keyboard events. 2012-11-29 05:21:24 +00:00
Mitchell Stokes
936fca57c3 BGE: Fix for [#33027] "logic.keyboard polling rate extremely low" reported by Josiah Lane (solarlune). The embedded player now treats KM_DBL_CLICK the same as KM_PRESS. 2012-11-27 17:41:39 +00:00