Commit Graph

1114 Commits

Author SHA1 Message Date
Campbell Barton
6883a9bad9 Recent changes broke SDL/GHOST 2015-03-05 21:01:48 +11:00
Mike Erwin
2a5e92c989 cleanup: use GHOST_PRINT instead of stdio
Mostly from my own NDoF stuff.
2015-02-26 21:21:11 -05:00
Mike Erwin
6cb692f48e cleanup: ghost Win32 event processing functions
Removed window arg from key conversion functions.

Removed processModifierKeys declaration since that function was
apparently never implemented.

Using Win32-specific classes instead of their generic superclass -- this
helps in a few cases like WinTab.
2015-02-26 19:53:55 -05:00
Joshua Leung
a6ebc9a813 Compile fixes for mingw64
* m_hDC was always included after m_hWnd in all the constructors and other functions,
  but the order was reversed in the struct, meaning that they would not get initialised
  correctly

* Got rid of the gotos for the error handling case in initializeDrawingContext()
  This was causing "jump to label ... crosses initialisation" errors for the calls
  to get GL version string info (i.e. const char *vendor = ...;  etc.)  I wasn't sure
  if those glGetString calls needed the rest of the context to be defined first, so
  I decided to leave them where they are now, and got rid of the gotos (which were
  making this particular piece of code a bit confusing) instead.


