Commit Graph

364 Commits

Author SHA1 Message Date
Bastien Montagne
5ff3017900 Replacing gettext i18n backend by boost::locale one.
This commit adds a small and simplistic C wrapper around boost's locale library as intern/locale, and heavily simplifies/reduces Blender's own i18n code (under blenfont/ dir). And it adds back UI translation on windows' official builds (with msvc)!

Note to platform maintainers: iconv and gettext (libintl) can now be removed from precompiled libs (not gettext binaries, under windows, of course ;) ).

Note to MinGW32/64 users: boost_locale lib has not yet been uploaded for those build env, please disable WITH_INTERNATIONAL for now (hopefully will be fixed very soon, have contacted psy-fy).
2012-11-11 16:54:26 +00:00
Campbell Barton
5a29885007 code cleanup: bge static functions & use C++ guarded alloc for the character class. 2012-11-09 23:47:06 +00:00
Campbell Barton
ff014a3077 code cleanup: cmake - add missing headers, remove directories from source listing.
also remove logImageLib.c - empty file.
2012-11-03 15:49:38 +00:00
Campbell Barton
25591e958d style cleanup: tabs & whitespace 2012-11-03 15:35:03 +00:00
Bastien Montagne
b5e85cae70 New "dynamic" i18n menu.
Now both UI translation menu (in userprefs) and isocodes are defined in a text file (release/datafiles/locale/languages), parsed at lunchtime. This way:
* No more need to edit Blender code each time we want to add an new language or reorganize the existing menu;
* Translators can easily add a new language for testing, by just editing the text file, so no more need to ask to change Blender code and wait for a new build to see your new translation work in Blender!

Remaining todo:
* Commit i18n py tools
* Update wiki doc!
2012-10-22 14:04:40 +00:00
Campbell Barton
ddc2dbc2a4 style cleanup 2012-10-22 08:15:51 +00:00
Campbell Barton
d599b643b7 style cleanup: bge, switch statements mostly.
also left bmesh decimator on in previous commit.
2012-10-21 07:58:38 +00:00
Campbell Barton
4d4664d98f code cleanup: check for msvc directly when using warning pragma's. 2012-10-15 02:15:07 +00:00
Mitchell Stokes
64b187a928 Blenderplayer: Fixing a crash on startup when the graphics driver tried to use uninitialized memory. I had fixed this previously in Swiss, but it looks like I missed grabbing the fix when bringing the GetViewPort() changes into trunk. 2012-10-14 04:22:38 +00:00
Campbell Barton
97d4fb4161 code cleanup: make header defines more consistent, JOYSENSOR header guard had a typo too. 2012-10-09 13:36:42 +00:00
Mitchell Stokes
244ce92dbd BGE: Setting up the RAS_ICanvas interface as the primary way to alter the OpenGL
viewport. This helps to eliminate OpenGL calls in weird places like the physics
code and to reduce glGet calls, which are expensive.

