Commit Graph

2694 Commits

Author SHA1 Message Date
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
Mitchell Stokes
7ba339ad32 BGE: Adding back the virtual destructor to PHY_IPhysicsController, which was accidentally removed in r54807. 2013-02-24 18:48:57 +00:00
Campbell Barton
963b1c1b16 fix for own commit r54806 with argument order and multisampling. 2013-02-24 10:50:33 +00:00
Mitchell Stokes
ed1d215cea BGE: Removing the source files for the PHY interfaces since they just contained virtual destructors. This means we had license and doc blocks for 3 lines of code, which seemed silly. This also means that ge_phys_common no longer needs to be built as a library. I tested this with CMake and SCons using GCC; hopefully this doesn't break other systems. 2013-02-24 07:09:39 +00:00
Campbell Barton
630a31a900 fix for fullscreen on X11 (used by the BGE, not blender application),
changing the screen resolution wasn't still allowed for larger virtual desktops.

added an exclusive option to ghost so the fullscreen window is ignored by the window manager and we get all events. (common practice for games on X11).
2013-02-24 05:05:29 +00:00
Campbell Barton
c42b51ed96 GHOST/X11 - free memory allocated by XF86VidModeGetAllModeLines(),
Comment from Zr says this crashes but looks like this was because there was no check if the function failed to allocate to begin with.
2013-02-23 23:15:38 +00:00
Campbell Barton
166de48ca4 code cleanup: confusingly written and named function for BGE materuial conversion: getImageFromMaterial() --> getMTexFromMaterial() 2013-02-23 07:36:40 +00:00
Campbell Barton
dddee08f27 code cleanup: bge material conversion was creating STR_String just to check for empty string for no reason (empty string was assigned irrespective). 2013-02-23 07:15:37 +00:00
Campbell Barton
e42e570ff4 BGE: fix for uninitialized tangents 2013-02-23 04:49:46 +00:00
Mitchell Stokes
87ab622463 BGE: Fix for bug #34377 "Multi UV mesh's materials not backwards compatible and Odd UV Coord behavior" reported by Alex Mairs (ctbm). The problem was the unused texture slot was still trying to be used. Now unused texture slots' mappings are set to DISABLE so they don't mess up the rest of the conversion process. 2013-02-23 04:15:47 +00:00
Mitchell Stokes
e4febef1fb BGE: Finally moving material IPOs to the 2.60 BGE animation system (BL_Action). It was kind of a fluke that they worked before. 2013-02-23 02:47:22 +00:00