forked from bartvdbraak/blender
style cleanup: comments
This commit is contained in:
parent
273f56ace0
commit
8b865c01cd
@ -128,8 +128,8 @@ extern GHOST_TSuccess GHOST_RemoveTimer(GHOST_SystemHandle systemhandle,
|
||||
GHOST_TimerTaskHandle timertaskhandle);
|
||||
|
||||
/***************************************************************************************
|
||||
** Display/window management functionality
|
||||
***************************************************************************************/
|
||||
* Display/window management functionality
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Returns the number of displays on this system.
|
||||
@ -235,8 +235,8 @@ extern GHOST_TSuccess GHOST_EndFullScreen(GHOST_SystemHandle systemhandle);
|
||||
extern int GHOST_GetFullScreen(GHOST_SystemHandle systemhandle);
|
||||
|
||||
/***************************************************************************************
|
||||
** Event management functionality
|
||||
***************************************************************************************/
|
||||
* Event management functionality
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Retrieves events from the system and stores them in the queue.
|
||||
@ -273,8 +273,8 @@ extern GHOST_TSuccess GHOST_RemoveEventConsumer(GHOST_SystemHandle systemhandle,
|
||||
GHOST_EventConsumerHandle consumerhandle);
|
||||
|
||||
/***************************************************************************************
|
||||
** Progress bar functionality
|
||||
***************************************************************************************/
|
||||
* Progress bar functionality
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Sets the progress bar value displayed in the window/application icon
|
||||
@ -290,8 +290,8 @@ extern GHOST_TSuccess GHOST_SetProgressBar(GHOST_WindowHandle windowhandle, floa
|
||||
extern GHOST_TSuccess GHOST_EndProgressBar(GHOST_WindowHandle windowhandle);
|
||||
|
||||
/***************************************************************************************
|
||||
** Cursor management functionality
|
||||
***************************************************************************************/
|
||||
* Cursor management functionality
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Returns the current cursor shape.
|
||||
@ -394,8 +394,8 @@ extern GHOST_TSuccess GHOST_SetCursorGrab(GHOST_WindowHandle windowhandle,
|
||||
int *bounds);
|
||||
|
||||
/***************************************************************************************
|
||||
** Access to mouse button and keyboard states.
|
||||
***************************************************************************************/
|
||||
* Access to mouse button and keyboard states.
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Returns the state of a modifier key (ouside the message queue).
|
||||
@ -421,8 +421,8 @@ extern GHOST_TSuccess GHOST_GetButtonState(GHOST_SystemHandle systemhandle,
|
||||
|
||||
|
||||
/***************************************************************************************
|
||||
** Drag'n'drop operations
|
||||
***************************************************************************************/
|
||||
* Drag'n'drop operations
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Tells if the ongoing drag'n'drop object can be accepted upon mouse drop
|
||||
|
@ -177,8 +177,8 @@ protected:
|
||||
|
||||
public:
|
||||
/***************************************************************************************
|
||||
** Time(r) functionality
|
||||
***************************************************************************************/
|
||||
* Time(r) functionality
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Returns the system time.
|
||||
@ -211,8 +211,8 @@ public:
|
||||
virtual GHOST_TSuccess removeTimer(GHOST_ITimerTask *timerTask) = 0;
|
||||
|
||||
/***************************************************************************************
|
||||
** Display/window management functionality
|
||||
***************************************************************************************/
|
||||
* Display/window management functionality
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Returns the number of displays on this system.
|
||||
@ -296,8 +296,8 @@ public:
|
||||
virtual bool getFullScreen(void) = 0;
|
||||
|
||||
/***************************************************************************************
|
||||
** Event management functionality
|
||||
***************************************************************************************/
|
||||
* Event management functionality
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Retrieves events from the system and stores them in the queue.
|
||||
@ -327,8 +327,8 @@ public:
|
||||
virtual GHOST_TSuccess removeEventConsumer(GHOST_IEventConsumer *consumer) = 0;
|
||||
|
||||
/***************************************************************************************
|
||||
** Cursor management functionality
|
||||
***************************************************************************************/
|
||||
* Cursor management functionality
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Returns the current location of the cursor (location in screen coordinates)
|
||||
@ -348,8 +348,8 @@ public:
|
||||
virtual GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y) = 0;
|
||||
|
||||
/***************************************************************************************
|
||||
** Access to mouse button and keyboard states.
|
||||
***************************************************************************************/
|
||||
* Access to mouse button and keyboard states.
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Returns the state of a modifier key (ouside the message queue).
|
||||
@ -379,8 +379,8 @@ public:
|
||||
virtual int toggleConsole(int action) = 0;
|
||||
|
||||
/***************************************************************************************
|
||||
** Access to clipboard.
|
||||
***************************************************************************************/
|
||||
* Access to clipboard.
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Returns the selection buffer
|
||||
|
@ -235,8 +235,8 @@ public:
|
||||
virtual const GHOST_TabletData *GetTabletData() = 0;
|
||||
|
||||
/***************************************************************************************
|
||||
** Progress bar functionality
|
||||
***************************************************************************************/
|
||||
* Progress bar functionality
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Sets the progress bar value displayed in the window/application icon
|
||||
@ -250,8 +250,8 @@ public:
|
||||
virtual GHOST_TSuccess endProgressBar() = 0;
|
||||
|
||||
/***************************************************************************************
|
||||
** Cursor management functionality
|
||||
***************************************************************************************/
|
||||
* Cursor management functionality
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Returns the current cursor shape.
|
||||
|
@ -27,15 +27,8 @@
|
||||
|
||||
/** \file ghost/intern/GHOST_C-api.cpp
|
||||
* \ingroup GHOST
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
|
||||
* GHOST_C-Api.cpp
|
||||
*
|
||||
* C Api for GHOST
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* Copyright (C) 2001 NaN Technologies B.V.
|
||||
* @author Maarten Gribnau
|
||||
* @date October 25, 2001
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* Copyright (C) 2001 NaN Technologies B.V.
|
||||
* @author Maarten Gribnau
|
||||
* @date September 21, 2001
|
||||
|
@ -177,7 +177,7 @@ GHOST_DisplayManagerSDL:: setCurrentDisplaySetting(GHOST_TUns8 display,
|
||||
}
|
||||
else {
|
||||
/* this is a problem for the BGE player :S, perhaps SDL2 will resolve at some point.
|
||||
* we really need SDL_SetDisplayModeForDisplay() to become an API func! - campbell */
|
||||
* we really need SDL_SetDisplayModeForDisplay() to become an API func! - campbell */
|
||||
printf("no windows available, cant fullscreen");
|
||||
|
||||
/* do not fail, we will try again later when the window is created - wander */
|
||||
|
@ -136,7 +136,7 @@ HRESULT __stdcall GHOST_DropTargetWin32::DragOver(DWORD grfKeyState, POINTL pt,
|
||||
}
|
||||
else {
|
||||
*pdwEffect = DROPEFFECT_NONE;
|
||||
//*pdwEffect = DROPEFFECT_COPY; // XXX Uncomment to test drop. Drop will not be called if pdwEffect == DROPEFFECT_NONE.
|
||||
// *pdwEffect = DROPEFFECT_COPY; // XXX Uncomment to test drop. Drop will not be called if pdwEffect == DROPEFFECT_NONE.
|
||||
}
|
||||
m_system->pushDragDropEvent(GHOST_kEventDraggingUpdated, m_draggedObjectType, m_window, pt.x, pt.y, NULL);
|
||||
return S_OK;
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* Copyright (C) 2001 NaN Technologies B.V.
|
||||
* @author Maarten Gribnau
|
||||
* @date May 14, 2001
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* Copyright (C) 2001 NaN Technologies B.V.
|
||||
* @author Maarten Gribnau
|
||||
* @date May 7, 2001
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* Copyright (C) 2001 NaN Technologies B.V.
|
||||
* @author Maarten Gribnau
|
||||
* @date May 7, 2001
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* Copyright (C) 2001 NaN Technologies B.V.
|
||||
* @author Maarten Gribnau
|
||||
* @date May 31, 2001
|
||||
|
@ -76,8 +76,8 @@ protected:
|
||||
|
||||
public:
|
||||
/***************************************************************************************
|
||||
** Time(r) functionality
|
||||
***************************************************************************************/
|
||||
* Time(r) functionality
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Returns the system time.
|
||||
@ -110,8 +110,8 @@ public:
|
||||
virtual GHOST_TSuccess removeTimer(GHOST_ITimerTask *timerTask);
|
||||
|
||||
/***************************************************************************************
|
||||
** Display/window management functionality
|
||||
***************************************************************************************/
|
||||
* Display/window management functionality
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Inherited from GHOST_ISystem but left pure virtual
|
||||
@ -169,8 +169,8 @@ public:
|
||||
|
||||
|
||||
/***************************************************************************************
|
||||
** Event management functionality
|
||||
***************************************************************************************/
|
||||
* Event management functionality
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Inherited from GHOST_ISystem but left pure virtual
|
||||
@ -202,8 +202,8 @@ public:
|
||||
virtual GHOST_TSuccess removeEventConsumer(GHOST_IEventConsumer *consumer);
|
||||
|
||||
/***************************************************************************************
|
||||
** Cursor management functionality
|
||||
***************************************************************************************/
|
||||
* Cursor management functionality
|
||||
***************************************************************************************/
|
||||
|
||||
/** Inherited from GHOST_ISystem but left pure virtual
|
||||
* GHOST_TSuccess getCursorPosition(GHOST_TInt32& x, GHOST_TInt32& y) const = 0;
|
||||
@ -211,8 +211,8 @@ public:
|
||||
*/
|
||||
|
||||
/***************************************************************************************
|
||||
** Access to mouse button and keyboard states.
|
||||
***************************************************************************************/
|
||||
* Access to mouse button and keyboard states.
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Returns the state of a modifier key (ouside the message queue).
|
||||
@ -231,8 +231,8 @@ public:
|
||||
virtual GHOST_TSuccess getButtonState(GHOST_TButtonMask mask, bool& isDown) const;
|
||||
|
||||
/***************************************************************************************
|
||||
** Other (internal) functionality.
|
||||
***************************************************************************************/
|
||||
* Other (internal) functionality.
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Pushes an event on the stack.
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* Copyright (C) 2001 NaN Technologies B.V.
|
||||
* @author Maarten Gribnau
|
||||
* @date May 7, 2001
|
||||
@ -70,10 +69,10 @@ enum {
|
||||
const EventTypeSpec kEvents[] =
|
||||
{
|
||||
{ kEventClassAppleEvent, kEventAppleEvent },
|
||||
/*
|
||||
{ kEventClassApplication, kEventAppActivated },
|
||||
{ kEventClassApplication, kEventAppDeactivated },
|
||||
*/
|
||||
#if 0
|
||||
{ kEventClassApplication, kEventAppActivated },
|
||||
{ kEventClassApplication, kEventAppDeactivated },
|
||||
#endif
|
||||
{ kEventClassKeyboard, kEventRawKeyDown },
|
||||
{ kEventClassKeyboard, kEventRawKeyRepeat },
|
||||
{ kEventClassKeyboard, kEventRawKeyUp },
|
||||
@ -994,7 +993,7 @@ bool GHOST_SystemCarbon::handleMouseDown(EventRef event)
|
||||
* @see GHOST_SystemCarbon::handleWindowEvent(EventRef event)
|
||||
*/
|
||||
/* even worse: scale window also generates a load of events, and nothing
|
||||
is handled (read: client's event proc called) until you release mouse (ton) */
|
||||
* is handled (read: client's event proc called) until you release mouse (ton) */
|
||||
|
||||
GHOST_ASSERT(validWindow(ghostWindow), "GHOST_SystemCarbon::handleMouseDown: invalid window");
|
||||
m_ignoreWindowSizedMessages = true;
|
||||
|
@ -62,8 +62,8 @@ public:
|
||||
~GHOST_SystemCocoa();
|
||||
|
||||
/***************************************************************************************
|
||||
** Time(r) functionality
|
||||
***************************************************************************************/
|
||||
* Time(r) functionality
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Returns the system time.
|
||||
@ -74,8 +74,8 @@ public:
|
||||
virtual GHOST_TUns64 getMilliSeconds() const;
|
||||
|
||||
/***************************************************************************************
|
||||
** Display/window management functionality
|
||||
***************************************************************************************/
|
||||
* Display/window management functionality
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Returns the number of displays on this system.
|
||||
@ -119,8 +119,8 @@ public:
|
||||
);
|
||||
|
||||
/***************************************************************************************
|
||||
** Event management functionality
|
||||
***************************************************************************************/
|
||||
* Event management functionality
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Gets events from the system and stores them in the queue.
|
||||
@ -154,8 +154,8 @@ public:
|
||||
GHOST_WindowCocoa *window, int mouseX, int mouseY, void *data);
|
||||
|
||||
/***************************************************************************************
|
||||
** Cursor management functionality
|
||||
***************************************************************************************/
|
||||
* Cursor management functionality
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Returns the current location of the cursor (location in screen coordinates)
|
||||
@ -174,8 +174,8 @@ public:
|
||||
virtual GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y);
|
||||
|
||||
/***************************************************************************************
|
||||
** Access to mouse button and keyboard states.
|
||||
***************************************************************************************/
|
||||
* Access to mouse button and keyboard states.
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Returns the state of all modifier keys.
|
||||
|
@ -58,10 +58,10 @@ public:
|
||||
virtual const GHOST_TUns8 *getSystemDir(int version, const char *versionstr) const = 0;
|
||||
|
||||
/**
|
||||
* Determine the base dir in which user configuration is stored, including versioning.
|
||||
* If needed, it will create the base directory.
|
||||
* @return Unsigned char string pointing to user dir (eg ~/.blender/).
|
||||
*/
|
||||
* Determine the base dir in which user configuration is stored, including versioning.
|
||||
* If needed, it will create the base directory.
|
||||
* @return Unsigned char string pointing to user dir (eg ~/.blender/).
|
||||
*/
|
||||
virtual const GHOST_TUns8 *getUserDir(int version, const char *versionstr) const = 0;
|
||||
|
||||
/**
|
||||
|
@ -1093,7 +1093,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
|
||||
system->storeModifierKeys(modifiers);
|
||||
event = processWindowEvent(LOWORD(wParam) ? GHOST_kEventWindowActivate : GHOST_kEventWindowDeactivate, window);
|
||||
/* WARNING: Let DefWindowProc handle WM_ACTIVATE, otherwise WM_MOUSEWHEEL
|
||||
will not be dispatched to OUR active window if we minimize one of OUR windows. */
|
||||
* will not be dispatched to OUR active window if we minimize one of OUR windows. */
|
||||
lResult = ::DefWindowProc(hwnd, msg, wParam, lParam);
|
||||
break;
|
||||
}
|
||||
@ -1230,11 +1230,11 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
|
||||
// Event found for a window before the pointer to the class has been set.
|
||||
GHOST_PRINT("GHOST_SystemWin32::wndProc: GHOST window event before creation\n");
|
||||
/* These are events we typically miss at this point:
|
||||
WM_GETMINMAXINFO 0x24
|
||||
WM_NCCREATE 0x81
|
||||
WM_NCCALCSIZE 0x83
|
||||
WM_CREATE 0x01
|
||||
We let DefWindowProc do the work.
|
||||
* WM_GETMINMAXINFO 0x24
|
||||
* WM_NCCREATE 0x81
|
||||
* WM_NCCALCSIZE 0x83
|
||||
* WM_CREATE 0x01
|
||||
* We let DefWindowProc do the work.
|
||||
*/
|
||||
}
|
||||
}
|
||||
@ -1274,7 +1274,7 @@ GHOST_TUns8 *GHOST_SystemWin32::getClipboard(bool selection) const
|
||||
temp_buff = alloc_utf_8_from_16(buffer, 0);
|
||||
|
||||
/* Buffer mustn't be accessed after CloseClipboard
|
||||
it would like accessing free-d memory */
|
||||
* it would like accessing free-d memory */
|
||||
GlobalUnlock(hData);
|
||||
CloseClipboard();
|
||||
|
||||
@ -1300,7 +1300,7 @@ GHOST_TUns8 *GHOST_SystemWin32::getClipboard(bool selection) const
|
||||
temp_buff[len] = '\0';
|
||||
|
||||
/* Buffer mustn't be accessed after CloseClipboard
|
||||
it would like accessing free-d memory */
|
||||
* it would like accessing free-d memory */
|
||||
GlobalUnlock(hData);
|
||||
CloseClipboard();
|
||||
|
||||
|
@ -566,7 +566,7 @@ GHOST_SystemX11::processEvent(XEvent *xe)
|
||||
}
|
||||
else if (status == XLookupKeySym) {
|
||||
/* this key doesn't have a text representation, it is a command
|
||||
key of some sort */;
|
||||
* key of some sort */;
|
||||
}
|
||||
else {
|
||||
printf("Bad keycode lookup. Keysym 0x%x Status: %s\n",
|
||||
@ -745,11 +745,11 @@ GHOST_SystemX11::processEvent(XEvent *xe)
|
||||
case LeaveNotify:
|
||||
{
|
||||
/* XCrossingEvents pointer leave enter window.
|
||||
also do cursor move here, MotionNotify only
|
||||
happens when motion starts & ends inside window.
|
||||
we only do moves when the crossing mode is 'normal'
|
||||
(really crossing between windows) since some windowmanagers
|
||||
also send grab/ungrab crossings for mousewheel events.
|
||||
* also do cursor move here, MotionNotify only
|
||||
* happens when motion starts & ends inside window.
|
||||
* we only do moves when the crossing mode is 'normal'
|
||||
* (really crossing between windows) since some windowmanagers
|
||||
* also send grab/ungrab crossings for mousewheel events.
|
||||
*/
|
||||
XCrossingEvent &xce = xe->xcrossing;
|
||||
if (xce.mode == NotifyNormal) {
|
||||
@ -1077,15 +1077,15 @@ convertXKey(KeySym key)
|
||||
type = GHOST_TKey(key - XK_F1 + int(GHOST_kKeyF1));
|
||||
#if defined(__sun) || defined(__sun__)
|
||||
/* This is a bit of a hack, but it looks like sun
|
||||
Used F11 and friends for its special keys Stop,again etc..
|
||||
So this little patch enables F11 and F12 to work as expected
|
||||
following link has documentation on it:
|
||||
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4734408
|
||||
also from /usr/include/X11/Sunkeysym.h
|
||||
#define SunXK_F36 0x1005FF10 // Labeled F11
|
||||
#define SunXK_F37 0x1005FF11 // Labeled F12
|
||||
|
||||
mein@cs.umn.edu
|
||||
* Used F11 and friends for its special keys Stop,again etc..
|
||||
* So this little patch enables F11 and F12 to work as expected
|
||||
* following link has documentation on it:
|
||||
* http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4734408
|
||||
* also from /usr/include/X11/Sunkeysym.h
|
||||
* #define SunXK_F36 0x1005FF10 // Labeled F11
|
||||
* #define SunXK_F37 0x1005FF11 // Labeled F12
|
||||
*
|
||||
* mein@cs.umn.edu
|
||||
*/
|
||||
|
||||
}
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* Copyright (C) 2001 NaN Technologies B.V.
|
||||
* @author Maarten Gribnau
|
||||
* @date May 31, 2001
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* Copyright (C) 2001 NaN Technologies B.V.
|
||||
* @author Maarten Gribnau
|
||||
* @date May 10, 2001
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* Copyright (C) 2001 NaN Technologies B.V.
|
||||
* @author Maarten Gribnau
|
||||
* @date May 11, 2001
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* Copyright (C) 2001 NaN Technologies B.V.
|
||||
* @author Maarten Gribnau
|
||||
* @date May 10, 2001
|
||||
@ -106,10 +105,10 @@ static PIXELFORMATDESCRIPTOR sPreferredFormat = {
|
||||
};
|
||||
|
||||
/* Intel videocards don't work fine with multiple contexts and
|
||||
have to share the same context for all windows.
|
||||
But if we just share context for all windows it could work incorrect
|
||||
with multiple videocards configuration. Suppose, that Intel videocards
|
||||
can't be in multiple-devices configuration. */
|
||||
* have to share the same context for all windows.
|
||||
* But if we just share context for all windows it could work incorrect
|
||||
* with multiple videocards configuration. Suppose, that Intel videocards
|
||||
* can't be in multiple-devices configuration. */
|
||||
static int is_crappy_intel_card(void)
|
||||
{
|
||||
int crappy = 0;
|
||||
@ -1279,8 +1278,8 @@ GHOST_TSuccess GHOST_WindowWin32::endProgressBar()
|
||||
return GHOST_kFailure;
|
||||
}
|
||||
|
||||
/* Ron Fosner's code for weighting pixel formats and forcing software.
|
||||
See http://www.opengl.org/resources/faq/technical/weight.cpp */
|
||||
/* Ron Fosner's code for weighting pixel formats and forcing software.
|
||||
* See http://www.opengl.org/resources/faq/technical/weight.cpp */
|
||||
|
||||
static int WeightPixelFormat(PIXELFORMATDESCRIPTOR& pfd)
|
||||
{
|
||||
@ -1335,7 +1334,7 @@ static int EnumPixelFormats(HDC hdc)
|
||||
sizeof(PIXELFORMATDESCRIPTOR), &pfd);
|
||||
|
||||
/* choose a pixel format using the useless Windows function in case
|
||||
we come up empty handed */
|
||||
* we come up empty handed */
|
||||
iPixelFormat = ::ChoosePixelFormat(hdc, &sPreferredFormat);
|
||||
|
||||
if (!iPixelFormat) return 0; /* couldn't find one to use */
|
||||
|
@ -228,7 +228,7 @@ GHOST_WindowX11(
|
||||
m_visual = glXChooseVisual(m_display, DefaultScreen(m_display), attributes);
|
||||
|
||||
/* Any sample level or even zero, which means oversampling disabled, is good
|
||||
but we need a valid visual to continue */
|
||||
* but we need a valid visual to continue */
|
||||
if (m_visual == NULL) {
|
||||
if (samples == 0) {
|
||||
/* All options exhausted, cannot continue */
|
||||
@ -1155,8 +1155,8 @@ setOrder(
|
||||
Atom atom;
|
||||
|
||||
/* We use both XRaiseWindow and _NET_ACTIVE_WINDOW, since some
|
||||
window managers ignore the former (e.g. kwin from kde) and others
|
||||
don't implement the latter (e.g. fluxbox pre 0.9.9) */
|
||||
* window managers ignore the former (e.g. kwin from kde) and others
|
||||
* don't implement the latter (e.g. fluxbox pre 0.9.9) */
|
||||
|
||||
XRaiseWindow(m_display, m_window);
|
||||
|
||||
|
@ -26,7 +26,6 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
* Copyright (C) 2001 NaN Technologies B.V.
|
||||
*
|
||||
* Simple test file for the GHOST library.
|
||||
@ -294,14 +293,14 @@ int processEvent(GHOST_EventHandle hEvent, GHOST_TUserDataPtr userData)
|
||||
|
||||
switch (GHOST_GetEventType(hEvent))
|
||||
{
|
||||
/*
|
||||
case GHOST_kEventUnknown:
|
||||
break;
|
||||
case GHOST_kEventCursorButton:
|
||||
break;
|
||||
case GHOST_kEventCursorMove:
|
||||
break;
|
||||
*/
|
||||
#if 0
|
||||
case GHOST_kEventUnknown:
|
||||
break;
|
||||
case GHOST_kEventCursorButton:
|
||||
break;
|
||||
case GHOST_kEventCursorMove:
|
||||
break;
|
||||
#endif
|
||||
case GHOST_kEventWheel:
|
||||
{
|
||||
wheelData = (GHOST_TEventWheelData *)GHOST_GetEventData(hEvent);
|
||||
@ -345,10 +344,10 @@ int processEvent(GHOST_EventHandle hEvent, GHOST_TUserDataPtr userData)
|
||||
setting.yPixels = 480;
|
||||
|
||||
/*
|
||||
setting.bpp = 16;
|
||||
setting.frequency = 75;
|
||||
setting.xPixels = 640;
|
||||
setting.yPixels = 480;
|
||||
* setting.bpp = 16;
|
||||
* setting.frequency = 75;
|
||||
* setting.xPixels = 640;
|
||||
* setting.yPixels = 480;
|
||||
*/
|
||||
|
||||
sFullScreenWindow = GHOST_BeginFullScreen(shSystem, &setting,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* ***** BEGIN GPL LICENSE BLOCK *****
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@ -26,7 +26,6 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
* Copyright (C) 2001 NaN Technologies B.V.
|
||||
* Simple test file for the GHOST library.
|
||||
* The OpenGL gear code is taken from the Qt sample code which,
|
||||
@ -344,27 +343,27 @@ void StereoProjection(float left, float right, float bottom, float top, float ne
|
||||
float zero_plane, float dist,
|
||||
float eye)
|
||||
/* Perform the perspective projection for one eye's subfield.
|
||||
The projection is in the direction of the negative z axis.
|
||||
|
||||
-6.0, 6.0, -4.8, 4.8,
|
||||
left, right, bottom, top = the coordinate range, in the plane of zero
|
||||
parallax setting, which will be displayed on the screen. The
|
||||
ratio between (right-left) and (top-bottom) should equal the aspect
|
||||
ratio of the display.
|
||||
|
||||
6.0, -6.0,
|
||||
near, far = the z-coordinate values of the clipping planes.
|
||||
|
||||
0.0,
|
||||
zero_plane = the z-coordinate of the plane of zero parallax setting.
|
||||
|
||||
14.5,
|
||||
dist = the distance from the center of projection to the plane
|
||||
of zero parallax.
|
||||
|
||||
-0.31
|
||||
eye = half the eye separation; positive for the right eye subfield,
|
||||
negative for the left eye subfield.
|
||||
* The projection is in the direction of the negative z axis.
|
||||
*
|
||||
* -6.0, 6.0, -4.8, 4.8,
|
||||
* left, right, bottom, top = the coordinate range, in the plane of zero
|
||||
* parallax setting, which will be displayed on the screen. The
|
||||
* ratio between (right-left) and (top-bottom) should equal the aspect
|
||||
* ratio of the display.
|
||||
*
|
||||
* 6.0, -6.0,
|
||||
* near, far = the z-coordinate values of the clipping planes.
|
||||
*
|
||||
* 0.0,
|
||||
* zero_plane = the z-coordinate of the plane of zero parallax setting.
|
||||
*
|
||||
* 14.5,
|
||||
* dist = the distance from the center of projection to the plane
|
||||
* of zero parallax.
|
||||
*
|
||||
* -0.31
|
||||
* eye = half the eye separation; positive for the right eye subfield,
|
||||
* negative for the left eye subfield.
|
||||
*/
|
||||
{
|
||||
float xmid, ymid, clip_near, clip_far, topw, bottomw, leftw, rightw,
|
||||
@ -462,13 +461,14 @@ bool Application::processEvent(GHOST_IEvent *event)
|
||||
bool handled = true;
|
||||
|
||||
switch (event->getType()) {
|
||||
/* case GHOST_kEventUnknown:
|
||||
break;
|
||||
case GHOST_kEventCursorButton:
|
||||
std::cout << "GHOST_kEventCursorButton"; break;
|
||||
case GHOST_kEventCursorMove:
|
||||
std::cout << "GHOST_kEventCursorMove"; break;
|
||||
*/
|
||||
#if 0
|
||||
case GHOST_kEventUnknown:
|
||||
break;
|
||||
case GHOST_kEventCursorButton:
|
||||
std::cout << "GHOST_kEventCursorButton"; break;
|
||||
case GHOST_kEventCursorMove:
|
||||
std::cout << "GHOST_kEventCursorMove"; break;
|
||||
#endif
|
||||
case GHOST_kEventWheel:
|
||||
{
|
||||
GHOST_TEventWheelData *wheelData = (GHOST_TEventWheelData *) event->getData();
|
||||
|
@ -545,90 +545,90 @@ typedef struct FT_Outline_
|
||||
|
||||
#endif
|
||||
|
||||
/***//*
|
||||
from: http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html#section-1
|
||||
|
||||
Vectorial representation of Freetype glyphs
|
||||
|
||||
The source format of outlines is a collection of closed paths called "contours". Each contour is
|
||||
made of a series of line segments and bezier arcs. Depending on the file format, these can be
|
||||
second-order or third-order polynomials. The former are also called quadratic or conic arcs, and
|
||||
they come from the TrueType format. The latter are called cubic arcs and mostly come from the
|
||||
Type1 format.
|
||||
|
||||
Each arc is described through a series of start, end and control points. Each point of the outline
|
||||
has a specific tag which indicates wether it is used to describe a line segment or an arc.
|
||||
|
||||
|
||||
The following rules are applied to decompose the contour's points into segments and arcs :
|
||||
|
||||
# two successive "on" points indicate a line segment joining them.
|
||||
|
||||
# one conic "off" point amidst two "on" points indicates a conic bezier arc, the "off" point being
|
||||
the control point, and the "on" ones the start and end points.
|
||||
|
||||
# Two successive cubic "off" points amidst two "on" points indicate a cubic bezier arc. There must
|
||||
be exactly two cubic control points and two on points for each cubic arc (using a single cubic
|
||||
"off" point between two "on" points is forbidden, for example).
|
||||
|
||||
# finally, two successive conic "off" points forces the rasterizer to create (during the scan-line
|
||||
conversion process exclusively) a virtual "on" point amidst them, at their exact middle. This
|
||||
greatly facilitates the definition of successive conic bezier arcs. Moreover, it's the way
|
||||
outlines are described in the TrueType specification.
|
||||
|
||||
Note that it is possible to mix conic and cubic arcs in a single contour, even though no current
|
||||
font driver produces such outlines.
|
||||
|
||||
* # on
|
||||
* off
|
||||
__---__
|
||||
#-__ _-- -_
|
||||
--__ _- -
|
||||
--__ # \
|
||||
--__ #
|
||||
-#
|
||||
Two "on" points
|
||||
Two "on" points and one "conic" point
|
||||
between them
|
||||
|
||||
|
||||
|
||||
*
|
||||
# __ Two "on" points with two "conic"
|
||||
\ - - points between them. The point
|
||||
\ / \ marked '0' is the middle of the
|
||||
- 0 \ "off" points, and is a 'virtual'
|
||||
-_ _- # "on" point where the curve passes.
|
||||
-- It does not appear in the point
|
||||
list.
|
||||
*
|
||||
|
||||
|
||||
|
||||
|
||||
* # on
|
||||
* * off
|
||||
__---__
|
||||
_-- -_
|
||||
_- -
|
||||
# \
|
||||
#
|
||||
|
||||
Two "on" points
|
||||
and two "cubic" point
|
||||
between them
|
||||
|
||||
|
||||
Each glyph's original outline points are located on a grid of indivisible units. The points are stored
|
||||
in the font file as 16-bit integer grid coordinates, with the grid origin's being at (0, 0); they thus
|
||||
range from -16384 to 16383.
|
||||
|
||||
Convert conic to bezier arcs:
|
||||
Conic P0 P1 P2
|
||||
Bezier B0 B1 B2 B3
|
||||
B0=P0
|
||||
B1=(P0+2*P1)/3
|
||||
B2=(P2+2*P1)/3
|
||||
B3=P2
|
||||
|
||||
*//****/
|
||||
/*
|
||||
* from: http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html#section-1
|
||||
*
|
||||
* Vectorial representation of Freetype glyphs
|
||||
*
|
||||
* The source format of outlines is a collection of closed paths called "contours". Each contour is
|
||||
* made of a series of line segments and bezier arcs. Depending on the file format, these can be
|
||||
* second-order or third-order polynomials. The former are also called quadratic or conic arcs, and
|
||||
* they come from the TrueType format. The latter are called cubic arcs and mostly come from the
|
||||
* Type1 format.
|
||||
*
|
||||
* Each arc is described through a series of start, end and control points. Each point of the outline
|
||||
* has a specific tag which indicates wether it is used to describe a line segment or an arc.
|
||||
*
|
||||
*
|
||||
* The following rules are applied to decompose the contour's points into segments and arcs :
|
||||
*
|
||||
* # two successive "on" points indicate a line segment joining them.
|
||||
*
|
||||
* # one conic "off" point amidst two "on" points indicates a conic bezier arc, the "off" point being
|
||||
* the control point, and the "on" ones the start and end points.
|
||||
*
|
||||
* # Two successive cubic "off" points amidst two "on" points indicate a cubic bezier arc. There must
|
||||
* be exactly two cubic control points and two on points for each cubic arc (using a single cubic
|
||||
* "off" point between two "on" points is forbidden, for example).
|
||||
*
|
||||
* # finally, two successive conic "off" points forces the rasterizer to create (during the scan-line
|
||||
* conversion process exclusively) a virtual "on" point amidst them, at their exact middle. This
|
||||
* greatly facilitates the definition of successive conic bezier arcs. Moreover, it's the way
|
||||
* outlines are described in the TrueType specification.
|
||||
*
|
||||
* Note that it is possible to mix conic and cubic arcs in a single contour, even though no current
|
||||
* font driver produces such outlines.
|
||||
*
|
||||
* * # on
|
||||
* * off
|
||||
* __---__
|
||||
* #-__ _-- -_
|
||||
* --__ _- -
|
||||
* --__ # \
|
||||
* --__ #
|
||||
* -#
|
||||
* Two "on" points
|
||||
* Two "on" points and one "conic" point
|
||||
* between them
|
||||
*
|
||||
*
|
||||
*
|
||||
* *
|
||||
* # __ Two "on" points with two "conic"
|
||||
* \ - - points between them. The point
|
||||
* \ / \ marked '0' is the middle of the
|
||||
* - 0 \ "off" points, and is a 'virtual'
|
||||
* -_ _- # "on" point where the curve passes.
|
||||
* -- It does not appear in the point
|
||||
* list.
|
||||
* *
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* * # on
|
||||
* * * off
|
||||
* __---__
|
||||
* _-- -_
|
||||
* _- -
|
||||
* # \
|
||||
* #
|
||||
*
|
||||
* Two "on" points
|
||||
* and two "cubic" point
|
||||
* between them
|
||||
*
|
||||
*
|
||||
* Each glyph's original outline points are located on a grid of indivisible units. The points are stored
|
||||
* in the font file as 16-bit integer grid coordinates, with the grid origin's being at (0, 0); they thus
|
||||
* range from -16384 to 16383.
|
||||
*
|
||||
* Convert conic to bezier arcs:
|
||||
* Conic P0 P1 P2
|
||||
* Bezier B0 B1 B2 B3
|
||||
* B0=P0
|
||||
* B1=(P0+2*P1)/3
|
||||
* B2=(P2+2*P1)/3
|
||||
* B3=P2
|
||||
*
|
||||
*/
|
||||
|
@ -159,52 +159,52 @@
|
||||
#include <errno.h>
|
||||
|
||||
/*
|
||||
Remark: still a weak point is the newaddress() function, that doesnt solve reading from
|
||||
multiple files at the same time
|
||||
|
||||
(added remark: oh, i thought that was solved? will look at that... (ton)
|
||||
|
||||
READ
|
||||
- Existing Library (Main) push or free
|
||||
- allocate new Main
|
||||
- load file
|
||||
- read SDNA
|
||||
- for each LibBlock
|
||||
- read LibBlock
|
||||
- if a Library
|
||||
- make a new Main
|
||||
- attach ID's to it
|
||||
- else
|
||||
- read associated 'direct data'
|
||||
- link direct data (internal and to LibBlock)
|
||||
- read FileGlobal
|
||||
- read USER data, only when indicated (file is ~/X.XX/startup.blend)
|
||||
- free file
|
||||
- per Library (per Main)
|
||||
- read file
|
||||
- read SDNA
|
||||
- find LibBlocks and attach IDs to Main
|
||||
- if external LibBlock
|
||||
- search all Main's
|
||||
- or it's already read,
|
||||
- or not read yet
|
||||
- or make new Main
|
||||
- per LibBlock
|
||||
- read recursive
|
||||
- read associated direct data
|
||||
- link direct data (internal and to LibBlock)
|
||||
- free file
|
||||
- per Library with unread LibBlocks
|
||||
- read file
|
||||
- read SDNA
|
||||
- per LibBlock
|
||||
- read recursive
|
||||
- read associated direct data
|
||||
- link direct data (internal and to LibBlock)
|
||||
- free file
|
||||
- join all Mains
|
||||
- link all LibBlocks and indirect pointers to libblocks
|
||||
- initialize FileGlobal and copy pointers to Global
|
||||
* Remark: still a weak point is the newaddress() function, that doesnt solve reading from
|
||||
* multiple files at the same time
|
||||
*
|
||||
* (added remark: oh, i thought that was solved? will look at that... (ton)
|
||||
*
|
||||
* READ
|
||||
* - Existing Library (Main) push or free
|
||||
* - allocate new Main
|
||||
* - load file
|
||||
* - read SDNA
|
||||
* - for each LibBlock
|
||||
* - read LibBlock
|
||||
* - if a Library
|
||||
* - make a new Main
|
||||
* - attach ID's to it
|
||||
* - else
|
||||
* - read associated 'direct data'
|
||||
* - link direct data (internal and to LibBlock)
|
||||
* - read FileGlobal
|
||||
* - read USER data, only when indicated (file is ~/X.XX/startup.blend)
|
||||
* - free file
|
||||
* - per Library (per Main)
|
||||
* - read file
|
||||
* - read SDNA
|
||||
* - find LibBlocks and attach IDs to Main
|
||||
* - if external LibBlock
|
||||
* - search all Main's
|
||||
* - or it's already read,
|
||||
* - or not read yet
|
||||
* - or make new Main
|
||||
* - per LibBlock
|
||||
* - read recursive
|
||||
* - read associated direct data
|
||||
* - link direct data (internal and to LibBlock)
|
||||
* - free file
|
||||
* - per Library with unread LibBlocks
|
||||
* - read file
|
||||
* - read SDNA
|
||||
* - per LibBlock
|
||||
* - read recursive
|
||||
* - read associated direct data
|
||||
* - link direct data (internal and to LibBlock)
|
||||
* - free file
|
||||
* - join all Mains
|
||||
* - link all LibBlocks and indirect pointers to libblocks
|
||||
* - initialize FileGlobal and copy pointers to Global
|
||||
*/
|
||||
|
||||
/* also occurs in library.c */
|
||||
@ -4426,7 +4426,7 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
|
||||
}
|
||||
else if (md->type == eModifierType_Collision) {
|
||||
CollisionModifierData *collmd = (CollisionModifierData *)md;
|
||||
/*
|
||||
#if 0
|
||||
// TODO: CollisionModifier should use pointcache
|
||||
// + have proper reset events before enabling this
|
||||
collmd->x = newdataadr(fd, collmd->x);
|
||||
@ -4436,7 +4436,7 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
|
||||
collmd->current_x = MEM_callocN(sizeof(MVert)*collmd->numverts, "current_x");
|
||||
collmd->current_xnew = MEM_callocN(sizeof(MVert)*collmd->numverts, "current_xnew");
|
||||
collmd->current_v = MEM_callocN(sizeof(MVert)*collmd->numverts, "current_v");
|
||||
*/
|
||||
#endif
|
||||
|
||||
collmd->x = NULL;
|
||||
collmd->xnew = NULL;
|
||||
@ -5496,7 +5496,7 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene)
|
||||
v3d->localvd->camera = sc->scene->camera;
|
||||
|
||||
/* localview can become invalid during undo/redo steps, so we exit it when no could be found */
|
||||
/* XXX regionlocalview ?
|
||||
#if 0 /* XXX regionlocalview ? */
|
||||
for (base= sc->scene->base.first; base; base= base->next) {
|
||||
if (base->lay & v3d->lay) break;
|
||||
}
|
||||
@ -5506,7 +5506,7 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene)
|
||||
MEM_freeN(v3d->localvd);
|
||||
v3d->localvd= NULL;
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
}
|
||||
else if (v3d->scenelock) v3d->lay = sc->scene->lay;
|
||||
|
||||
@ -7421,7 +7421,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
|
||||
if (main->versionfile < 263) {
|
||||
/* set fluidsim rate. the version patch for this in 2.62 was wrong, so
|
||||
try to correct it, if rate is 0.0 that's likely not intentional */
|
||||
* try to correct it, if rate is 0.0 that's likely not intentional */
|
||||
Object *ob;
|
||||
|
||||
for (ob = main->object.first; ob; ob = ob->id.next) {
|
||||
|
@ -2580,8 +2580,8 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main)
|
||||
act->type = act->otype = ACT_ACTION;
|
||||
|
||||
/* Fix for converting 2.4x files: if we don't have an action, but we have an
|
||||
object IPO, then leave the actuator as an IPO actuator for now and let the
|
||||
IPO conversion code handle it */
|
||||
* object IPO, then leave the actuator as an IPO actuator for now and let the
|
||||
* IPO conversion code handle it */
|
||||
if (ob->ipo && !aa->act)
|
||||
act->type = ACT_IPO;
|
||||
}
|
||||
|
@ -1380,14 +1380,14 @@ static void write_modifiers(WriteData *wd, ListBase *modbase)
|
||||
}
|
||||
else if (md->type==eModifierType_Collision) {
|
||||
|
||||
/*
|
||||
#if 0
|
||||
CollisionModifierData *collmd = (CollisionModifierData*) md;
|
||||
// TODO: CollisionModifier should use pointcache
|
||||
// + have proper reset events before enabling this
|
||||
writestruct(wd, DATA, "MVert", collmd->numverts, collmd->x);
|
||||
writestruct(wd, DATA, "MVert", collmd->numverts, collmd->xnew);
|
||||
writestruct(wd, DATA, "MFace", collmd->numfaces, collmd->mfaces);
|
||||
*/
|
||||
#endif
|
||||
}
|
||||
else if (md->type==eModifierType_MeshDeform) {
|
||||
MeshDeformModifierData *mmd = (MeshDeformModifierData*) md;
|
||||
|
@ -172,7 +172,7 @@ static void bm_extrude_copy_face_loop_attributes(BMesh *bm, BMFace *f, BMEdge *e
|
||||
}
|
||||
|
||||
/* Disable the skin root flag on the input vert, assumes that the vert
|
||||
data includes an CD_MVERT_SKIN layer */
|
||||
* data includes an CD_MVERT_SKIN layer */
|
||||
static void bm_extrude_disable_skin_root(BMesh *bm, BMVert *v)
|
||||
{
|
||||
MVertSkin *vs;
|
||||
|
@ -141,8 +141,8 @@ static void hull_add_triangle(BMesh *bm, GHash *hull_triangles, BLI_mempool *poo
|
||||
static int hull_point_tri_side(const HullTriangle *t, const float co[3])
|
||||
{
|
||||
/* Added epsilon to fix bug [#31941], improves output when some
|
||||
vertices are nearly coplanar. Might need further tweaking for
|
||||
other cases though. */
|
||||
* vertices are nearly coplanar. Might need further tweaking for
|
||||
* other cases though. */
|
||||
float p[3], d, epsilon = 0.0001;
|
||||
sub_v3_v3v3(p, co, t->v[0]->co);
|
||||
d = dot_v3v3(t->no, p);
|
||||
|
@ -224,7 +224,7 @@ extern "C" {
|
||||
* For every CPUcore a working thread is created. These working threads will ask the WorkScheduler if there is work
|
||||
* for a specific Device.
|
||||
* the workscheduler will find work for the device and the device will be asked to execute the WorkPackage
|
||||
|
||||
*
|
||||
* @subsection singlethread Single threaded
|
||||
* For debugging reasons the multi-threading can be disabled. This is done by changing the COM_CURRENT_THREADING_MODEL
|
||||
* to COM_TM_NOTHREAD. When compiling the workscheduler
|
||||
@ -268,7 +268,7 @@ extern "C" {
|
||||
*
|
||||
* @section executePixel executing a pixel
|
||||
* Finally the last step, the node functionality :)
|
||||
|
||||
*
|
||||
* @page newnode Creating new nodes
|
||||
*/
|
||||
|
||||
|
@ -60,7 +60,7 @@ public:
|
||||
*
|
||||
* @note Conversion logic is implemented in this method
|
||||
* @see InputSocketResizeMode for the possible conversions.
|
||||
|
||||
*
|
||||
* @param connection the SocketConnection what needs conversion
|
||||
* @param system the ExecutionSystem to add the conversion to.
|
||||
* @see SocketConnection - a link between two sockets
|
||||
|
@ -781,10 +781,10 @@ static void do_allEdgeDetection(unsigned int t, unsigned int rw, unsigned int *l
|
||||
if (!limask[a]) { // if the inner mask is empty
|
||||
if (lomask[a]) { // if the outer mask is full
|
||||
/*
|
||||
Next we test all 4 directions around the current pixel: next/prev/up/down
|
||||
The test ensures that the outer mask is empty and that the inner mask
|
||||
is also empty. If both conditions are true for any one of the 4 adjacent pixels
|
||||
then the current pixel is counted as being a true outer edge pixel.
|
||||
* Next we test all 4 directions around the current pixel: next/prev/up/down
|
||||
* The test ensures that the outer mask is empty and that the inner mask
|
||||
* is also empty. If both conditions are true for any one of the 4 adjacent pixels
|
||||
* then the current pixel is counted as being a true outer edge pixel.
|
||||
*/
|
||||
if ((!lomask[pix_nextCol] && !limask[pix_nextCol]) ||
|
||||
(!lomask[pix_prevCol] && !limask[pix_prevCol]) ||
|
||||
@ -843,10 +843,10 @@ static void do_adjacentEdgeDetection(unsigned int t, unsigned int rw, unsigned i
|
||||
if (!limask[a]) { // if the inner mask is empty
|
||||
if (lomask[a]) { // if the outer mask is full
|
||||
/*
|
||||
Next we test all 4 directions around the current pixel: next/prev/up/down
|
||||
The test ensures that the outer mask is empty and that the inner mask
|
||||
is also empty. If both conditions are true for any one of the 4 adjacent pixels
|
||||
then the current pixel is counted as being a true outer edge pixel.
|
||||
* Next we test all 4 directions around the current pixel: next/prev/up/down
|
||||
* The test ensures that the outer mask is empty and that the inner mask
|
||||
* is also empty. If both conditions are true for any one of the 4 adjacent pixels
|
||||
* then the current pixel is counted as being a true outer edge pixel.
|
||||
*/
|
||||
if ((!lomask[pix_nextCol] && !limask[pix_nextCol]) ||
|
||||
(!lomask[pix_prevCol] && !limask[pix_prevCol]) ||
|
||||
@ -902,65 +902,65 @@ static void do_createEdgeLocationBuffer(unsigned int t, unsigned int rw, unsigne
|
||||
unsigned int outerAccum = 0; // for looping outer edge pixel indexes, represents current position from offset
|
||||
unsigned int gradientAccum = 0; // for looping gradient pixel indexes, represents current position from offset
|
||||
/*
|
||||
Here we compute the size of buffer needed to hold (row,col) coordinates
|
||||
for each pixel previously determined to be either gradient, inner edge,
|
||||
or outer edge.
|
||||
|
||||
Allocation is done by requesting 4 bytes "sizeof(int)" per pixel, even
|
||||
though gbuf[] is declared as unsigned short* (2 bytes) because we don't
|
||||
store the pixel indexes, we only store x,y location of pixel in buffer.
|
||||
|
||||
This does make the assumption that x and y can fit in 16 unsigned bits
|
||||
so if Blender starts doing renders greater than 65536 in either direction
|
||||
this will need to allocate gbuf[] as unsigned int *and allocate 8 bytes
|
||||
per flagged pixel.
|
||||
|
||||
In general, the buffer on-screen:
|
||||
|
||||
Example: 9 by 9 pixel block
|
||||
|
||||
. = pixel non-white in both outer and inner mask
|
||||
o = pixel white in outer, but not inner mask, adjacent to "." pixel
|
||||
g = pixel white in outer, but not inner mask, not adjacent to "." pixel
|
||||
i = pixel white in inner mask, adjacent to "g" or "." pixel
|
||||
F = pixel white in inner mask, only adjacent to other pixels white in the inner mask
|
||||
|
||||
|
||||
......... <----- pixel #80
|
||||
..oooo...
|
||||
.oggggo..
|
||||
.oggiggo.
|
||||
.ogiFigo.
|
||||
.oggiggo.
|
||||
.oggggo..
|
||||
..oooo...
|
||||
pixel #00 -----> .........
|
||||
|
||||
gsz = 18 (18 "g" pixels above)
|
||||
isz = 4 (4 "i" pixels above)
|
||||
osz = 18 (18 "o" pixels above)
|
||||
|
||||
|
||||
The memory in gbuf[] after filling will look like this:
|
||||
|
||||
gradientFillOffset (0 pixels) innerEdgeOffset (18 pixels) outerEdgeOffset (22 pixels)
|
||||
/ / /
|
||||
/ / /
|
||||
|X Y X Y X Y X Y > <X Y X Y > <X Y X Y X Y > <X Y X Y | <- (x,y)
|
||||
+--------------------------------> <----------------> <------------------------> <----------------+
|
||||
|0 2 4 6 8 10 12 14 > ... <68 70 72 74 > ... <80 82 84 86 88 90 > ... <152 154 156 158 | <- bytes
|
||||
+--------------------------------> <----------------> <------------------------> <----------------+
|
||||
|g0 g0 g1 g1 g2 g2 g3 g3 > <g17 g17 i0 i0 > <i2 i2 i3 i3 o0 o0 > <o16 o16 o17 o17 | <- pixel
|
||||
/ / /
|
||||
/ / /
|
||||
/ / /
|
||||
+---------- gradientAccum (18) ---------+ +--- innerAccum (22) ---+ +--- outerAccum (40) ---+
|
||||
|
||||
|
||||
Ultimately we do need the pixel's memory buffer index to set the output
|
||||
pixel color, but it's faster to reconstruct the memory buffer location
|
||||
each iteration of the final gradient calculation than it is to deconstruct
|
||||
a memory location into x,y pairs each round.
|
||||
* Here we compute the size of buffer needed to hold (row,col) coordinates
|
||||
* for each pixel previously determined to be either gradient, inner edge,
|
||||
* or outer edge.
|
||||
*
|
||||
* Allocation is done by requesting 4 bytes "sizeof(int)" per pixel, even
|
||||
* though gbuf[] is declared as unsigned short* (2 bytes) because we don't
|
||||
* store the pixel indexes, we only store x,y location of pixel in buffer.
|
||||
*
|
||||
* This does make the assumption that x and y can fit in 16 unsigned bits
|
||||
* so if Blender starts doing renders greater than 65536 in either direction
|
||||
* this will need to allocate gbuf[] as unsigned int *and allocate 8 bytes
|
||||
* per flagged pixel.
|
||||
*
|
||||
* In general, the buffer on-screen:
|
||||
*
|
||||
* Example: 9 by 9 pixel block
|
||||
*
|
||||
* . = pixel non-white in both outer and inner mask
|
||||
* o = pixel white in outer, but not inner mask, adjacent to "." pixel
|
||||
* g = pixel white in outer, but not inner mask, not adjacent to "." pixel
|
||||
* i = pixel white in inner mask, adjacent to "g" or "." pixel
|
||||
* F = pixel white in inner mask, only adjacent to other pixels white in the inner mask
|
||||
*
|
||||
*
|
||||
* ......... <----- pixel #80
|
||||
* ..oooo...
|
||||
* .oggggo..
|
||||
* .oggiggo.
|
||||
* .ogiFigo.
|
||||
* .oggiggo.
|
||||
* .oggggo..
|
||||
* ..oooo...
|
||||
* pixel #00 -----> .........
|
||||
*
|
||||
* gsz = 18 (18 "g" pixels above)
|
||||
* isz = 4 (4 "i" pixels above)
|
||||
* osz = 18 (18 "o" pixels above)
|
||||
*
|
||||
*
|
||||
* The memory in gbuf[] after filling will look like this:
|
||||
*
|
||||
* gradientFillOffset (0 pixels) innerEdgeOffset (18 pixels) outerEdgeOffset (22 pixels)
|
||||
* / / /
|
||||
* / / /
|
||||
* |X Y X Y X Y X Y > <X Y X Y > <X Y X Y X Y > <X Y X Y | <- (x,y)
|
||||
* +--------------------------------> <----------------> <------------------------> <----------------+
|
||||
* |0 2 4 6 8 10 12 14 > ... <68 70 72 74 > ... <80 82 84 86 88 90 > ... <152 154 156 158 | <- bytes
|
||||
* +--------------------------------> <----------------> <------------------------> <----------------+
|
||||
* |g0 g0 g1 g1 g2 g2 g3 g3 > <g17 g17 i0 i0 > <i2 i2 i3 i3 o0 o0 > <o16 o16 o17 o17 | <- pixel
|
||||
* / / /
|
||||
* / / /
|
||||
* / / /
|
||||
* +---------- gradientAccum (18) ---------+ +--- innerAccum (22) ---+ +--- outerAccum (40) ---+
|
||||
*
|
||||
*
|
||||
* Ultimately we do need the pixel's memory buffer index to set the output
|
||||
* pixel color, but it's faster to reconstruct the memory buffer location
|
||||
* each iteration of the final gradient calculation than it is to deconstruct
|
||||
* a memory location into x,y pairs each round.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -120,8 +120,8 @@ static void FHT(fREAL *data, unsigned int M, unsigned int inverse)
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/* 2D Fast Hartley Transform, Mx/My -> log2 of width/height,
|
||||
nzp -> the row where zero pad data starts,
|
||||
inverse -> see above */
|
||||
* nzp -> the row where zero pad data starts,
|
||||
* inverse -> see above */
|
||||
static void FHT2D(fREAL *data, unsigned int Mx, unsigned int My,
|
||||
unsigned int nzp, unsigned int inverse)
|
||||
{
|
||||
|
@ -27,8 +27,8 @@
|
||||
#include "COM_NodeOperation.h"
|
||||
|
||||
/**
|
||||
* Class with implementation of black/white clipping for keying node
|
||||
*/
|
||||
* Class with implementation of black/white clipping for keying node
|
||||
*/
|
||||
class KeyingClipOperation : public NodeOperation {
|
||||
protected:
|
||||
float m_clipBlack;
|
||||
|
@ -27,8 +27,8 @@
|
||||
#include "COM_NodeOperation.h"
|
||||
|
||||
/**
|
||||
* Class with implementation of keying despill node
|
||||
*/
|
||||
* Class with implementation of keying despill node
|
||||
*/
|
||||
class KeyingDespillOperation : public NodeOperation {
|
||||
protected:
|
||||
SocketReader *m_pixelReader;
|
||||
|
@ -32,8 +32,8 @@
|
||||
#include "BLI_listbase.h"
|
||||
|
||||
/**
|
||||
* Class with implementation of keying node
|
||||
*/
|
||||
* Class with implementation of keying node
|
||||
*/
|
||||
class KeyingOperation : public NodeOperation {
|
||||
protected:
|
||||
SocketReader *m_pixelReader;
|
||||
|
@ -176,7 +176,7 @@ ModifierData *ED_object_modifier_add(ReportList *reports, Main *bmain, Scene *sc
|
||||
/* Return TRUE if the object has a modifier of type 'type' other than
|
||||
* the modifier pointed to be 'exclude', otherwise returns FALSE. */
|
||||
static int object_has_modifier(const Object *ob, const ModifierData *exclude,
|
||||
ModifierType type)
|
||||
ModifierType type)
|
||||
{
|
||||
ModifierData *md;
|
||||
|
||||
@ -195,10 +195,10 @@ static int object_has_modifier(const Object *ob, const ModifierData *exclude,
|
||||
*
|
||||
* If the callback ever returns TRUE, iteration will stop and the
|
||||
* function value will be TRUE. Otherwise the function returns FALSE.
|
||||
*/
|
||||
*/
|
||||
int ED_object_iter_other(Main *bmain, Object *orig_ob, int include_orig,
|
||||
int (*callback)(Object *ob, void *callback_data),
|
||||
void *callback_data)
|
||||
int (*callback)(Object *ob, void *callback_data),
|
||||
void *callback_data)
|
||||
{
|
||||
ID *ob_data_id = orig_ob->data;
|
||||
int users = ob_data_id->us;
|
||||
@ -239,8 +239,8 @@ static int object_has_modifier_cb(Object *ob, void *data)
|
||||
}
|
||||
|
||||
/* Use with ED_object_iter_other(). Sets the total number of levels
|
||||
for any multires modifiers on the object to the int pointed to by
|
||||
callback_data. */
|
||||
* for any multires modifiers on the object to the int pointed to by
|
||||
* callback_data. */
|
||||
int ED_object_multires_update_totlevels_cb(Object *ob, void *totlevel_v)
|
||||
{
|
||||
ModifierData *md;
|
||||
@ -257,16 +257,16 @@ int ED_object_multires_update_totlevels_cb(Object *ob, void *totlevel_v)
|
||||
|
||||
/* Return TRUE if no modifier of type 'type' other than 'exclude' */
|
||||
static int object_modifier_safe_to_delete(Main *bmain, Object *ob,
|
||||
ModifierData *exclude,
|
||||
ModifierType type)
|
||||
ModifierData *exclude,
|
||||
ModifierType type)
|
||||
{
|
||||
return (!object_has_modifier(ob, exclude, type) &&
|
||||
!ED_object_iter_other(bmain, ob, FALSE,
|
||||
object_has_modifier_cb, &type));
|
||||
!ED_object_iter_other(bmain, ob, FALSE,
|
||||
object_has_modifier_cb, &type));
|
||||
}
|
||||
|
||||
static int object_modifier_remove(Main *bmain, Object *ob, ModifierData *md,
|
||||
int *sort_depsgraph)
|
||||
int *sort_depsgraph)
|
||||
{
|
||||
ModifierData *obmd;
|
||||
|
||||
@ -1756,7 +1756,7 @@ static Object *modifier_skin_armature_create(struct Scene *scene,
|
||||
edges_visited = BLI_BITMAP_NEW(me->totedge, "edge_visited");
|
||||
|
||||
/* note: we use EditBones here, easier to set them up and use
|
||||
* edit-armature functions to convert back to regular bones */
|
||||
* edit-armature functions to convert back to regular bones */
|
||||
for (v = 0; v < me->totvert; v++) {
|
||||
if (mvert_skin[v].flag & MVERT_SKIN_ROOT) {
|
||||
EditBone *bone = NULL;
|
||||
|
@ -3645,8 +3645,8 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob,
|
||||
}
|
||||
|
||||
/* Returns true iff any of the smoothing modes are active (currently
|
||||
one of smooth brush, autosmooth, mask smooth, or shift-key
|
||||
smooth) */
|
||||
* one of smooth brush, autosmooth, mask smooth, or shift-key
|
||||
* smooth) */
|
||||
static int sculpt_any_smooth_mode(const Brush *brush,
|
||||
StrokeCache *cache,
|
||||
int stroke_mode)
|
||||
|
@ -2176,8 +2176,8 @@ static void constraintob_from_transdata(bConstraintOb *cob, TransData *td)
|
||||
if (td->ext->rotOrder == ROT_MODE_QUAT) {
|
||||
/* quats */
|
||||
/* objects and bones do normalization first too, otherwise
|
||||
* we don't necessarily end up with a rotation matrix, and
|
||||
* then conversion back to quat gives a different result */
|
||||
* we don't necessarily end up with a rotation matrix, and
|
||||
* then conversion back to quat gives a different result */
|
||||
float quat[4];
|
||||
normalize_qt_qt(quat, td->ext->quat);
|
||||
quat_to_mat4(cob->matrix, quat);
|
||||
|
@ -276,7 +276,7 @@ static void axisProjection(TransInfo *t, float axis[3], float in[3], float out[3
|
||||
sub_v3_v3v3(out, i1, t_con_center);
|
||||
|
||||
/* possible some values become nan when
|
||||
* viewpoint and object are both zero */
|
||||
* viewpoint and object are both zero */
|
||||
if (!finite(out[0])) out[0] = 0.0f;
|
||||
if (!finite(out[1])) out[1] = 0.0f;
|
||||
if (!finite(out[2])) out[2] = 0.0f;
|
||||
|
@ -313,7 +313,7 @@ int IMB_proxy_size_to_array_index(IMB_Proxy_Size pr_size)
|
||||
{
|
||||
switch (pr_size) {
|
||||
case IMB_PROXY_NONE: /* if we got here, something is broken anyways,
|
||||
so sane defaults... */
|
||||
* so sane defaults... */
|
||||
return 0;
|
||||
case IMB_PROXY_25:
|
||||
return 0;
|
||||
@ -333,7 +333,7 @@ int IMB_timecode_to_array_index(IMB_Timecode_Type tc)
|
||||
{
|
||||
switch (tc) {
|
||||
case IMB_TC_NONE: /* if we got here, something is broken anyways,
|
||||
so sane defaults... */
|
||||
* so sane defaults... */
|
||||
return 0;
|
||||
case IMB_TC_RECORD_RUN:
|
||||
return 0;
|
||||
@ -906,11 +906,11 @@ static int index_rebuild_ffmpeg(FFmpegIndexBuilderContext *context,
|
||||
pts_time_base * frame_rate + 0.5f);
|
||||
|
||||
/* decoding starts *always* on I-Frames,
|
||||
so: P-Frames won't work, even if all the
|
||||
information is in place, when we seek
|
||||
to the I-Frame presented *after* the P-Frame,
|
||||
but located before the P-Frame within
|
||||
the stream */
|
||||
* so: P-Frames won't work, even if all the
|
||||
* information is in place, when we seek
|
||||
* to the I-Frame presented *after* the P-Frame,
|
||||
* but located before the P-Frame within
|
||||
* the stream */
|
||||
|
||||
if (pts < seek_pos_pts) {
|
||||
s_pos = last_seek_pos;
|
||||
@ -966,7 +966,7 @@ static AviMovie *alloc_proxy_output_avi(
|
||||
double framerate;
|
||||
AviMovie *avi;
|
||||
short frs_sec = 25; /* it doesn't really matter for proxies,
|
||||
but sane defaults help anyways...*/
|
||||
* but sane defaults help anyways...*/
|
||||
float frs_sec_base = 1.0;
|
||||
|
||||
IMB_anim_get_fps(anim, &frs_sec, &frs_sec_base);
|
||||
|
@ -259,19 +259,19 @@ typedef struct GridPaintMask {
|
||||
|
||||
typedef enum MVertSkinFlag {
|
||||
/* Marks a vertex as the edge-graph root, used for calculating
|
||||
rotations for all connected edges (recursively.) Also used to
|
||||
choose a root when generating an armature. */
|
||||
* rotations for all connected edges (recursively.) Also used to
|
||||
* choose a root when generating an armature. */
|
||||
MVERT_SKIN_ROOT = 1,
|
||||
|
||||
/* Marks a branch vertex (vertex with more than two connected
|
||||
edges) so that it's neighbors are directly hulled together,
|
||||
rather than the default of generating intermediate frames. */
|
||||
* edges) so that it's neighbors are directly hulled together,
|
||||
* rather than the default of generating intermediate frames. */
|
||||
MVERT_SKIN_LOOSE = 2
|
||||
} MVertSkinFlag;
|
||||
|
||||
typedef struct MVertSkin {
|
||||
/* Radii of the skin, define how big the generated frames
|
||||
are. Currently only the first two elements are used. */
|
||||
* are. Currently only the first two elements are used. */
|
||||
float radius[3];
|
||||
|
||||
/* MVertSkinFlag */
|
||||
|
@ -224,8 +224,8 @@ static void bm_merge_dm_transform(BMesh *bm, DerivedMesh *dm, float mat[4][4],
|
||||
BMIter iter;
|
||||
|
||||
/* Add the DerivedMesh's elements to the BMesh. The pre-existing
|
||||
elements were already tagged, so the new elements can be
|
||||
identified by not having the BM_ELEM_TAG flag set. */
|
||||
* elements were already tagged, so the new elements can be
|
||||
* identified by not having the BM_ELEM_TAG flag set. */
|
||||
DM_to_bmesh_ex(dm, bm);
|
||||
|
||||
if (amd->flags & MOD_ARR_MERGE) {
|
||||
|
@ -221,8 +221,8 @@ static void local_merge(bNodeTree *localtree, bNodeTree *ntree)
|
||||
}
|
||||
else if (lnode->type==CMP_NODE_MOVIEDISTORTION) {
|
||||
/* special case for distortion node: distortion context is allocating in exec function
|
||||
and to achive much better performance on further calls this context should be
|
||||
copied back to original node */
|
||||
* and to achive much better performance on further calls this context should be
|
||||
* copied back to original node */
|
||||
if (lnode->storage) {
|
||||
if (lnode->new_node->storage)
|
||||
BKE_tracking_distortion_free(lnode->new_node->storage);
|
||||
|
@ -872,8 +872,8 @@ static void FHT(fREAL* data, unsigned int M, unsigned int inverse)
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/* 2D Fast Hartley Transform, Mx/My -> log2 of width/height,
|
||||
nzp -> the row where zero pad data starts,
|
||||
inverse -> see above */
|
||||
* nzp -> the row where zero pad data starts,
|
||||
* inverse -> see above */
|
||||
static void FHT2D(fREAL *data, unsigned int Mx, unsigned int My,
|
||||
unsigned int nzp, unsigned int inverse)
|
||||
{
|
||||
|
@ -59,7 +59,7 @@ static bNodeSocketTemplate cmp_node_bilateralblur_out[] = {
|
||||
(c1[3] - c2[3]) * (c1[3] - c2[3]))
|
||||
|
||||
/* this is the main kernel function for comparing color distances
|
||||
and adding them weighted to the final color */
|
||||
* and adding them weighted to the final color */
|
||||
#define KERNEL_ELEMENT_C3(k) \
|
||||
temp_color = src + deltas[k]; \
|
||||
ref_color = ref + deltas[k]; \
|
||||
|
@ -384,7 +384,7 @@ static void bokeh_single_image(bNode *node, CompBuf *new, CompBuf *img, float fa
|
||||
float fi = (float)i / radxf;
|
||||
float dist = sqrt(fj * fj + fi * fi);
|
||||
|
||||
//*dgauss= hexagon_filter(fi, fj);
|
||||
// *dgauss= hexagon_filter(fi, fj);
|
||||
*dgauss = RE_filter_value(nbd->filtertype, dist);
|
||||
|
||||
val += *dgauss;
|
||||
|
@ -26,8 +26,8 @@
|
||||
*/
|
||||
|
||||
/** \file blender/nodes/composite/nodes/node_composite_chromaMatte.c
|
||||
* \ingroup cmpnodes
|
||||
*/
|
||||
* \ingroup cmpnodes
|
||||
*/
|
||||
|
||||
|
||||
#include "node_composite_util.h"
|
||||
|
@ -26,8 +26,8 @@
|
||||
*/
|
||||
|
||||
/** \file blender/nodes/composite/nodes/node_composite_diffMatte.c
|
||||
* \ingroup cmpnodes
|
||||
*/
|
||||
* \ingroup cmpnodes
|
||||
*/
|
||||
|
||||
|
||||
#include "node_composite_util.h"
|
||||
|
@ -126,7 +126,7 @@ static void do_displace(bNode *node, CompBuf *stackbuf, CompBuf *cbuf, CompBuf *
|
||||
|
||||
|
||||
/* simple method for reference, linear interpolation */
|
||||
/*
|
||||
#if 0
|
||||
int x, y;
|
||||
float dx, dy;
|
||||
float u, v;
|
||||
@ -147,7 +147,7 @@ static void do_displace(bNode *node, CompBuf *stackbuf, CompBuf *cbuf, CompBuf *
|
||||
qd_setPixel(stackbuf, x, y, col);
|
||||
}
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -26,8 +26,8 @@
|
||||
*/
|
||||
|
||||
/** \file blender/nodes/composite/nodes/node_composite_distanceMatte.c
|
||||
* \ingroup cmpnodes
|
||||
*/
|
||||
* \ingroup cmpnodes
|
||||
*/
|
||||
|
||||
|
||||
#include "node_composite_util.h"
|
||||
@ -139,9 +139,9 @@ static void do_chroma_distance_matte(bNode *node, float *out, float *in)
|
||||
static void node_composit_exec_distance_matte(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
|
||||
{
|
||||
/*
|
||||
Loosely based on the Sequencer chroma key plug-in, but enhanced to work in other color spaces and
|
||||
uses a different difference function (suggested in forums of vfxtalk.com).
|
||||
*/
|
||||
* Loosely based on the Sequencer chroma key plug-in, but enhanced to work in other color spaces and
|
||||
* uses a different difference function (suggested in forums of vfxtalk.com).
|
||||
*/
|
||||
CompBuf *workbuf;
|
||||
CompBuf *inbuf;
|
||||
NodeChroma *c;
|
||||
|
@ -368,9 +368,11 @@ static CompBuf *node_composit_get_image(RenderData *rd, Image *ima, ImageUser *i
|
||||
stackbuf->malloc= alloc;
|
||||
}
|
||||
|
||||
/*code to respect the premul flag of images; I'm
|
||||
not sure if this is a good idea for multilayer images,
|
||||
since it never worked before for them.
|
||||
/* code to respect the premul flag of images; I'm
|
||||
* not sure if this is a good idea for multilayer images,
|
||||
* since it never worked before for them.
|
||||
*/
|
||||
#if 0
|
||||
if (type==CB_RGBA && ima->flag & IMA_DO_PREMUL) {
|
||||
//premul the image
|
||||
int i;
|
||||
@ -382,7 +384,7 @@ static CompBuf *node_composit_get_image(RenderData *rd, Image *ima, ImageUser *i
|
||||
pixel[2] *= pixel[3];
|
||||
}
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
return stackbuf;
|
||||
}
|
||||
|
||||
@ -481,8 +483,8 @@ static void node_composit_exec_image(void *data, bNode *node, bNodeStack **UNUSE
|
||||
int i;
|
||||
float *pixel;
|
||||
|
||||
/*first duplicate stackbuf->rect, since it's just a pointer
|
||||
to the source imbuf, and we don't want to change that.*/
|
||||
/* first duplicate stackbuf->rect, since it's just a pointer
|
||||
* to the source imbuf, and we don't want to change that.*/
|
||||
stackbuf->rect = MEM_dupallocN(stackbuf->rect);
|
||||
|
||||
/* since stackbuf now has allocated memory, rather than just a pointer,
|
||||
|
@ -291,10 +291,11 @@ static void node_composit_exec_view_levels(void *data, bNode *node, bNodeStack *
|
||||
mean=brightness_mean(node, in[0]->data);
|
||||
std_dev=brightness_standard_deviation(node, in[0]->data, mean);
|
||||
|
||||
/* Printf debuging ;)
|
||||
/* Printf debuging ;) */
|
||||
#if 0
|
||||
printf("Mean: %f\n", mean);
|
||||
printf("Std Dev: %f\n", std_dev);
|
||||
*/
|
||||
#endif
|
||||
|
||||
if (out[0]->hasoutput)
|
||||
out[0]->vec[0]= mean;
|
||||
|
@ -282,7 +282,7 @@ int ntreeTexExecTree(
|
||||
if (texres->nor) retval |= TEX_NOR;
|
||||
retval |= TEX_RGB;
|
||||
/* confusing stuff; the texture output node sets this to NULL to indicate no normal socket was set
|
||||
however, the texture code checks this for other reasons (namely, a normal is required for material) */
|
||||
* however, the texture code checks this for other reasons (namely, a normal is required for material) */
|
||||
texres->nor= nor;
|
||||
|
||||
return retval;
|
||||
|
@ -31,20 +31,20 @@
|
||||
|
||||
|
||||
/*
|
||||
HOW TEXTURE NODES WORK
|
||||
|
||||
In contrast to Shader nodes, which place a color into the output
|
||||
stack when executed, Texture nodes place a TexDelegate* there. To
|
||||
obtain a color value from this, a node further up the chain reads
|
||||
the TexDelegate* from its input stack, and uses tex_call_delegate to
|
||||
retrieve the color from the delegate.
|
||||
|
||||
comments: (ton)
|
||||
|
||||
This system needs recode, a node system should rely on the stack, and
|
||||
callbacks for nodes only should evaluate own node, not recursively go
|
||||
over other previous ones.
|
||||
*/
|
||||
* HOW TEXTURE NODES WORK
|
||||
*
|
||||
* In contrast to Shader nodes, which place a color into the output
|
||||
* stack when executed, Texture nodes place a TexDelegate* there. To
|
||||
* obtain a color value from this, a node further up the chain reads
|
||||
* the TexDelegate* from its input stack, and uses tex_call_delegate to
|
||||
* retrieve the color from the delegate.
|
||||
*
|
||||
* comments: (ton)
|
||||
*
|
||||
* This system needs recode, a node system should rely on the stack, and
|
||||
* callbacks for nodes only should evaluate own node, not recursively go
|
||||
* over other previous ones.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include "node_texture_util.h"
|
||||
|
@ -97,7 +97,7 @@ typedef struct TexParams {
|
||||
int osatex;
|
||||
|
||||
/* optional. we don't really want these here, but image
|
||||
textures need to do mapping & color correction */
|
||||
* textures need to do mapping & color correction */
|
||||
ShadeInput *shi;
|
||||
MTex *mtex;
|
||||
} TexParams;
|
||||
|
@ -36,8 +36,8 @@
|
||||
#include "RE_shader_ext.h"
|
||||
|
||||
/*
|
||||
In this file: wrappers to use procedural textures as nodes
|
||||
*/
|
||||
* In this file: wrappers to use procedural textures as nodes
|
||||
*/
|
||||
|
||||
|
||||
static bNodeSocketTemplate outputs_both[]= {
|
||||
|
@ -327,16 +327,16 @@ void RE_make_stars(Render *re, Scene *scenev3d, void (*initfunc)(void),
|
||||
|
||||
#define UVTOINDEX(u,v) (startvlak + (u) * sizev + (v))
|
||||
/*
|
||||
|
||||
NOTE THAT U/V COORDINATES ARE SOMETIMES SWAPPED !!
|
||||
|
||||
^ ()----p4----p3----()
|
||||
| | | | |
|
||||
u | | F1 | F2 |
|
||||
| | | |
|
||||
()----p1----p2----()
|
||||
v ->
|
||||
*/
|
||||
*
|
||||
* NOTE THAT U/V COORDINATES ARE SOMETIMES SWAPPED !!
|
||||
*
|
||||
* ^ ()----p4----p3----()
|
||||
* | | | | |
|
||||
* u | | F1 | F2 |
|
||||
* | | | |
|
||||
* ()----p1----p2----()
|
||||
* v ->
|
||||
*/
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
@ -3226,12 +3226,15 @@ static void init_camera_inside_volumes(Render *re)
|
||||
}
|
||||
}
|
||||
|
||||
/* debug {
|
||||
MatInside *m;
|
||||
for (m=re->render_volumes_inside.first; m; m=m->next) {
|
||||
printf("matinside: ma: %s\n", m->ma->id.name+2);
|
||||
|
||||
#if 0 /* debug */
|
||||
{
|
||||
MatInside *m;
|
||||
for (m = re->render_volumes_inside.first; m; m = m->next) {
|
||||
printf("matinside: ma: %s\n", m->ma->id.name + 2);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
#endif
|
||||
}
|
||||
|
||||
static void add_volume(Render *re, ObjectRen *obr, Material *ma)
|
||||
|
@ -274,14 +274,14 @@ public:
|
||||
|
||||
protected:
|
||||
/**
|
||||
m_eventStatusTables are two tables that contain current and previous
|
||||
status of all events
|
||||
*/
|
||||
* m_eventStatusTables are two tables that contain current and previous
|
||||
* status of all events
|
||||
*/
|
||||
|
||||
SCA_InputEvent m_eventStatusTables[2][SCA_IInputDevice::KX_MAX_KEYS];
|
||||
/**
|
||||
m_currentTable is index for m_keyStatusTable that toggle between 0 or 1
|
||||
*/
|
||||
* m_currentTable is index for m_keyStatusTable that toggle between 0 or 1
|
||||
*/
|
||||
int m_currentTable;
|
||||
void ClearStatusTable(int tableid);
|
||||
|
||||
|
@ -56,7 +56,7 @@ SCA_LogicManager::~SCA_LogicManager()
|
||||
assert(m_activeActuators.Empty());
|
||||
}
|
||||
|
||||
/*
|
||||
#if 0
|
||||
// this kind of fixes bug 398 but breakes games, so better leave it out for now.
|
||||
// a removed object's gameobject (and logicbricks and stuff) didn't get released
|
||||
// because it was still in the m_mapStringToGameObjects map.
|
||||
@ -77,7 +77,7 @@ void SCA_LogicManager::RemoveGameObject(const STR_String& gameobjname)
|
||||
|
||||
m_mapStringToGameObjects.remove(gameobjname);
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
|
||||
|
||||
void SCA_LogicManager::RegisterEventManager(SCA_EventManager* eventmgr)
|
||||
|
@ -318,9 +318,9 @@ CValue* SCA_PropertySensor::FindIdentifier(const STR_String& identifiername)
|
||||
|
||||
int SCA_PropertySensor::validValueForProperty(void *self, const PyAttributeDef*)
|
||||
{
|
||||
/* If someone actually do type checking please make sure the 'max' and 'min'
|
||||
are checked as well (currently they are calling the PrecalculateRangeExpression
|
||||
function directly */
|
||||
/* If someone actually do type checking please make sure the 'max' and 'min'
|
||||
* are checked as well (currently they are calling the PrecalculateRangeExpression
|
||||
* function directly */
|
||||
|
||||
/* There is no type checking at this moment, unfortunately... */
|
||||
return 0;
|
||||
|
@ -71,21 +71,19 @@ SCA_PythonController::SCA_PythonController(SCA_IObject* gameobj, int mode)
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
#if 0
|
||||
//debugging
|
||||
CValue* SCA_PythonController::AddRef()
|
||||
CValue *SCA_PythonController::AddRef()
|
||||
{
|
||||
//printf("AddRef refcount = %i\n",GetRefCount());
|
||||
return CValue::AddRef();
|
||||
}
|
||||
int SCA_PythonController::Release()
|
||||
int SCA_PythonController::Release()
|
||||
{
|
||||
//printf("Release refcount = %i\n",GetRefCount());
|
||||
return CValue::Release();
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
SCA_PythonController::~SCA_PythonController()
|
||||
{
|
||||
@ -122,13 +120,14 @@ CValue* SCA_PythonController::GetReplica()
|
||||
if (m_pythondictionary)
|
||||
replica->m_pythondictionary = PyDict_Copy(m_pythondictionary);
|
||||
|
||||
/*
|
||||
#if 0
|
||||
// The other option is to incref the replica->m_pythondictionary -
|
||||
// the replica objects can then share data.
|
||||
if (m_pythondictionary)
|
||||
Py_INCREF(replica->m_pythondictionary);
|
||||
*/
|
||||
#endif
|
||||
|
||||
#endif /* WITH_PYTHON */
|
||||
|
||||
// this will copy properties and so on...
|
||||
replica->ProcessReplica();
|
||||
|
@ -87,7 +87,7 @@ protected:
|
||||
/** Height of the context. */
|
||||
int m_height;
|
||||
/** Rect that defines the area used for rendering,
|
||||
relative to the context */
|
||||
* relative to the context */
|
||||
RAS_Rect m_displayarea;
|
||||
|
||||
/** Storage for the banners to display. */
|
||||
|
@ -35,13 +35,13 @@
|
||||
#include "PHY_IPhysicsEnvironment.h"
|
||||
|
||||
/**
|
||||
* DummyPhysicsEnvironment is an empty placeholder
|
||||
* Alternatives are ODE,Sumo and Dynamo PhysicsEnvironments
|
||||
* Use DummyPhysicsEnvironment as a base to integrate your own physics engine
|
||||
* Physics Environment takes care of stepping the simulation and is a container for physics entities (rigidbodies,constraints, materials etc.)
|
||||
*
|
||||
* A derived class may be able to 'construct' entities by loading and/or converting
|
||||
*/
|
||||
* DummyPhysicsEnvironment is an empty placeholder
|
||||
* Alternatives are ODE,Sumo and Dynamo PhysicsEnvironments
|
||||
* Use DummyPhysicsEnvironment as a base to integrate your own physics engine
|
||||
* Physics Environment takes care of stepping the simulation and is a container for physics entities (rigidbodies,constraints, materials etc.)
|
||||
*
|
||||
* A derived class may be able to 'construct' entities by loading and/or converting
|
||||
*/
|
||||
class DummyPhysicsEnvironment : public PHY_IPhysicsEnvironment
|
||||
{
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user