Commit Graph

548 Commits

Author SHA1 Message Date
Alexander Kuznetsov
6e788c37df Hides console on win32 even if python path is 2 or more lines
Adding tlhelp32.h header
2011-07-30 19:09:34 +00:00
Ton Roosendaal
681b26a48e Bugfix #28109
Old issue with OSX Cocoa code: shift+scrollwheel should send
a 'horizontal wheel' event to Blender. Blender only recognizes
scroll events in general though. The old code then just didn't
send an event at all, not passing on shift+scrolls.

Now the scroll event is sent anyway, relying on Blender's
keymapping to define what to do with shift+scroll.

This fixes things like shift+scroll to scale ListBox widgets.
2011-07-30 10:14:50 +00:00
Alexander Kuznetsov
6b987910e4 Patch [#27925] by Andrew Cox and me
Modifier key sticks after Alt-tab on Win32
2011-07-29 20:21:37 +00:00
Dalai Felinto
1f5d60ba01 patch: [#27783] "Problem with clock" at 18:39:00 by Daniel Dionne (mrzeon)
the overflow of the clock was causing crash in the game engine in Linux.
(on June 11 2011, 18:39:00 GMT)

running to the "where is waldo (wally)" bug award of 2011.
2011-07-18 22:28:42 +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
0fc6aac3dc make X11's getModifierKeys more compact and don't run XKeysymToKeycode 8 times for call. 2011-07-13 05:22:21 +00:00
Guillermo S. Romero
74494dbcd2 SVN maintenance. 2011-07-13 00:49:22 +00:00
Campbell Barton
41f37cff93 changes to ghost/sdl
- mouse coords made absolute
- window position set
- building with SDL 1.2 gives an error.
2011-07-13 00:31:08 +00:00
Sergey Sharybin
9eb1b26312 Fix for recent GHOST SDL commit.
SCons rules haven't been changed to deal with new option.
2011-07-12 18:39:46 +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
Campbell Barton
b90535cc33 correction to cursor enum and make GHOST_SystemX11's convertXKey into a static function. 2011-07-12 12:53:23 +00:00
Campbell Barton
65d1e27ff5 fix for using uninitialized value in gpu_shader_material 2011-07-09 19:16:32 +00:00
Campbell Barton
c50b5ee320 ghost multi-test builds again, now uses BLF font library 2011-07-09 16:18:15 +00:00
Brecht Van Lommel
e7878389bb Fix #27865: weird mouse warping with continuous grab on OS X. 2011-07-05 20:15:29 +00:00
Brecht Van Lommel
e15fd7df6c Patch #27829: fix X11 compile problem due to missing XF86XK_AudioForward define
on Debian Lenny. Patch by "dungeoneer".
2011-07-05 19:10:28 +00:00
Campbell Barton
5913179f85 CMake file to build ghost tests again. 2011-07-03 16:17:38 +00:00
Campbell Barton
228be10722 fix for building headless 2011-07-01 15:15:22 +00:00
Brecht Van Lommel
24c0f1873e Fix part of #26850: Cocoa OS X game player was not working, two issues:
* Unlike blender, the game player draws only on windows update callbacks,
  and those wer not implemented.
* Going fullscreen for player was not implemented correct, it expected an
  existing window but actually it should create one.
2011-06-27 13:57:27 +00:00
Brecht Van Lommel
da79ab5acc GHOST Cocoa: some changes to Y coordinate conversion in previous commit,
to fix continuous grab being broken (bug report #27760).
2011-06-25 02:10:13 +00:00
Brecht Van Lommel
c518aa1383 GHOST Cocoa: move y origin top/bottom conversions out of windowmanager module
and into GHOST. Also fixes a problem where e.g. the user preferences window
would not open under the mouse cursor correctly.
2011-06-23 19:55:47 +00:00
Guillermo S. Romero
a79072c80d SVN maintenance. 2011-06-05 00:10:20 +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
d635a2b143 Disabling xinput wasn't done completely. 2011-05-28 15:34:02 +00:00
Brecht Van Lommel
1e00590f1c Fix #26728: crash with load/save on Mac, on files that close & open a window
when loading them. Custom cursor shown during load was not freed correctly
when closing the old window, which resulted in unpredictable crashes later on.
2011-05-23 15:56:26 +00:00
Sergey Sharybin
57c626d11c Forgot to close clipboard when lock fails.
Thanks to jesterKing!
2011-05-12 18:04:24 +00:00
Sergey Sharybin
1d6278f80a Fix #27359: Pasting long text crashes blender
Actual problem was caused by insufficient buffer size
in ui_text_leftclip()

Also fixed possible invalid memory write in GHOST_SystemWin32::getClipboard
which was caused by accessing clipboard buffer after closing
clipboard. This mustn't happen.
Also fixed possible crush when buffer was failed to be locked.
2011-05-12 16:49:53 +00:00
Nathan Letwory
56c5d71f1c Apply patch from Ryakiotakis Antonis as posted on ML
Should fix MingW build problems - mingw users, please test too :)
2011-05-10 23:54:15 +00:00
Nathan Letwory
fab1ee1f78 MingW apparently doesn't know about RIM_INPUTSINK, define it if it isn't already. 2011-05-10 23:38:40 +00:00
Campbell Barton
1e0c3d315b minor cleanup, no functional changes. 2011-05-09 14:41:44 +00:00
M.G. Kishalmi
88a13d7395 fixed scrolling lists with the mousewheel for some X11 windowmanagers.
some WMs not only send 'crossing' events when really moving from one
window to another, but also when mousewheeling.
distinguishing those events 'mode' property fixed this.

brecht++ for figuring out the details.
2011-05-09 12:46:59 +00:00
Dalai Felinto
0b03268c17 Patch [#26799] embedded blenderplayer not receiving keyboard input by Sebastian Korczak
(patch co-reviewed by Nathan Letwory)

Overview: GHOST using rawinput for keyboard input. GHOST window receives WM_INPUT only when it is the active window. Child window cannot be active, so when embedding blenderplayer, WM_INPUT is consumed by top level parent window (for Burster it is the web browser window). Patch register raw input device as 'inputsink' - it makes GHOST window receives all keyboard messages. Window procedure check if GHOST window is active or focused.

::TranslateMessage(&msg) generates WM_CHAR etc. messages from WM_KEYDOWN, WM_KEYUP etc. Because of using RawInput only WM_INPUT messages are processed, so we doesn't need WM_CHAR, WM_KEYDOWN etc. [this is why ::TranslateMessage is no longer getting called].

Note: It's responsibility of the parent window (aka the wrapper) to send WM_SETFOCUS to child window (embedded blenderplayer).
However some parent windows (e.g. webbrowsers) will not send WM_SETFOCUS to the child window when someone clicks on it.
In those cases the blenderplayer needs to be patched to call setFocus(&msg); in the event of WM_LBUTTONDOWN (see GHOST_SystemWin32.cpp)
2011-05-07 22:28:56 +00:00
Dalai Felinto
c56fe3efe6 Patch [#26799] 2.5x blenderplayer (BGE) anti-aliasing & embedding by Sebastian Korczak (with some small tweaks) + adding GHOST_PRINTF
The patch can also be found in http://codereview.appspot.com/4431072/

##############
This patch fix anti-aliasing (multisampling) implementation for win32 platform. It also gives opportunity to embed blenderplayer inside parent window.

Usage:
blenderplayer.exe -i 123456 -m 16 file.blend

where:
123456 - parent window handler (integer, default: 0)
16 - multisample level (integer, default: 0, max: 16. Put there maximum level you want. If not supported, player will automatically try 15,14,13,...,3,2,1)
##############

This patch was originally created as part of the Burster (aka webplugin) project but benefit any one embedding the bge in a custom OpenGL context. By the way, to embed the BGE in a .Net application is really straightforward now =)
The Multisampling work for blenderplayer as a whole.

Missing functionalities:
- to expose the multisampling to the ui (so far it only works in console)
- window focus and keyboard messages for embedded blenderplayer (supported in their previous patch for 2.49, yet to be ported over)
- handle resizing (to be investigated, indeed the changes in getState() in GHOST_WindowWin32.cpp are going to get in the way of that if I'm not mistaken. To be addressed together.

Doxygen documentation to be added whenever I sort out how to do so. Sorry Nathan too many stuff to deal with at the same time. The sooner this patch gets in, the sooner the missing functionalities can be patched on top of that.
2011-05-04 01:50:17 +00:00
Campbell Barton
08a914095e change ghost/x11 toggleConsole to use dummy function in the header. 2011-05-03 07:05:01 +00:00
Campbell Barton
e910bf1ef5 fix for building windows/mingw 2011-05-02 14:18:47 +00:00
Nathan Letwory
aecb892e19 Also add build fix for OSX (not-tested, so OSXers, please do test). 2011-05-02 08:39:17 +00:00
Campbell Barton
e9e9f89f1a x11 builds again. 2011-05-02 08:36:00 +00:00
Nathan Letwory
d197ec74e3 Fix [#26981] Command window is not opening in 2.57.0
Reported by Thomas Engel
Fix [#26938] Blender Zoom not working after startup (Windows)
  Reported by Ilija Boshkov

by applying patch [#26881] Fix for console disappearing in debug mode [Windows]
  Submitted by Alexander Kuznetsov (AlexK)

The patch moves console toggling code into GHOST and improves on the toggling behaviour.

The patch changes handling of WM_SYSCOMMAND so that alt-key toggling isn't a problem anymore.
2011-05-02 08:07:24 +00:00
Campbell Barton
f86565c90e whitespace edits for bpy api, split some really long lines. 2011-04-30 13:58:31 +00:00
Campbell Barton
d6d2f09dd9 quiet some clang warnings & fix for bugs in exceptional cases.
- ghost C api, BLI_get_folder_version() could assign garbage values.
- pointcache ptcache_find_frames_around() had a superfluous NULL check which would have crashed anyway if actually NULL.
2011-04-23 12:57:03 +00:00
Sergey Sharybin
b3a04b4ea7 Fix crash for Intel G45 video cards
This video card need a bit different approach to buffer swapping.
Patch provided by nico_ga from IRC.
2011-04-12 14:31:59 +00:00
Sergey Sharybin
e210d82f17 FIx crash when opening User Preferences even with NVidia card
This crash was discovered by Dalai and this happened because of
unset current context (as result of call wglMakeCurrent(NULL, NULL)).
In this case glGetString(GL_VENDOR) returns NULL. Rather than add check
for vendor != NULL before string comparison, I've changed a bit logic of
context creation:
- Create context and set it as current
- If it's crappy Intel card -- delete this context and
  share the only one context between all Windows
- Otherwise, use initial logic (with sharing lists and so on)

This could also fix crash when opening userprefs from a menu with Intel card.
2011-04-11 19:22:43 +00:00
Nathan Letwory
28478967f4 doxygen fix 2011-04-09 19:46:17 +00:00
Nathan Letwory
b344fe05ec whitespace 2011-04-09 19:23:49 +00:00
Sergey Sharybin
66cee63665 Fix crash for Windows+Intel video card configuration
Intel video cards don't work fine with multiple contexts and
have to share the same context for all windows. This could work
incorrect with multiple video cards configuration, so suppose
there'll be no such situation (Intel cards are mostly in portable
devices like notebooks and laptops, where there's actually no
dual video cards). Anyway, it should work much better now.

Non-Intel cards behavior was kept unchanged.

Thanks to Ton for debug session :)
2011-04-09 18:29:43 +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
bb1f20a534 includes for building with gcc 4.6 on fedora.
patch from Richard Shaw
2011-03-30 16:14:54 +00:00