Commit Graph

77 Commits

Author SHA1 Message Date
Benoit Bolsee
8529b2f925 BGE: alpha on frame buffer and precedence of MSAA over swap.
A new option '-a' can be passed to the blenderplayer. It forces the
framebuffer to have an alpha channel.
This can be used in VideoTexture to return a image with alpha channel
with ImageViewport (provided alpha is set to True on the ImageViewport
object and that the background color alpha channel is 0, which is the
default).
Without the -a option, the frame buffer has no alpha channel and
ImageViewport always returns an opaque image, no matter what.
In Linux, the player window will be rendered transparently over
the desktop.
In Windows, the player window is still rendered opaque because
transparency of the window is only possible using the 'compositing'
functions of Windows. The code is there but not enabled  (look for
WIN32_COMPOSITING) because 1) it doesn't work so well 2) it requires
a DLL that is only available on Vista and up.

give precedence to AA over Swap copy:

Certain GPU (intel) will not allow MSAA together with swap copy.
Previously, swap copy had priority over MSAA: fewer AA samples would be
chosen if it was the condition to get swap copy. This patch reverse the
logic: swap copy will be abandonned if another swap method (undefined or
exchange) will provide the number of AA samples requested. If no AA
samples is requested, swap copy still has the priority of course.
2016-06-09 22:15:13 +02:00
Campbell Barton
dc14629b26 GHOST: rename suffix X11 to Unix for non X11 files
We may use these for Wayland or SDL back-ends.
2015-11-16 21:57:05 +11:00
Mike Erwin
c3cec828e8 ndof: rework Mac driver glue
Load driver dynamically at runtime instead of weak-linking the
3Dconnexion framework. Driver no longer needed at build time!

Works with really old drivers (as in PowerMac old), more recent
versions, and the latest which allows us to process events on a
separate thread.
2015-10-25 21:19:26 +01:00
Campbell Barton
63ab5b0883 Fix for building win32 headless 2015-03-21 02:17:27 +11:00
Severin
e81d077c85 Input Method Editor (IME) support for text buttons
Original patch by @random (D765) with some minor work done by @campbell
and me.

At this place, I'd like call out a number of people who were involved and
deserve a big "Thank you!":
* At the first place @randon who developed and submitted the patch
* The Blendercn community which helped a lot with testing - espacially
* @yuzukyo, @leon_cheung and @kjym3
* @campbellbarton, @mont29 and @sergey for their help and advises during
* review
* @ton who realized the importance of this early on and asked me for
* reviewing