TODO:
There are still a bunch of warnings about around 660, which I haven't managed to solve
(but at least they won't prevent Blender from compiling)

  narrowing conversion of '(stereoVisual ? 1063 : 1061)' from 'int' to
  'DWORD {aka long unsigned int}' inside { } is ill-formed in C++11 [-Wnarrowing]
2015-02-27 13:14:09 +13:00
Mike Erwin
7aa91f5fbc cleanup: ghost Win32 IME
Took out lots of redundant function calls (getters). Also wrapped more
code in WITH_INPUT_IME guards.
2015-02-26 18:40:34 -05:00
Mike Erwin
90cc2643e9 cleanup: spelling & typos
Comments only, no functional change.
2015-02-26 14:12:24 -05:00
Antony Riakiotakis
6a65bc91e2 Minor message fixes - thanks to S.J.Bennett for the heads up 2015-02-25 14:41:54 +01:00
Antony Riakiotakis
df258c9054 Fix silly mistake with flags which would make stereo buffers unsupported 2015-02-25 14:15:07 +01:00
Antony Riakiotakis
5d01db8035 Make the message even more clear in case someone does not know what GPU
is

(we are talking about people who won't have installed a driver -
anything is possible)
2015-02-25 14:09:40 +01:00
Antony Riakiotakis
b5b359b48f Warning messagebox for windows when an unsupported implementation of
OpenGL is detected:

Hoping to decrease the frequency of by far one of the most frequent bug
reports by windows users.

There is some reorganization of the GHOST API to allow easy addition of
further OpenGL options in the future. The change is not propagated too
deep to keep the size of the patch managable. We might reorganize things
here later.

For OpenGL we do two checks here:
One is a combination of GDI generic renderer or vendor microsoft
corporation and OpenGL version 1.1. This means the system does not
use GPU acceleration at all. We warn user to install a graphics
driver and of cases where this might happen (remote connection, using
blender through virtual machine)

The other one just checks if OpenGL version is less than 1.4 (we can
easily change that in the future of course) and warns that it is
deprecated.

Both cases will still let blender startup correctly but users should now
have a clear idea of the system being unsupported.

A user preference flag is provided to turn the warning off.

Now stop posting those bug reports without installing a driver first -
please?
2015-02-25 13:51:53 +01:00
Antony Riakiotakis
fed61d50c7 Debug GPU functionality from soc-viewport_fx by Jason Wilkins
patch number D706 with changes:

- WITH_GPU_DEBUG just creates a debug context (and enables the debug messaging
system functions) but leaves the checks we had intact. Old patch
added the debug functionality only if we had the flag on to save some
performance.

Rationale here is that we might not want to recompile blender just to get
the extra information, and having users start blender with a -d flag to
get the extra information is also useful for bug reports. Those checks already
existed and most expensive ones are hidden behind a debug mode check
so performance should not be that bad.

- Did some cleanup of existing functionality:
When things go wrong blender side, just print the error,
don't check for GL errors first.

- Did not port changes needed for GLES to regular glew.h

- Got rid of duplicate or very similar new functionality.

Generally, code is more moving things around/cleanup and should work exactly
as before apart from the debug context, so it's safe to add even now.

It also provides a nice substitute function for glu error descriptions
2015-02-23 13:35:57 +01:00
Campbell Barton
5ed2cc8070 Fix T43652: X11 "_NET_WM_PID" not set by Ghost
D1107 by @kevindietrich
2015-02-19 09:54:11 +11:00
Campbell Barton
f0527d9631 Ghost/X11 cleanup (reduce variable scope) 2015-02-19 09:54:11 +11:00
Campbell Barton
5eecfbd980 Quiet uninitialized mem use for blank cursor
harmless but may as well initialize.
2015-02-18 10:44:28 +11:00
Bastien Montagne
e63594a6e5 Fix again tablets with linux!
Yes, for me tablets (both wacom and no-name) were again broken - curse X11!
So now, we want ButtonPress, Button1Motion does not work anymore...

Anyway, this patch makes things much cleaner, storing each event type
in its own variable!

Patch by cedricp (Cédric PAILLE) from T43367, thanks a bunch!
2015-02-13 10:57:26 +01:00
Mike Erwin
a19229b80c ndof: detect new 3Dx devices on Linux
Was filtering for Logitech's USB vendor ID. 3Dconnexion now uses their
own vendor ID for new products. Mac & Windows don't look for specific
vendors so they should be fine.

Also added a note to eventually make USE_FINISH_GLITCH_WORKAROUND
available on all platforms.
2015-02-08 15:01:18 -05:00
Mike Erwin
f0f3554e17 GHOST: fewer virtual functions
Reined back over-use of virtual functions in GHOST, especially in
"leaves" of the inheritance hierarchy. This eliminates vtables for many
classes and (in some places) turns virtual function dispatch into direct
function calls.

I'll be around to fix things if other coders think this change is too
much.

Still lots of virtual in GHOST_TaskbarWin32 since it just loves virtual.
2015-02-08 14:18:53 -05:00
Campbell Barton
27cfd291c6 Fix copypaste error in x11 tablet init 2015-02-03 16:37:37 +11:00
Bastien Montagne
0d5ebabe43 Fix T43367: Non-wacom tablets broken on Blender in linux?
Looks like with some versions of Xlib (at least the 1.6.2 currently used on Debian testing)
and/or evdev generic driver (2.9.0 currently on Debian testing), you have to also 'select'
DeviceButton1Motion with the extended tablet's motion event, otherwise you won't get any
tablet motion event once pen is pressed, leading to no pressure (each stroke keeping its
init pressure until the end). Crap!
2015-01-27 16:23:56 +01:00
Campbell Barton
301433fe9d Fix OpenGL Context freeing 2015-01-13 01:44:40 +11:00
Campbell Barton
d8fc404415 Cleanup: style 2015-01-12 18:56:36 +11:00
Jens Verwiebe
e5063b0bd3 Cleanup: OSX: remove obsolete ppc/ppc64 sw-renderer kCGL attributes 2015-01-04 20:42:16 +01:00
Jens Verwiebe
c1f54bcdcc OSX: revive GHOST_HACK_getFirstFile cause it breaks things on older OSX versions.
Dunno exactly why this was done earlier, but propose not to remove code not understood.
2014-12-25 15:12:56 +01:00
julianeisel
c71c7f0e0b Correction for non-Windows SCons compiling fix after IME Merge
As discussed in rB983c71931b1886d4, we should print a warning in case of building on non-Windows and WITH_BF_IME enabled. We also terminate build in this case, so the warning isn't scrolled away. Was worked out together with @sergey.
2014-12-11 00:22:17 +01:00
Campbell Barton
690345a826 Cleanup: spelling 2014-12-08 09:46:21 +01:00
julianeisel
983c71931b Fix non-Windows SCons compiling error after IME merge 2014-12-07 23:57:51 +01:00
Severin
12e5a32557 Forgot to add new files in recent IME commit
Sorry, my bad :/
2014-12-07 18:23:02 +01: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
Jens Verwiebe
6e8a8a72a3 OSX: change previous commit to not only make animation-player window frontmost but whole process 2014-12-06 12:13:28 +01:00
Mike Erwin
036f4e7a38 Cleanup: style from my previous commit 2014-12-06 03:48:41 -05:00
Mike Erwin
c077f5fa08 Fix T42789: support 3Dconnexion wireless devices
SpaceMouse Wireless
SpaceMouse Pro Wireless

Device info is from user reports. I don’t yet have the new devices, so
these are untested but likely to work :D
2014-12-06 02:48:51 -05:00
Jens Verwiebe
825d6adef5 OSX: make sure window of new blender instance is front when playing animation 2014-12-05 18:42:10 +01:00
Alexandr Kuznetsov
dc199369d1 Fix T42426. Add support for UK "`" key.
Because key == OEM_8, there no clear conversion for different keyboard layouts.
Also, we must map key to GhostKey for shortcuts.
2014-11-30 14:44:53 -05:00
Sergey Sharybin
e9645806f5 Fix T42420: Touchpad zoom and scroll gester using touchpad stopped working
Seems to be an own mistake on using Windows API.
2014-11-26 16:46:01 +05:00
Antony Riakiotakis
8d5d6de761 Reuse local view for UVs for previous commit, thanks to Campbell for the
suggestion.

Also minor compile fix after viewport patch
2014-11-14 14:06:39 +01:00
Campbell Barton
08974c22e4 Fix X11/GLX failing with multi-sample
Caused by D643, in fact we need to get the visualInfo before creating the window.
2014-11-14 13:43:22 +01:00
Campbell Barton
9ebe44bc9c Cleanup: cmake 2014-11-13 15:30:32 +01:00
Campbell Barton
577327635c GHOST/X11: correct USE_X11_ERROR_HANDLERS define 2014-11-13 10:58:01 +01:00
Campbell Barton
133f79e449 Cleanup: warnings, typos 2014-10-29 14:15:21 +01:00
Jens Verwiebe
8dbce41706 OSX/GHOST: fix T42305, appswitching not reliable, proposed by Fabio Arnold 2014-10-28 20:44:05 +01:00
Jens Verwiebe
f0d475d3de OSX/GHOST: more little cleanups 2014-10-23 14:40:56 +02:00
Jens Verwiebe
abf7bd8d98 OSX/GHOST: some cleanups 2014-10-23 14:34:56 +02:00
Jens Verwiebe
b6dc15278c OSX: move notification into its own function 2014-10-23 14:20:16 +02:00
Jason Wilkins
88fe896243 Checked each of my (jwilkins) XXX notes.
The ones in extern/glew-es have been changed to NOTE instead of XXX

GHOST_ContextEGL.cpp: It really does seem that it is not possible to query the swap interval using EGL

GHOST_WidnowCocoa.h: The comment referring to Carbon is clearly out of date, so I removed it.

math_geom.c: The node about not using tmax again is correct, but the code is kept for a future maintainer who will need to know how to compute it if they modify that code.

paint_image_proj.c (2698): The question about integer truncation does not appear to have been resolved.  It still seems to be an incorrectly implementation of rounding (I'd suggest using the round function instead of this hack).
2014-10-22 20:03:25 -05:00
Jens Verwiebe
459c5d2045 OSX: as we cannot be sure to have ARC, better release allocated notification 2014-10-22 20:17:04 +02:00
Jens Verwiebe
dfc0afb5b8 OSX/GHOST: use notifications to inform user about a progress reached 100%
The occurance can be controlled in NotificationCenter, todo: move to own function ?
2014-10-22 19:59:16 +02:00
Dalai Felinto
7fb68cf83f Fix python module (bpy) compilation - broken since 8d084e8c
(reported on bf-python mailing-list and in my github (!), let's hope in
the future we get more reports in developer.blender.org instead ;))
2014-10-17 12:00:54 -03:00
Campbell Barton
5918fcb5e7 Cleanup: ws 2014-10-14 17:49:37 +02:00
Jens Verwiebe
11e7679d1c OSX/GHOST: replace spaces with tabs in sesponese to rB424c050a6fc1
New IDE did not take over my former setting for preferring tabs
2014-10-14 17:27:36 +02:00
Jens Verwiebe
e0cacb808c OSX: refinement for last fullscreen condition commit 2014-10-14 13:17:14 +02:00