There should be no functional changes (except maybe a very slight speed improvement).
2012-10-08 03:28:11 +00:00
Mitchell Stokes
99dd59f08c BGE: Disable depth testing when drawing the overhead profile information in the Blenderplayer. This keeps the text from being blocked by geometry in the scene. 2012-10-08 01:25:21 +00:00
Campbell Barton
aa49ca25d5 incorrect spelling in comments 2012-09-26 20:05:38 +00:00
Campbell Barton
2fb8292005 style cleanup 2012-09-16 04:58:18 +00:00
Campbell Barton
04b5ef20f1 style cleanup: indentation 2012-09-06 02:20:03 +00:00
Mitchell Stokes
e5a1b1b526 Fix for [#32469] "standalone blenderplayer no longer starts in lastest build" reported by narutocanada. It looks like the Hive commit (r50310) didn't take changes from r49998 into account, so it was still relying on Ghost events to push the engine along instead of calling app->EngineNextFrame(). 2012-09-04 02:33:37 +00:00
Campbell Barton
aaafa0c2fe code cleanup: move file string defines into BLI_path_utils.h, BKE_utildefines is now unused but keep incase we want to add defines there later. 2012-09-03 22:04:14 +00:00
Benoit Bolsee
53f343edd7 ..\commmit_hive.txt 2012-09-01 21:23:05 +00:00
Campbell Barton
ee96cde864 style cleanup: whitespace 2012-08-26 11:35:43 +00:00
Mitchell Stokes
e4a6602a9a Fix for [#32361] "Blenderplayer quad-buffer maximum 100Hz Fps" reported by HG1.
Allowing the Blenderplayer to break 100fps by making it less dependent on Ghost's messages.
2012-08-18 23:46:37 +00:00
Campbell Barton
b96c622015 style cleanup 2012-08-11 22:12:32 +00:00
Campbell Barton
9b51503307 style cleanup 2012-07-21 22:58:08 +00:00
Campbell Barton
8b865c01cd style cleanup: comments 2012-06-30 22:49:33 +00:00
Campbell Barton
d5032657ed style cleanup 2012-06-06 22:38:39 +00:00
Brecht Van Lommel
e45530ef8f Fix #31366: check to enable opengl quadbuffer stereo was wrong, causing it to
not work and making other stereo modes not work when the graphics card did not
support quadbuffer stereo.
2012-05-09 11:11:35 +00:00
Campbell Barton
34b18fcbc1 code cleanup: BKE_ naming, also make bpy.data.images.load() always load a new image. (not use existing one) 2012-05-05 14:52:04 +00:00
Brecht Van Lommel
885c4a6e78 Fix #31273: videotexture ImageRender not working in blenderplayer. 2012-05-03 14:59:42 +00:00
Campbell Barton
b4a0152e76 code cleanup: float formatting was confusing in some cases - eg: (0.,0.,0.) 2012-04-11 08:15:13 +00:00
Campbell Barton
5b88712ff9 move debug flag into its own global var (G.debug), split up debug options.
--debug
  --debug-ffmpeg
  --debug-python
  --debug-events
  --debug-wm

This makes debug output easier to read - event debug prints would flood output too much before.

For convenience:
  --debug-all turns all debug flags on (works as --debug did before).

also removed some redundant whitespace in debug prints and prefix some prints with __func__ to give some context.
2012-03-31 00:59:17 +00:00
Mitchell Stokes
a308b6c0ec Windows Blenderplayer: The console now closes when the Blenderplayer launches (like it does with Blender). To get it back, use the -c flag, which is finally working as described: "-c: keep console window open" 2012-03-29 01:40:19 +00:00
Campbell Barton
07065b27b8 style cleanup 2012-03-28 05:03:24 +00:00
Campbell Barton
b8a71efeba style cleanup: follow style guide for/with/if spacing 2012-03-24 07:52:14 +00:00
Campbell Barton
89a963fb7f style cleanup: comment blocks 2012-03-09 18:28:30 +00:00
Campbell Barton
640d766370 style cleanup - remove unneeded ';'s 2012-03-08 03:05:57 +00:00
Campbell Barton
7bbf4b7831 style cleanup
- spelling - turns out we had tessellation spelt wrong all over.
- use \directive for doxy (not @directive)
- remove BLI_sparsemap.h - was from bmesh merge IIRC but entire file commented and not used.
2012-03-02 16:05:54 +00:00
Campbell Barton
ea13ec1699 Spelling Cleanup 2012-03-01 12:20:18 +00:00
Campbell Barton
47c373c7a9 style cleanup (mostly whitespace) 2012-02-27 10:35:39 +00:00
Campbell Barton
b8e019d839 use __ prefix on header guards to avoid mixing up defines with api functions / classes. 2012-02-23 10:41:31 +00:00
Benoit Bolsee
2478db9d37 BGE bug #30173: ImageRender not working when initialized on frame 1. This was because the canvas display area was initialized on render frame 1, which happens after logic frame 1. Fixed in blender and player by initializing the area on canvas creation. 2012-02-18 15:25:31 +00:00
Dalai Felinto
91058355cc font objects in blenderplayer fail when object with alpha is rendered
the embed bge has its own DisableForText() routine which prepares the GL flags for the text render.

For some reason blenderplayer is taking a slim approach and going straight for the rendering. This routine helps to address this bug/case (non reported, foundin my own project files). If need arises we should move this to its own routine incorporating the other GL tests the embed bge performs.
2012-02-14 18:23:58 +00:00
Dalai Felinto
17dadffd66 reverting commit [43876] Fix for aliased fonts in the game engine 2012-02-10 06:18:32 +00:00
Dalai Felinto
e90e522942 bugfix [#30127] alpha in FontObjects not working in blenderplayer 2012-02-10 05:10:52 +00:00
Alex Fraser
a05fdb837b Fix for aliased fonts in the game engine.
- Mipmaps are generated in BLF when drawing text in-game. In that case, padding around each glyph is increased to prevent bleeding.
 - Texture filtering is turned on for in-game text.
 - All glyphs are now "twisted": the leading edge is brought a small distance forward, to prevent z-fighting in overlapping (kerned) glyphs. This happens both in the game engine and the rest of the UI, but should have no effect in the UI due to Z-compression in the clipping matrix.
Reviewed and approved by bdiego; see patch [#29882] in the tracker. Tested by dfelinto.
2012-02-04 01:51:59 +00:00
Mitchell Stokes
686ce92fe8 Committing patch "[#27676] Change window size/resolution in realtime" by me.
Description:
This patch allows the user to change the size of the window (or the resolution in fullscreen mode) using the new bge.render.setWindowSize() method. This only works in the Blenderplayer since it doesn't make a whole lot of sense for the embedded player.
2012-01-22 20:25:25 +00:00
Campbell Barton
ae9b4b81cb opengl render save ignored alpha settings. also some FILE_MAX defines missed last commit. 2012-01-16 06:43:58 +00:00
Dalai Felinto
de86d89a9f Cucumber - AA for blenderplayer and fullscreen
..............................................
svn merge ^/branches/soc-2011-cucumber -r 38968,38970,38973,39045,40845

Notes:
======
*  we replaced fullscreen by playerflag in DNA_scene.types.h. So no doversion here, I think this is a small reversion can't see any potential problem in forcuing users to re-check fullscreen. If the file is really old (<250) it will doversion though;

* (for after commit) it would be nice to gray out the width/height when desktop=True

* for a rainy day: it would be nice to have other ghost modes (e.g. screensaver) to support desktop + MSAA as well. It's not a huge deal given that I don't even know if anything else work (apart from windowed, fullscreen and embed) but it doesn't hurt to have it updated as well.

* there is something strange with outliner. I think space_outliner merge-info is not in sync with the ^/ folder. It's probably a wrong merge early in cucumber.

Commit Logs:
===========
# 40845 by dfelinto
remove desktop and fullscreen properties. They are both part of playerflag now
also I removed the fullscreen from the DNA completely. I don't think we need doversion that..

#39045 by kupoman
The Desktop option is now greyed out when fullscreen is not checked rather than disappearing from the UI completely.

#38973 by kupoman
Adding a checkbox to the UI to allow the full screen Blender Player to use the current desktop resolution instead of the resolution setting.

#38970 by kupoman
Multisampling now works in a fullscreen Blender Player.

#38968 by moguri
Committing a patch from Mitchell Stokes (Moguri) to include a setting in the UI for the Blenderplayer multisampling.
2012-01-11 20:53:22 +00:00
Campbell Barton
cda5d1769d minor changes to BLF api use
- replace calls to BLF_width & BLF_height --> BLF_width_and_height
- no need to call strlen() on length value passed to BLF_draw(). this already checks for \0 char.
2012-01-11 05:45:39 +00:00
Mitchell Stokes
ac498a6b64 Cleaning up the GPU_extensions_init/exit() code a bit to keep the Blenderplayer from crashing on exit and restart. 2011-12-23 07:10:01 +00:00
Dalai Felinto
32b23b9f74 Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting

[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]


Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593

36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)

37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.

37157:
Making the bake options available in Blender Game

37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)

37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.

[37517: committed previously]

37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API

39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]

40552: space_logic.py (* fixed an error in space_logic.py *)

40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me



########################################################
code left behind (to be included in next commit):
########################################################
		{
			/* Initialize default values for collision masks */
			Object *ob;
			for(ob=main->object.first; ob; ob=ob->id.next)
				ob->col_group = ob->col_mask = 1;
		}
2011-12-20 03:11:56 +00:00
Campbell Barton
6736576f6d replace FILE_MAXDIR + FILE_MAXFILE with FILE_MAX 2011-11-26 04:07:38 +00:00