Commit Graph

2704 Commits

Author SHA1 Message Date
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
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
Campbell Barton
3f7f07faf5 style cleanup 2013-04-18 01:52:38 +00:00
Mitchell Stokes
8051ab07fc BGE: Cleaning up BL_ShapeDeformer's use of Blender's Key. This also fixes a bug with replicas (added objects) crashing when using shape keys. 2013-04-14 18:54:06 +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
Dalai Felinto
1c80388a73 bge fix: framing mode "Expanded" not updated when resizing blenderplayer
now, with a 'resize' routine for the engine we can/should also recreate some
buffers that are created only at init time (e.g., 2d filters, dome fbos, ...).

This bug was always present in Blender (since 2.49 at least).

Bugfix supported by NF-UBC Nereus Program as part of the development
of OceanViz/NereusViz
2013-04-12 01:52:30 +00:00
Campbell Barton
502ddd3128 code cleanup: warnings and style. 2013-04-12 00:50:40 +00:00
Campbell Barton
8c1cb10cfd code cleanup: unused vars, make other vars static. 2013-04-10 22:49:50 +00:00
Campbell Barton
fcf137dbd7 style cleanup 2013-04-08 04:39:09 +00:00
Thomas Dinges
858ff6b696 Fix for [#34898] Typo in error message of mathutils.Vector
* Also fixed some more cases of "more then" -> "more than".
2013-04-07 15:09:06 +00:00
Mitchell Stokes
7bdb7331b5 BGE: KX_Camera.getScreenVect() was using glReadPixels to get a depth value, which was causing a sync event between the gpu and cpu. glReadPixels was always returning 0, so I removed it and set depth to be a constant 0. 2013-04-07 00:13:04 +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
dee2f0c9ac correction to previous warning cleanup, also quiet shadow-warning for thumbnail size 2013-04-05 00:10:33 +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
Mitchell Stokes
966e86cd2d Fix for [#34754] "Revision 55527 provokes glitchy GLSL shadow map rendering" reported by Alain Ducharme. Per material uniforms and per object uniforms are now better separated. 2013-04-04 03:55:43 +00:00
Campbell Barton
ab41583bc2 style cleanup 2013-03-29 06:21:28 +00:00
Campbell Barton
d15d78a33a style cleanup: osl and NULL pointer use, also correct sequencer gap operator id's 2013-03-27 20:27:07 +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
e1a54214bb code cleanup:
- remove unused defines.
- quiet some shadow warnings.
- bevel, ifdef out some asserts that are too common.
- style
2013-03-25 02:41:30 +00:00
Campbell Barton
92d7955d13 fix for struct definition building with msvc2008 and some style cleanup. 2013-03-24 01:19:55 +00:00
Mitchell Stokes
1356e3b490 BGE: getting rid of a few maybe-uninitialized warnings. 2013-03-23 03:04:02 +00:00
Campbell Barton
dad877bc3b fix for BGE crash replicating a navmesh. 2013-03-22 20:19:55 +00:00
Campbell Barton
9379dcb507 code cleanup: unused defines, shadowing and unintended enum-as-variable. 2013-03-22 14:31:03 +00:00
Campbell Barton
dd0e2da784 code cleanup: use booleans and const's for operator vars. 2013-03-22 04:40:45 +00:00
Dalai Felinto
5ef9a20671 BGE bugfix for [#34505] Vertex Colors not working in the BGE (for custom GLSL shaders) when multitexture and no material
Bug introduced on rev.36723
2013-03-21 23:20:46 +00:00
Campbell Barton
f254ba77fd code cleanup: conversion from blender to BGE was unnecessarily confusing in checking weather to use vertex colors,
move check to function.
2013-03-21 23:11:52 +00:00
Dalai Felinto
6d8b3d2d94 BGE bugfix: [#34550] getVertexArrayLength changed in 2.66
This bug was producing way more geometry than we need. Potentially
memory saver (or performance even) bugfix.

Bottomline is:
We need to initialize the UVs otherwise vertex comparison fails ...
Ideally MoTo should take care of initializing MT_Point2
(note in Windows that seems to be fine, but it's safer to not rely on that)
2013-03-21 21:10:14 +00:00
Mitchell Stokes
e6020cd320 BGE: Adding a getProfileInfo() function to bge.logic. This function returns a Python dictionary with the same information as the on screen profiler. 2013-03-19 04:51:37 +00:00
Dalai Felinto
4a5a5f2968 bge bugfix: [#34677] Setting Boolean property on KX_GameObject creates Int type
we need to check for booleans before testing for longs.
2013-03-18 22:52:43 +00:00
Campbell Barton
655ed9cc7f style cleanup 2013-03-18 11:44:56 +00:00
Campbell Barton
09c41019a8 use const pointers for file loading and booleans for animation system return values passed as pointers. 2013-03-17 19:13:04 +00:00
Campbell Barton
16b82845ee code cleanup: add 'const' to headers to quiet msvc warnings, also remove (char *) casts that aren't needed now we're on Python3.3 2013-03-17 18:30:31 +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
Irie Shinsuke
5792e77239 Patch [#34373] Use i18n monospace font in Text editor and Python console
This patch allows Blender to display i18n monospace font in the text
editor and the Python interactive console. Wide characters that occupy
multiple columns such as CJK characters can be displayed correctly.
Furthermore, wrapping, selection, suggestion, cursor drawing, and
syntax highlighting should work.

Also fixes a bug [#34543]: In Text Editor false color in comment on cyrillic

To estimate how many columns each character occupies, this patch uses
wcwidth.c written by Markus Kuhn and distributed under MIT-style license:

  http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c

wcwidth.c is stored in extern/wcwidth and used as a static library.

This patch adds new API to blenfont, blenlib and blenkernel:

BLF_get_unifont_mono()
BLF_free_unifont_mono()
BLF_draw_mono()
BLI_wcwidth()
BLI_wcswidth()
BLI_str_utf8_char_width()
BLI_str_utf8_char_width_safe()
txt_utf8_offset_to_column()
txt_utf8_column_to_offset()
2013-03-12 07:25:53 +00:00
Campbell Barton
7d585ed475 patch [#34103] check_for_dupid.patch
from Lawrence D'Oliveiro (ldo)

- more comments
- more uses of bool type
- define symbol for length of in_use array in check_for_dupid
2013-03-10 05:46:24 +00:00
Campbell Barton
c36f20a7d2 style cleanup 2013-03-08 04:00:06 +00:00
Sergej Reich
643b0be4cb bullet: Update to current svn, r2636
Apply patches in patches directory, remove patches that were applied
upstream.
If you made changes without adding a patch, please check.

Fixes [#32233] exporting bullet format results in corrupt files.
2013-03-07 17:53:16 +00:00
Campbell Barton
f2bb536994 code cleanup: also change BKE_blender.h BLENDER_VERSION_CHAR to 'a' so as not to confuse things. 2013-03-05 14:47:49 +00:00
Campbell Barton
f44b54d2a7 patch [#34103]
from Lawrence D'Oliveiro (ldo)

More use of bool type, necessitating adding inclusion of BLI_utildefines.h, or moving it up in the inclusion order if it was already included, in various places
- storage.c: make some variables only used in bli_builddir local to that
- storage.c: BLI_file_descriptor_size should allow 0 as a valid file descriptor
- path_util.c: make pointers to non-reentrant storage returned from folder routines const, necessitating making variables holding these returned pointers const elsewhere as well
- path_util.c: BLI_string_to_utf8 closes iconv context in case of conversion error
-  blf_lang.c: fill_locales routine now has its own "languages" local variable to construct paths (was stealing internal storage belonging to BLI_get_folder before)
2013-03-05 03:17:46 +00:00
Dalai Felinto
8ea7b742f6 bge bugfix: [#34517] 2D Filter causes mouselook script drifting effect (patch by Daniel Stokes - Kupoman)
Fix for 2.66a

""We can't pass the results of canvas->GetViewPort() directly because canvas->SetViewPort() does some extra math""
Bug introduced during 2.65 series in the refactor to use canvas->SetViewPort instead of direct opengl calls for viewport
(53305, 53392, 53393)
2013-03-04 08:45:42 +00:00
Dalai Felinto
a3b47ede17 BGE bug-fix[#34523] 2dfilter produces render error (objects disappear) - likely an alpha problem
Fix for 2.66a

With help from Daniel Stokes and Mitchell Stokes.

This bug always existed in OSX, but started showing up in Windows and Linux on review (54745 + 54747)
[the patch to enable alpha buffer for all OSs]

A better fix would be to use RAS_IRasterizer::SetAlphaBlend(GPU_BLEND_SOLID);
but I think gpu_verify_alpha_blend() is not switching to SOLID because
GTS.alphablend is GPU_BLEND_SOLID (even though GL_ALPHA_TEST is enabled).

Anyways, this is not something worth tackling now, since in terms of functionality it shouldn't matter.
2013-03-04 08:22:20 +00:00
Campbell Barton
2921d48239 code cleanup: unused vars in collada, preprocessor formatting & warning in mingw.
also compiling without bullet needed a stub added.
2013-03-04 00:53:57 +00:00
Mitchell Stokes
db6d34daad BGE: Fix for bugs #34428, #20856, #20281. These were all multi-uv bugs caused by the BGE keeping too much uv information. When setting up shaders the BGE assumes each UV layer is unique, but the converter would store duplicates. 2013-03-02 18:05:52 +00:00
Brecht Van Lommel
2822a14e5d Fix #34483: game engine multi UV glsl materials not working correct after changes
to support more than 2 UV maps. This code indirectly depended on the order of
OpenGL attribute ID's assigned by the OpenGL driver being the same as the
attributes being declared in the GLSL shader code, which is not always the case.
2013-03-01 20:45:42 +00:00
Campbell Barton
0dd6988a1e add PHY headers to cmake's ketsji (else some IDE's won't show) 2013-02-26 23:08:42 +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
Nathan Letwory
04c1a7f1bc Check if the variable is a string and split nicely, so compile command stays intact with proper include options. 2013-02-25 12:03:55 +00:00
Mitchell Stokes
2f2c0a6b02 BGE: Fixing a crash reported by Ace Dragon on BA. It looks like Object->totcol can give a number higher than the number of materials, so I've added some NULL checks. 2013-02-25 05:55:37 +00:00