We are still not finished, as this is only the first part of the
implementaion, but there's more to come!
2014-12-07 00:58:17 +01:00
Campbell Barton
9ebe44bc9c Cleanup: cmake 2014-11-13 15:30:32 +01: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
Campbell Barton
ea9d94cf28 Spelling 2014-08-06 05:41:14 +10:00
Jens Verwiebe
37f45454d3 Fix linking for non-apple ndof 2013-11-05 15:48:26 +00:00
Jens Verwiebe
4df23896e5 OSX: removing useless cocoa conditionals as it's solely api now 2013-11-05 14:35:09 +00:00
Jens Verwiebe
e83f169da1 OSX/cmake: ghost carbon removal 2013-11-05 14:09:17 +00:00
Campbell Barton
4aa02d8038 patch [#37188] Remove filename entry specified twice
from Lawrence D'Oliveiro (ldo)
2013-10-25 05:21:17 +00:00
Campbell Barton
811669c14e minor style clanup and use more meaningful name for 3DCONNEXION source code. 2013-09-14 12:04:10 +00:00
Jens Verwiebe
e05fc7bb2f Cleanup for last commit 2013-09-13 21:42:52 +00:00
Jens Verwiebe
c446015974 Fix broken compiling with ndof on linux and win 2013-09-13 21:21:53 +00:00
Jens Verwiebe
3596ab932c OSX: Compilefix for ndof symbols get magled when used extern C, now use discrete c files embedded, patch by Jake Kauth 2013-09-13 15:18:17 +00:00
Antony Riakiotakis
ac8e379a87 Fix linking issue, we use bundled static glew so we should define static glew in ghost as well. 2013-07-31 22:39:17 +00:00
Alexander Kuznetsov
b9817cd207 Live resize on Windows. Based on Ton's patch for mac.
Removing old resize stuff. 
Windows has resize lag, which creates black gap with openGL. Still looking to fix it.
2013-05-25 21:59:34 +00:00
Alexander Kuznetsov
f652b11ed1 Live window resizing on Windows
Custom implementation for resizing (GHOST_SizerWin32)

Some things still don't work:
* esc cancel
* max windows size
* aero (sizing) snap on win7

hbrBackground = 0 to disable clear screen.

Thanks to dfelinto for help in finding of root cause.
2013-04-09 17:21:05 +00:00
Campbell Barton
76b7afd909 removing xinerama on X11 dependency, this wasn't working very usefully. 2013-02-07 14:10:01 +00:00
Campbell Barton
dbf54dacf7 Add Xinerama support for GHOST_GetMainDisplayDimensions() so X11 works as it should (previously would include all monitors).
Now the active monitor size is used on startup. 
Currently the cursor position is checked for intersection with the monitor bounds to find the active screen.
2013-01-31 11:05:09 +00:00
Jens Verwiebe
4ec5a42456 OSX/cmake: little cleanup in ghost 2012-11-10 13:53:58 +00:00
Campbell Barton
606d76f07d fix for building blender as a python module on windows. 2012-06-15 20:59:00 +00:00
Brecht Van Lommel
942fcf4415 Unix: enable use of XDG paths for storing Blender configuration on Linux/BSD/..,
starting from version 2.64. Unless you have a special system setup, this means the
will be in ~/.config/blender rather than ~/.blender.

When the version number is changed to 2.64, the "Copy Previous Settings" operator
in the splash will copy the settings to the new location.

XDG base directory specification:
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
2012-05-25 12:08:29 +00:00
Campbell Barton
3bbfbfe4b1 dont use sdl include when building headless 2012-05-11 14:17:49 +00:00
Alexander Kuznetsov
f11a6d3a84 Adds support for utf paths on Windows.
Not all file formats/calls are supported yet. It will be expended.

Please from now on use BLI_fopen, BLI_* for file manipulations.
For non-windows systems BLI_fopen just calls fopen.
For Windows, the utf-8 string is translated to utf-16 string in order to call UTF version of the function.
2012-03-20 02:17:37 +00:00
Sergey Sharybin
9def83f7e0 XDND support now can be disabled using WITH_GHOST_XDND=OFF with CMake and WITH_GHOST_XDND=False with SCons
Disabled on FreeBSD platforms due to some linking errors.
2012-02-17 20:51:39 +00:00
Sergey Sharybin
e8a1daaf9b Drag-n-drop support on Linux
This commit implements drag-n-drop support from external applications into Blender.
Used xdnd implementation from Paul Sheer.
2012-02-17 16:58:09 +00:00
Alex Fraser
c2bb285750 Mode switching for GHOST under X11: adds the ability to change screen resolutions in the blenderplayer on GNU/Linux.
Code ported from Quake 2.
2012-01-02 12:25:14 +00:00
Campbell Barton
4293f4738c patch [#28947] Patches for #28943 (Support for XDG Base Directory Specification)
from Cosme
2011-11-02 22:00:22 +00:00
Campbell Barton
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
Campbell Barton
e4c299d975 comment warnings as errors for MSVC - it too easily made small problems like unused vars into errors which gets annoying for non developers.
with GCC we have *some* warnings as errors which works out better.
2011-09-27 12:08:35 +00:00
Campbell Barton
0160901c90 - update X3D and FBX testing checksums
- building with GHOST/SDL now adds the PREFIX
- image.external_edit operator errors out if the filepath isnt set (was annoying and loaded gimp while running tests)
2011-08-08 03:31:25 +00:00
Sergey Sharybin
d4909c5628 - Do not add GHOST_NDOFManager.cpp to list of sources if
NDOF is disabled in CMake.
- Added "default" section to switch in sendMotionEvent.
  It's what strict gcc rules don't like much and it's
  And it's good practice in general, imo.
2011-08-03 07:30:24 +00:00
Campbell Barton
baa37b1b46 more cmake/x11 edits
- added includes for spnav
- added FindSpacenav.cmake which allows using spacenav from a nonstandard path.
- remove NDOF_LIBPATH, use a full library path instead.
2011-08-02 06:32:53 +00:00
Campbell Barton
fcd7d2b486 NDOF related edits
- fix for building without NDOF on X11
- quiet some warnings
2011-08-02 05:52:27 +00:00
Nathan Letwory
eea7c358c7 svn merge -r37276:38555 https://svn.blender.org/svnroot/bf-blender/trunk/blender . 2011-07-21 09:40:59 +00:00
Campbell Barton
5792bd7cc7 cmake: cleanup include paths, some duplicates and going up some unneeded dirs. 2011-07-17 09:11:13 +00:00
Campbell Barton
410c5e3cd2 cmake source definitions:
remove missing includes and use more strict formatting.
2011-07-16 23:01:14 +00:00
Campbell Barton
cf485cd963 Advanced CMake option to build the player without blender: WITH_BLENDER 2011-07-13 08:15:06 +00:00
Campbell Barton
44e45e54c5 - don't build ghost's event printer unless ghost debug is enabled.
- use char rather then STR_String for the event printer.
- added option to build WITH_GHOST_DEBUG for cmake
- renamed WITH_SDL_GHOST --> WITH_GHOST_SDL
2011-07-13 06:04:54 +00:00
Campbell Barton
f7b9418d25 build option to use SDL 1.3 for GHOST rather then X11/Win32/Cocoa api's,
This opens up the option for blender to be more easily ported to other devices, OS's.

TODO
- continuous grab.
- text glitch with multiple windows (was a bug in X11 too for a while, will check on this)
2011-07-12 13:17:54 +00:00
Mike Erwin
30b4ff8949 first attempt at CMake fix (untested) 2011-06-27 23:24:24 +00:00
Campbell Barton
4a59928484 CMake option 'WITH_HEADLESS' to build blender in headless mode (no x11/xlib) with NULL ghost classe. 2011-06-04 14:12:55 +00:00
Campbell Barton
09da9d4393 cmake maintenance
blender_add_lib now takes a separate include argument to suppress warnings in system includes (mostly ffmpeg & python).
also only build wm_apple.c on apple+carbon configuration.
2011-05-31 01:15:44 +00:00
Campbell Barton
1e0c3d315b minor cleanup, no functional changes. 2011-05-09 14:41:44 +00:00
Campbell Barton
ca254dd37b add option WITH_BUILTIN_GLEW, so linux packagers can disable to use their own glew library. 2011-04-05 23:31:01 +00:00
Campbell Barton
06b04fa886 dont return a system path if cmake's 'WITH_INSTALL_PORTABLE' is enabled. this way portable builds wont find scripts in /usr/share. 2011-03-25 05:23:58 +00:00
Campbell Barton
5f8fa29755 add cmake option to build without xinput (tablet support) 2011-03-25 04:56:48 +00:00
Guillermo S. Romero
c37884b015 Add XF86keysym.h detection and use to CMake system, for r34983. 2011-02-19 23:51:55 +00:00