[Bf-blender-cvs] [d0fce1c] HMD_viewport: Cleanup: Undo whitespace changes, comments, etc
Julian Eisel
noreply at git.blender.org
Tue Aug 2 00:28:43 CEST 2016
Commit: d0fce1c9927b42f0c3f55ac0a0206d9b905339f0
Author: Julian Eisel
Date: Tue Aug 2 00:28:11 2016 +0200
Branches: HMD_viewport
https://developer.blender.org/rBd0fce1c9927b42f0c3f55ac0a0206d9b905339f0
Cleanup: Undo whitespace changes, comments, etc
===================================================================
M build_files/cmake/macros.cmake
M intern/cycles/render/camera.h
M intern/ghost/GHOST_Types.h
M intern/ghost/intern/GHOST_C-api.cpp
M intern/ghost/intern/GHOST_OpenHMDManager.cpp
M intern/ghost/intern/GHOST_OpenHMDManager.h
M intern/ghost/intern/GHOST_System.cpp
M intern/ghost/intern/GHOST_System.h
M source/blender/editors/render/render_opengl.c
M source/blender/gpu/GPU_compositing.h
M source/blender/gpu/intern/gpu_compositing.c
M source/blender/gpu/intern/gpu_shader.c
M source/blender/makesdna/DNA_windowmanager_types.h
M source/blender/windowmanager/wm_event_types.h
===================================================================
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 3881091..ab5620a 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -710,7 +710,7 @@ function(SETUP_BLENDER_SORTED_LIBS)
if(WITH_OPENHMD)
list(APPEND BLENDER_SORTED_LIBS extern_openhmd)
endif()
-
+
if(WITH_MOD_BOOLEAN)
list(APPEND BLENDER_SORTED_LIBS extern_carve)
endif()
diff --git a/intern/cycles/render/camera.h b/intern/cycles/render/camera.h
index 0caa06f..141ef9c 100644
--- a/intern/cycles/render/camera.h
+++ b/intern/cycles/render/camera.h
@@ -172,7 +172,7 @@ public:
/* functions */
Camera();
~Camera();
-
+
void compute_auto_viewplane();
void update();
diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h
index 4be61f5..4464c12 100644
--- a/intern/ghost/GHOST_Types.h
+++ b/intern/ghost/GHOST_Types.h
@@ -77,7 +77,7 @@ typedef enum {
GHOST_kSuccess
} GHOST_TSuccess;
-/* Xtilt and Ytilt represent how much the pen is tilted away from
+/* Xtilt and Ytilt represent how much the pen is tilted away from
* vertically upright in either the X or Y direction, with X and Y the
* axes of the tablet surface.
* In other words, Xtilt and Ytilt are components of a vector created by projecting
@@ -187,12 +187,12 @@ typedef enum {
GHOST_kEventWindowUpdate,
GHOST_kEventWindowSize,
GHOST_kEventWindowMove,
-
+
GHOST_kEventDraggingEntered,
GHOST_kEventDraggingUpdated,
GHOST_kEventDraggingExited,
GHOST_kEventDraggingDropDone,
-
+
GHOST_kEventOpenMainFile, // Needed for Cocoa to open double-clicked .blend file at startup
GHOST_kEventNativeResolutionChange, // Needed for Cocoa when window moves to other display
@@ -213,9 +213,9 @@ typedef enum {
GHOST_kStandardCursorDefault = 0,
GHOST_kStandardCursorRightArrow,
GHOST_kStandardCursorLeftArrow,
- GHOST_kStandardCursorInfo,
+ GHOST_kStandardCursorInfo,
GHOST_kStandardCursorDestroy,
- GHOST_kStandardCursorHelp,
+ GHOST_kStandardCursorHelp,
GHOST_kStandardCursorCycle,
GHOST_kStandardCursorSpray,
GHOST_kStandardCursorWait,
@@ -232,7 +232,7 @@ typedef enum {
GHOST_kStandardCursorBottomRightCorner,
GHOST_kStandardCursorBottomLeftCorner,
GHOST_kStandardCursorCopy,
- GHOST_kStandardCursorCustom,
+ GHOST_kStandardCursorCustom,
GHOST_kStandardCursorPencil,
GHOST_kStandardCursorNumCursors
@@ -246,7 +246,7 @@ typedef enum {
GHOST_kKeyLinefeed,
GHOST_kKeyClear,
GHOST_kKeyEnter = 0x0D,
-
+
GHOST_kKeyEsc = 0x1B,
GHOST_kKeySpace = ' ',
GHOST_kKeyQuote = 0x27,
@@ -304,7 +304,7 @@ typedef enum {
GHOST_kKeyBackslash = 0x5C,
GHOST_kKeyAccentGrave = '`',
-
+
GHOST_kKeyLeftShift = 0x100,
GHOST_kKeyRightShift,
GHOST_kKeyLeftControl,
@@ -376,7 +376,7 @@ typedef enum {
GHOST_kKeyF22,
GHOST_kKeyF23,
GHOST_kKeyF24,
-
+
// Multimedia keypad buttons
GHOST_kKeyMediaPlay,
GHOST_kKeyMediaStop,
@@ -417,7 +417,7 @@ typedef enum {
GHOST_kTrackpadEventSwipe, /* Reserved, not used for now */
GHOST_kTrackpadEventMagnify
} GHOST_TTrackpadEventSubTypes;
-
+
typedef struct {
/** The event subtype */
diff --git a/intern/ghost/intern/GHOST_C-api.cpp b/intern/ghost/intern/GHOST_C-api.cpp
index dc1424e..c0e992a 100644
--- a/intern/ghost/intern/GHOST_C-api.cpp
+++ b/intern/ghost/intern/GHOST_C-api.cpp
@@ -120,7 +120,7 @@ void GHOST_GetMainDisplayDimensions(GHOST_SystemHandle systemhandle,
GHOST_TUns32 *height)
{
GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
-
+
system->getMainDisplayDimensions(*width, *height);
}
@@ -167,7 +167,7 @@ GHOST_TSuccess GHOST_DisposeWindow(GHOST_SystemHandle systemhandle,
{
GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
-
+
return system->disposeWindow(window);
}
@@ -178,7 +178,7 @@ int GHOST_ValidWindow(GHOST_SystemHandle systemhandle,
{
GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
-
+
return (int) system->validWindow(window);
}
@@ -196,7 +196,7 @@ GHOST_WindowHandle GHOST_BeginFullScreen(GHOST_SystemHandle systemhandle,
bstereoVisual = true;
else
bstereoVisual = false;
-
+
system->beginFullScreen(*setting, &window, bstereoVisual);
return (GHOST_WindowHandle)window;
@@ -225,7 +225,7 @@ int GHOST_GetFullScreen(GHOST_SystemHandle systemhandle)
int GHOST_ProcessEvents(GHOST_SystemHandle systemhandle, int waitForEvent)
{
GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
-
+
return (int) system->processEvents(waitForEvent ? true : false);
}
@@ -234,7 +234,7 @@ int GHOST_ProcessEvents(GHOST_SystemHandle systemhandle, int waitForEvent)
void GHOST_DispatchEvents(GHOST_SystemHandle systemhandle)
{
GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
-
+
system->dispatchEvents();
}
@@ -242,7 +242,7 @@ void GHOST_DispatchEvents(GHOST_SystemHandle systemhandle)
GHOST_TSuccess GHOST_AddEventConsumer(GHOST_SystemHandle systemhandle, GHOST_EventConsumerHandle consumerhandle)
{
GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
-
+
return system->addEventConsumer((GHOST_CallbackEventConsumer *)consumerhandle);
}
@@ -338,7 +338,7 @@ GHOST_TSuccess GHOST_GetCursorPosition(GHOST_SystemHandle systemhandle,
GHOST_TInt32 *y)
{
GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
-
+
return system->getCursorPosition(*x, *y);
}
@@ -349,7 +349,7 @@ GHOST_TSuccess GHOST_SetCursorPosition(GHOST_SystemHandle systemhandle,
GHOST_TInt32 y)
{
GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
-
+
return system->setCursorPosition(x, y);
}
@@ -383,7 +383,7 @@ GHOST_TSuccess GHOST_GetModifierKeyState(GHOST_SystemHandle systemhandle,
GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
GHOST_TSuccess result;
bool isdown = false;
-
+
result = system->getModifierKeyState(mask, isdown);
*isDown = (int) isdown;
@@ -399,7 +399,7 @@ GHOST_TSuccess GHOST_GetButtonState(GHOST_SystemHandle systemhandle,
GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
GHOST_TSuccess result;
bool isdown = false;
-
+
result = system->getButtonState(mask, isdown);
*isDown = (int) isdown;
@@ -425,7 +425,7 @@ void GHOST_setAcceptDragOperation(GHOST_WindowHandle windowhandle, GHOST_TInt8 c
GHOST_TEventType GHOST_GetEventType(GHOST_EventHandle eventhandle)
{
GHOST_IEvent *event = (GHOST_IEvent *) eventhandle;
-
+
return event->getType();
}
@@ -450,7 +450,7 @@ GHOST_WindowHandle GHOST_GetEventWindow(GHOST_EventHandle eventhandle)
GHOST_TEventDataPtr GHOST_GetEventData(GHOST_EventHandle eventhandle)
{
GHOST_IEvent *event = (GHOST_IEvent *) eventhandle;
-
+
return event->getData();
}
@@ -459,7 +459,7 @@ GHOST_TEventDataPtr GHOST_GetEventData(GHOST_EventHandle eventhandle)
GHOST_TimerProcPtr GHOST_GetTimerProc(GHOST_TimerTaskHandle timertaskhandle)
{
GHOST_ITimerTask *timertask = (GHOST_ITimerTask *) timertaskhandle;
-
+
return timertask->getTimerProc();
}
@@ -469,7 +469,7 @@ void GHOST_SetTimerProc(GHOST_TimerTaskHandle timertaskhandle,
GHOST_TimerProcPtr timerproc)
{
GHOST_ITimerTask *timertask = (GHOST_ITimerTask *) timertaskhandle;
-
+
timertask->setTimerProc(timerproc);
}
@@ -488,13 +488,13 @@ void GHOST_SetTimerTaskUserData(GHOST_TimerTaskHandle timertaskhandle,
GHOST_TUserDataPtr userdata)
{
GHOST_ITimerTask *timertask = (GHOST_ITimerTask *) timertaskhandle;
-
+
timertask->setUserData(userdata);
}
-int GHOST_GetValid(GHOST_WindowHandle windowhandle)
+int GHOST_GetValid(GHOST_WindowHandle windowhandle)
{
GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
@@ -526,7 +526,7 @@ void GHOST_SetTitle(GHOST_WindowHandle windowhandle,
const char *title)
{
GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
-
+
window->setTitle(title);
}
@@ -662,16 +662,16 @@ GHOST_TSuccess GHOST_SetWindowState(GHOST_WindowHandle windowhandle,
GHOST_TSuccess GHOST_SetWindowModifiedState(GHOST_WindowHandle windowhandle, GHOST_TUns8 isUnsavedChanges)
{
GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
-
+
return window->setModifiedState(isUnsavedChanges);
-}
+}
GHOST_TSuccess GHOST_SetWindowOrder(GHOST_WindowHandle windowhandle,
GHOST_TWindowOrder order)
{
GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
-
+
return window->setOrder(order);
}
@@ -709,7 +709,7 @@ GHOST_TUns16 GHOST_GetNumOfAASamples(GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_ActivateWindowDrawingContext(GHOST_WindowHandle windowhandle)
{
GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
-
+
return window->activateDrawingContext();
}
diff --git a/intern/ghost/intern/GHOST_OpenHMDManager.cpp b/intern/ghost/intern/GHOST_OpenHMDManager.cpp
index 0de4b4d..32fd318 100644
--- a/intern/ghost/intern/GHOST_OpenHMDManager.cpp
+++ b/intern/ghost/intern/GHOST_OpenHMDManager.cpp
@@ -70,7 +70,7 @@ bool GHOST_OpenHMDManager::processEvents()
}
/* OrientationUpdate event
* We might want to add a timeout check here to avoid too many updates. */
- if (1 && m_device) {
+ if (m_device) {
GHOST_EventOpenHMD *event = new GHOST_EventOpenHMD(now, GHOST_kOrientationUpdate, window);
GHOST_TEventOpenHMDData *data = (GHOST_TEventOpenHMDData*)event->getData();
@@ -260,6 +260,7 @@ bool GHOST_OpenHMDManager::getRotationQuat(float orientation[4]) const
if (ohmd_device_getf(m_device, OHMD_ROTATION_QUAT, tmp) < 0)
return false;
+ // Convert from x, y, z, w space (OpenHMD) to w, x, y, z (Blender)
orientation[0] = tmp[3];
orientation[1] = tmp[0];
orientation[2] = tmp[1];
diff --git a/intern/ghost/intern/GHOST_OpenHMDManager.h b/intern/ghost/intern/GHOST_OpenHMDManager.h
index afbce69..d0d78cc 100644
--- a/intern/ghost/intern/GHOST_OpenHMDManager.h
+++ b/intern/ghost/intern/GHOST_OpenHMDManager.h
@@ -64,10 +64,10 @@ public:
*/
bool openDevice(int index);
- /**
- * Close the currently opened device (if available)
+ /**
+ * Close th
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list