diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4be1c91 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Disable LF normalization for all files +* -text \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..416f670 --- /dev/null +++ b/.gitignore @@ -0,0 +1,215 @@ +################# +## Eclipse +################# + +*.pydevproject +.project +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.classpath +.settings/ +.loadpath + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + + +################# +## Visual Studio +################# + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +build/ +[Bb]in/ +[Oo]bj/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.scc + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml +*.pubxml + +# NuGet Packages Directory +## TODO: If you have NuGet Package Restore enabled, uncomment the next line +#packages/ + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml +*.pfx +*.publishsettings + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +App_Data/*.mdf +App_Data/*.ldf + +############# +## Windows detritus +############# + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac crap +.DS_Store + + +############# +## Python +############# + +*.py[co] + +# Packages +*.egg +*.egg-info +dist/ +build/ +eggs/ +parts/ +var/ +sdist/ +develop-eggs/ +.installed.cfg + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox + +#Translations +*.mo + +#Mr Developer +.mr.developer.cfg diff --git a/PROJ1_MAC/glfw/include/GL/glfw.h b/PROJ1_MAC/glfw/include/GL/glfw.h deleted file mode 100755 index 6b4d80c..0000000 --- a/PROJ1_MAC/glfw/include/GL/glfw.h +++ /dev/null @@ -1,518 +0,0 @@ -/************************************************************************ - * GLFW - An OpenGL framework - * API version: 2.7 - * WWW: http://www.glfw.org/ - *------------------------------------------------------------------------ - * Copyright (c) 2002-2006 Marcus Geelnard - * Copyright (c) 2006-2010 Camilla Berglund - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would - * be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and must not - * be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - *************************************************************************/ - -#ifndef __glfw_h_ -#define __glfw_h_ - -#ifdef __cplusplus -extern "C" { -#endif - - -/************************************************************************* - * Global definitions - *************************************************************************/ - -/* We need a NULL pointer from time to time */ -#ifndef NULL - #ifdef __cplusplus - #define NULL 0 - #else - #define NULL ((void *)0) - #endif -#endif /* NULL */ - - -/* ------------------- BEGIN SYSTEM/COMPILER SPECIFIC -------------------- */ - -/* Please report any probles that you find with your compiler, which may - * be solved in this section! There are several compilers that I have not - * been able to test this file with yet. - * - * First: If we are we on Windows, we want a single define for it (_WIN32) - * (Note: For Cygwin the compiler flag -mwin32 should be used, but to - * make sure that things run smoothly for Cygwin users, we add __CYGWIN__ - * to the list of "valid Win32 identifiers", which removes the need for - * -mwin32) - */ -#if !defined(_WIN32) && (defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__)) - #define _WIN32 -#endif /* _WIN32 */ - -/* In order for extension support to be portable, we need to define an - * OpenGL function call method. We use the keyword APIENTRY, which is - * defined for Win32. (Note: Windows also needs this for ) - */ -#ifndef APIENTRY - #ifdef _WIN32 - #define APIENTRY __stdcall - #else - #define APIENTRY - #endif - #define GL_APIENTRY_DEFINED -#endif /* APIENTRY */ - - -/* The following three defines are here solely to make some Windows-based - * files happy. Theoretically we could include , but - * it has the major drawback of severely polluting our namespace. - */ - -/* Under Windows, we need WINGDIAPI defined */ -#if !defined(WINGDIAPI) && defined(_WIN32) - #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__POCC__) - /* Microsoft Visual C++, Borland C++ Builder and Pelles C */ - #define WINGDIAPI __declspec(dllimport) - #elif defined(__LCC__) - /* LCC-Win32 */ - #define WINGDIAPI __stdcall - #else - /* Others (e.g. MinGW, Cygwin) */ - #define WINGDIAPI extern - #endif - #define GL_WINGDIAPI_DEFINED -#endif /* WINGDIAPI */ - -/* Some files also need CALLBACK defined */ -#if !defined(CALLBACK) && defined(_WIN32) - #if defined(_MSC_VER) - /* Microsoft Visual C++ */ - #if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS) - #define CALLBACK __stdcall - #else - #define CALLBACK - #endif - #else - /* Other Windows compilers */ - #define CALLBACK __stdcall - #endif - #define GLU_CALLBACK_DEFINED -#endif /* CALLBACK */ - -/* Microsoft Visual C++, Borland C++ and Pelles C needs wchar_t */ -#if defined(_WIN32) && (defined(_MSC_VER) || defined(__BORLANDC__) || defined(__POCC__)) && !defined(_WCHAR_T_DEFINED) - typedef unsigned short wchar_t; - #define _WCHAR_T_DEFINED -#endif /* _WCHAR_T_DEFINED */ - - -/* ---------------- GLFW related system specific defines ----------------- */ - -#if defined(_WIN32) && defined(GLFW_BUILD_DLL) - - /* We are building a Win32 DLL */ - #define GLFWAPI __declspec(dllexport) - #define GLFWAPIENTRY __stdcall - #define GLFWCALL __stdcall - -#elif defined(_WIN32) && defined(GLFW_DLL) - - /* We are calling a Win32 DLL */ - #if defined(__LCC__) - #define GLFWAPI extern - #else - #define GLFWAPI __declspec(dllimport) - #endif - #define GLFWAPIENTRY __stdcall - #define GLFWCALL __stdcall - -#else - - /* We are either building/calling a static lib or we are non-win32 */ - #define GLFWAPIENTRY - #define GLFWAPI - #define GLFWCALL - -#endif - -/* -------------------- END SYSTEM/COMPILER SPECIFIC --------------------- */ - -/* Include standard OpenGL headers: GLFW uses GL_FALSE/GL_TRUE, and it is - * convenient for the user to only have to include . This also - * solves the problem with Windows and needing some - * special defines which normally requires the user to include - * (which is not a nice solution for portable programs). - */ -#if defined(__APPLE_CC__) - #if defined(GLFW_INCLUDE_GL3) - #include - #else - #define GL_GLEXT_LEGACY - #include - #endif - #ifndef GLFW_NO_GLU - #include - #endif -#else - #if defined(GLFW_INCLUDE_GL3) - #include - #else - #include - #endif - #ifndef GLFW_NO_GLU - #include - #endif -#endif - - -/************************************************************************* - * GLFW version - *************************************************************************/ - -#define GLFW_VERSION_MAJOR 2 -#define GLFW_VERSION_MINOR 7 -#define GLFW_VERSION_REVISION 6 - - -/************************************************************************* - * Input handling definitions - *************************************************************************/ - -/* Key and button state/action definitions */ -#define GLFW_RELEASE 0 -#define GLFW_PRESS 1 - -/* Keyboard key definitions: 8-bit ISO-8859-1 (Latin 1) encoding is used - * for printable keys (such as A-Z, 0-9 etc), and values above 256 - * represent special (non-printable) keys (e.g. F1, Page Up etc). - */ -#define GLFW_KEY_UNKNOWN -1 -#define GLFW_KEY_SPACE 32 -#define GLFW_KEY_SPECIAL 256 -#define GLFW_KEY_ESC (GLFW_KEY_SPECIAL+1) -#define GLFW_KEY_F1 (GLFW_KEY_SPECIAL+2) -#define GLFW_KEY_F2 (GLFW_KEY_SPECIAL+3) -#define GLFW_KEY_F3 (GLFW_KEY_SPECIAL+4) -#define GLFW_KEY_F4 (GLFW_KEY_SPECIAL+5) -#define GLFW_KEY_F5 (GLFW_KEY_SPECIAL+6) -#define GLFW_KEY_F6 (GLFW_KEY_SPECIAL+7) -#define GLFW_KEY_F7 (GLFW_KEY_SPECIAL+8) -#define GLFW_KEY_F8 (GLFW_KEY_SPECIAL+9) -#define GLFW_KEY_F9 (GLFW_KEY_SPECIAL+10) -#define GLFW_KEY_F10 (GLFW_KEY_SPECIAL+11) -#define GLFW_KEY_F11 (GLFW_KEY_SPECIAL+12) -#define GLFW_KEY_F12 (GLFW_KEY_SPECIAL+13) -#define GLFW_KEY_F13 (GLFW_KEY_SPECIAL+14) -#define GLFW_KEY_F14 (GLFW_KEY_SPECIAL+15) -#define GLFW_KEY_F15 (GLFW_KEY_SPECIAL+16) -#define GLFW_KEY_F16 (GLFW_KEY_SPECIAL+17) -#define GLFW_KEY_F17 (GLFW_KEY_SPECIAL+18) -#define GLFW_KEY_F18 (GLFW_KEY_SPECIAL+19) -#define GLFW_KEY_F19 (GLFW_KEY_SPECIAL+20) -#define GLFW_KEY_F20 (GLFW_KEY_SPECIAL+21) -#define GLFW_KEY_F21 (GLFW_KEY_SPECIAL+22) -#define GLFW_KEY_F22 (GLFW_KEY_SPECIAL+23) -#define GLFW_KEY_F23 (GLFW_KEY_SPECIAL+24) -#define GLFW_KEY_F24 (GLFW_KEY_SPECIAL+25) -#define GLFW_KEY_F25 (GLFW_KEY_SPECIAL+26) -#define GLFW_KEY_UP (GLFW_KEY_SPECIAL+27) -#define GLFW_KEY_DOWN (GLFW_KEY_SPECIAL+28) -#define GLFW_KEY_LEFT (GLFW_KEY_SPECIAL+29) -#define GLFW_KEY_RIGHT (GLFW_KEY_SPECIAL+30) -#define GLFW_KEY_LSHIFT (GLFW_KEY_SPECIAL+31) -#define GLFW_KEY_RSHIFT (GLFW_KEY_SPECIAL+32) -#define GLFW_KEY_LCTRL (GLFW_KEY_SPECIAL+33) -#define GLFW_KEY_RCTRL (GLFW_KEY_SPECIAL+34) -#define GLFW_KEY_LALT (GLFW_KEY_SPECIAL+35) -#define GLFW_KEY_RALT (GLFW_KEY_SPECIAL+36) -#define GLFW_KEY_TAB (GLFW_KEY_SPECIAL+37) -#define GLFW_KEY_ENTER (GLFW_KEY_SPECIAL+38) -#define GLFW_KEY_BACKSPACE (GLFW_KEY_SPECIAL+39) -#define GLFW_KEY_INSERT (GLFW_KEY_SPECIAL+40) -#define GLFW_KEY_DEL (GLFW_KEY_SPECIAL+41) -#define GLFW_KEY_PAGEUP (GLFW_KEY_SPECIAL+42) -#define GLFW_KEY_PAGEDOWN (GLFW_KEY_SPECIAL+43) -#define GLFW_KEY_HOME (GLFW_KEY_SPECIAL+44) -#define GLFW_KEY_END (GLFW_KEY_SPECIAL+45) -#define GLFW_KEY_KP_0 (GLFW_KEY_SPECIAL+46) -#define GLFW_KEY_KP_1 (GLFW_KEY_SPECIAL+47) -#define GLFW_KEY_KP_2 (GLFW_KEY_SPECIAL+48) -#define GLFW_KEY_KP_3 (GLFW_KEY_SPECIAL+49) -#define GLFW_KEY_KP_4 (GLFW_KEY_SPECIAL+50) -#define GLFW_KEY_KP_5 (GLFW_KEY_SPECIAL+51) -#define GLFW_KEY_KP_6 (GLFW_KEY_SPECIAL+52) -#define GLFW_KEY_KP_7 (GLFW_KEY_SPECIAL+53) -#define GLFW_KEY_KP_8 (GLFW_KEY_SPECIAL+54) -#define GLFW_KEY_KP_9 (GLFW_KEY_SPECIAL+55) -#define GLFW_KEY_KP_DIVIDE (GLFW_KEY_SPECIAL+56) -#define GLFW_KEY_KP_MULTIPLY (GLFW_KEY_SPECIAL+57) -#define GLFW_KEY_KP_SUBTRACT (GLFW_KEY_SPECIAL+58) -#define GLFW_KEY_KP_ADD (GLFW_KEY_SPECIAL+59) -#define GLFW_KEY_KP_DECIMAL (GLFW_KEY_SPECIAL+60) -#define GLFW_KEY_KP_EQUAL (GLFW_KEY_SPECIAL+61) -#define GLFW_KEY_KP_ENTER (GLFW_KEY_SPECIAL+62) -#define GLFW_KEY_KP_NUM_LOCK (GLFW_KEY_SPECIAL+63) -#define GLFW_KEY_CAPS_LOCK (GLFW_KEY_SPECIAL+64) -#define GLFW_KEY_SCROLL_LOCK (GLFW_KEY_SPECIAL+65) -#define GLFW_KEY_PAUSE (GLFW_KEY_SPECIAL+66) -#define GLFW_KEY_LSUPER (GLFW_KEY_SPECIAL+67) -#define GLFW_KEY_RSUPER (GLFW_KEY_SPECIAL+68) -#define GLFW_KEY_MENU (GLFW_KEY_SPECIAL+69) -#define GLFW_KEY_LAST GLFW_KEY_MENU - -/* Mouse button definitions */ -#define GLFW_MOUSE_BUTTON_1 0 -#define GLFW_MOUSE_BUTTON_2 1 -#define GLFW_MOUSE_BUTTON_3 2 -#define GLFW_MOUSE_BUTTON_4 3 -#define GLFW_MOUSE_BUTTON_5 4 -#define GLFW_MOUSE_BUTTON_6 5 -#define GLFW_MOUSE_BUTTON_7 6 -#define GLFW_MOUSE_BUTTON_8 7 -#define GLFW_MOUSE_BUTTON_LAST GLFW_MOUSE_BUTTON_8 - -/* Mouse button aliases */ -#define GLFW_MOUSE_BUTTON_LEFT GLFW_MOUSE_BUTTON_1 -#define GLFW_MOUSE_BUTTON_RIGHT GLFW_MOUSE_BUTTON_2 -#define GLFW_MOUSE_BUTTON_MIDDLE GLFW_MOUSE_BUTTON_3 - - -/* Joystick identifiers */ -#define GLFW_JOYSTICK_1 0 -#define GLFW_JOYSTICK_2 1 -#define GLFW_JOYSTICK_3 2 -#define GLFW_JOYSTICK_4 3 -#define GLFW_JOYSTICK_5 4 -#define GLFW_JOYSTICK_6 5 -#define GLFW_JOYSTICK_7 6 -#define GLFW_JOYSTICK_8 7 -#define GLFW_JOYSTICK_9 8 -#define GLFW_JOYSTICK_10 9 -#define GLFW_JOYSTICK_11 10 -#define GLFW_JOYSTICK_12 11 -#define GLFW_JOYSTICK_13 12 -#define GLFW_JOYSTICK_14 13 -#define GLFW_JOYSTICK_15 14 -#define GLFW_JOYSTICK_16 15 -#define GLFW_JOYSTICK_LAST GLFW_JOYSTICK_16 - - -/************************************************************************* - * Other definitions - *************************************************************************/ - -/* glfwOpenWindow modes */ -#define GLFW_WINDOW 0x00010001 -#define GLFW_FULLSCREEN 0x00010002 - -/* glfwGetWindowParam tokens */ -#define GLFW_OPENED 0x00020001 -#define GLFW_ACTIVE 0x00020002 -#define GLFW_ICONIFIED 0x00020003 -#define GLFW_ACCELERATED 0x00020004 -#define GLFW_RED_BITS 0x00020005 -#define GLFW_GREEN_BITS 0x00020006 -#define GLFW_BLUE_BITS 0x00020007 -#define GLFW_ALPHA_BITS 0x00020008 -#define GLFW_DEPTH_BITS 0x00020009 -#define GLFW_STENCIL_BITS 0x0002000A - -/* The following constants are used for both glfwGetWindowParam - * and glfwOpenWindowHint - */ -#define GLFW_REFRESH_RATE 0x0002000B -#define GLFW_ACCUM_RED_BITS 0x0002000C -#define GLFW_ACCUM_GREEN_BITS 0x0002000D -#define GLFW_ACCUM_BLUE_BITS 0x0002000E -#define GLFW_ACCUM_ALPHA_BITS 0x0002000F -#define GLFW_AUX_BUFFERS 0x00020010 -#define GLFW_STEREO 0x00020011 -#define GLFW_WINDOW_NO_RESIZE 0x00020012 -#define GLFW_FSAA_SAMPLES 0x00020013 -#define GLFW_OPENGL_VERSION_MAJOR 0x00020014 -#define GLFW_OPENGL_VERSION_MINOR 0x00020015 -#define GLFW_OPENGL_FORWARD_COMPAT 0x00020016 -#define GLFW_OPENGL_DEBUG_CONTEXT 0x00020017 -#define GLFW_OPENGL_PROFILE 0x00020018 - -/* GLFW_OPENGL_PROFILE tokens */ -#define GLFW_OPENGL_CORE_PROFILE 0x00050001 -#define GLFW_OPENGL_COMPAT_PROFILE 0x00050002 - -/* glfwEnable/glfwDisable tokens */ -#define GLFW_MOUSE_CURSOR 0x00030001 -#define GLFW_STICKY_KEYS 0x00030002 -#define GLFW_STICKY_MOUSE_BUTTONS 0x00030003 -#define GLFW_SYSTEM_KEYS 0x00030004 -#define GLFW_KEY_REPEAT 0x00030005 -#define GLFW_AUTO_POLL_EVENTS 0x00030006 - -/* glfwWaitThread wait modes */ -#define GLFW_WAIT 0x00040001 -#define GLFW_NOWAIT 0x00040002 - -/* glfwGetJoystickParam tokens */ -#define GLFW_PRESENT 0x00050001 -#define GLFW_AXES 0x00050002 -#define GLFW_BUTTONS 0x00050003 - -/* glfwReadImage/glfwLoadTexture2D flags */ -#define GLFW_NO_RESCALE_BIT 0x00000001 /* Only for glfwReadImage */ -#define GLFW_ORIGIN_UL_BIT 0x00000002 -#define GLFW_BUILD_MIPMAPS_BIT 0x00000004 /* Only for glfwLoadTexture2D */ -#define GLFW_ALPHA_MAP_BIT 0x00000008 - -/* Time spans longer than this (seconds) are considered to be infinity */ -#define GLFW_INFINITY 100000.0 - - -/************************************************************************* - * Typedefs - *************************************************************************/ - -/* The video mode structure used by glfwGetVideoModes() */ -typedef struct { - int Width, Height; - int RedBits, BlueBits, GreenBits; -} GLFWvidmode; - -/* Image/texture information */ -typedef struct { - int Width, Height; - int Format; - int BytesPerPixel; - unsigned char *Data; -} GLFWimage; - -/* Thread ID */ -typedef int GLFWthread; - -/* Mutex object */ -typedef void * GLFWmutex; - -/* Condition variable object */ -typedef void * GLFWcond; - -/* Function pointer types */ -typedef void (GLFWCALL * GLFWwindowsizefun)(int,int); -typedef int (GLFWCALL * GLFWwindowclosefun)(void); -typedef void (GLFWCALL * GLFWwindowrefreshfun)(void); -typedef void (GLFWCALL * GLFWmousebuttonfun)(int,int); -typedef void (GLFWCALL * GLFWmouseposfun)(int,int); -typedef void (GLFWCALL * GLFWmousewheelfun)(int); -typedef void (GLFWCALL * GLFWkeyfun)(int,int); -typedef void (GLFWCALL * GLFWcharfun)(int,int); -typedef void (GLFWCALL * GLFWthreadfun)(void *); - - -/************************************************************************* - * Prototypes - *************************************************************************/ - -/* GLFW initialization, termination and version querying */ -GLFWAPI int GLFWAPIENTRY glfwInit( void ); -GLFWAPI void GLFWAPIENTRY glfwTerminate( void ); -GLFWAPI void GLFWAPIENTRY glfwGetVersion( int *major, int *minor, int *rev ); - -/* Window handling */ -GLFWAPI int GLFWAPIENTRY glfwOpenWindow( int width, int height, int redbits, int greenbits, int bluebits, int alphabits, int depthbits, int stencilbits, int mode ); -GLFWAPI void GLFWAPIENTRY glfwOpenWindowHint( int target, int hint ); -GLFWAPI void GLFWAPIENTRY glfwCloseWindow( void ); -GLFWAPI void GLFWAPIENTRY glfwSetWindowTitle( const char *title ); -GLFWAPI void GLFWAPIENTRY glfwGetWindowSize( int *width, int *height ); -GLFWAPI void GLFWAPIENTRY glfwSetWindowSize( int width, int height ); -GLFWAPI void GLFWAPIENTRY glfwSetWindowPos( int x, int y ); -GLFWAPI void GLFWAPIENTRY glfwIconifyWindow( void ); -GLFWAPI void GLFWAPIENTRY glfwRestoreWindow( void ); -GLFWAPI void GLFWAPIENTRY glfwSwapBuffers( void ); -GLFWAPI void GLFWAPIENTRY glfwSwapInterval( int interval ); -GLFWAPI int GLFWAPIENTRY glfwGetWindowParam( int param ); -GLFWAPI void GLFWAPIENTRY glfwSetWindowSizeCallback( GLFWwindowsizefun cbfun ); -GLFWAPI void GLFWAPIENTRY glfwSetWindowCloseCallback( GLFWwindowclosefun cbfun ); -GLFWAPI void GLFWAPIENTRY glfwSetWindowRefreshCallback( GLFWwindowrefreshfun cbfun ); - -/* Video mode functions */ -GLFWAPI int GLFWAPIENTRY glfwGetVideoModes( GLFWvidmode *list, int maxcount ); -GLFWAPI void GLFWAPIENTRY glfwGetDesktopMode( GLFWvidmode *mode ); - -/* Input handling */ -GLFWAPI void GLFWAPIENTRY glfwPollEvents( void ); -GLFWAPI void GLFWAPIENTRY glfwWaitEvents( void ); -GLFWAPI int GLFWAPIENTRY glfwGetKey( int key ); -GLFWAPI int GLFWAPIENTRY glfwGetMouseButton( int button ); -GLFWAPI void GLFWAPIENTRY glfwGetMousePos( int *xpos, int *ypos ); -GLFWAPI void GLFWAPIENTRY glfwSetMousePos( int xpos, int ypos ); -GLFWAPI int GLFWAPIENTRY glfwGetMouseWheel( void ); -GLFWAPI void GLFWAPIENTRY glfwSetMouseWheel( int pos ); -GLFWAPI void GLFWAPIENTRY glfwSetKeyCallback( GLFWkeyfun cbfun ); -GLFWAPI void GLFWAPIENTRY glfwSetCharCallback( GLFWcharfun cbfun ); -GLFWAPI void GLFWAPIENTRY glfwSetMouseButtonCallback( GLFWmousebuttonfun cbfun ); -GLFWAPI void GLFWAPIENTRY glfwSetMousePosCallback( GLFWmouseposfun cbfun ); -GLFWAPI void GLFWAPIENTRY glfwSetMouseWheelCallback( GLFWmousewheelfun cbfun ); - -/* Joystick input */ -GLFWAPI int GLFWAPIENTRY glfwGetJoystickParam( int joy, int param ); -GLFWAPI int GLFWAPIENTRY glfwGetJoystickPos( int joy, float *pos, int numaxes ); -GLFWAPI int GLFWAPIENTRY glfwGetJoystickButtons( int joy, unsigned char *buttons, int numbuttons ); - -/* Time */ -GLFWAPI double GLFWAPIENTRY glfwGetTime( void ); -GLFWAPI void GLFWAPIENTRY glfwSetTime( double time ); -GLFWAPI void GLFWAPIENTRY glfwSleep( double time ); - -/* Extension support */ -GLFWAPI int GLFWAPIENTRY glfwExtensionSupported( const char *extension ); -GLFWAPI void* GLFWAPIENTRY glfwGetProcAddress( const char *procname ); -GLFWAPI void GLFWAPIENTRY glfwGetGLVersion( int *major, int *minor, int *rev ); - -/* Threading support */ -GLFWAPI GLFWthread GLFWAPIENTRY glfwCreateThread( GLFWthreadfun fun, void *arg ); -GLFWAPI void GLFWAPIENTRY glfwDestroyThread( GLFWthread ID ); -GLFWAPI int GLFWAPIENTRY glfwWaitThread( GLFWthread ID, int waitmode ); -GLFWAPI GLFWthread GLFWAPIENTRY glfwGetThreadID( void ); -GLFWAPI GLFWmutex GLFWAPIENTRY glfwCreateMutex( void ); -GLFWAPI void GLFWAPIENTRY glfwDestroyMutex( GLFWmutex mutex ); -GLFWAPI void GLFWAPIENTRY glfwLockMutex( GLFWmutex mutex ); -GLFWAPI void GLFWAPIENTRY glfwUnlockMutex( GLFWmutex mutex ); -GLFWAPI GLFWcond GLFWAPIENTRY glfwCreateCond( void ); -GLFWAPI void GLFWAPIENTRY glfwDestroyCond( GLFWcond cond ); -GLFWAPI void GLFWAPIENTRY glfwWaitCond( GLFWcond cond, GLFWmutex mutex, double timeout ); -GLFWAPI void GLFWAPIENTRY glfwSignalCond( GLFWcond cond ); -GLFWAPI void GLFWAPIENTRY glfwBroadcastCond( GLFWcond cond ); -GLFWAPI int GLFWAPIENTRY glfwGetNumberOfProcessors( void ); - -/* Enable/disable functions */ -GLFWAPI void GLFWAPIENTRY glfwEnable( int token ); -GLFWAPI void GLFWAPIENTRY glfwDisable( int token ); - -/* Image/texture I/O support */ -GLFWAPI int GLFWAPIENTRY glfwReadImage( const char *name, GLFWimage *img, int flags ); -GLFWAPI int GLFWAPIENTRY glfwReadMemoryImage( const void *data, long size, GLFWimage *img, int flags ); -GLFWAPI void GLFWAPIENTRY glfwFreeImage( GLFWimage *img ); -GLFWAPI int GLFWAPIENTRY glfwLoadTexture2D( const char *name, int flags ); -GLFWAPI int GLFWAPIENTRY glfwLoadMemoryTexture2D( const void *data, long size, int flags ); -GLFWAPI int GLFWAPIENTRY glfwLoadTextureImage2D( GLFWimage *img, int flags ); - - -#ifdef __cplusplus -} -#endif - -#endif /* __glfw_h_ */ - diff --git a/PROJ1_MAC/glfw/lib/libglfw.dylib b/PROJ1_MAC/glfw/lib/libglfw.dylib deleted file mode 100755 index 57bd701..0000000 Binary files a/PROJ1_MAC/glfw/lib/libglfw.dylib and /dev/null differ diff --git a/PROJ1_MAC/makefile b/PROJ1_MAC/makefile deleted file mode 100755 index 85aa34c..0000000 --- a/PROJ1_MAC/makefile +++ /dev/null @@ -1,26 +0,0 @@ -NVCC = /usr/local/cuda/bin/nvcc -m64 -CC = /usr/bin/gcc -m64 - -GLFW_INCLUDE_PATH = -Iglfw/include/ -GLFW_LIB_PATH = -Lglfw/lib/ -GLFW = $(GLFW_INCLUDE_PATH) $(GLFW_LIB_PATH) - -CUDA_INCLUDE = -I/usr/local/cuda/include -CUDASDK_C_LIB_PATH = -L/Developer/GPU\ Computing/C/lib -CUDASDK_C_INCLUDE_PATH = -I/Developer/GPU\ Computing/C/common/inc -CUDA = $(CUDA_INCLUDE) $(CUDASDK_C_LIB_PATH) $(CUDASDK_C_INCLUDE_PATH) - -XLINKER = -Xlinker -framework,OpenGL,-framework,GLUT - -LFLAGS = $(GLFW) $(CUDA) $(XLINKER) -lglfw - -all: 565raytracer - -565raytracer: ../src/main.cpp - $(NVCC) $(GLEW_PATH) $(LFLAGS) ../src/main.cpp ../src/raytraceKernel.cu ../src/glslUtility.cpp ../src/utilities.cpp ../src/image.cpp ../src/scene.cpp ../src/stb_image/stb_image_write.c ../src/stb_image/stb_image.c -o bin/565raytracer - -clean: - rm bin/565raytracer - rm *.o - -.PHONY : bin/565raytracer \ No newline at end of file diff --git a/PROJ1_MAC/run.sh b/PROJ1_MAC/run.sh deleted file mode 100755 index 4ce8cbb..0000000 --- a/PROJ1_MAC/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -export DYLD_LIBRARY_PATH='/usr/local/cuda/lib:glfw/lib'; -./bin/565raytracer "$1" "$2" diff --git a/PROJ1_NIX/makefile b/PROJ1_NIX/makefile deleted file mode 100755 index 30fbaa8..0000000 --- a/PROJ1_NIX/makefile +++ /dev/null @@ -1,45 +0,0 @@ -#All cuda paths are for v5.0+ - -NVCC = nvcc -m64 -CC = gcc -m64 -CPPC = g++ -m64 - -CUDA_FLAGS = -I/usr/local/cuda/samples/common/inc -I/usr/local/cuda/include - -LFLAGS = -lglut -lGL -lGLEW - -all: 565Pathtracer - -raytraceKernel.o: ../src/raytraceKernel.cu - $(NVCC) $(CUDA_FLAGS) -c ../src/raytraceKernel.cu - -glslUtility.o: ../src/glslUtility.cpp - $(CPPC) $(CUDA_FLAGS) ../src/glslUtility.cpp -c - -utilities.o: ../src/utilities.cpp - $(CPPC) $(CUDA_FLAGS) ../src/utilities.cpp -c - -image.o: ../src/image.cpp - $(CPPC) $(CUDA_FLAGS) ../src/image.cpp -c - -scene.o: ../src/scene.cpp - $(CPPC) $(CUDA_FLAGS) ../src/scene.cpp -c - -stb_image.o: ../src/stb_image/stb_image.c - $(CC) $(CUDA_FLAGS) ../src/stb_image/stb_image.c -c - -stb_image_write.o: ../src/stb_image/stb_image_write.c - $(CC) $(CUDA_FLAGS) ../src/stb_image/stb_image_write.c -c - -main.o: ../src/main.cpp - $(CPPC) $(CUDA_FLAGS) ../src/main.cpp -c - -565Pathtracer: main.o raytraceKernel.o glslUtility.o utilities.o image.o scene.o stb_image_write.o stb_image.o - $(NVCC) $(LFLAGS) main.o raytraceKernel.o glslUtility.o utilities.o image.o scene.o stb_image_write.o stb_image.o -o 565Pathtracer - -clean: - rm *.o - rm 565Pathtracer - -test: 565Pathtracer - ./565Pathtracer scene=../scenes/sampleScene.txt diff --git a/PROJ1_NIX/shaders/passthroughFS.glsl b/PROJ1_NIX/shaders/passthroughFS.glsl deleted file mode 100755 index 9f6d7c5..0000000 --- a/PROJ1_NIX/shaders/passthroughFS.glsl +++ /dev/null @@ -1,8 +0,0 @@ -varying vec2 v_Texcoords; - -uniform sampler2D u_image; - -void main(void) -{ - gl_FragColor = texture2D(u_image, v_Texcoords); -} diff --git a/PROJ1_NIX/shaders/passthroughVS.glsl b/PROJ1_NIX/shaders/passthroughVS.glsl deleted file mode 100755 index 55db651..0000000 --- a/PROJ1_NIX/shaders/passthroughVS.glsl +++ /dev/null @@ -1,9 +0,0 @@ -attribute vec4 Position; -attribute vec2 Texcoords; -varying vec2 v_Texcoords; - -void main(void) -{ - v_Texcoords = Texcoords; - gl_Position = Position; -} \ No newline at end of file diff --git a/PROJ1_WIN/565Pathtracer.sln b/PROJ1_WIN/565Pathtracer.sln index 5cc5973..cd7b9c3 100755 --- a/PROJ1_WIN/565Pathtracer.sln +++ b/PROJ1_WIN/565Pathtracer.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "565Pathtracer", "565Pathtracer\565Pathtracer.vcxproj", "{FF21CA49-522E-4E86-B508-EE515B248FC4}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "565Raytracer", "565Raytracer\565Raytracer.vcxproj", "{FF21CA49-522E-4E86-B508-EE515B248FC4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/PROJ1_WIN/565Pathtracer/565Pathtracer.user b/PROJ1_WIN/565Pathtracer/565Pathtracer.user deleted file mode 100755 index 695b5c7..0000000 --- a/PROJ1_WIN/565Pathtracer/565Pathtracer.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/PROJ1_WIN/565Pathtracer/565Pathtracer.vcxproj.user b/PROJ1_WIN/565Pathtracer/565Pathtracer.vcxproj.user deleted file mode 100755 index dfd9f6c..0000000 --- a/PROJ1_WIN/565Pathtracer/565Pathtracer.vcxproj.user +++ /dev/null @@ -1,19 +0,0 @@ - - - - scene=../../scenes/sampleScene.txt - WindowsLocalDebugger - - - scene=../../scenes/sampleScene.txt - WindowsLocalDebugger - - - scene=../../scenes/sampleScene.txt - WindowsLocalDebugger - - - scene=../../scenes/sampleScene.txt - WindowsLocalDebugger - - diff --git a/PROJ1_WIN/565Pathtracer/shaders/passthroughFS.glsl b/PROJ1_WIN/565Pathtracer/shaders/passthroughFS.glsl deleted file mode 100755 index 9f6d7c5..0000000 --- a/PROJ1_WIN/565Pathtracer/shaders/passthroughFS.glsl +++ /dev/null @@ -1,8 +0,0 @@ -varying vec2 v_Texcoords; - -uniform sampler2D u_image; - -void main(void) -{ - gl_FragColor = texture2D(u_image, v_Texcoords); -} diff --git a/PROJ1_WIN/565Pathtracer/shaders/passthroughVS.glsl b/PROJ1_WIN/565Pathtracer/shaders/passthroughVS.glsl deleted file mode 100755 index 55db651..0000000 --- a/PROJ1_WIN/565Pathtracer/shaders/passthroughVS.glsl +++ /dev/null @@ -1,9 +0,0 @@ -attribute vec4 Position; -attribute vec2 Texcoords; -varying vec2 v_Texcoords; - -void main(void) -{ - v_Texcoords = Texcoords; - gl_Position = Position; -} \ No newline at end of file diff --git a/PROJ1_WIN/565Pathtracer/565Pathtracer.filters b/PROJ1_WIN/565Raytracer/565Raytracer.filters old mode 100755 new mode 100644 similarity index 100% rename from PROJ1_WIN/565Pathtracer/565Pathtracer.filters rename to PROJ1_WIN/565Raytracer/565Raytracer.filters diff --git a/PROJ1_WIN/565Pathtracer/565Pathtracer.vcxproj b/PROJ1_WIN/565Raytracer/565Raytracer.vcxproj old mode 100755 new mode 100644 similarity index 86% rename from PROJ1_WIN/565Pathtracer/565Pathtracer.vcxproj rename to PROJ1_WIN/565Raytracer/565Raytracer.vcxproj index 4515c57..f919cac --- a/PROJ1_WIN/565Pathtracer/565Pathtracer.vcxproj +++ b/PROJ1_WIN/565Raytracer/565Raytracer.vcxproj @@ -20,6 +20,10 @@ + + + + @@ -33,6 +37,7 @@ + @@ -44,10 +49,13 @@ + + + {FF21CA49-522E-4E86-B508-EE515B248FC4} Win32Proj - 565Pathtracer + 565Raytracer 565Pathtracer @@ -101,6 +109,7 @@ false + C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\common\inc;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include; @@ -109,7 +118,7 @@ Level3 Disabled WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include;C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0\C\common\inc;../shared/glew/include;../shared/freeglut/include;%(AdditionalIncludeDirectories) + D:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include;D:\ProgramData\NVDIA Corporation\Cuda Samples\v5.5\common\inc;../shared/glew/include;../shared/freeglut/include;%(AdditionalIncludeDirectories) Console @@ -122,7 +131,7 @@ $(ProjectDir)$(Platform)/$(Configuration)/%(Filename)%(Extension).obj - C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include;C:/ProgramData/NVIDIA Corporation/NVIDIA GPU Computing SDK 4.0/C/common/inc;../shared/glew/includes;../shared/freeglut/includes + D:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include;D:\ProgramData\NVDIA Corporation\Cuda Samples\v5.5\common\inc;../shared/glew/includes;../shared/freeglut/includes @@ -182,24 +191,24 @@ true true WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include;C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\common\inc;../shared/glew/include;../shared/freeglut/include;%(AdditionalIncludeDirectories) + C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include;C:\ProgramData\NVIDIA Corporation\Cuda Samples\v5.5\common\inc;../shared/glew/include;../shared/freeglut/include;%(AdditionalIncludeDirectories) Console true true true - ../shared/glew/lib;../shared/freeglut/lib;%(AdditionalLibraryDirectories) + C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\lib;../shared/glew/lib;../shared/freeglut/lib;%(AdditionalLibraryDirectories) cudart.lib; glew32.lib;glu32.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) mainCRTStartup $(ProjectDir)$(Platform)/$(Configuration)/%(Filename)%(Extension).obj - C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include;C:/ProgramData/NVIDIA Corporation/CUDA Samples/v5.5/common/inc;../shared/glew/includes;../shared/freeglut/includes + C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include;C:\ProgramData\NVIDIA Corporation\Cuda Samples\v5.5\common\inc;../shared/glew/includes;../shared/freeglut/includes - + \ No newline at end of file diff --git a/PROJ1_WIN/565Pathtracer/565Pathtracer.vcxproj.filters b/PROJ1_WIN/565Raytracer/565Raytracer.vcxproj.filters old mode 100755 new mode 100644 similarity index 79% rename from PROJ1_WIN/565Pathtracer/565Pathtracer.vcxproj.filters rename to PROJ1_WIN/565Raytracer/565Raytracer.vcxproj.filters index d49ad9c..08bb03f --- a/PROJ1_WIN/565Pathtracer/565Pathtracer.vcxproj.filters +++ b/PROJ1_WIN/565Raytracer/565Raytracer.vcxproj.filters @@ -12,6 +12,7 @@ stb_image + @@ -30,6 +31,10 @@ stb_image + + + + @@ -39,4 +44,7 @@ {011aa553-95e8-4e59-b7ff-1bb89aebe21d} + + + \ No newline at end of file diff --git a/PROJ1_WIN/565Raytracer/Release (v5.5)/565Pathtracer.exe.intermediate.manifest b/PROJ1_WIN/565Raytracer/Release (v5.5)/565Pathtracer.exe.intermediate.manifest new file mode 100644 index 0000000..1c06b61 --- /dev/null +++ b/PROJ1_WIN/565Raytracer/Release (v5.5)/565Pathtracer.exe.intermediate.manifest @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/PROJ1_WIN/565Raytracer/Release (v5.5)/565Pathtracer.lastbuildstate b/PROJ1_WIN/565Raytracer/Release (v5.5)/565Pathtracer.lastbuildstate new file mode 100644 index 0000000..33aad6d --- /dev/null +++ b/PROJ1_WIN/565Raytracer/Release (v5.5)/565Pathtracer.lastbuildstate @@ -0,0 +1,2 @@ +#v4.0:v100:false +Release (v5.5)|Win32|E:\gitprojects\Project2-Pathtracer\PROJ1_WIN\| diff --git a/PROJ1_MAC/bin/makefile b/PROJ1_WIN/565Raytracer/Release (v5.5)/565Pathtracer.write.1.tlog old mode 100755 new mode 100644 similarity index 100% rename from PROJ1_MAC/bin/makefile rename to PROJ1_WIN/565Raytracer/Release (v5.5)/565Pathtracer.write.1.tlog diff --git a/PROJ1_WIN/565Raytracer/Release (v5.5)/565Raytracer.lastbuildstate b/PROJ1_WIN/565Raytracer/Release (v5.5)/565Raytracer.lastbuildstate new file mode 100644 index 0000000..060fad9 --- /dev/null +++ b/PROJ1_WIN/565Raytracer/Release (v5.5)/565Raytracer.lastbuildstate @@ -0,0 +1,2 @@ +#v4.0:v100:false +Release (v5.5)|Win32|E:\gitprojects\Project1-RayTracer\PROJ1_WIN\| diff --git a/PROJ1_WIN/565Raytracer/Release (v5.5)/CL.read.1.tlog b/PROJ1_WIN/565Raytracer/Release (v5.5)/CL.read.1.tlog new file mode 100644 index 0000000..488ea19 Binary files /dev/null and b/PROJ1_WIN/565Raytracer/Release (v5.5)/CL.read.1.tlog differ diff --git a/PROJ1_WIN/565Raytracer/Release (v5.5)/CL.write.1.tlog b/PROJ1_WIN/565Raytracer/Release (v5.5)/CL.write.1.tlog new file mode 100644 index 0000000..3b9cf86 Binary files /dev/null and b/PROJ1_WIN/565Raytracer/Release (v5.5)/CL.write.1.tlog differ diff --git a/PROJ1_WIN/565Raytracer/Release (v5.5)/cl.command.1.tlog b/PROJ1_WIN/565Raytracer/Release (v5.5)/cl.command.1.tlog new file mode 100644 index 0000000..ec7c6de Binary files /dev/null and b/PROJ1_WIN/565Raytracer/Release (v5.5)/cl.command.1.tlog differ diff --git a/PROJ1_WIN/565Raytracer/Release (v5.5)/link.command.1.tlog b/PROJ1_WIN/565Raytracer/Release (v5.5)/link.command.1.tlog new file mode 100644 index 0000000..929a95a Binary files /dev/null and b/PROJ1_WIN/565Raytracer/Release (v5.5)/link.command.1.tlog differ diff --git a/PROJ1_WIN/565Raytracer/Release (v5.5)/link.read.1.tlog b/PROJ1_WIN/565Raytracer/Release (v5.5)/link.read.1.tlog new file mode 100644 index 0000000..9299ed3 Binary files /dev/null and b/PROJ1_WIN/565Raytracer/Release (v5.5)/link.read.1.tlog differ diff --git a/PROJ1_WIN/565Raytracer/Release (v5.5)/link.write.1.tlog b/PROJ1_WIN/565Raytracer/Release (v5.5)/link.write.1.tlog new file mode 100644 index 0000000..709bfd0 Binary files /dev/null and b/PROJ1_WIN/565Raytracer/Release (v5.5)/link.write.1.tlog differ diff --git a/PROJ1_WIN/565Raytracer/Release (v5.5)/mt.command.1.tlog b/PROJ1_WIN/565Raytracer/Release (v5.5)/mt.command.1.tlog new file mode 100644 index 0000000..35014a3 Binary files /dev/null and b/PROJ1_WIN/565Raytracer/Release (v5.5)/mt.command.1.tlog differ diff --git a/PROJ1_WIN/565Raytracer/Release (v5.5)/mt.read.1.tlog b/PROJ1_WIN/565Raytracer/Release (v5.5)/mt.read.1.tlog new file mode 100644 index 0000000..cd0c3dd Binary files /dev/null and b/PROJ1_WIN/565Raytracer/Release (v5.5)/mt.read.1.tlog differ diff --git a/PROJ1_WIN/565Raytracer/Release (v5.5)/mt.write.1.tlog b/PROJ1_WIN/565Raytracer/Release (v5.5)/mt.write.1.tlog new file mode 100644 index 0000000..3eace58 Binary files /dev/null and b/PROJ1_WIN/565Raytracer/Release (v5.5)/mt.write.1.tlog differ diff --git a/PROJ1_WIN/565Raytracer/Release (v5.5)/raytraceKernel.cu.deps b/PROJ1_WIN/565Raytracer/Release (v5.5)/raytraceKernel.cu.deps new file mode 100644 index 0000000..f155d8d --- /dev/null +++ b/PROJ1_WIN/565Raytracer/Release (v5.5)/raytraceKernel.cu.deps @@ -0,0 +1,1017 @@ +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\cuda_runtime.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\host_config.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\builtin_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\device_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\host_defines.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\driver_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\host_defines.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\limits.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sal.h +c:\program files (x86)\microsoft visual studio 10.0\vc\include\codeanalysis\sourceannotations.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vadefs.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stddef.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\surface_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\driver_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\texture_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\driver_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\vector_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\builtin_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\device_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\driver_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\surface_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\texture_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\vector_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\host_defines.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\channel_descriptor.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\driver_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\cuda_runtime_api.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\host_defines.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\builtin_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\device_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\driver_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\surface_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\texture_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\vector_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\cuda_device_runtime_api.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\host_defines.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\vector_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\cuda_runtime_api.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\driver_functions.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\builtin_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\device_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\driver_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\surface_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\texture_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\vector_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\host_defines.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\driver_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\host_defines.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\vector_functions.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\builtin_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\device_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\driver_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\surface_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\texture_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\vector_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\host_defines.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\vector_types.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\swprintf.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\cuda.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdlib.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cmath +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\yvals.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\use_ansi.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\math.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h +e:\gitprojects\project2-pathtracer\src\sceneStructs.h +e:\gitprojects\project2-pathtracer\src\glm/glm.hpp +e:\gitprojects\project2-pathtracer\src\glm\core/_fixes.hpp +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\climits +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cfloat +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\float.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtwrn.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\limits +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ymath.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cwchar +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\wchar.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\wtime.inl +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xstddef +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cstddef +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cstdio +e:\gitprojects\project2-pathtracer\src\glm\core/setup.hpp +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\immintrin.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\wmmintrin.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\nmmintrin.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\smmintrin.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\tmmintrin.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\pmmintrin.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\emmintrin.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xmmintrin.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\mmintrin.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\malloc.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h +e:\gitprojects\project2-pathtracer\src\glm\./core/_detail.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\setup.hpp +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cassert +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\assert.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h +e:\gitprojects\project2-pathtracer\src\glm\./core/type.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_half.hpp +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cstdlib +e:\gitprojects\project2-pathtracer\src\glm\core\type_half.inl +e:\gitprojects\project2-pathtracer\src\glm\core\_detail.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_float.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_half.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\setup.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_int.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\setup.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\_detail.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_gentype.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_size.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_vec1.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_vec.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_gentype.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_float.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_int.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_size.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\_swizzle.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\_swizzle_func.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_vec1.inl +e:\gitprojects\project2-pathtracer\src\glm\core\type_vec2.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_vec.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_float.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_int.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_size.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\_swizzle.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_vec2.inl +e:\gitprojects\project2-pathtracer\src\glm\core\type_vec3.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_vec.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_float.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_int.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_size.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\_swizzle.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_vec3.inl +e:\gitprojects\project2-pathtracer\src\glm\core\type_vec4.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_vec.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_float.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_int.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_size.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\_swizzle.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_vec4.inl +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat2x2.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_gentype.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat2x2.inl +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat2x3.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat2x3.inl +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat2x4.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat2x4.inl +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat3x2.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat3x2.inl +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat3x3.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat3x3.inl +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat3x4.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat3x4.inl +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat4x2.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat4x2.inl +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat4x3.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat4x3.inl +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat4x4.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\type_mat4x4.inl +e:\gitprojects\project2-pathtracer\src\glm\./core/func_trigonometric.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\func_trigonometric.inl +e:\gitprojects\project2-pathtracer\src\glm\core\_vectorize.hpp +e:\gitprojects\project2-pathtracer\src\glm\./core/func_exponential.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\func_exponential.inl +e:\gitprojects\project2-pathtracer\src\glm\core\_vectorize.hpp +e:\gitprojects\project2-pathtracer\src\glm\./core/func_common.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\_fixes.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\func_common.inl +e:\gitprojects\project2-pathtracer\src\glm\core\_vectorize.hpp +e:\gitprojects\project2-pathtracer\src\glm\./core/func_packing.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\func_packing.inl +e:\gitprojects\project2-pathtracer\src\glm\./core/func_geometric.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\func_geometric.inl +e:\gitprojects\project2-pathtracer\src\glm\core\_vectorize.hpp +e:\gitprojects\project2-pathtracer\src\glm\./core/func_matrix.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\func_matrix.inl +e:\gitprojects\project2-pathtracer\src\glm\core\_vectorize.hpp +e:\gitprojects\project2-pathtracer\src\glm\./core/func_vector_relational.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\_detail.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\func_vector_relational.inl +e:\gitprojects\project2-pathtracer\src\glm\./core/func_integer.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\func_integer.inl +e:\gitprojects\project2-pathtracer\src\glm\core\_vectorize.hpp +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\intrin.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\setjmp.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ammintrin.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\mm3dnow.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\mmintrin.h +e:\gitprojects\project2-pathtracer\src\glm\./core/func_noise.hpp +e:\gitprojects\project2-pathtracer\src\glm\core\func_noise.inl +e:\gitprojects\project2-pathtracer\src\glm\./core/_swizzle.hpp +e:\gitprojects\project2-pathtracer\src\EasyBMP.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\iostream +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\istream +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ios +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocnum +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\streambuf +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xiosbase +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cstring +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdexcept +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\exception +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\eh.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xstring +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xmemory +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\new +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\iosfwd +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdbg.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\type_traits +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xtr1common +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxtype_traits +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxtype_traits +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxtype_traits +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxtype_traits +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxtype_traits +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxtype_traits +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxtype_traits +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxtype_traits +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxtype_traits +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxtype_traits +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxtype_traits +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocinfo +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocinfo.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\locale.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xdebug +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\system_error +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cerrno +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\errno.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\share.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cctype +e:\gitprojects\project2-pathtracer\src\EasyBMP_DataStructures.h +e:\gitprojects\project2-pathtracer\src\EasyBMP_BMP.h +e:\gitprojects\project2-pathtracer\src\EasyBMP_VariousBMPutilities.h +e:\gitprojects\project2-pathtracer\src\cudaMat4.h +e:\gitprojects\project2-pathtracer\src\glm/glm.hpp +e:\gitprojects\project2-pathtracer\src\glm\core/_fixes.hpp +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\cuda_runtime.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\cuda_runtime.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string +e:\gitprojects\project2-pathtracer\src\glm/glm.hpp +e:\gitprojects\project2-pathtracer\src\glm\core/_fixes.hpp +e:\gitprojects\project2-pathtracer\src\utilities.h +e:\gitprojects\project2-pathtracer\src\glm/glm.hpp +e:\gitprojects\project2-pathtracer\src\glm\core/_fixes.hpp +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\algorithm +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\memory +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxshared +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\iterator +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sstream +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vector +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfunctional +e:\gitprojects\project2-pathtracer\src\cudaMat4.h +e:\gitprojects\project2-pathtracer\src\raytraceKernel.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/random.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/config.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/config/config.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/config/simple_defines.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/config/compiler.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/config/host_system.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/config/device_system.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/config/host_device.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\host_defines.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/config/debug.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/config/compiler_fence.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/config/forceinline.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/config/hd_warning_disable.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/cstdint.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/random/discard_block_engine.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/random/detail/random_core_access.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/random/detail/discard_block_engine.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/random/linear_congruential_engine.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/random/detail/linear_congruential_engine_discard.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/random/detail/mod.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/random/detail/linear_congruential_engine.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/random/linear_feedback_shift_engine.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/random/detail/linear_feedback_shift_engine_wordmask.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/random/detail/linear_feedback_shift_engine.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/random/subtract_with_carry_engine.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/random/detail/subtract_with_carry_engine.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/random/xor_combine_engine.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/type_traits.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/type_traits/has_trivial_assign.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/random/detail/xor_combine_engine_max.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/mpl/math.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/random/detail/xor_combine_engine.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/random/uniform_int_distribution.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/pair.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/pair.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/swap.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/integer_traits.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/random/detail/uniform_int_distribution.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/random/uniform_real_distribution.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/random/detail/uniform_real_distribution.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/random/normal_distribution.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/random/detail/normal_distribution_base.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/random/detail/normal_distribution.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/scan.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/execution_policy.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/scan.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/iterator_traits.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/iterator_traversal_tags.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/host_system_tag.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/execution_policy.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/device_system_tag.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/execution_policy.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/any_system_tag.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/iterator_traits.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/iterator_categories.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/universal_categories.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/iterator_category_to_traversal.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/iterator_category_to_system.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/select_system.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/type_traits/is_metafunction_defined.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/type_traits/has_nested_type.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/minimum_system.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/type_traits/minimum_type.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/type_traits.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/scan.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/tag.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/scan.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/static_assert.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/type_traits/iterator/is_output_iterator.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/any_assign.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/functional.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\functional +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xrefwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxresult +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxresult +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxresult +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxresult +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxresult +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxresult +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxresult +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxresult +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxresult +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxresult +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxresult +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallobj +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallobj +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallobj +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallobj +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallobj +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallobj +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallobj +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallobj +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallobj +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallobj +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallobj +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxpmfcaller +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxpmfcaller +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxpmfcaller +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxpmfcaller +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxpmfcaller +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxpmfcaller +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxpmfcaller +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxpmfcaller +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxpmfcaller +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxpmfcaller +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxpmfcaller +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallpmf +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallpmf +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallpmf +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallpmf +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallpmf +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallpmf +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallpmf +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallpmf +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallpmf +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallpmf +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallpmf +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallfun +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallfun +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallfun +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallfun +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallfun +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallfun +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallfun +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallfun +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallfun +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallfun +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallfun +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xawrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxcallwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxrefwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxrefwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxrefwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxrefwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxrefwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxrefwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxrefwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxrefwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxrefwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxrefwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxrefwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxmem_fn +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxmem_fn +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxmem_fn +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxmem_fn +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxmem_fn +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxmem_fn +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxmem_fn +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxmem_fn +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxmem_fn +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxmem_fn +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxfunction +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxfunction +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxfunction +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxfunction +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxfunction +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxfunction +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxfunction +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxfunction +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxfunction +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxfunction +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxfunction +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xawrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind0 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind0 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind0 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind0 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind0 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind0 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind0 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind0 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind0 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind0 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind0 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfwrap1 +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1 +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/functional/placeholder.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/functional/actor.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/tuple.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/tuple.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/functional/value.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/functional/composite.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/functional/operators/assignment_operator.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/functional/operators/operator_adaptors.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/type_traits/result_of.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/type_traits/function_traits.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/functional/actor.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/functional/argument.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/functional.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/functional/operators.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/functional/operators/arithmetic_operators.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/functional/operators/relational_operators.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/functional/operators/logical_operators.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/functional/operators/bitwise_operators.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/functional/operators/compound_assignment_operators.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/scan_by_key.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/scan_by_key.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/transform.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/transform.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/transform.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/transform.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/for_each.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/for_each.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/for_each.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/for_each.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/for_each.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/internal/scalar/for_each.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/function.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/raw_reference_cast.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/raw_pointer_cast.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/type_traits/pointer_traits.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/tuple_of_iterator_references.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/reference_forward_declaration.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/use_default.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/raw_reference_cast.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/tuple_transform.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/tuple_meta_transform.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/for_each.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/for_each.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/minmax.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/distance.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/distance.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/advance.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/advance.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/advance.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/advance.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/distance.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/distance.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/detail/launch_closure.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/cuda_launch_config.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/detail/launch_closure.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/temporary_array.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/retag.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/retag.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/tagged_iterator.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/iterator_adaptor.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/iterator_facade.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/iterator_facade_category.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/is_iterator_category.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/distance_from_result.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/iterator_adaptor_base.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/pointer.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/pointer.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/contiguous_storage.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/normal_iterator.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/is_trivial_iterator.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/allocator/allocator_traits.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/allocator/allocator_traits.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/type_traits/has_member_function.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/type_traits/is_call_possible.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/contiguous_storage.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/allocator/copy_construct_range.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/allocator/copy_construct_range.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/copy.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/copy.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/copy.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/copy.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/internal_functional.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/zip_iterator.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/zip_iterator_base.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/minimum_category.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/zip_iterator.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/copy.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/copy.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/internal/scalar/copy.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/internal/scalar/copy.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/dispatch/is_trivial_copy.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/internal/scalar/general_copy.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/internal/scalar/trivial_copy.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/copy.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/copy.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/copy_device_to_device.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/copy_device_to_device.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/copy_cross_system.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/copy_cross_system.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/trivial_copy.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/trivial_copy.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/trivial_copy.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/guarded_cuda_runtime_api.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\cuda_runtime_api.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system_error.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/error_code.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/errno.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/error_category.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/error_code.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/error_condition.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/system_error.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/system_error.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/error.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\driver_types.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/error.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/trivial_copy.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/allocator/default_construct_range.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/allocator/default_construct_range.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/uninitialized_fill.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/uninitialized_fill.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/uninitialized_fill.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/uninitialized_fill.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/fill.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/fill.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/fill.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/generate.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/generate.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/generate.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/generate.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/generate.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/generate.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/generate.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/fill.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/fill.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/fill.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/fill.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/util/align.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/runtime_introspection.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/runtime_introspection.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/util/blocking.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/uninitialized_fill.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/uninitialized_fill.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/uninitialized_fill.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/allocator/destroy_range.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/allocator/destroy_range.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/allocator/fill_construct_range.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/allocator/fill_construct_range.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/allocator/temporary_allocator.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/allocator/tagged_allocator.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/allocator/tagged_allocator.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/memory.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/reference.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/reference.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/memory.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/memory.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/malloc_and_free.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/malloc_and_free.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/malloc_and_free.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/bad_alloc.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/malloc_and_free.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/get_value.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/get_value.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/get_value.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/assign_value.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/assign_value.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/assign_value.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/iter_swap.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/iter_swap.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/iter_swap.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/swap.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/swap.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/swap_ranges.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/swap_ranges.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/swap_ranges.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/swap_ranges.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/swap_ranges.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/swap_ranges.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/temporary_buffer.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/temporary_buffer.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/temporary_buffer.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/temporary_buffer.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/temporary_buffer.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/temporary_buffer.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/allocator/temporary_allocator.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/allocator/no_throw_allocator.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/temporary_array.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/synchronize.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/synchronize.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/detail/launch_calculator.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/detail/launch_calculator.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/transform.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/transform.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/transform.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/replace.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/replace.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/replace.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/replace.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/replace.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/replace.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/replace.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/scan.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/scan.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/internal/scalar/scan.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/scan.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/scan.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/detail/fast_scan.h +c:\program files\nvidia gpu computing toolkit\cuda\v5.5\include\thrust\system\cuda\detail\detail\fast_scan.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/reduce_intervals.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/reduce_intervals.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/internal/decompose.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/extern_shared_ptr.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/block/reduce.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/default_decomposition.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/default_decomposition.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/detail/uninitialized.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/detail/alignment.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/scan_by_key.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/scan_by_key.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/internal/scalar/scan_by_key.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/scan_by_key.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/device_ptr.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/memory.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/device_ptr.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/device_reference.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/device_reference.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/device_vector.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/device_malloc_allocator.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/device_malloc.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/device_malloc.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/device_free.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/device_free.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/vector_base.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/reverse_iterator.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/reverse_iterator_base.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/reverse_iterator.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/vector_base.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/overlapped_copy.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/equal.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/equal.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/equal.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/equal.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/mismatch.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/mismatch.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/mismatch.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/mismatch.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/find.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/find.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/find.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/find.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/reduce.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/reduce.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/reduce.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/reduce.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/reduce_by_key.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/reduce_by_key.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/scatter.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/scatter.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/scatter.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/scatter.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/permutation_iterator.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/permutation_iterator_base.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/scatter.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/scatter.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/scatter.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/reduce.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/reduce.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/internal/scalar/reduce.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/reduce.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/reduce.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/reduce_by_key.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/reduce_by_key.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/internal/scalar/reduce_by_key.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/type_traits/algorithm/intermediate_type_from_function_and_iterators.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/reduce_by_key.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/reduce_by_key.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/counting_iterator.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/counting_iterator.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/numeric_traits.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/transform_iterator.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/transform_iterator.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/type_traits/iterator/is_discard_iterator.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/discard_iterator.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/iterator/detail/discard_iterator_base.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/block/inclusive_scan.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/extrema.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/extrema.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/extrema.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/extrema.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/transform_reduce.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/transform_reduce.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/transform_reduce.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/transform_reduce.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/transform_reduce.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/transform_reduce.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/transform_reduce.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/extrema.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/extrema.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/internal/scalar/extrema.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/extrema.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/find.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/find.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/internal/scalar/find.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/find.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/mismatch.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/mismatch.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/mismatch.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/equal.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/equal.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/equal.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/device_vector.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/host_vector.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/host_vector.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/copy.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/copy_if.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/copy_if.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/copy_if.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/copy_if.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/copy_if.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/copy_if.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/internal/scalar/copy_if.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/copy_if.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/copy_if.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/remove.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/detail/remove.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/remove.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/generic/remove.inl +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/adl/remove.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cpp/detail/remove.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/detail/internal/scalar/remove.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust/system/cuda/detail/remove.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\cuda.h +e:\gitprojects\project2-pathtracer\src\sceneStructs.h +C:\ProgramData\NVIDIA Corporation\Cuda Samples\v5.5\common\inc\helper_math.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\cuda_runtime.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\math.h +e:\gitprojects\project2-pathtracer\src\intersections.h +e:\gitprojects\project2-pathtracer\src\sceneStructs.h +e:\gitprojects\project2-pathtracer\src\cudaMat4.h +e:\gitprojects\project2-pathtracer\src\glm/glm.hpp +e:\gitprojects\project2-pathtracer\src\glm\core/_fixes.hpp +e:\gitprojects\project2-pathtracer\src\utilities.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\math.h +e:\gitprojects\project2-pathtracer\src\interactions.h +e:\gitprojects\project2-pathtracer\src\intersections.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\time.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h +c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\time.inl +C:\ProgramData\NVIDIA Corporation\Cuda Samples\v5.5\common\inc\helper_math.h diff --git a/PROJ1_WIN/565Pathtracer/glut32.dll b/PROJ1_WIN/565Raytracer/glut32.dll old mode 100755 new mode 100644 similarity index 100% rename from PROJ1_WIN/565Pathtracer/glut32.dll rename to PROJ1_WIN/565Raytracer/glut32.dll diff --git a/PROJ1_WIN/565Raytracer/gridtexture.bmp b/PROJ1_WIN/565Raytracer/gridtexture.bmp new file mode 100644 index 0000000..73c4a22 Binary files /dev/null and b/PROJ1_WIN/565Raytracer/gridtexture.bmp differ diff --git a/PROJ1_MAC/shaders/passthroughFS.glsl b/PROJ1_WIN/565Raytracer/shaders/passthroughFS.glsl old mode 100755 new mode 100644 similarity index 100% rename from PROJ1_MAC/shaders/passthroughFS.glsl rename to PROJ1_WIN/565Raytracer/shaders/passthroughFS.glsl diff --git a/PROJ1_MAC/shaders/passthroughVS.glsl b/PROJ1_WIN/565Raytracer/shaders/passthroughVS.glsl old mode 100755 new mode 100644 similarity index 100% rename from PROJ1_MAC/shaders/passthroughVS.glsl rename to PROJ1_WIN/565Raytracer/shaders/passthroughVS.glsl diff --git a/PROJ1_WIN/565Raytracer/test.0.bmp b/PROJ1_WIN/565Raytracer/test.0.bmp new file mode 100644 index 0000000..03af1e8 Binary files /dev/null and b/PROJ1_WIN/565Raytracer/test.0.bmp differ diff --git a/PROJ1_WIN/565Raytracer/woodtexture.bmp b/PROJ1_WIN/565Raytracer/woodtexture.bmp new file mode 100644 index 0000000..9c437a7 Binary files /dev/null and b/PROJ1_WIN/565Raytracer/woodtexture.bmp differ diff --git a/PROJ1_WIN/Build/CUDA 4.0.props b/PROJ1_WIN/Build/CUDA 4.0.props index d0c1013..5239e40 100755 --- a/PROJ1_WIN/Build/CUDA 4.0.props +++ b/PROJ1_WIN/Build/CUDA 4.0.props @@ -7,13 +7,13 @@ $(CudaToolkitCustomDir) - v4.0 - 4.00.0000.0000 + v5.5 + 5.50.0000.0000 - $(CUDA_PATH_V4_0) + $(CUDA_PATH_V5_5) $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\NVIDIA Corporation\GPU Computing Toolkit\Cuda\$(CudaToolkitVersion)', 'InstallDir', null, RegistryView.Registry64, RegistryView.Registry32)) diff --git a/PROJ1_WIN/Build/CUDA 4.0.xml b/PROJ1_WIN/Build/CUDA 4.0.xml index 8ca3fa7..cd230ff 100755 --- a/PROJ1_WIN/Build/CUDA 4.0.xml +++ b/PROJ1_WIN/Build/CUDA 4.0.xml @@ -206,8 +206,8 @@ Name="GPUDebugInfo" DisplayName="Generate GPU Debug Information" Category="Device" - Description="Specifies whether or not GPU debugging information is generated by the CUDA Compiler. (-G0)" - Switch="-G0" /> + Description="Specifies whether or not GPU debugging information is generated by the CUDA Compiler. (-G)" + Switch="-G" /> = Width ) + { i = Width-1; Warn = true; } + if( i < 0 ) + { i = 0; Warn = true; } + if( j >= Height ) + { j = Height-1; Warn = true; } + if( j < 0 ) + { j = 0; Warn = true; } + if( Warn && EasyBMPwarnings ) + { + cout << "EasyBMP Warning: Attempted to access non-existent pixel;" << endl + << " Truncating request to fit in the range [0," + << Width-1 << "] x [0," << Height-1 << "]." << endl; + } + return Pixels[i][j]; +} + +bool BMP::SetPixel( int i, int j, RGBApixel NewPixel ) +{ + Pixels[i][j] = NewPixel; + return true; +} + + +bool BMP::SetColor( int ColorNumber , RGBApixel NewColor ) +{ + using namespace std; + if( BitDepth != 1 && BitDepth != 4 && BitDepth != 8 ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Warning: Attempted to change color table for a BMP object" << endl + << " that lacks a color table. Ignoring request." << endl; + } + return false; + } + if( !Colors ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Warning: Attempted to set a color, but the color table" << endl + << " is not defined. Ignoring request." << endl; + } + return false; + } + if( ColorNumber >= TellNumberOfColors() ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Warning: Requested color number " + << ColorNumber << " is outside the allowed" << endl + << " range [0," << TellNumberOfColors()-1 + << "]. Ignoring request to set this color." << endl; + } + return false; + } + Colors[ColorNumber] = NewColor; + return true; +} + +// RGBApixel BMP::GetColor( int ColorNumber ) const +RGBApixel BMP::GetColor( int ColorNumber ) +{ + RGBApixel Output; + Output.Red = 255; + Output.Green = 255; + Output.Blue = 255; + Output.Alpha = 0; + + using namespace std; + if( BitDepth != 1 && BitDepth != 4 && BitDepth != 8 ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Warning: Attempted to access color table for a BMP object" << endl + << " that lacks a color table. Ignoring request." << endl; + } + return Output; + } + if( !Colors ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Warning: Requested a color, but the color table" << endl + << " is not defined. Ignoring request." << endl; + } + return Output; + } + if( ColorNumber >= TellNumberOfColors() ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Warning: Requested color number " + << ColorNumber << " is outside the allowed" << endl + << " range [0," << TellNumberOfColors()-1 + << "]. Ignoring request to get this color." << endl; + } + return Output; + } + Output = Colors[ColorNumber]; + return Output; +} + +BMP::BMP() +{ + Width = 1; + Height = 1; + BitDepth = 24; + Pixels = new RGBApixel* [Width]; + Pixels[0] = new RGBApixel [Height]; + Colors = NULL; + + XPelsPerMeter = 0; + YPelsPerMeter = 0; + + MetaData1 = NULL; + SizeOfMetaData1 = 0; + MetaData2 = NULL; + SizeOfMetaData2 = 0; +} + +// BMP::BMP( const BMP& Input ) +BMP::BMP( BMP& Input ) +{ + // first, make the image empty. + + Width = 1; + Height = 1; + BitDepth = 24; + Pixels = new RGBApixel* [Width]; + Pixels[0] = new RGBApixel [Height]; + Colors = NULL; + XPelsPerMeter = 0; + YPelsPerMeter = 0; + + MetaData1 = NULL; + SizeOfMetaData1 = 0; + MetaData2 = NULL; + SizeOfMetaData2 = 0; + + // now, set the correct bit depth + + SetBitDepth( Input.TellBitDepth() ); + + // set the correct pixel size + + SetSize( Input.TellWidth() , Input.TellHeight() ); + + // set the DPI information from Input + + SetDPI( Input.TellHorizontalDPI() , Input.TellVerticalDPI() ); + + // if there is a color table, get all the colors + + if( BitDepth == 1 || BitDepth == 4 || + BitDepth == 8 ) + { + for( int k=0 ; k < TellNumberOfColors() ; k++ ) + { + SetColor( k, Input.GetColor( k )); + } + } + + // get all the pixels + + for( int j=0; j < Height ; j++ ) + { + for( int i=0; i < Width ; i++ ) + { + Pixels[i][j] = *Input(i,j); +// Pixels[i][j] = Input.GetPixel(i,j); // *Input(i,j); + } + } +} + +BMP::~BMP() +{ + int i; + for(i=0;i= Width ) + { i = Width-1; Warn = true; } + if( i < 0 ) + { i = 0; Warn = true; } + if( j >= Height ) + { j = Height-1; Warn = true; } + if( j < 0 ) + { j = 0; Warn = true; } + if( Warn && EasyBMPwarnings ) + { + cout << "EasyBMP Warning: Attempted to access non-existent pixel;" << endl + << " Truncating request to fit in the range [0," + << Width-1 << "] x [0," << Height-1 << "]." << endl; + } + return &(Pixels[i][j]); +} + +// int BMP::TellBitDepth( void ) const +int BMP::TellBitDepth( void ) +{ return BitDepth; } + +// int BMP::TellHeight( void ) const +int BMP::TellHeight( void ) +{ return Height; } + +// int BMP::TellWidth( void ) const +int BMP::TellWidth( void ) +{ return Width; } + +// int BMP::TellNumberOfColors( void ) const +int BMP::TellNumberOfColors( void ) +{ + int output = IntPow( 2, BitDepth ); + if( BitDepth == 32 ) + { output = IntPow( 2, 24 ); } + return output; +} + +bool BMP::SetBitDepth( int NewDepth ) +{ + using namespace std; + if( NewDepth != 1 && NewDepth != 4 && + NewDepth != 8 && NewDepth != 16 && + NewDepth != 24 && NewDepth != 32 ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Warning: User attempted to set unsupported bit depth " + << NewDepth << "." << endl + << " Bit depth remains unchanged at " + << BitDepth << "." << endl; + } + return false; + } + + BitDepth = NewDepth; + if( Colors ) + { delete [] Colors; } + int NumberOfColors = IntPow( 2, BitDepth ); + if( BitDepth == 1 || BitDepth == 4 || BitDepth == 8 ) + { Colors = new RGBApixel [NumberOfColors]; } + else + { Colors = NULL; } + if( BitDepth == 1 || BitDepth == 4 || BitDepth == 8 ) + { CreateStandardColorTable(); } + + return true; +} + +bool BMP::SetSize(int NewWidth , int NewHeight ) +{ + using namespace std; + if( NewWidth <= 0 || NewHeight <= 0 ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Warning: User attempted to set a non-positive width or height." << endl + << " Size remains unchanged at " + << Width << " x " << Height << "." << endl; + } + return false; + } + + int i,j; + + for(i=0;i -1 ) + { + bool Success = false; + if( BitDepth == 32 ) + { Success = Write32bitRow( Buffer, BufferSize, j ); } + if( BitDepth == 24 ) + { Success = Write24bitRow( Buffer, BufferSize, j ); } + if( BitDepth == 8 ) + { Success = Write8bitRow( Buffer, BufferSize, j ); } + if( BitDepth == 4 ) + { Success = Write4bitRow( Buffer, BufferSize, j ); } + if( BitDepth == 1 ) + { Success = Write1bitRow( Buffer, BufferSize, j ); } + if( Success ) + { + int BytesWritten = (int) fwrite( (char*) Buffer, 1, BufferSize, fp ); + if( BytesWritten != BufferSize ) + { Success = false; } + } + if( !Success ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Error: Could not write proper amount of data." << endl; + } + j = -1; + } + j--; + } + + delete [] Buffer; + } + + if( BitDepth == 16 ) + { + // write the bit masks + + ebmpWORD BlueMask = 31; // bits 12-16 + ebmpWORD GreenMask = 2016; // bits 6-11 + ebmpWORD RedMask = 63488; // bits 1-5 + ebmpWORD ZeroWORD; + + if( IsBigEndian() ) + { RedMask = FlipWORD( RedMask ); } + fwrite( (char*) &RedMask , 2 , 1 , fp ); + fwrite( (char*) &ZeroWORD , 2 , 1 , fp ); + + if( IsBigEndian() ) + { GreenMask = FlipWORD( GreenMask ); } + fwrite( (char*) &GreenMask , 2 , 1 , fp ); + fwrite( (char*) &ZeroWORD , 2 , 1 , fp ); + + if( IsBigEndian() ) + { BlueMask = FlipWORD( BlueMask ); } + fwrite( (char*) &BlueMask , 2 , 1 , fp ); + fwrite( (char*) &ZeroWORD , 2 , 1 , fp ); + + int DataBytes = Width*2; + int PaddingBytes = ( 4 - DataBytes % 4 ) % 4; + + // write the actual pixels + + for( j=Height-1 ; j >= 0 ; j-- ) + { + // write all row pixel data + i=0; + int WriteNumber = 0; + while( WriteNumber < DataBytes ) + { + ebmpWORD TempWORD; + + ebmpWORD RedWORD = (ebmpWORD) ((Pixels[i][j]).Red / 8); + ebmpWORD GreenWORD = (ebmpWORD) ((Pixels[i][j]).Green / 4); + ebmpWORD BlueWORD = (ebmpWORD) ((Pixels[i][j]).Blue / 8); + + TempWORD = (RedWORD<<11) + (GreenWORD<<5) + BlueWORD; + if( IsBigEndian() ) + { TempWORD = FlipWORD( TempWORD ); } + + fwrite( (char*) &TempWORD , 2, 1, fp); + WriteNumber += 2; + i++; + } + // write any necessary row padding + WriteNumber = 0; + while( WriteNumber < PaddingBytes ) + { + ebmpBYTE TempBYTE; + fwrite( (char*) &TempBYTE , 1, 1, fp); + WriteNumber++; + } + } + + } + + fclose(fp); + return true; +} + +bool BMP::ReadFromFile( const char* FileName ) +{ + using namespace std; + if( !EasyBMPcheckDataSize() ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Error: Data types are wrong size!" << endl + << " You may need to mess with EasyBMP_DataTypes.h" << endl + << " to fix these errors, and then recompile." << endl + << " All 32-bit and 64-bit machines should be" << endl + << " supported, however." << endl << endl; + } + return false; + } + + FILE* fp = fopen( FileName, "rb" ); + if( fp == NULL ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Error: Cannot open file " + << FileName << " for input." << endl; + } + SetBitDepth(1); + SetSize(1,1); + return false; + } + + // read the file header + + BMFH bmfh; + bool NotCorrupted = true; + + NotCorrupted &= SafeFread( (char*) &(bmfh.bfType) , sizeof(ebmpWORD), 1, fp); + + bool IsBitmap = false; + + if( IsBigEndian() && bmfh.bfType == 16973 ) + { IsBitmap = true; } + if( !IsBigEndian() && bmfh.bfType == 19778 ) + { IsBitmap = true; } + + if( !IsBitmap ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Error: " << FileName + << " is not a Windows BMP file!" << endl; + } + fclose( fp ); + return false; + } + + NotCorrupted &= SafeFread( (char*) &(bmfh.bfSize) , sizeof(ebmpDWORD) , 1, fp); + NotCorrupted &= SafeFread( (char*) &(bmfh.bfReserved1) , sizeof(ebmpWORD) , 1, fp); + NotCorrupted &= SafeFread( (char*) &(bmfh.bfReserved2) , sizeof(ebmpWORD) , 1, fp); + NotCorrupted &= SafeFread( (char*) &(bmfh.bfOffBits) , sizeof(ebmpDWORD) , 1 , fp); + + if( IsBigEndian() ) + { bmfh.SwitchEndianess(); } + + // read the info header + + BMIH bmih; + + NotCorrupted &= SafeFread( (char*) &(bmih.biSize) , sizeof(ebmpDWORD) , 1 , fp); + NotCorrupted &= SafeFread( (char*) &(bmih.biWidth) , sizeof(ebmpDWORD) , 1 , fp); + NotCorrupted &= SafeFread( (char*) &(bmih.biHeight) , sizeof(ebmpDWORD) , 1 , fp); + NotCorrupted &= SafeFread( (char*) &(bmih.biPlanes) , sizeof(ebmpWORD) , 1, fp); + NotCorrupted &= SafeFread( (char*) &(bmih.biBitCount) , sizeof(ebmpWORD) , 1, fp); + + NotCorrupted &= SafeFread( (char*) &(bmih.biCompression) , sizeof(ebmpDWORD) , 1 , fp); + NotCorrupted &= SafeFread( (char*) &(bmih.biSizeImage) , sizeof(ebmpDWORD) , 1 , fp); + NotCorrupted &= SafeFread( (char*) &(bmih.biXPelsPerMeter) , sizeof(ebmpDWORD) , 1 , fp); + NotCorrupted &= SafeFread( (char*) &(bmih.biYPelsPerMeter) , sizeof(ebmpDWORD) , 1 , fp); + NotCorrupted &= SafeFread( (char*) &(bmih.biClrUsed) , sizeof(ebmpDWORD) , 1 , fp); + NotCorrupted &= SafeFread( (char*) &(bmih.biClrImportant) , sizeof(ebmpDWORD) , 1 , fp); + + if( IsBigEndian() ) + { bmih.SwitchEndianess(); } + + // a safety catch: if any of the header information didn't read properly, abort + // future idea: check to see if at least most is self-consistent + + if( !NotCorrupted ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Error: " << FileName + << " is obviously corrupted." << endl; + } + SetSize(1,1); + SetBitDepth(1); + fclose(fp); + return false; + } + + XPelsPerMeter = bmih.biXPelsPerMeter; + YPelsPerMeter = bmih.biYPelsPerMeter; + + // if bmih.biCompression 1 or 2, then the file is RLE compressed + + if( bmih.biCompression == 1 || bmih.biCompression == 2 ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Error: " << FileName << " is (RLE) compressed." << endl + << " EasyBMP does not support compression." << endl; + } + SetSize(1,1); + SetBitDepth(1); + fclose(fp); + return false; + } + + // if bmih.biCompression > 3, then something strange is going on + // it's probably an OS2 bitmap file. + + if( bmih.biCompression > 3 ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Error: " << FileName << " is in an unsupported format." + << endl + << " (bmih.biCompression = " + << bmih.biCompression << ")" << endl + << " The file is probably an old OS2 bitmap or corrupted." + << endl; + } + SetSize(1,1); + SetBitDepth(1); + fclose(fp); + return false; + } + + if( bmih.biCompression == 3 && bmih.biBitCount != 16 ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Error: " << FileName + << " uses bit fields and is not a" << endl + << " 16-bit file. This is not supported." << endl; + } + SetSize(1,1); + SetBitDepth(1); + fclose(fp); + return false; + } + + // set the bit depth + + int TempBitDepth = (int) bmih.biBitCount; + if( TempBitDepth != 1 && TempBitDepth != 4 + && TempBitDepth != 8 && TempBitDepth != 16 + && TempBitDepth != 24 && TempBitDepth != 32 ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Error: " << FileName << " has unrecognized bit depth." << endl; + } + SetSize(1,1); + SetBitDepth(1); + fclose(fp); + return false; + } + SetBitDepth( (int) bmih.biBitCount ); + + // set the size + + if( (int) bmih.biWidth <= 0 || (int) bmih.biHeight <= 0 ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Error: " << FileName + << " has a non-positive width or height." << endl; + } + SetSize(1,1); + SetBitDepth(1); + fclose(fp); + return false; + } + SetSize( (int) bmih.biWidth , (int) bmih.biHeight ); + + // some preliminaries + + double dBytesPerPixel = ( (double) BitDepth ) / 8.0; + double dBytesPerRow = dBytesPerPixel * (Width+0.0); + dBytesPerRow = ceil(dBytesPerRow); + + int BytePaddingPerRow = 4 - ( (int) (dBytesPerRow) )% 4; + if( BytePaddingPerRow == 4 ) + { BytePaddingPerRow = 0; } + + // if < 16 bits, read the palette + + if( BitDepth < 16 ) + { + // determine the number of colors specified in the + // color table + + int NumberOfColorsToRead = ((int) bmfh.bfOffBits - 54 )/4; + if( NumberOfColorsToRead > IntPow(2,BitDepth) ) + { NumberOfColorsToRead = IntPow(2,BitDepth); } + + if( NumberOfColorsToRead < TellNumberOfColors() ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Warning: file " << FileName << " has an underspecified" << endl + << " color table. The table will be padded with extra" << endl + << " white (255,255,255,0) entries." << endl; + } + } + + int n; + for( n=0; n < NumberOfColorsToRead ; n++ ) + { + SafeFread( (char*) &(Colors[n]) , 4 , 1 , fp); + } + for( n=NumberOfColorsToRead ; n < TellNumberOfColors() ; n++ ) + { + RGBApixel WHITE; + WHITE.Red = 255; + WHITE.Green = 255; + WHITE.Blue = 255; + WHITE.Alpha = 0; + SetColor( n , WHITE ); + } + + + } + + // skip blank data if bfOffBits so indicates + + int BytesToSkip = bmfh.bfOffBits - 54;; + if( BitDepth < 16 ) + { BytesToSkip -= 4*IntPow(2,BitDepth); } + if( BitDepth == 16 && bmih.biCompression == 3 ) + { BytesToSkip -= 3*4; } + if( BytesToSkip < 0 ) + { BytesToSkip = 0; } + if( BytesToSkip > 0 && BitDepth != 16 ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Warning: Extra meta data detected in file " << FileName << endl + << " Data will be skipped." << endl; + } + ebmpBYTE* TempSkipBYTE; + TempSkipBYTE = new ebmpBYTE [BytesToSkip]; + SafeFread( (char*) TempSkipBYTE , BytesToSkip , 1 , fp); + delete [] TempSkipBYTE; + } + + // This code reads 1, 4, 8, 24, and 32-bpp files + // with a more-efficient buffered technique. + + int i,j; + if( BitDepth != 16 ) + { + int BufferSize = (int) ( (Width*BitDepth) / 8.0 ); + while( 8*BufferSize < Width*BitDepth ) + { BufferSize++; } + while( BufferSize % 4 ) + { BufferSize++; } + ebmpBYTE* Buffer; + Buffer = new ebmpBYTE [BufferSize]; + j= Height-1; + while( j > -1 ) + { + int BytesRead = (int) fread( (char*) Buffer, 1, BufferSize, fp ); + if( BytesRead < BufferSize ) + { + j = -1; + if( EasyBMPwarnings ) + { + cout << "EasyBMP Error: Could not read proper amount of data." << endl; + } + } + else + { + bool Success = false; + if( BitDepth == 1 ) + { Success = Read1bitRow( Buffer, BufferSize, j ); } + if( BitDepth == 4 ) + { Success = Read4bitRow( Buffer, BufferSize, j ); } + if( BitDepth == 8 ) + { Success = Read8bitRow( Buffer, BufferSize, j ); } + if( BitDepth == 24 ) + { Success = Read24bitRow( Buffer, BufferSize, j ); } + if( BitDepth == 32 ) + { Success = Read32bitRow( Buffer, BufferSize, j ); } + if( !Success ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Error: Could not read enough pixel data!" << endl; + } + j = -1; + } + } + j--; + } + delete [] Buffer; + } + + if( BitDepth == 16 ) + { + int DataBytes = Width*2; + int PaddingBytes = ( 4 - DataBytes % 4 ) % 4; + + // set the default mask + + ebmpWORD BlueMask = 31; // bits 12-16 + ebmpWORD GreenMask = 992; // bits 7-11 + ebmpWORD RedMask = 31744; // bits 2-6 + + // read the bit fields, if necessary, to + // override the default 5-5-5 mask + + if( bmih.biCompression != 0 ) + { + // read the three bit masks + + ebmpWORD TempMaskWORD; + ebmpWORD ZeroWORD; + + SafeFread( (char*) &RedMask , 2 , 1 , fp ); + if( IsBigEndian() ) + { RedMask = FlipWORD(RedMask); } + SafeFread( (char*) &TempMaskWORD , 2, 1, fp ); + + SafeFread( (char*) &GreenMask , 2 , 1 , fp ); + if( IsBigEndian() ) + { GreenMask = FlipWORD(GreenMask); } + SafeFread( (char*) &TempMaskWORD , 2, 1, fp ); + + SafeFread( (char*) &BlueMask , 2 , 1 , fp ); + if( IsBigEndian() ) + { BlueMask = FlipWORD(BlueMask); } + SafeFread( (char*) &TempMaskWORD , 2, 1, fp ); + } + + // read and skip any meta data + + if( BytesToSkip > 0 ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Warning: Extra meta data detected in file " + << FileName << endl + << " Data will be skipped." << endl; + } + ebmpBYTE* TempSkipBYTE; + TempSkipBYTE = new ebmpBYTE [BytesToSkip]; + SafeFread( (char*) TempSkipBYTE , BytesToSkip , 1 , fp); + delete [] TempSkipBYTE; + } + + // determine the red, green and blue shifts + + int GreenShift = 0; + ebmpWORD TempShiftWORD = GreenMask; + while( TempShiftWORD > 31 ) + { TempShiftWORD = TempShiftWORD>>1; GreenShift++; } + int BlueShift = 0; + TempShiftWORD = BlueMask; + while( TempShiftWORD > 31 ) + { TempShiftWORD = TempShiftWORD>>1; BlueShift++; } + int RedShift = 0; + TempShiftWORD = RedMask; + while( TempShiftWORD > 31 ) + { TempShiftWORD = TempShiftWORD>>1; RedShift++; } + + // read the actual pixels + + for( j=Height-1 ; j >= 0 ; j-- ) + { + i=0; + int ReadNumber = 0; + while( ReadNumber < DataBytes ) + { + ebmpWORD TempWORD; + SafeFread( (char*) &TempWORD , 2 , 1 , fp ); + if( IsBigEndian() ) + { TempWORD = FlipWORD(TempWORD); } + ReadNumber += 2; + + ebmpWORD Red = RedMask & TempWORD; + ebmpWORD Green = GreenMask & TempWORD; + ebmpWORD Blue = BlueMask & TempWORD; + + ebmpBYTE BlueBYTE = (ebmpBYTE) 8*(Blue>>BlueShift); + ebmpBYTE GreenBYTE = (ebmpBYTE) 8*(Green>>GreenShift); + ebmpBYTE RedBYTE = (ebmpBYTE) 8*(Red>>RedShift); + + (Pixels[i][j]).Red = RedBYTE; + (Pixels[i][j]).Green = GreenBYTE; + (Pixels[i][j]).Blue = BlueBYTE; + + i++; + } + ReadNumber = 0; + while( ReadNumber < PaddingBytes ) + { + ebmpBYTE TempBYTE; + SafeFread( (char*) &TempBYTE , 1, 1, fp); + ReadNumber++; + } + } + + } + + fclose(fp); + return true; +} + +bool BMP::CreateStandardColorTable( void ) +{ + using namespace std; + if( BitDepth != 1 && BitDepth != 4 && BitDepth != 8 ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Warning: Attempted to create color table at a bit" << endl + << " depth that does not require a color table." << endl + << " Ignoring request." << endl; + } + return false; + } + + if( BitDepth == 1 ) + { + int i; + for( i=0 ; i < 2 ; i++ ) + { + Colors[i].Red = i*255; + Colors[i].Green = i*255; + Colors[i].Blue = i*255; + Colors[i].Alpha = 0; + } + return true; + } + + if( BitDepth == 4 ) + { + int i = 0; + int j,k,ell; + + // simplify the code for the first 8 colors + for( ell=0 ; ell < 2 ; ell++ ) + { + for( k=0 ; k < 2 ; k++ ) + { + for( j=0 ; j < 2 ; j++ ) + { + Colors[i].Red = j*128; + Colors[i].Green = k*128; + Colors[i].Blue = ell*128; + i++; + } + } + } + + // simplify the code for the last 8 colors + for( ell=0 ; ell < 2 ; ell++ ) + { + for( k=0 ; k < 2 ; k++ ) + { + for( j=0 ; j < 2 ; j++ ) + { + Colors[i].Red = j*255; + Colors[i].Green = k*255; + Colors[i].Blue = ell*255; + i++; + } + } + } + + // overwrite the duplicate color + i=8; + Colors[i].Red = 192; + Colors[i].Green = 192; + Colors[i].Blue = 192; + + for( i=0 ; i < 16 ; i++ ) + { Colors[i].Alpha = 0; } + return true; + } + + if( BitDepth == 8 ) + { + int i=0; + int j,k,ell; + + // do an easy loop, which works for all but colors + // 0 to 9 and 246 to 255 + for( ell=0 ; ell < 4 ; ell++ ) + { + for( k=0 ; k < 8 ; k++ ) + { + for( j=0; j < 8 ; j++ ) + { + Colors[i].Red = j*32; + Colors[i].Green = k*32; + Colors[i].Blue = ell*64; + Colors[i].Alpha = 0; + i++; + } + } + } + + // now redo the first 8 colors + i=0; + for( ell=0 ; ell < 2 ; ell++ ) + { + for( k=0 ; k < 2 ; k++ ) + { + for( j=0; j < 2 ; j++ ) + { + Colors[i].Red = j*128; + Colors[i].Green = k*128; + Colors[i].Blue = ell*128; + i++; + } + } + } + + // overwrite colors 7, 8, 9 + i=7; + Colors[i].Red = 192; + Colors[i].Green = 192; + Colors[i].Blue = 192; + i++; // 8 + Colors[i].Red = 192; + Colors[i].Green = 220; + Colors[i].Blue = 192; + i++; // 9 + Colors[i].Red = 166; + Colors[i].Green = 202; + Colors[i].Blue = 240; + + // overwrite colors 246 to 255 + i=246; + Colors[i].Red = 255; + Colors[i].Green = 251; + Colors[i].Blue = 240; + i++; // 247 + Colors[i].Red = 160; + Colors[i].Green = 160; + Colors[i].Blue = 164; + i++; // 248 + Colors[i].Red = 128; + Colors[i].Green = 128; + Colors[i].Blue = 128; + i++; // 249 + Colors[i].Red = 255; + Colors[i].Green = 0; + Colors[i].Blue = 0; + i++; // 250 + Colors[i].Red = 0; + Colors[i].Green = 255; + Colors[i].Blue = 0; + i++; // 251 + Colors[i].Red = 255; + Colors[i].Green = 255; + Colors[i].Blue = 0; + i++; // 252 + Colors[i].Red = 0; + Colors[i].Green = 0; + Colors[i].Blue = 255; + i++; // 253 + Colors[i].Red = 255; + Colors[i].Green = 0; + Colors[i].Blue = 255; + i++; // 254 + Colors[i].Red = 0; + Colors[i].Green = 255; + Colors[i].Blue = 255; + i++; // 255 + Colors[i].Red = 255; + Colors[i].Green = 255; + Colors[i].Blue = 255; + + return true; + } + return true; +} + +bool SafeFread( char* buffer, int size, int number, FILE* fp ) +{ + using namespace std; + int ItemsRead; + if( feof(fp) ) + { return false; } + ItemsRead = (int) fread( buffer , size , number , fp ); + if( ItemsRead < number ) + { return false; } + return true; +} + +void BMP::SetDPI( int HorizontalDPI, int VerticalDPI ) +{ + XPelsPerMeter = (int) ( HorizontalDPI * 39.37007874015748 ); + YPelsPerMeter = (int) ( VerticalDPI * 39.37007874015748 ); +} + +// int BMP::TellVerticalDPI( void ) const +int BMP::TellVerticalDPI( void ) +{ + if( !YPelsPerMeter ) + { YPelsPerMeter = DefaultYPelsPerMeter; } + return (int) ( YPelsPerMeter / (double) 39.37007874015748 ); +} + +// int BMP::TellHorizontalDPI( void ) const +int BMP::TellHorizontalDPI( void ) +{ + if( !XPelsPerMeter ) + { XPelsPerMeter = DefaultXPelsPerMeter; } + return (int) ( XPelsPerMeter / (double) 39.37007874015748 ); +} + +/* These functions are defined in EasyBMP_VariousBMPutilities.h */ + +BMFH GetBMFH( const char* szFileNameIn ) +{ + using namespace std; + BMFH bmfh; + + FILE* fp; + fp = fopen( szFileNameIn,"rb"); + + if( !fp ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Error: Cannot initialize from file " + << szFileNameIn << "." << endl + << " File cannot be opened or does not exist." + << endl; + } + bmfh.bfType = 0; + return bmfh; + } + + SafeFread( (char*) &(bmfh.bfType) , sizeof(ebmpWORD) , 1 , fp ); + SafeFread( (char*) &(bmfh.bfSize) , sizeof(ebmpDWORD) , 1 , fp ); + SafeFread( (char*) &(bmfh.bfReserved1) , sizeof(ebmpWORD) , 1 , fp ); + SafeFread( (char*) &(bmfh.bfReserved2) , sizeof(ebmpWORD) , 1 , fp ); + SafeFread( (char*) &(bmfh.bfOffBits) , sizeof(ebmpDWORD) , 1 , fp ); + + fclose( fp ); + + if( IsBigEndian() ) + { bmfh.SwitchEndianess(); } + + return bmfh; +} + +BMIH GetBMIH( const char* szFileNameIn ) +{ + using namespace std; + BMFH bmfh; + BMIH bmih; + + FILE* fp; + fp = fopen( szFileNameIn,"rb"); + + if( !fp ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Error: Cannot initialize from file " + << szFileNameIn << "." << endl + << " File cannot be opened or does not exist." + << endl; + } + return bmih; + } + + // read the bmfh, i.e., first 14 bytes (just to get it out of the way); + + ebmpBYTE TempBYTE; + int i; + for( i = 14 ; i > 0 ; i-- ) + { SafeFread( (char*) &TempBYTE , sizeof(ebmpBYTE) , 1, fp ); } + + // read the bmih + + SafeFread( (char*) &(bmih.biSize) , sizeof(ebmpDWORD) , 1 , fp ); + SafeFread( (char*) &(bmih.biWidth) , sizeof(ebmpDWORD) , 1 , fp ); + SafeFread( (char*) &(bmih.biHeight) , sizeof(ebmpDWORD) , 1 , fp ); + SafeFread( (char*) &(bmih.biPlanes) , sizeof(ebmpWORD) , 1 , fp ); + + SafeFread( (char*) &(bmih.biBitCount) , sizeof(ebmpWORD) , 1 , fp ); + SafeFread( (char*) &(bmih.biCompression) , sizeof(ebmpDWORD) , 1 , fp ); + SafeFread( (char*) &(bmih.biSizeImage) , sizeof(ebmpDWORD) , 1 , fp ); + SafeFread( (char*) &(bmih.biXPelsPerMeter) , sizeof(ebmpDWORD) , 1 , fp ); + + SafeFread( (char*) &(bmih.biYPelsPerMeter) , sizeof(ebmpDWORD) , 1 , fp ); + SafeFread( (char*) &(bmih.biClrUsed) , sizeof(ebmpDWORD) , 1 , fp ); + SafeFread( (char*) &(bmih.biClrImportant) , sizeof(ebmpDWORD) , 1 , fp ); + + fclose( fp ); + + if( IsBigEndian() ) + { bmih.SwitchEndianess(); } + + return bmih; +} + +void DisplayBitmapInfo( const char* szFileNameIn ) +{ + using namespace std; + FILE* fp; + fp = fopen( szFileNameIn,"rb"); + + if( !fp ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Error: Cannot initialize from file " + << szFileNameIn << "." << endl + << " File cannot be opened or does not exist." + << endl; + } + return; + } + fclose( fp ); + + // don't duplicate work! Just use the functions from above! + + BMFH bmfh = GetBMFH(szFileNameIn); + BMIH bmih = GetBMIH(szFileNameIn); + + cout << "File information for file " << szFileNameIn + << ":" << endl << endl; + + cout << "BITMAPFILEHEADER:" << endl + << "bfType: " << bmfh.bfType << endl + << "bfSize: " << bmfh.bfSize << endl + << "bfReserved1: " << bmfh.bfReserved1 << endl + << "bfReserved2: " << bmfh.bfReserved2 << endl + << "bfOffBits: " << bmfh.bfOffBits << endl << endl; + + cout << "BITMAPINFOHEADER:" << endl + << "biSize: " << bmih.biSize << endl + << "biWidth: " << bmih.biWidth << endl + << "biHeight: " << bmih.biHeight << endl + << "biPlanes: " << bmih.biPlanes << endl + << "biBitCount: " << bmih.biBitCount << endl + << "biCompression: " << bmih.biCompression << endl + << "biSizeImage: " << bmih.biSizeImage << endl + << "biXPelsPerMeter: " << bmih.biXPelsPerMeter << endl + << "biYPelsPerMeter: " << bmih.biYPelsPerMeter << endl + << "biClrUsed: " << bmih.biClrUsed << endl + << "biClrImportant: " << bmih.biClrImportant << endl << endl; + return; +} + +int GetBitmapColorDepth( const char* szFileNameIn ) +{ + BMIH bmih = GetBMIH( szFileNameIn ); + return (int) bmih.biBitCount; +} + +void PixelToPixelCopy( BMP& From, int FromX, int FromY, + BMP& To, int ToX, int ToY) +{ + *To(ToX,ToY) = *From(FromX,FromY); + return; +} + +void PixelToPixelCopyTransparent( BMP& From, int FromX, int FromY, + BMP& To, int ToX, int ToY, + RGBApixel& Transparent ) +{ + if( From(FromX,FromY)->Red != Transparent.Red || + From(FromX,FromY)->Green != Transparent.Green || + From(FromX,FromY)->Blue != Transparent.Blue ) + { *To(ToX,ToY) = *From(FromX,FromY); } + return; +} + +void RangedPixelToPixelCopy( BMP& From, int FromL , int FromR, int FromB, int FromT, + BMP& To, int ToX, int ToY ) +{ + // make sure the conventions are followed + if( FromB < FromT ) + { int Temp = FromT; FromT = FromB; FromB = Temp; } + + // make sure that the copied regions exist in both bitmaps + if( FromR >= From.TellWidth() ) + { FromR = From.TellWidth()-1; } + if( FromL < 0 ){ FromL = 0; } + + if( FromB >= From.TellHeight() ) + { FromB = From.TellHeight()-1; } + if( FromT < 0 ){ FromT = 0; } + + if( ToX+(FromR-FromL) >= To.TellWidth() ) + { FromR = To.TellWidth()-1+FromL-ToX; } + if( ToY+(FromB-FromT) >= To.TellHeight() ) + { FromB = To.TellHeight()-1+FromT-ToY; } + + int i,j; + for( j=FromT ; j <= FromB ; j++ ) + { + for( i=FromL ; i <= FromR ; i++ ) + { + PixelToPixelCopy( From, i,j, + To, ToX+(i-FromL), ToY+(j-FromT) ); + } + } + + return; +} + +void RangedPixelToPixelCopyTransparent( + BMP& From, int FromL , int FromR, int FromB, int FromT, + BMP& To, int ToX, int ToY , + RGBApixel& Transparent ) +{ + // make sure the conventions are followed + if( FromB < FromT ) + { int Temp = FromT; FromT = FromB; FromB = Temp; } + + // make sure that the copied regions exist in both bitmaps + if( FromR >= From.TellWidth() ) + { FromR = From.TellWidth()-1; } + if( FromL < 0 ){ FromL = 0; } + + if( FromB >= From.TellHeight() ) + { FromB = From.TellHeight()-1; } + if( FromT < 0 ){ FromT = 0; } + + if( ToX+(FromR-FromL) >= To.TellWidth() ) + { FromR = To.TellWidth()-1+FromL-ToX; } + if( ToY+(FromB-FromT) >= To.TellHeight() ) + { FromB = To.TellHeight()-1+FromT-ToY; } + + int i,j; + for( j=FromT ; j <= FromB ; j++ ) + { + for( i=FromL ; i <= FromR ; i++ ) + { + PixelToPixelCopyTransparent( From, i,j, + To, ToX+(i-FromL), ToY+(j-FromT) , + Transparent); + } + } + + return; +} + +bool CreateGrayscaleColorTable( BMP& InputImage ) +{ + using namespace std; + int BitDepth = InputImage.TellBitDepth(); + if( BitDepth != 1 && BitDepth != 4 && BitDepth != 8 ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Warning: Attempted to create color table at a bit" << endl + << " depth that does not require a color table." << endl + << " Ignoring request." << endl; + } + return false; + } + int i; + int NumberOfColors = InputImage.TellNumberOfColors(); + + ebmpBYTE StepSize; + if( BitDepth != 1 ) + { StepSize = 255/(NumberOfColors-1); } + else + { StepSize = 255; } + + for( i=0 ; i < NumberOfColors ; i++ ) + { + ebmpBYTE TempBYTE = i*StepSize; + RGBApixel TempColor; + TempColor.Red = TempBYTE; + TempColor.Green = TempBYTE; + TempColor.Blue = TempBYTE; + TempColor.Alpha = 0; + InputImage.SetColor( i , TempColor ); + } + return true; +} + +bool BMP::Read32bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ) +{ + int i; + if( Width*4 > BufferSize ) + { return false; } + for( i=0 ; i < Width ; i++ ) + { memcpy( (char*) &(Pixels[i][Row]), (char*) Buffer+4*i, 4 ); } + return true; +} + +bool BMP::Read24bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ) +{ + int i; + if( Width*3 > BufferSize ) + { return false; } + for( i=0 ; i < Width ; i++ ) + { memcpy( (char*) &(Pixels[i][Row]), Buffer+3*i, 3 ); } + return true; +} + +bool BMP::Read8bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ) +{ + int i; + if( Width > BufferSize ) + { return false; } + for( i=0 ; i < Width ; i++ ) + { + int Index = Buffer[i]; + *( this->operator()(i,Row) )= GetColor(Index); + } + return true; +} + +bool BMP::Read4bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ) +{ + int Shifts[2] = {4 ,0 }; + int Masks[2] = {240,15}; + + int i=0; + int j; + int k=0; + if( Width > 2*BufferSize ) + { return false; } + while( i < Width ) + { + j=0; + while( j < 2 && i < Width ) + { + int Index = (int) ( (Buffer[k]&Masks[j]) >> Shifts[j]); + *( this->operator()(i,Row) )= GetColor(Index); + i++; j++; + } + k++; + } + return true; +} +bool BMP::Read1bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ) +{ + int Shifts[8] = {7 ,6 ,5 ,4 ,3,2,1,0}; + int Masks[8] = {128,64,32,16,8,4,2,1}; + + int i=0; + int j; + int k=0; + + if( Width > 8*BufferSize ) + { return false; } + while( i < Width ) + { + j=0; + while( j < 8 && i < Width ) + { + int Index = (int) ( (Buffer[k]&Masks[j]) >> Shifts[j]); + *( this->operator()(i,Row) )= GetColor(Index); + i++; j++; + } + k++; + } + return true; +} + +bool BMP::Write32bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ) +{ + int i; + if( Width*4 > BufferSize ) + { return false; } + for( i=0 ; i < Width ; i++ ) + { memcpy( (char*) Buffer+4*i, (char*) &(Pixels[i][Row]), 4 ); } + return true; +} + +bool BMP::Write24bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ) +{ + int i; + if( Width*3 > BufferSize ) + { return false; } + for( i=0 ; i < Width ; i++ ) + { memcpy( (char*) Buffer+3*i, (char*) &(Pixels[i][Row]), 3 ); } + return true; +} + +bool BMP::Write8bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ) +{ + int i; + if( Width > BufferSize ) + { return false; } + for( i=0 ; i < Width ; i++ ) + { Buffer[i] = FindClosestColor( Pixels[i][Row] ); } + return true; +} + +bool BMP::Write4bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ) +{ + int PositionWeights[2] = {16,1}; + + int i=0; + int j; + int k=0; + if( Width > 2*BufferSize ) + { return false; } + while( i < Width ) + { + j=0; + int Index = 0; + while( j < 2 && i < Width ) + { + Index += ( PositionWeights[j]* (int) FindClosestColor( Pixels[i][Row] ) ); + i++; j++; + } + Buffer[k] = (ebmpBYTE) Index; + k++; + } + return true; +} + +bool BMP::Write1bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ) +{ + int PositionWeights[8] = {128,64,32,16,8,4,2,1}; + + int i=0; + int j; + int k=0; + if( Width > 8*BufferSize ) + { return false; } + while( i < Width ) + { + j=0; + int Index = 0; + while( j < 8 && i < Width ) + { + Index += ( PositionWeights[j]* (int) FindClosestColor( Pixels[i][Row] ) ); + i++; j++; + } + Buffer[k] = (ebmpBYTE) Index; + k++; + } + return true; +} + +ebmpBYTE BMP::FindClosestColor( RGBApixel& input ) +{ + using namespace std; + + int i=0; + int NumberOfColors = TellNumberOfColors(); + ebmpBYTE BestI = 0; + int BestMatch = 999999; + + while( i < NumberOfColors ) + { + RGBApixel Attempt = GetColor( i ); + int TempMatch = IntSquare( (int) Attempt.Red - (int) input.Red ) + + IntSquare( (int) Attempt.Green - (int) input.Green ) + + IntSquare( (int) Attempt.Blue - (int) input.Blue ); + if( TempMatch < BestMatch ) + { BestI = (ebmpBYTE) i; BestMatch = TempMatch; } + if( BestMatch < 1 ) + { i = NumberOfColors; } + i++; + } + return BestI; +} + +bool EasyBMPcheckDataSize( void ) +{ + using namespace std; + bool ReturnValue = true; + if( sizeof( ebmpBYTE ) != 1 ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Error: ebmpBYTE has the wrong size (" + << sizeof( ebmpBYTE ) << " bytes)," << endl + << " Compared to the expected 1 byte value" << endl; + } + ReturnValue = false; + } + if( sizeof( ebmpWORD ) != 2 ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Error: ebmpWORD has the wrong size (" + << sizeof( ebmpWORD ) << " bytes)," << endl + << " Compared to the expected 2 byte value" << endl; + } + ReturnValue = false; + } + if( sizeof( ebmpDWORD ) != 4 ) + { + if( EasyBMPwarnings ) + { + cout << "EasyBMP Error: ebmpDWORD has the wrong size (" + << sizeof( ebmpDWORD ) << " bytes)," << endl + << " Compared to the expected 4 byte value" << endl; + } + ReturnValue = false; + } + return ReturnValue; +} + +bool Rescale( BMP& InputImage , char mode, int NewDimension ) +{ + using namespace std; + int CapMode = toupper( mode ); + + BMP OldImage( InputImage ); + + if( CapMode != 'P' && + CapMode != 'W' && + CapMode != 'H' && + CapMode != 'F' ) + { + if( EasyBMPwarnings ) + { + char ErrorMessage [1024]; + sprintf( ErrorMessage, "EasyBMP Error: Unknown rescale mode %c requested\n" , mode ); + cout << ErrorMessage; + } + return false; + } + + int NewWidth =0; + int NewHeight =0; + + int OldWidth = OldImage.TellWidth(); + int OldHeight= OldImage.TellHeight(); + + if( CapMode == 'P' ) + { + NewWidth = (int) floor( OldWidth * NewDimension / 100.0 ); + NewHeight = (int) floor( OldHeight * NewDimension / 100.0 ); + } + if( CapMode == 'F' ) + { + if( OldWidth > OldHeight ) + { CapMode = 'W'; } + else + { CapMode = 'H'; } + } + + if( CapMode == 'W' ) + { + double percent = (double) NewDimension / (double) OldWidth; + NewWidth = NewDimension; + NewHeight = (int) floor( OldHeight * percent ); + } + if( CapMode == 'H' ) + { + double percent = (double) NewDimension / (double) OldHeight; + NewHeight = NewDimension; + NewWidth = (int) floor( OldWidth * percent ); + } + + if( NewWidth < 1 ) + { NewWidth = 1; } + if( NewHeight < 1 ) + { NewHeight = 1; } + + InputImage.SetSize( NewWidth, NewHeight ); + InputImage.SetBitDepth( 24 ); + + int I,J; + double ThetaI,ThetaJ; + + for( int j=0; j < NewHeight-1 ; j++ ) + { + ThetaJ = (double)(j*(OldHeight-1.0)) + /(double)(NewHeight-1.0); + J = (int) floor( ThetaJ ); + ThetaJ -= J; + + for( int i=0; i < NewWidth-1 ; i++ ) + { + ThetaI = (double)(i*(OldWidth-1.0)) + /(double)(NewWidth-1.0); + I = (int) floor( ThetaI ); + ThetaI -= I; + + InputImage(i,j)->Red = (ebmpBYTE) + ( (1.0-ThetaI-ThetaJ+ThetaI*ThetaJ)*(OldImage(I,J)->Red) + +(ThetaI-ThetaI*ThetaJ)*(OldImage(I+1,J)->Red) + +(ThetaJ-ThetaI*ThetaJ)*(OldImage(I,J+1)->Red) + +(ThetaI*ThetaJ)*(OldImage(I+1,J+1)->Red) ); + InputImage(i,j)->Green = (ebmpBYTE) + ( (1.0-ThetaI-ThetaJ+ThetaI*ThetaJ)*OldImage(I,J)->Green + +(ThetaI-ThetaI*ThetaJ)*OldImage(I+1,J)->Green + +(ThetaJ-ThetaI*ThetaJ)*OldImage(I,J+1)->Green + +(ThetaI*ThetaJ)*OldImage(I+1,J+1)->Green ); + InputImage(i,j)->Blue = (ebmpBYTE) + ( (1.0-ThetaI-ThetaJ+ThetaI*ThetaJ)*OldImage(I,J)->Blue + +(ThetaI-ThetaI*ThetaJ)*OldImage(I+1,J)->Blue + +(ThetaJ-ThetaI*ThetaJ)*OldImage(I,J+1)->Blue + +(ThetaI*ThetaJ)*OldImage(I+1,J+1)->Blue ); + } + InputImage(NewWidth-1,j)->Red = (ebmpBYTE) + ( (1.0-ThetaJ)*(OldImage(OldWidth-1,J)->Red) + + ThetaJ*(OldImage(OldWidth-1,J+1)->Red) ); + InputImage(NewWidth-1,j)->Green = (ebmpBYTE) + ( (1.0-ThetaJ)*(OldImage(OldWidth-1,J)->Green) + + ThetaJ*(OldImage(OldWidth-1,J+1)->Green) ); + InputImage(NewWidth-1,j)->Blue = (ebmpBYTE) + ( (1.0-ThetaJ)*(OldImage(OldWidth-1,J)->Blue) + + ThetaJ*(OldImage(OldWidth-1,J+1)->Blue) ); + } + + for( int i=0 ; i < NewWidth-1 ; i++ ) + { + ThetaI = (double)(i*(OldWidth-1.0)) + /(double)(NewWidth-1.0); + I = (int) floor( ThetaI ); + ThetaI -= I; + InputImage(i,NewHeight-1)->Red = (ebmpBYTE) + ( (1.0-ThetaI)*(OldImage(I,OldHeight-1)->Red) + + ThetaI*(OldImage(I,OldHeight-1)->Red) ); + InputImage(i,NewHeight-1)->Green = (ebmpBYTE) + ( (1.0-ThetaI)*(OldImage(I,OldHeight-1)->Green) + + ThetaI*(OldImage(I,OldHeight-1)->Green) ); + InputImage(i,NewHeight-1)->Blue = (ebmpBYTE) + ( (1.0-ThetaI)*(OldImage(I,OldHeight-1)->Blue) + + ThetaI*(OldImage(I,OldHeight-1)->Blue) ); + } + + *InputImage(NewWidth-1,NewHeight-1) = *OldImage(OldWidth-1,OldHeight-1); + return true; +} diff --git a/src/EasyBMP.h b/src/EasyBMP.h new file mode 100644 index 0000000..ead98c1 --- /dev/null +++ b/src/EasyBMP.h @@ -0,0 +1,86 @@ +/************************************************* +* * +* EasyBMP Cross-Platform Windows Bitmap Library * +* * +* Author: Paul Macklin * +* email: macklin01@users.sourceforge.net * +* support: http://easybmp.sourceforge.net * +* * +* file: EasyBMP.h * +* date added: 01-31-2005 * +* date modified: 12-01-2006 * +* version: 1.06 * +* * +* License: BSD (revised/modified) * +* Copyright: 2005-6 by the EasyBMP Project * +* * +* description: Main include file * +* * +*************************************************/ + +#ifdef _MSC_VER +// MS Visual Studio gives warnings when using +// fopen. But fopen_s is not going to work well +// with most compilers, and fopen_s uses different +// syntax than fopen. (i.e., a macro won't work) +// So, we'lll use this: +#define _CRT_SECURE_NO_DEPRECATE +#endif + +#include +#include +#include +#include + +#ifndef EasyBMP +#define EasyBMP + +#ifdef __BCPLUSPLUS__ +// The Borland compiler must use this because something +// is wrong with their cstdio file. +#include +#else +#include +#endif + +#ifdef __GNUC__ +// If g++ specific code is ever required, this is +// where it goes. +#endif + +#ifdef __INTEL_COMPILER +// If Intel specific code is ever required, this is +// where it goes. +#endif + +#ifndef _DefaultXPelsPerMeter_ +#define _DefaultXPelsPerMeter_ +#define DefaultXPelsPerMeter 3780 +// set to a default of 96 dpi +#endif + +#ifndef _DefaultYPelsPerMeter_ +#define _DefaultYPelsPerMeter_ +#define DefaultYPelsPerMeter 3780 +// set to a default of 96 dpi +#endif + +#include "EasyBMP_DataStructures.h" +#include "EasyBMP_BMP.h" +#include "EasyBMP_VariousBMPutilities.h" + +#ifndef _EasyBMP_Version_ +#define _EasyBMP_Version_ 1.06 +#define _EasyBMP_Version_Integer_ 106 +#define _EasyBMP_Version_String_ "1.06" +#endif + +#ifndef _EasyBMPwarnings_ +#define _EasyBMPwarnings_ +#endif + +void SetEasyBMPwarningsOff( void ); +void SetEasyBMPwarningsOn( void ); +bool GetEasyBMPwarningState( void ); + +#endif diff --git a/src/EasyBMP_BMP.h b/src/EasyBMP_BMP.h new file mode 100644 index 0000000..819a976 --- /dev/null +++ b/src/EasyBMP_BMP.h @@ -0,0 +1,86 @@ +/************************************************* +* * +* EasyBMP Cross-Platform Windows Bitmap Library * +* * +* Author: Paul Macklin * +* email: macklin01@users.sourceforge.net * +* support: http://easybmp.sourceforge.net * +* * +* file: EasyBMP_VariousBMPutilities.h * +* date added: 05-02-2005 * +* date modified: 12-01-2006 * +* version: 1.06 * +* * +* License: BSD (revised/modified) * +* Copyright: 2005-6 by the EasyBMP Project * +* * +* description: Defines BMP class * +* * +*************************************************/ + +#ifndef _EasyBMP_BMP_h_ +#define _EasyBMP_BMP_h_ + +bool SafeFread( char* buffer, int size, int number, FILE* fp ); +bool EasyBMPcheckDataSize( void ); + +class BMP +{private: + + int BitDepth; + int Width; + int Height; + RGBApixel** Pixels; + RGBApixel* Colors; + int XPelsPerMeter; + int YPelsPerMeter; + + ebmpBYTE* MetaData1; + int SizeOfMetaData1; + ebmpBYTE* MetaData2; + int SizeOfMetaData2; + + bool Read32bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ); + bool Read24bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ); + bool Read8bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ); + bool Read4bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ); + bool Read1bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ); + + bool Write32bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ); + bool Write24bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ); + bool Write8bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ); + bool Write4bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ); + bool Write1bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ); + + ebmpBYTE FindClosestColor( RGBApixel& input ); + + public: + + int TellBitDepth( void ); + int TellWidth( void ); + int TellHeight( void ); + int TellNumberOfColors( void ); + void SetDPI( int HorizontalDPI, int VerticalDPI ); + int TellVerticalDPI( void ); + int TellHorizontalDPI( void ); + + BMP(); + BMP( BMP& Input ); + ~BMP(); + RGBApixel* operator()(int i,int j); + + RGBApixel GetPixel( int i, int j ) const; + bool SetPixel( int i, int j, RGBApixel NewPixel ); + + bool CreateStandardColorTable( void ); + + bool SetSize( int NewWidth, int NewHeight ); + bool SetBitDepth( int NewDepth ); + bool WriteToFile( const char* FileName ); + bool ReadFromFile( const char* FileName ); + + RGBApixel GetColor( int ColorNumber ); + bool SetColor( int ColorNumber, RGBApixel NewColor ); +}; + +#endif diff --git a/src/EasyBMP_ChangeLog.txt b/src/EasyBMP_ChangeLog.txt new file mode 100644 index 0000000..b0a2c14 --- /dev/null +++ b/src/EasyBMP_ChangeLog.txt @@ -0,0 +1,821 @@ +EasyBMP Cross-Platform Windows Bitmap Library: Change Log + +Library Author(s): Paul Macklin + Library License: BSD (revised). See the BSD_(revised)_license.txt + file for further information. + Copyright: 2005-6 by the EasyBMP Project + Email: macklin01@users.sourceforge.net + Support: http://easybmp.sourceforge.net + +All changes by Paul Macklin unless otherwise noted. + +*--------------------------------------------------------------------* + +Version: 0.50 + Date: 1-31-2005 + + None! (first release) + +*--------------------------------------------------------------------* + +Version: 0.51 + Date: 2-14-2005 + + Added full 32-bit BMP file support + + Took out annoying "colors: " message from BMP8 initialization + from scratch + + Added more license and copyright info to each file + + Added change log to library + + To do next: + Should update the error messages for the initializations + Should simplify the reading and writing code + +*--------------------------------------------------------------------* + +Version: 0.52 + Date: 2-19-2005 + + Fixed a minor bug in the MakeGreyscalePalette function where the + 0 color turned out to be (255,255,255), rather than (0,0,0) + + Updated standard colors for 4-bit, 8-bit, and 24-bit + +*--------------------------------------------------------------------* + +Version: 0.53 + Date: 2-27-2005 + + Fixed unsigned / signed problem that VS.net shows + + + Tried fix of line 186 in EasyBMP_BMP4.h file. If it works, + I'll apply it consistently. I think that VS.net wants us + to clear char* blah, then char = new blah [size], just + like the old days for g++. + + Removed EasyBMP_StandardColors.h from standard package + +*--------------------------------------------------------------------* + +Version: 0.54 + Date: 2-27-2005 + + The fix of line 186 in EasyBMP_BMP4.h file appears to have + worked. I applied it through the remainder of the code. + Hopefully, this should ensure Visual Studio.Net compati- + bility. + + Fixed some typos in the comment lines + +*--------------------------------------------------------------------* + +Version: 0.55 + Date: 5-2-2005 + + Introduced RGBApixel struct. + + Introduced BMFH, BMIH, and BMP classes. + + Deprecated all old code to *_legacy.h. + + Rewrote EasyBMP_VariousBMPutilities.h to use the new + BMP class. + +*--------------------------------------------------------------------* + +Version: 0.56 + Date: 5-4-2005 + + Made Width, Height, and BitDepth private members and added + functions for accessing them. + + Made a new function, SetBitDepth, as the only means to + change the bit depth. It will create/resize a palette as + necessary. This simplifies the WriteToFile code, as well as + any palette altering algorithms. (All algorithms can now + assume that a properly-sized palette exists.) This will + help improve code stability greatly. + + Made a new function, SetSize, as the only way to change the + width and height of the image. + + Eliminated useless HasPalette and NumberOfColors members, + and added TellNumberOfColors() function. + + Updated EasyBMP_VariousBMPutilities.h to respect privacy + of data members. + +*--------------------------------------------------------------------* + +Version: 0.57 + Date: 5-8-2005 + + Removed fclose(fp) lines from EasyBMP_BMP.h and + EasyBMP_VariousBMPutilities.h whenever ( !fp ) occurs, + to avoid a crash when trying to close a non-existant file. + + + Added a line to set bmfh.bfType = 0; to getBMFH() routine + in the case where ( !fp ) occurs, so that a nonexistant file + doesn't falsely show up as a bitmap file. + + Made error messages in BMP::ReadFromFile(char*) more meaningful, + since Argh! doesn't help much. :-) + + Made ReadFromFile operations safer: can deal more effectively + with corrupted and/or truncated files by adding the new + SafeFread() wrapper function. + + Moved all change-log entries to the change log to make the source + file tidier. + + Removed all references to Palettes; renamed them to ColorTables. + +*--------------------------------------------------------------------* + +Version: 0.58 + Date: 5-13-2005 + + Rewrote ReadFromFile() to fix program crashes on reading 4-bit + files. (*grumble* I can't believe there was such a bug in such + a late version! */grumble*) + + Added support to ReadFromFile() for reading 1-bit files. + + Rewrote ReadFromFile() to avoid trying to read bitmap files of + depths other than 1, 4, 8, 24, and 32 bits. + + Tested reading 4-bit files of width 0,1,2, and 3 (modulo 4), + and 1-bit files of width 0,1,2,3,4,5,6, and 7 (modulo 8) + +*--------------------------------------------------------------------* + +Version: 0.59 + Date: 5-15-2005 + + Made ReadFromFile() more robust. Evidently, reading to the + same temp variable all the time made it unstable when reading + many files. I would never have guessed. I instead declare BMIH + and BMFH objects and read directly to their members. This appears + to be more stable when dealing with many ReadFromFile() calls. + + On a related note, made sure to not call SetSize( Width,Height), + which is a bit recursive, as well as SetBitDepth( BitDepth ). + This appears to help stability, since these two functions were + create precisely for the purpose of setting those variables + values safely. + + Made use of the boolean return value in SafeFread() to detect + when files are obviously corrupted. Used this to have an early + catch in ReadFromFile() and set it to a 1x1 1-bit image and + exit. + + Made ReadFromFile() stricter, in that it only reads recognized + bit depths (1,4,8,24,32). Any other bit depth will prompt the + routine to terminate and set it to a 1x1 1-bit file. + + Added write support for 1-bit files. + + Rewrote WriteToFile() for 4,8-bit files to match methods used + for reading them. + + Revised CreateStandardColorTable() and + CreateGreyscaleColorTable() to add support for 1-bit files. + + Rewrote WriteToFile() to be stricter in only writing known bit + depths (1,4,8,24,32) and ignoring all others. + +*--------------------------------------------------------------------* + +Version: 0.60 + Date: 5-21-2005 + + Deprecated *_legacy.h files. + + Tested library extensivey in linux with good results. + + Made CreateGreyscaleColorTable() stricter, in that it exits + if supplied a bit depth other than 1, 4, or 8. + + Made cosmetic changes in EasyBMP_DataStructures.h to + improve readability. + + Made SetBitDepth() stricter, in that it will never allow a bitmap + to be set to an unsupported bit depth. Only bit depths of 1, 4, + 8, 24, or 32 are accepted. + + Made SetSize() stricter, in that it will not allow negative + widths or heights. + + Made cosmetic changes in EasyBMP_BMP.h to improve readability. + + Added a check in ReadFromFile() to see if the requested width or + height is negative, a good sign of file corruption. In such a + case, the file is set to a blank 1x1 1-bit file. + + Added code to ReadFromFile() to set size to 1x1 and bit depth to + 1-bit if the file was not found. + +*--------------------------------------------------------------------* + +Version: 0.61 + Date: 5-22-2005 + + Fixed awIndex typo in WriteToFile(). + + Replaced double BestDistance comparisons in WriteToFile() + with int BestDistances (so as to do integer operations, + rather than double operations). This gave a roughly 100% + speedup in 8-bit, 4-bit, and 1-bit write operations on + unoptimized (no compiler flags) code and a 30% speedup + on optimized code. + + Removed checks like if( BestDistance < 1 ){ k=256; } .. from + WriteToFile(), as they give more overhead than savings in my + testing. For 8-bit files, there was a slight gain by putting + it back in with another method: + while( k < 256 && BestDistance > 0 ). + + Redefined StepSize in CreateGreyscaleColorTable() to give a + better range of greys in 4-bit mode. As it was, white was not + in the color table. (Colors were spaced by 256/16 = 16). Now, + colors are spaced by (255-1)/(16-1) = 17, which gives the full + range. + +*--------------------------------------------------------------------* + +Version: 0.62 + Date: 5-25-2005 + + Added endianess check function IsBigEndian() to + EasyBMP_DataStructures.h file. + + Added functions to swap bytes in WORD and DWORD multibyte + variables to EasyBMP_DataStructures.h file for future big-endian + support. + + Added functions to switch endianess to BMFH and BMIH objects + to EasyBMP_DataStructures.h file. + + Added endianess checks to ReadFromFile() and WriteToFile() + functions in EasyBMP_BMP.h file, along with endianess conversions + where necessary. + + Added endianess checks and conversions to GetBMFH() and GetBMIH() + functions in EasyBMP_VariousBMPutilities.h file. + + Rewrote GetBitmapInfo() function to use GetBMFH() and GetBMIH() + functions instead. (In EasyBMP_VariousBMPutilities.h.) This + cuts down on the redundancy in the code. + + Renamed GetBitmapInfo() to DisplayBitmapInfo() in the + EasyBMP_VariousBMPutilities.h file. + + With these changes, big-endian architectures should be supported, + including IBM PowerPC, Sun Sparc, Motorola 86k, etc., and + including Mac OSX. + +*--------------------------------------------------------------------* + +Version: 0.63 + Date: 7-20-2005 + + Added IntPow(int,int) function to help compiling with std + namespace. Besides, integer operations are faster and more + accurate. + + Moved Square(double), IntSquare(int), and IntPow(int,int) to + EasyBMP_DataStructures.h + + Simplified and cleaned up code in + Create4bitColorTable( RGBApixel**). + + Changed safety check in BMP.ReadFromFile(char*) to set size to + 1 x 1 if width or height is non-positive, rather than simply + negative. + + Added bounds checking to BMP.operator()(int,int) to automatically + truncate requested pixel if out of bounds. Also added a warning + to cue the user in. :-) + + Made error messages more consistent in format. + + Simplified and cleaned up code in + Create4bitColorTable( RGBApixel**). + + Added #include to EasyBMP.h, since EasyBMP uses + cout, etc. + + Simplified and cleaned up code in + Create1bitColorTable( RGBApixel**). + + Changed BMP.SetSize(int,int) to disallow non-positive widths and + heights, rather than simply negative widths and heights. Such + function calls are now ignored. + +*--------------------------------------------------------------------* + +Version: 0.64 + Date: 8-2-2005 + + Changed "include " to "include " for + ANSI-C++ compliance, as well as for better compatibility with the + std namespace and VC++. (Thanks, Tommy Li!) + + Added some #ifndef pragmas to each header so that it should be + fine to incluce EasyBMP.h in multiple files in larger projects. + + Added "using namespace std" inside any function that used C++ + math or I/O operations. I avoided putting "using namespace std" + anywhere with global scope for maximum compatibility with C++ + software in the wild. + + Added includes for and to EasyBMP.h + + Removed unused temporary variables (TempWORD and TempDWORD) from + EasyBMP_BMP.h for cleaner compiling. If I see any more such + unused variables, I'll remove them, too. + +*--------------------------------------------------------------------* + +Version: 0.65 + Date: 8-13-2005 + + Moved implementations of BMP::BMP(), BMP::~BMP(), and + BMP::operator()(int,int) outside of the class. This should help + for eventually moving everything into a separate cpp file. + + Made RGBApixel** Pixels a private data member of the class + BMP. + + Added function void BMP::SetColor(int,RGBApixel) to BMP class + to allow safe method of changing a color in the color table. + + Added function RGBApixel BMP::GetColor(int) to BMP class + to allow safe method of retrieving a color in the color + table. + + Cleaned up error messages in EasyBMP_BMP.h + + Cleaned up error messages in EasyBMP_VariousBMPutilities.h + +*--------------------------------------------------------------------* + +Version: 0.66 + Date: 8-18-2005 + + EasyBMP_StandardColorTables.h was removed from the library. + + CreateStandardColorTable(RGBApixel**,int) was changed to + CreateStandardColorTable() and made a member function of BMP. + All other CreateStandardColorTable functions are now unnecessary + and have been removed. + + CreateGreyscaleColorTable(RGBApixel**,int) was changed to + CreateStandardColorTable( BMP& ) and moved to + EasyBMP_VariousBMPutilities.h. + + RGBApixel* Colors was made a private data member of the BMP + class. + + CreateGreyscaleColorTable( BMP& ) was renamed to + CreateGrayscaleColorTable( BMP& ). + +*--------------------------------------------------------------------* + +Version: 0.67 + Date: 9-14-2005 + + Made the EasyBMP custom math functions in + EasyBMP_DataStructures.h inline. (Square,IntSquare,IntPow). + This should make those function calls faster while improving + compatibility with compiling DLL's. + + Separated the code from SafeFread() in EasyBMP_BMP.h to + improve compatibility with compiling DLL's. + + Removed #define _WINGDI_H from EasyBMP_DataStructures.h to + improve compatibility with win32 applications. Instead, + there's an extra #ifndef _SELF_DEFINED_BMP_DATA_TYPES + conditional added. + + _SELF_DEFINED_BMP_DATA_TYPES renamed to _SELF_DEFINED_WINGDI + in EasyBMP_DataStructures.h. + + All bit-flipping functions (IsBigEndian, FlipWORD, + FlipDWORD) in EasyBMP_DataStructures.h were made inline + to improve execution speed and improve compatibility with + compiling DLL's. + + All code was separated from function declarations in + EasyBMP_VariousBMPutilities.h to improve compatibility + with compiling DLL's. + + Updated and cleaned up layout of EasyBMP_ChangeLog.txt. + + Updated contact and support information in library files. + + Corrected the LGPL license version. + +*--------------------------------------------------------------------* + +Version: 0.68 + Date: 10-9-2005 + + Changed references to FILE to std::FILE in the SafeFread function + in EasyBMP_BMP.h to improve compatibility with Borland's compiler. + + Removed a few assignments in EasyBMP_BMP.h that weren't used to + improve efficiency and reduce Borland warnings. + + Changed calls like NotCorrupted = SafeFread() to + NotCorrupted &= SafeFread() in BMP::ReadFromFile() in EasyBMP_BMP.h + to improve robustness. Now, if the NotCorrupted bit is ever set + to false, it stays false, meaning that the function won't "forget" + that it encountered file corruption. + +*--------------------------------------------------------------------* + +Version: 0.69 + Date: 10-19-2005 + + Changed BMP::WriteToFile( char* ) to BMP::WriteToFile(const char*) + in EasyBMP_BMP.h to respond to a feature request. + + Changed BMP::ReadFromFile( char* ) to BMP::ReadToFile(const char*) + in EasyBMP_BMP.h to respond to a feature request. + + Made BMP::ReadFromFile() and BMP::WriteToFile() in EasyBMP_BMP.h + return true/false to indicate success/failure in the operations. + These functions previously returned void. + + Made BMP::SetSize() and BMP::SetBitDepth() in EasyBMP_BMP.h + return true/false to indicate success/failure in the operations. + These functions previously returned void. + + Made BMP::SetColor() and BMP::CreateStandardColorTable() in + EasyBMP_BMP.h return true/false to indicate success/failure in the + operations. These functions previously returned void. + + Made CreateGrayscaleColorTable() in EasyBMP_VariousBMPutilities.h + return true/false to indicate success/failure in the operations. + This function previously returned void. + + Changed the char* argument GetBMFH( char* ), GetBMIH( char* ), + DisplayBitmapInfo( char* ), and GetBitmapColorDepth( char* ) in + EasyBMP_VariousBMPutilities.h to const char* for cleaner, safer + programming. + +*--------------------------------------------------------------------* + +Version: 0.70 + Date: 10-19-2005 + + Found and fixed error in BMP::ReadFromFile() in the check for only + reading support bit depths. + + Changed license from LGPL to BSD (revised/modified) to simplify + licensing issues and resolve any lingering licensing questions. + + Fixed compiler error when using MSVC++. + + Improved fix to allow compiling with Borland without breaking + Borland support. + + Added a few lines to EasyBMP.h to make it easier to tailor code + to specific compilers. (For future use as needed.) + + Added a few lines to EasyBMP_BMP.h (in BMP::ReadFromFile(), + BMP::WriteToFile(), and BMP::SetBitDepth()) to eventually add + support for 16-bit files. + +*--------------------------------------------------------------------* + +Version: 0.71 + Date: 11-01-2005 + + Cleaned up comments in BMP::ReadFromFile() in EasyBMP_BMP.h + + Added endian-safe read support for 16-bit files that are in the + standard 5-5-5 format (not specified in bit fields) + + Added endian-safe read support for 16-bit files that use bit + fields, including 5-6-5 files. + + Added endian-safe write support for 16-bit files. Uses the 5-6-5 + encoding scheme to maximize the utility of the bits used. + + Added a check for compression in BMP::ReadFromFile(). Because + file compression is beyond the scope of EasyBMP, such files are + not supported, and EasyBMP now properly detects these situations + and exits with an error. + + Added a check for files that attempt to use bit fields but are not + 16-bit files to BMP::ReadFromFile(). Such files are not supported. + + Added a check to BMP::ReadFromFile() for files that use unknown + values of bmih.biCompression, such as old OS2 bitmaps. Such files + are not supported. + + Removed "switching endianness" messages from EasyBMP_BMP.h + + Added support for indexed (1, 4, and 8-bit) files that don't + specify all the colors. + + Added support for reading files that include extra meta data before + the pixels. This data is skipped. + + Added enclosing #ifndef EasyBMP ... lines to EasyBMP.h as a + further safeguard when EasyBMP is included in multiple cpp + files. + +*--------------------------------------------------------------------* + +Version: 1.00 + Date: 02-06-2006 + + First Production/Stable release. + + Corrected typographical errors in the comment sections of all + files. + + Updated copyright on all files. + + Removed extraneous comment in BMIH::BMIH() function in + EasyBMP_DataStructures.h file. + + Replaced instances of \n with the more modern endl in + EasyBMP_DataStructures.h, EasyBMP_BMP.h, and + EasyBMP_VariousBMPutilities.h. + + Added placeholder MetaData1 and MetaData2 data members to the + BMP class for potential future use. + + Removed extraneous comments from EasyBMP_BMP.h. + + Removed warning messages for switching endianness from + EasyBMP_VariousBMPutilities.h. + + Updated copyright in EasyBMP_ChangeLog.txt file. + + Fixed formatting issues in EasyBMP_ChangeLog.txt file. + + Added DefaultXpelsPerMeter and DefaultYpelsPerMeter in + EasyBMP.h. These will default to 96 dpi. + + Changed BMP::WriteToFile() to use DefaultXpelsPerMeter and + DefaultYpelsPerMeter when writing the BMIH structure. + + Added XpelsPerMeter and YpelsPerMeter data members to BMP + class so that horizontal and vertical resolution are handled + properly. Currently, upon reading a file, the stated resolutions + are preserved, and upon writing, if no resolutions are given, + the defaults (of 96 DPI) are used. + + Added function void BMP::SetDPI(int,int) to set the horizontal + and vertical resolutions. + + Removed some unnecessary code from GetBitmapColorDepth() in + EasyBMP_VariousBMPutilities.h. + + Fixed a bug in RangedPixelToPixelCopyTransparent() and + RangedPixelToPixelCopy() in EasyBMP_VariousBMPutilities.h which + caused copies to be truncated by an extra row or column in + certain circumstances. + + Fixed a bug in RangedPixelToPixelCopyTransparent() and + RangedPixelToPixelCopy() in EasyBMP_VariousBMPutilities.h which + checked the wrong variable (FromT instead of FromB) to see if + it was out of range. + + Added extra checks to RangedPixelToPixelCopyTransparent() and + RangedPixelToPixelCopy() in EasyBMP_VariousBMPutilities.h to + prevent attempted access of out-of-range pixels. + +*--------------------------------------------------------------------* + +Version: 1.01 + Date: 03-31-2006 + + Made only the short functions Square, IntSquare, IsBigEndian, + FlipWORD, and FlipDWORD inline functions in + EasyBMP_DataStructures.h. + + Moved all code (other than inline functions) to EasyBMP.cpp. + + Changed DefaultXPelsPerMeter and DefaultYPelsPerMeter to #define + lines in EasyBMP.h to make the library compatible with + with the header-code split. + + Removed memory hole in ~BMP() where "delete Colors;" was used + instead of "delete [] Colors;". Likewise with MetaData1 and + MetaData2. + + Fixed memory leak in BMP::SetBitDepth() by changing to + delete [] Colors; + + Removed potential memory leak in BMP::WriteToFile() in 24- and + 32-bit writing where szTemp wasn't delete at the end of a row. + + Fixed bug where XPelsPerMeter and YPelsPerMeter weren't + properly initialized in the BMP::BMP() constructor, leading + to strange horizontal and vertical resolutions. + + Fixed memory leak in BMP::ReadFromFile() where TempSkipBYTE + wasn't deleted. + + Fixed memory leak in BMP::ReadFromFile() where szTemp wasn't + deleted. + + Added BMP::TellVerticalDPI() and BMP::TellHorizontalDPI() + functions to give this information. If those values have + not yet been set, then they are first set to the EasyBMP + defaults of 96 dpi. + + Set uninitialized RGBApixel values to white (255,255,255,0) + in a few functions for the BMP class. + + Added a sample cpp application and makefile. + +*--------------------------------------------------------------------* + +Version: 1.02 + Date: 05-29-2006 + + Inserted a line into EasyBMP.h to suppress the Visual Studio + warnings. We'll keep using the C++ standard fopen for now + until fopen_s becomes a real standard. + + Moved the code sample and makefile to a subdirectory, so that + unzipping EasyBMP#_##.zip into a project directory doesn't + overwrite any crucial makefiles. + + Improved SafeFread() to check if the proper amount of data + could be read. + + Dramatically cleaned up ReadFromFile() code for 1 and 4 + bpp files. + + Fixed a typo (draw.o) in the sample makefile. + + Modified ReadFromFile() to use buffering when reading the pixel + data. This should substantially improve disk access performance. + Only 16 bpp files are read in the old, slower way. + + Changed DWORD from unsigned long to unsigned int. This should + fix the issue where 64-bit machines see DWORD as an 8-byte + data type, rather than 4 bytes. (Thank you to Bas Wegh!) + + Renamed BYTE, WORD, and DWORD data types to ebmpBYTE, ebmpWORD, + and ebmpDWORD to eliminate the possibility of conflict with + windows applications, particularly with 64-bit windows, which + likely uses 8 byte DWORDS. + + Modified WriteToFile() to use buffering when reading the pixel + data. This should substantially improve disk access performance. + Only 16 bpp files are read in the old, slower way. + + Added new function, EasyBMPcheckDataSize(), to check that + the ebmpBYTE, ebmpWORD, and ebmpDWORD types have the correct + type. + + Added some new macros of the EasyBMP version number for easier + version checking. New versions include _EasyBMP_Version_ + (a double), _EasyBMP_Version_String_ (a char* version), and + _EasyBMP_Version_Integer_ (an integer version, e.g., 102). + +*--------------------------------------------------------------------* + +Version: 1.03 + Date: 06-20-2006 + + Inserted a line into EasyBMP.h to suppress the Visual Studio + + Added a check to BMP.SetColor() to ensure that the color table + is defined before attempting to set a color entry. + + Added a check to BMP.GetColor() to ensure that the color table + is defined before attempting to retrieve a color entry. + + Simplified the conditional in BMP.WriteToFile() from + if( BitDepth == 1 || BitDepth == 4 || ... ) to the simpler + if( BitDepth != 16 ). + + Removed the old, unused code for writing 1- and 4-bit files + from BMP.WriteToFile(). + + Removed the line Colors = new RGBApixel [NumberOfColors]; in + BMP.ReadFromFile(). This operation is already covered by the + earlier SetBitDepth() call, and may contribute to a memory + leak. Furthermore, for files that had fewer than expected + number of colors (e.g., an 8-bit file with 236 colors), it + lead to memory access errors in BMP.GetColor() and BMP.SetColor(). + (In fact, this is the main motivation for release 1.03.) + + Added a warning when BMP.ReadFromFile() encounters an under- + specified color table, and code to pad the table with white + entries. + + Added screen output on EasyBMP version and project website to + the code sample. + +*--------------------------------------------------------------------* + +Version: 1.04 + Date: 07-22-2006 + + Removed the assignment to the integer i in IntPow() to eliminate a + Borland compiler warning. + + Removed the assignment to the integer i in the Read##bitRow() + functions to eliminate Borland compiler warnings. + + Removed the assignment to ZeroWORD in line 478 of EasyBMP.cpp in + BMP::WriteToFile() to eliminate Borland compiler warnings. + + Removed the assignment to ZeroWORD in line 825 of EasyBMP.cpp in + BMP::ReadFromFile() to eliminate Borland compiler warnings. + + The Borland warnings about conditions always being false are + incorrect. (Lines 1587, 1594, and 1601.) Likewise, the Borland + warnings about unreachable code (lines 1589, 1596, and 1603) are + incorrect. This code serves as a protection on unexpected hardware + where the data types may not be of the correct size, and helps to + future-proof EasyBMP. The first time this type of error was + encountered was on 64-bit CPUs, where the size of the DWORD was + larger than assumed when writing EasyBMP. Therefore, we will not + "correct" these "errors" detected by Borland. If they bother you, + compile with the -w-8008 and -w-8066 options. + + Borland issues warnings about argc and argv being unused in the + sample project. These are silly warnings and will be ignored. If + this warning bothers you, compile with the -w-8057 option. + + Modified the sample makefile so that EasyBMP.o depends upon + EasyBMP.cpp and EasyBMP*.h in the current working directory, rather + than the parent directory. + + Added a global EasyBMPwarnings boolean variable, and functions + SetEasyBMPwarningsOn() and SetEasyBMPwarningsOff() to enable and + disable EasyBMP warnings and errors. Note that this will not + disable error checking or any other EasyBMP behavior, other than + cout output of the warning and error messages. + + Added the function GetEasyBMPwarningState() to query the EasyBMP + warning state. (Either warnings are enabled or disabled.) + + Removed old commented code (Write1bitRow()) from EasyBMP.cpp. + + Replaced the 24-bit EasyBMPbackground.bmp image in the code sample + with a dithered 8-bit version to reduce the download size of the + core library. + +*--------------------------------------------------------------------* + +Version: 1.05 + Date: 11-01-2006 + + Renamed BytesRead to ItemsRead in the SafeFread() function in + EasyBMP.cpp for greater clarity. + + Added a copy constructor to the BMP class. However, note that + passing by value is not recommended practice. (Passing by refer- + ence is much faster, and consumes less memory.) + + Added a new function: + bool Rescale( BMP& InputImage, char mode, int NewDimension ); + to resize an image. The mode variables are as follows: + 'P': resizes the image to a new percentage of the old size, + e.g., 42%, 13%, etc. + example: Rescale( SomeImage, 'p', 42 ); + 'W': resizes the image such that the new width is as specified. + example: Rescale( SomeImage, 'W', 100 ); + 'H': resizes the image such that the new height is as specified. + example: Rescale( SomeImage, 'H', 100 ); + 'F': resizes the image to fit in a square of specified size. + example: Rescale( SomeImage, 'F', 100 ); // fits in 100x100 + // box + All rescaling is done with bilinear interpolation. + +*--------------------------------------------------------------------* + +Version: 1.06 + Date: 12-01-2006 + + Added includes for and to EasyBMP.h. These are + used and should have been included all along. This should help + with Intel icc compiling. + + Fixed the && bug in the copy constructor. (Thank you to user + fcnature!) + + Added image scaling to the supplied code sample. + + Added GetPixle() and SetPixel() functions for future use. These + will be added to enable more careful use of the const keyword. + +*--------------------------------------------------------------------* \ No newline at end of file diff --git a/src/EasyBMP_DataStructures.h b/src/EasyBMP_DataStructures.h new file mode 100644 index 0000000..82b6179 --- /dev/null +++ b/src/EasyBMP_DataStructures.h @@ -0,0 +1,104 @@ +/************************************************* +* * +* EasyBMP Cross-Platform Windows Bitmap Library * +* * +* Author: Paul Macklin * +* email: macklin01@users.sourceforge.net * +* support: http://easybmp.sourceforge.net * +* * +* file: EasyBMP_DataStructures.h * +* date added: 05-02-2005 * +* date modified: 12-01-2006 * +* version: 1.06 * +* * +* License: BSD (revised/modified) * +* Copyright: 2005-6 by the EasyBMP Project * +* * +* description: Defines basic data structures for * +* the BMP class * +* * +*************************************************/ + +#ifndef _EasyBMP_Custom_Math_Functions_ +#define _EasyBMP_Custom_Math_Functions_ +inline double Square( double number ) +{ return number*number; } + +inline int IntSquare( int number ) +{ return number*number; } +#endif + +int IntPow( int base, int exponent ); + +#ifndef _EasyBMP_Defined_WINGDI +#define _EasyBMP_Defined_WINGDI + typedef unsigned char ebmpBYTE; + typedef unsigned short ebmpWORD; + typedef unsigned int ebmpDWORD; +#endif + +#ifndef _EasyBMP_DataStructures_h_ +#define _EasyBMP_DataStructures_h_ + +inline bool IsBigEndian() +{ + short word = 0x0001; + if((*(char *)& word) != 0x01 ) + { return true; } + return false; +} + +inline ebmpWORD FlipWORD( ebmpWORD in ) +{ return ( (in >> 8) | (in << 8) ); } + +inline ebmpDWORD FlipDWORD( ebmpDWORD in ) +{ + return ( ((in&0xFF000000)>>24) | ((in&0x000000FF)<<24) | + ((in&0x00FF0000)>>8 ) | ((in&0x0000FF00)<<8 ) ); +} + +// it's easier to use a struct than a class +// because we can read/write all four of the bytes +// at once (as we can count on them being continuous +// in memory + +typedef struct RGBApixel { + ebmpBYTE Blue; + ebmpBYTE Green; + ebmpBYTE Red; + ebmpBYTE Alpha; +} RGBApixel; + +class BMFH{ +public: + ebmpWORD bfType; + ebmpDWORD bfSize; + ebmpWORD bfReserved1; + ebmpWORD bfReserved2; + ebmpDWORD bfOffBits; + + BMFH(); + void display( void ); + void SwitchEndianess( void ); +}; + +class BMIH{ +public: + ebmpDWORD biSize; + ebmpDWORD biWidth; + ebmpDWORD biHeight; + ebmpWORD biPlanes; + ebmpWORD biBitCount; + ebmpDWORD biCompression; + ebmpDWORD biSizeImage; + ebmpDWORD biXPelsPerMeter; + ebmpDWORD biYPelsPerMeter; + ebmpDWORD biClrUsed; + ebmpDWORD biClrImportant; + + BMIH(); + void display( void ); + void SwitchEndianess( void ); +}; + +#endif diff --git a/src/EasyBMP_VariousBMPutilities.h b/src/EasyBMP_VariousBMPutilities.h new file mode 100644 index 0000000..349dda6 --- /dev/null +++ b/src/EasyBMP_VariousBMPutilities.h @@ -0,0 +1,43 @@ +/************************************************* +* * +* EasyBMP Cross-Platform Windows Bitmap Library * +* * +* Author: Paul Macklin * +* email: macklin01@users.sourceforge.net * +* support: http://easybmp.sourceforge.net * +* * +* file: EasyBMP_VariousBMPutilities.h * +* date added: 05-02-2005 * +* date modified: 12-01-2006 * +* version: 1.06 * +* * +* License: BSD (revised/modified) * +* Copyright: 2005-6 by the EasyBMP Project * +* * +* description: Various utilities. * +* * +*************************************************/ + +#ifndef _EasyBMP_VariousBMPutilities_h_ +#define _EasyBMP_VariousBMPutilities_h_ + +BMFH GetBMFH( const char* szFileNameIn ); +BMIH GetBMIH( const char* szFileNameIn ); +void DisplayBitmapInfo( const char* szFileNameIn ); +int GetBitmapColorDepth( const char* szFileNameIn ); +void PixelToPixelCopy( BMP& From, int FromX, int FromY, + BMP& To, int ToX, int ToY); +void PixelToPixelCopyTransparent( BMP& From, int FromX, int FromY, + BMP& To, int ToX, int ToY, + RGBApixel& Transparent ); +void RangedPixelToPixelCopy( BMP& From, int FromL , int FromR, int FromB, int FromT, + BMP& To, int ToX, int ToY ); +void RangedPixelToPixelCopyTransparent( + BMP& From, int FromL , int FromR, int FromB, int FromT, + BMP& To, int ToX, int ToY , + RGBApixel& Transparent ); +bool CreateGrayscaleColorTable( BMP& InputImage ); + +bool Rescale( BMP& InputImage , char mode, int NewDimension ); + +#endif diff --git a/src/gridtexture.bmp b/src/gridtexture.bmp new file mode 100644 index 0000000..73c4a22 Binary files /dev/null and b/src/gridtexture.bmp differ diff --git a/src/image.cpp b/src/image.cpp index 67bf157..46b6235 100755 --- a/src/image.cpp +++ b/src/image.cpp @@ -38,7 +38,7 @@ image::~image(){ //------------------------ float image::applyGamma(float f){ - //apply gamma correction, use simple power law gamma for now. + //apply gamma correction, use simple power law gamma for now. TODO: sRGB return pow(f/float(gamma.divisor), gamma.gamma); } diff --git a/src/interactions.h b/src/interactions.h index 6561796..2b3dc17 100755 --- a/src/interactions.h +++ b/src/interactions.h @@ -8,10 +8,69 @@ #include "intersections.h" +struct Fresnel { + float reflectionCoefficient; + float transmissionCoefficient; +}; + +struct AbsorptionAndScatteringProperties{ + glm::vec3 absorptionCoefficient; + float reducedScatteringCoefficient; +}; + //forward declaration +__host__ __device__ bool calculateScatterAndAbsorption(ray& r, float& depth, AbsorptionAndScatteringProperties& currentAbsorptionAndScattering, glm::vec3& unabsorbedColor, material m, float randomFloatForScatteringDistance, float randomFloat2, float randomFloat3); __host__ __device__ glm::vec3 getRandomDirectionInSphere(float xi1, float xi2); +__host__ __device__ glm::vec3 calculateTransmission(glm::vec3 absorptionCoefficient, float distance); +__host__ __device__ glm::vec3 calculateTransmissionDirection(glm::vec3 normal, glm::vec3 incident, float incidentIOR, float transmittedIOR); +__host__ __device__ glm::vec3 calculateReflectionDirection(glm::vec3 normal, glm::vec3 incident); +__host__ __device__ Fresnel calculateFresnel(glm::vec3 normal, glm::vec3 incident, float incidentIOR, float transmittedIOR, glm::vec3 reflectionDirection, glm::vec3 transmissionDirection); __host__ __device__ glm::vec3 calculateRandomDirectionInHemisphere(glm::vec3 normal, float xi1, float xi2); +//TODO (OPTIONAL): IMPLEMENT THIS FUNCTION +__host__ __device__ glm::vec3 calculateTransmission(glm::vec3 absorptionCoefficient, float distance) { + return glm::vec3(0,0,0); +} + +//TODO (OPTIONAL): IMPLEMENT THIS FUNCTION +__host__ __device__ bool calculateScatterAndAbsorption(ray& r, float& depth, AbsorptionAndScatteringProperties& currentAbsorptionAndScattering, + glm::vec3& unabsorbedColor, material m, float randomFloatForScatteringDistance, float randomFloat2, float randomFloat3){ + return false; +} + +__host__ __device__ glm::vec3 colorMultiply(glm::vec3 c1, glm::vec3 c2) +{ + return glm::vec3(c1.x*c2.x,c1.y*c2.y,c1.z*c2.z); +} +__host__ __device__ glm::vec3 calculateTransmissionDirection(glm::vec3 normal, glm::vec3 incident, float incidentIOR, float transmittedIOR) { + + float eta12=incidentIOR/transmittedIOR; + float dotNI=glm::dot(normal,incident); + float delta=1-eta12*eta12*(1-dotNI*dotNI); + if(delta<0) return glm::normalize(incident-normal*glm::dot(incident,normal)); + return glm::normalize(normal*(-eta12*dotNI-sqrt(delta))+eta12*incident); +} + +__host__ __device__ glm::vec3 calculateReflectionDirection(glm::vec3 normal, glm::vec3 incident) { + + return glm::normalize(incident-normal*(2*glm::dot(normal,incident))); +} + +__host__ __device__ Fresnel calculateFresnel(glm::vec3 normal, glm::vec3 incident, float incidentIOR, float transmittedIOR, float specularExponent) { + Fresnel fresnel; + + glm::vec3 transmissionDirection=calculateTransmissionDirection(normal,incident,incidentIOR, transmittedIOR); + float theta=acos(glm::dot(normal,incident)); + float phi=acos(glm::dot(normal,transmissionDirection)); + float x1=tan(theta-phi)/tan(theta+phi); + float x2=sin(theta-phi)/sin(theta+phi); + x1*=x1;x2*=x2; + + fresnel.reflectionCoefficient = 0.5f*(x1+x2)*(1-glm::pow(0.99f,specularExponent)); + fresnel.transmissionCoefficient = 0; + return fresnel; +} + //LOOK: This function demonstrates cosine weighted random direction generation in a sphere! __host__ __device__ glm::vec3 calculateRandomDirectionInHemisphere(glm::vec3 normal, float xi1, float xi2) { @@ -39,12 +98,76 @@ __host__ __device__ glm::vec3 calculateRandomDirectionInHemisphere(glm::vec3 nor return ( up * normal ) + ( cos(around) * over * perpendicularDirection1 ) + ( sin(around) * over * perpendicularDirection2 ); } - +__host__ __device__ __inline__ float rand_01() +{ + return ((float)rand()/RAND_MAX); +} //TODO: IMPLEMENT THIS FUNCTION //Now that you know how cosine weighted direction generation works, try implementing non-cosine (uniform) weighted random direction generation. //This should be much easier than if you had to implement calculateRandomDirectionInHemisphere. -__host__ __device__ glm::vec3 getRandomDirectionInSphere(float xi1, float xi2) { - return glm::vec3(0,0,0); +__host__ __device__ glm::vec3 getRandomDirectionInSphere(glm::vec3 normal, float randomSeed) { + + glm::vec3 directionNotNormal; + if (abs(normal.x) < SQRT_OF_ONE_THIRD) { + directionNotNormal = glm::vec3(1, 0, 0); + } else if (abs(normal.y) < SQRT_OF_ONE_THIRD) { + directionNotNormal = glm::vec3(0, 1, 0); + } else { + directionNotNormal = glm::vec3(0, 0, 1); + } + glm::vec3 perpendicularDirection1 = glm::normalize(glm::cross(normal, directionNotNormal)); + glm::vec3 perpendicularDirection2 = glm::normalize(glm::cross(normal, perpendicularDirection1)); + + thrust::default_random_engine rng(hash((int)randomSeed)); + thrust::uniform_real_distribution u01(0,1); + //thrust::uniform_real_distribution u02(0,1); + + float M_PI=3.14159265358979323846; + float theta=u01(rng)*M_PI/2; +// thrust::default_random_engine rng2(hash(randomSeed*2)); + float phi=u01(rng)*M_PI*2; +// thrust::host_vector h_1(2); +// thrust::generate(h_1.begin(),h_1.end(),rand_01); + + //float theta=rand_01()*M_PI/2.0f; + //float phi=rand_01()*M_PI*2.0f; + float up=cos(theta); + float s1=sin(theta)*cos(phi); + float s2=sin(theta)*sin(phi); + + return glm::normalize(up*normal+perpendicularDirection1*s1+perpendicularDirection2*s2); } +__host__ __device__ int getNextStep(int randomseed, float threshold1, float threshold2) +{ + thrust::default_random_engine rng(hash(randomseed)); + thrust::uniform_real_distribution u(0,1); + float randnum=u(rng); + + if(randnum +#include +#include //Some forward declarations __host__ __device__ glm::vec3 getPointOnRay(ray r, float t); @@ -18,7 +20,6 @@ __host__ __device__ glm::vec3 multiplyMV(cudaMat4 m, glm::vec4 v); __host__ __device__ glm::vec3 getSignOfRay(ray r); __host__ __device__ glm::vec3 getInverseDirectionOfRay(ray r); __host__ __device__ float boxIntersectionTest(staticGeom sphere, ray r, glm::vec3& intersectionPoint, glm::vec3& normal); -__host__ __device__ float boxIntersectionTest(glm::vec3 boxMin, glm::vec3 boxMax, staticGeom box, ray r, glm::vec3& intersectionPoint, glm::vec3& normal); __host__ __device__ float sphereIntersectionTest(staticGeom sphere, ray r, glm::vec3& intersectionPoint, glm::vec3& normal); __host__ __device__ glm::vec3 getRandomPointOnCube(staticGeom cube, float randomSeed); @@ -69,105 +70,21 @@ __host__ __device__ glm::vec3 getSignOfRay(ray r){ return glm::vec3((int)(inv_direction.x < 0), (int)(inv_direction.y < 0), (int)(inv_direction.z < 0)); } -//Wrapper for cube intersection test for testing against unit cubes -__host__ __device__ float boxIntersectionTest(staticGeom box, ray r, glm::vec3& intersectionPoint, glm::vec3& normal){ - return boxIntersectionTest(glm::vec3(-.5,-.5,-.5), glm::vec3(.5,.5,.5), box, r, intersectionPoint, normal); -} //Cube intersection test, return -1 if no intersection, otherwise, distance to intersection -__host__ __device__ float boxIntersectionTest(glm::vec3 boxMin, glm::vec3 boxMax, staticGeom box, ray r, glm::vec3& intersectionPoint, glm::vec3& normal){ - glm::vec3 currentNormal = glm::vec3(0,0,0); - - ray ro = r; - - glm::vec3 iP0 = multiplyMV(box.inverseTransform,glm::vec4(r.origin, 1.0f)); - glm::vec3 iP1 = multiplyMV(box.inverseTransform,glm::vec4(r.origin+r.direction, 1.0f)); - glm::vec3 iV0 = iP1 - iP0; - - r.origin = iP0; - r.direction = glm::normalize(iV0); - - float tmin, tmax, tymin, tymax, tzmin, tzmax; - - glm::vec3 rsign = getSignOfRay(r); - glm::vec3 rInverseDirection = getInverseDirectionOfRay(r); - - if((int)rsign.x==0){ - tmin = (boxMin.x - r.origin.x) * rInverseDirection.x; - tmax = (boxMax.x - r.origin.x) * rInverseDirection.x; - }else{ - tmin = (boxMax.x - r.origin.x) * rInverseDirection.x; - tmax = (boxMin.x - r.origin.x) * rInverseDirection.x; - } - - if((int)rsign.y==0){ - tymin = (boxMin.y - r.origin.y) * rInverseDirection.y; - tymax = (boxMax.y - r.origin.y) * rInverseDirection.y; - }else{ - tymin = (boxMax.y - r.origin.y) * rInverseDirection.y; - tymax = (boxMin.y - r.origin.y) * rInverseDirection.y; - } - if ( (tmin > tymax) || (tymin > tmax) ){ - return -1; - } - if (tymin > tmin){ - tmin = tymin; - } - if (tymax < tmax){ - tmax = tymax; - } - - if((int)rsign.z==0){ - tzmin = (boxMin.z - r.origin.z) * rInverseDirection.z; - tzmax = (boxMax.z - r.origin.z) * rInverseDirection.z; - }else{ - tzmin = (boxMax.z - r.origin.z) * rInverseDirection.z; - tzmax = (boxMin.z - r.origin.z) * rInverseDirection.z; - } - - if ( (tmin > tzmax) || (tzmin > tmax) ){ - return -1; - } - if (tzmin > tmin){ - tmin = tzmin; - } - if (tzmax < tmax){ - tmax = tzmax; - } - if(tmin<0){ - return -1; - } - - glm::vec3 osintersect = r.origin + tmin*r.direction; - - if(abs(osintersect.x-abs(boxMax.x))<.001){ - currentNormal = glm::vec3(1,0,0); - }else if(abs(osintersect.y-abs(boxMax.y))<.001){ - currentNormal = glm::vec3(0,1,0); - }else if(abs(osintersect.z-abs(boxMax.z))<.001){ - currentNormal = glm::vec3(0,0,1); - }else if(abs(osintersect.x+abs(boxMin.x))<.001){ - currentNormal = glm::vec3(-1,0,0); - }else if(abs(osintersect.y+abs(boxMin.y))<.001){ - currentNormal = glm::vec3(0,-1,0); - }else if(abs(osintersect.z+abs(boxMin.z))<.001){ - currentNormal = glm::vec3(0,0,-1); - } - - intersectionPoint = multiplyMV(box.transform, glm::vec4(osintersect, 1.0)); - - - - normal = multiplyMV(box.transform, glm::vec4(currentNormal,0.0)); - return glm::length(intersectionPoint-ro.origin); +__host__ __device__ bool CheckInBox(glm::vec3 targ) +{ + float x=targ.x;float y=targ.y;float z=targ.z; + return (abs(x)<=0.5f+0.0001f && abs(y)<=0.5f+0.0001f && abs(z)<=0.5f+0.0001f); } + //LOOK: Here's an intersection test example from a sphere. Now you just need to figure out cube and, optionally, triangle. //Sphere intersection test, return -1 if no intersection, otherwise, distance to intersection -__host__ __device__ float sphereIntersectionTest(staticGeom sphere, ray r, glm::vec3& intersectionPoint, glm::vec3& normal){ +__host__ __device__ float sphereIntersection(staticGeom sphere, ray r, glm::vec3& intersectionPoint, glm::vec3& normal, float defaultRadius,glm::vec2& textureCoord){ - float radius = .5; + float radius = defaultRadius; glm::vec3 ro = multiplyMV(sphere.inverseTransform, glm::vec4(r.origin,1.0f)); glm::vec3 rd = glm::normalize(multiplyMV(sphere.inverseTransform, glm::vec4(r.direction,0.0f))); @@ -175,7 +92,7 @@ __host__ __device__ float sphereIntersectionTest(staticGeom sphere, ray r, glm:: ray rt; rt.origin = ro; rt.direction = rd; float vDotDirection = glm::dot(rt.origin, rt.direction); - float radicand = vDotDirection * vDotDirection - (glm::dot(rt.origin, rt.origin) - pow(radius, 2)); + float radicand = vDotDirection * vDotDirection - (glm::dot(rt.origin, rt.origin) - radius*radius); if (radicand < 0){ return -1; } @@ -203,6 +120,75 @@ __host__ __device__ float sphereIntersectionTest(staticGeom sphere, ray r, glm:: return glm::length(r.origin - realIntersectionPoint); } +__host__ __device__ float boxIntersection(staticGeom box, ray r, glm::vec3& intersectionPoint, glm::vec3& normal, glm::vec2& textureCoord){ + + + + float radius=0.9; + glm::vec3 ro = multiplyMV(box.inverseTransform, glm::vec4(r.origin,1.0f)); + glm::vec3 rd = glm::normalize(multiplyMV(box.inverseTransform, glm::vec4(r.direction,0.0f))); + ray rt; rt.origin = ro; rt.direction = rd; + textureCoord=glm::vec2(0,0); + // float vDotDirection = glm::dot(rt.origin, rt.direction); + //float radicand = vDotDirection * vDotDirection - (glm::dot(rt.origin, rt.origin) - radius*radius)+0.00001f; + //if (radicand < 0){ + // return -1; + //} + + //float squareRoot = sqrt(radicand); + //float firstTerm = -vDotDirection; + //float t1 = firstTerm + squareRoot; + //float t2 = firstTerm - squareRoot; + // + //if (t1 < 0 && t2 < 0) { + // return -1; + //} + + float t; glm::vec3 x; + float maxt=100000000; + float finalt=maxt; + glm::vec3 hitnormal; + + if(abs(rd.x)>EPSILON) + {//left face + t=-(ro.x+0.5f)/rd.x; x=ro+rd*t; + if(t>EPSILON && tEPSILON && tEPSILON) + { //bottom face + t=-(ro.y+0.5f)/rd.y; x=ro+rd*t; + if(t>EPSILON && tEPSILON && tEPSILON) + {//back face + t=-(ro.z+0.5f)/rd.z; x=ro+rd*t; + if(t>EPSILON && tEPSILON && t10000000.0f) return -1; + + glm::vec3 realIntersectionPoint = multiplyMV(box.transform, glm::vec4(getPointOnRay(rt, finalt), 1.0)); + normal = multiplyMV(box.transform,glm::vec4(hitnormal,0.0)); + normal=glm::vec3(normal.x,normal.y,normal.z); + normal=glm::normalize(normal); + intersectionPoint=realIntersectionPoint; + + return glm::length(r.origin - realIntersectionPoint); + + // return finalt; + +} + //returns x,y,z half-dimensions of tightest bounding box __host__ __device__ glm::vec3 getRadiuses(staticGeom geom){ glm::vec3 origin = multiplyMV(geom.transform, glm::vec4(0,0,0,1)); @@ -213,8 +199,10 @@ __host__ __device__ glm::vec3 getRadiuses(staticGeom geom){ float yradius = glm::distance(origin, ymax); float zradius = glm::distance(origin, zmax); return glm::vec3(xradius, yradius, zradius); + } + //LOOK: Example for generating a random point on an object using thrust. //Generates a random point on a given cube __host__ __device__ glm::vec3 getRandomPointOnCube(staticGeom cube, float randomSeed){ @@ -256,25 +244,33 @@ __host__ __device__ glm::vec3 getRandomPointOnCube(staticGeom cube, float random } glm::vec3 randPoint = multiplyMV(cube.transform, glm::vec4(point,1.0f)); - + //randPoint=multiplyMV(cube.transform,glm::vec4(0,0,0,1)); return randPoint; } +//TODO: IMPLEMENT THIS FUNCTION //Generates a random point on a given sphere __host__ __device__ glm::vec3 getRandomPointOnSphere(staticGeom sphere, float randomSeed){ - float radius=.5f; - thrust::default_random_engine rng(hash(randomSeed)); - thrust::uniform_real_distribution u01(-1,1); - thrust::uniform_real_distribution u02(0,TWO_PI); - - float theta = (float)u02(rng); - float cosphi = (float)u01(rng); - float sinphi = sqrt(1 - cosphi*cosphi); - glm::vec3 point = radius*glm::vec3(sinphi*cos(theta),sinphi*sin(theta),cosphi); - glm::vec3 randPoint = multiplyMV(sphere.transform, glm::vec4(point,1.0f)); - - return randPoint; + double pi=3.14159265358979f; + thrust::default_random_engine rng(hash(randomSeed)); + thrust::uniform_real_distribution u01(0,pi); + thrust::uniform_real_distribution u02(-pi,pi); + + glm::vec3 point(sin((float)u01(rng))*cos((float)u02(rng)),sin((float)u01(rng))*sin((float)u02(rng)),cos((float)u01(rng))); + glm::vec3 randPoint = multiplyMV(sphere.transform, glm::vec4(point,1.0f)); + return randPoint; + +} +__host__ __device__ glm::vec3 clampColor(glm::vec3 target) +{ + return utilityCore::clampRGB(target); +} +__host__ __device__ glm::vec3 getRandomPoint(staticGeom x, float randomSeed) +{ + if(x.type==0) return getRandomPointOnSphere(x,randomSeed); + else if (x.type==1) return getRandomPointOnCube(x,randomSeed); + } #endif diff --git a/src/main.cpp b/src/main.cpp index 81836b1..7324506 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,10 +6,13 @@ // Yining Karl Li's TAKUA Render, a massively parallel pathtracing renderer: http://www.yiningkarlli.com #include "main.h" +#include //------------------------------- //-------------MAIN-------------- //------------------------------- +int totalRayNum=0; +long starttime; int main(int argc, char** argv){ @@ -50,8 +53,27 @@ int main(int argc, char** argv){ // Set up camera stuff from loaded pathtracer settings iterations = 0; renderCam = &renderScene->renderCam; + parameterSet = &renderScene->parameterSet; width = renderCam->resolution[0]; height = renderCam->resolution[1]; + textures=new m_BMP[renderScene->bmps.size()]; + int i,j,k; + + for(i=0;ibmps.size();i++) + { + //int w=renderScene->bmps[i]->Width; + //int h=renderScene->bmps[i]->Height; + BMP now; + now.ReadFromFile(renderScene->bmps[i].c_str()); + int h=now.TellHeight();int w=now.TellWidth(); + textures[i].resolution=glm::vec2(w,h); + textures[i].colors=new glm::vec3[w*h]; + for(j=0;j=renderCam->frames){ cout << "Warning: Specified target frame is out of range, defaulting to frame 0." << endl; @@ -76,7 +98,7 @@ int main(int argc, char** argv){ glUseProgram(passthroughProgram); glActiveTexture(GL_TEXTURE0); - + starttime=clock(); #ifdef __APPLE__ // send into GLFW main loop while(1){ @@ -105,6 +127,8 @@ void runCuda(){ // Map OpenGL buffer object for writing from CUDA on a single GPU // No data is moved (Win & Linux). When mapped to CUDA, OpenGL should not use this buffer + + if(iterationsiterations){ uchar4 *dptr=NULL; iterations++; @@ -123,10 +147,17 @@ void runCuda(){ // execute the kernel - cudaRaytraceCore(dptr, renderCam, targetFrame, iterations, materials, renderScene->materials.size(), geoms, renderScene->objects.size() ); + cudaRaytraceCore(dptr, renderCam, parameterSet, targetFrame, iterations, materials, renderScene->materials.size(), geoms, renderScene->objects.size(),textures,renderScene->bmps.size()); // unmap buffer object cudaGLUnmapBufferObject(pbo); + + if(iterations%1000==0) + { + long end=clock(); + printf("time usage for %d iterations: %d milliseconds.\n",iterations,(end-starttime)); + } + }else{ if(!finishedRender){ @@ -142,8 +173,8 @@ void runCuda(){ gammaSettings gamma; gamma.applyGamma = true; - gamma.gamma = 1.0; - gamma.divisor = 1.0; //renderCam->iterations; + gamma.gamma = 1.0/2.2; + gamma.divisor = renderCam->iterations; outputImage.setGammaSettings(gamma); string filename = renderCam->imageName; string s; @@ -167,10 +198,13 @@ void runCuda(){ iterations = 0; for(int i=0; iresolution.x*renderCam->resolution.y; i++){ renderCam->image[i] = glm::vec3(0,0,0); + renderCam->shadowVal[i] = glm::vec3(0,0,0); } cudaDeviceReset(); finishedRender = false; } + + } } diff --git a/src/main.h b/src/main.h index 0bab7cb..c10f648 100755 --- a/src/main.h +++ b/src/main.h @@ -48,6 +48,9 @@ using namespace std; scene* renderScene; camera* renderCam; +ParameterSet* parameterSet; +m_BMP* textures; + int targetFrame; int iterations; bool finishedRender; diff --git a/src/raytraceKernel.cu b/src/raytraceKernel.cu index 87a65a6..883ce79 100755 --- a/src/raytraceKernel.cu +++ b/src/raytraceKernel.cu @@ -9,12 +9,20 @@ #include #include #include "sceneStructs.h" +#include "glm/glm.hpp" #include "utilities.h" #include "raytraceKernel.h" #include "intersections.h" #include "interactions.h" + +#include #include -#include "glm/glm.hpp" + +#if CUDA_VERSION >= 5000 + #include +#else + #include +#endif void checkCUDAError(const char *msg) { cudaError_t err = cudaGetLastError(); @@ -24,6 +32,8 @@ void checkCUDAError(const char *msg) { } } + + //LOOK: This function demonstrates how to use thrust for random number generation on the GPU! //Function that generates static. __host__ __device__ glm::vec3 generateRandomNumberFromThread(glm::vec2 resolution, float time, int x, int y){ @@ -35,42 +45,25 @@ __host__ __device__ glm::vec3 generateRandomNumberFromThread(glm::vec2 resolutio return glm::vec3((float) u01(rng), (float) u01(rng), (float) u01(rng)); } -//Kernel that does the initial raycast from the camera. -__host__ __device__ ray raycastFromCameraKernel(glm::vec2 resolution, float time, int x, int y, glm::vec3 eye, glm::vec3 view, glm::vec3 up, glm::vec2 fov){ - - int index = x + (y * resolution.x); - - thrust::default_random_engine rng(hash(index*time)); - thrust::uniform_real_distribution u01(0,1); - - //standard camera raycast stuff - glm::vec3 E = eye; - glm::vec3 C = view; - glm::vec3 U = up; - float fovx = fov.x; - float fovy = fov.y; - - float CD = glm::length(C); - - glm::vec3 A = glm::cross(C, U); - glm::vec3 B = glm::cross(A, C); - glm::vec3 M = E+C; - glm::vec3 H = (A*float(CD*tan(fovx*(PI/180))))/float(glm::length(A)); - glm::vec3 V = (B*float(CD*tan(-fovy*(PI/180))))/float(glm::length(B)); - - float sx = (x)/(resolution.x-1); - float sy = (y)/(resolution.y-1); - - glm::vec3 P = M + (((2*sx)-1)*H) + (((2*sy)-1)*V); - glm::vec3 PmE = P-E; - glm::vec3 R = E + (float(200)*(PmE))/float(glm::length(PmE)); - - glm::vec3 direction = glm::normalize(R); - //major performance cliff at this point, TODO: find out why! - ray r; - r.origin = eye; - r.direction = direction; - return r; +//TODO: IMPLEMENT THIS FUNCTION +//Function that does the initial raycast from the camera +__host__ __device__ ray raycastFromCameraKernel(glm::vec2 resolution, float time, float x, float y, glm::vec3 eye, glm::vec3 view, glm::vec3 up, glm::vec2 fov){ + ray r; + + glm::vec3 A=glm::cross(view,up); + glm::vec3 B=glm::cross(A,view); + glm::vec3 M=eye+view; + glm::vec3 V=B*(glm::length(view)*tan(fov.y)/glm::length(B)); + glm::vec3 H=A*(glm::length(view)*tan(fov.x)/glm::length(A)); + + float t1=(x/(resolution.x+0.0f))*2.0f-1.0f; + float t2=(y/(resolution.y+0.0f))*2.0f-1.0f; + glm::vec3 P=M-t1*H+t2*V; + glm::vec3 R=glm::normalize(P-eye); + + r.origin = eye; + r.direction = R; + return r; } //Kernel that blacks out a given image buffer @@ -83,8 +76,8 @@ __global__ void clearImage(glm::vec2 resolution, glm::vec3* image){ } } -//Kernel that writes the image to the OpenGL PBO directly. -__global__ void sendImageToPBO(uchar4* PBOpos, glm::vec2 resolution, glm::vec3* image){ +//Kernel that writes the image to the OpenGL PBO directly. +__global__ void sendImageToPBO(uchar4* PBOpos, glm::vec2 resolution, glm::vec3* image, int iterations){ int x = (blockIdx.x * blockDim.x) + threadIdx.x; int y = (blockIdx.y * blockDim.y) + threadIdx.y; @@ -92,10 +85,11 @@ __global__ void sendImageToPBO(uchar4* PBOpos, glm::vec2 resolution, glm::vec3* if(x<=resolution.x && y<=resolution.y){ - glm::vec3 color; + glm::vec3 color; color.x = image[index].x*255.0; color.y = image[index].y*255.0; color.z = image[index].z*255.0; + color*=1.0f/(float)iterations; if(color.x>255){ color.x = 255; @@ -111,61 +105,245 @@ __global__ void sendImageToPBO(uchar4* PBOpos, glm::vec2 resolution, glm::vec3* // Each thread writes one pixel location in the texture (textel) PBOpos[index].w = 0; - PBOpos[index].x = color.x; + PBOpos[index].x = color.x; PBOpos[index].y = color.y; PBOpos[index].z = color.z; } } -//TODO: IMPLEMENT THIS FUNCTION -//Core raytracer kernel -__global__ void raytraceRay(glm::vec2 resolution, float time, float bounce, cameraData cam, int rayDepth, glm::vec3* colors, - staticGeom* geoms, int numberOfGeoms, material* materials, int numberOfMaterials){ +__host__ __device__ float findIntersection(int index, ray r, staticGeom* geoms, int numberOfGeoms ,int& hitidx, glm::vec3& p, glm::vec3& n, glm::vec2& texturecoord) +{ + glm::vec3 intersectPoint; + glm::vec3 normalValue; + glm::vec3 final_intersectPoint; + glm::vec3 final_normal; + + float mindist=1000000000; + glm::vec3 outColor(0,0,0); + float tempd=0; + bool isLight=false; + + glm::vec2 tempcoord; + for(int i=0;i0 && tempd6) blurradius=6; + int blurnum=0; + toColors[index]=glm::vec3(0,0,0); + for(int i=-blurradius;i<=blurradius;i++) for(int j=-blurradius;j<=blurradius;j++) + { + int xx=x+i, yy=y+j; + if(xx<=0 || xx>resolution.x || yy<=0 || yy>resolution.y) continue; + int newidx=xx+yy*resolution.x; + if(abs(cudahitinfo[newidx].dof/standardDOF-1.0f)<0.1f) continue; + blurnum++; + toColors[index]+=colors[newidx]; + } + toColors[index]*=(1.0f/(float)blurnum); + } +} - ray r = raycastFromCameraKernel(resolution, time, x, y, cam.position, cam.view, cam.up, cam.fov); +__global__ void initializeRayPool(glm::vec2 resolution, float time, cameraData cam, parallelRay* raypool, int* flagpool, int subraynum){ - if((x<=resolution.x && y<=resolution.y)){ + int x = (blockIdx.x * blockDim.x) + threadIdx.x; + int y = (blockIdx.y * blockDim.y) + threadIdx.y; + int index = x + (y * resolution.x); + if((x>resolution.x || y>resolution.y)) return; + for(int i=0;i-EPSILON){ - MAX_DEPTH = depth; - colors[index] = materials[geoms[i].materialid].color; - } - } + ray r=raycastFromCameraKernel(resolution, time,x+offsetx, y+offsetx, cam.position, cam.view, cam.up, cam.fov); + parallelRay pr; + pr.direction=r.direction; + + pr.index=index; + pr.iters=0; + pr.origin=r.origin; + pr.coeff=glm::vec3(1,1,1)*(1.0f/(float)subraynum); + pr.terminated=false; + raypool[index+indexoffset]=pr; + flagpool[index+indexoffset]=0; + } + +} + +__global__ void computeRaypool(parallelRay* rayPool,int* flagPool, int raypoolsize, float time, int maxDepth, glm::vec3* colors, cameraData cam, BMPInfo* bmps, int numberOfTexture, glm::vec3* textures, + staticGeom* geoms, int numberOfGeoms, staticMaterial* materials, ParameterSet ps) +{ + int now=blockIdx.x*blockDim.x+threadIdx.x; + if(now>=raypoolsize) return; + parallelRay pr=rayPool[now]; + if(pr.iters>maxDepth) { rayPool[now].terminated=true;return;} + + int index=pr.index; + ray r; + r.direction=pr.direction; + r.origin=pr.origin; + + glm::vec3 final_intersectPoint; + glm::vec3 final_normal; + float mindist=1000000000; + glm::vec3 outColor(0,0,0); + float tempd=0; + bool isLight=false; + staticMaterial targetMat; + int hitidx,matid; + glm::vec2 texturecoord; + tempd=findIntersection(index,r,geoms,numberOfGeoms,hitidx,final_intersectPoint,final_normal,texturecoord); + + if(tempd<0) + { + flagPool[now]=0; + rayPool[now].terminated=true; + } + else + { + flagPool[now]=0; + targetMat=materials[geoms[hitidx].materialid]; + glm::vec3 hitcolor=targetMat.color; + if(targetMat.textureidx>=1) + { + hitcolor=getTextureColor(texturecoord,targetMat.textureidx,bmps,numberOfTexture,textures); + } - //colors[index] = generateRandomNumberFromThread(resolution, time, x, y); - } + rayPool[now].terminated=(targetMat.emittance>0.1f); + + colors[index]+=colorMultiply(hitcolor*(targetMat.emittance),rayPool[now].coeff); + + if(rayPool[now].terminated) return; + flagPool[now]=1; + int nextstep=0; //0=DIFFUSE,1=REFLECTIVE, 2=REFRACTIVE + if(targetMat.hasRefractive>0.5f && targetMat.hasReflective>0.5f) + { + nextstep=getNextStep(index*time,0.01,0.2); + } + else if(targetMat.hasRefractive>0.5f) + { + nextstep=getNextStep(index*time,0.01,0.01); + } + else if(targetMat.hasReflective) + { + nextstep=getNextStep(index*time,0.01,1.0); + } + + + if(nextstep==2) //REFRACTION + { + glm::vec3 dir1=calculateTransmissionDirection(final_normal,r.direction,1,targetMat.indexOfRefraction); + glm::vec2 tempcoord; + if(glm::length(dir1)<0.5f) + { + r.origin=final_intersectPoint+final_normal*0.001f; + r.direction=calculateReflectionDirection(final_normal,r.direction); + } + else + { + glm::vec3 hp1=final_intersectPoint+dir1*0.001f; + glm::vec3 hp2,normal2; + r.origin=hp1; + r.direction=dir1; + if(geoms[hitidx].type==0) tempd=sphereIntersection(geoms[hitidx],r,hp2,normal2,0.5f,tempcoord); + else if (geoms[hitidx].type==1) tempd=boxIntersection(geoms[hitidx],r,hp2,normal2,tempcoord); + normal2=-normal2; + glm::vec3 dir2=calculateTransmissionDirection(normal2, dir1,targetMat.indexOfRefraction,1); + r.origin=hp2+dir2*0.01f; + r.direction=dir2; + r.origin-=normal2*0.001f; + } + rayPool[now].origin=r.origin; + rayPool[now].direction=r.direction; + } + else if(nextstep==1) //REFLECTION + { + rayPool[now].origin=final_intersectPoint+final_normal*0.0001f; + rayPool[now].direction=calculateReflectionDirection(final_normal,r.direction); + } + else //DIFFUSE + { + + if(!rayPool[now].terminated) + { + rayPool[now].origin=final_intersectPoint+final_normal*0.001f; + int theseed=(int)time*index+now*rayPool[now].iters; + //theseed=(int)(time*index*rayPool[now].iters/maxDepth); + //theseed=(int)(time*(index+rayPool[max(now-1,0)].index)); + //theseed=(int)time*now; + rayPool[now].direction=getRandomDirectionInSphere(final_normal, theseed); + rayPool[now].coeff*=glm::dot(final_normal,rayPool[now].direction); + } + } + rayPool[now].iters++; + rayPool[now].coeff=colorMultiply(hitcolor,rayPool[now].coeff); + } } +struct terminated +{ + __host__ __device__ + bool operator()(const parallelRay pr) + { + return pr.terminated; + } +}; + +parallelRay* raypool; +int raypoolsize; +glm::vec3* cudashadow; +glm::vec3* cudaTexture; +BMPInfo* textureInfo; + //TODO: FINISH THIS FUNCTION // Wrapper for the __global__ call that sets up the kernel calls and does a ton of memory management -void cudaRaytraceCore(uchar4* PBOpos, camera* renderCam, int frame, int iterations, material* materials, int numberOfMaterials, geom* geoms, int numberOfGeoms){ - - int traceDepth = 1; //determines how many bounces the raytracer traces - +void cudaRaytraceCore(uchar4* PBOpos,camera* renderCam, ParameterSet* pSet, int frame, int iterations, material* materials, int numberOfMaterials, geom* geoms, int numberOfGeoms, m_BMP* textures, int numberOfTextures){ +//pre-process, including memcpy and initialization + int traceMaxDepth = (int)pSet->ks; //determines how many bounces the raytracer traces // set up crucial magic - int tileSize = 8; + int tileSize = (int)pSet->ka; //don't care about this var name. it is tilesize from input file + int numberOfLights=0; + dim3 threadsPerBlock(tileSize, tileSize); dim3 fullBlocksPerGrid((int)ceil(float(renderCam->resolution.x)/float(tileSize)), (int)ceil(float(renderCam->resolution.y)/float(tileSize))); @@ -173,7 +351,54 @@ void cudaRaytraceCore(uchar4* PBOpos, camera* renderCam, int frame, int iteratio glm::vec3* cudaimage = NULL; cudaMalloc((void**)&cudaimage, (int)renderCam->resolution.x*(int)renderCam->resolution.y*sizeof(glm::vec3)); cudaMemcpy( cudaimage, renderCam->image, (int)renderCam->resolution.x*(int)renderCam->resolution.y*sizeof(glm::vec3), cudaMemcpyHostToDevice); - + + cameraData cam; + cam.resolution = renderCam->resolution; + cam.position = renderCam->positions[frame]; + cam.view = renderCam->views[frame]; + cam.up = renderCam->ups[frame]; + cam.fov = renderCam->fov; + cam.ambient=renderCam->ambient; + + if(iterations<1.5f) + { + + cudaMalloc((void**)&cudashadow, (int)renderCam->resolution.x*(int)renderCam->resolution.y*sizeof(glm::vec3)); + cudaMemcpy( cudashadow, renderCam->shadowVal, (int)renderCam->resolution.x*(int)renderCam->resolution.y*sizeof(glm::vec3), cudaMemcpyHostToDevice); + + BMPInfo* localInfo=new BMPInfo[numberOfTextures]; + printf("number of textures: %d\n", numberOfTextures); + + int total=0; + for(int i=0;i0.1f) + { + + float t=(iterations%pSet->shadowRays)/(float)pSet->shadowRays; + float mbcoeff=t*t/2; + newStaticGeom.translation+=mbcoeff*newStaticGeom.moblur; + glm::mat4 transform = utilityCore::buildTransformationMatrix(newStaticGeom.translation, newStaticGeom.rotation, newStaticGeom.scale); + newStaticGeom.transform = utilityCore::glmMat4ToCudaMat4(transform); + newStaticGeom.inverseTransform = utilityCore::glmMat4ToCudaMat4(glm::inverse(transform)); + } + else + { + newStaticGeom.transform = geoms[i].transforms[frame]; + newStaticGeom.inverseTransform = geoms[i].inverseTransforms[frame]; + } geomList[i] = newStaticGeom; } - staticGeom* cudageoms = NULL; cudaMalloc((void**)&cudageoms, numberOfGeoms*sizeof(staticGeom)); cudaMemcpy( cudageoms, geomList, numberOfGeoms*sizeof(staticGeom), cudaMemcpyHostToDevice); - - material* cudamaterials = NULL; - cudaMalloc((void**)&cudamaterials, numberOfMaterials*sizeof(material)); - cudaMemcpy( cudamaterials, materials, numberOfMaterials*sizeof(material), cudaMemcpyHostToDevice); + + + staticMaterial* matList = new staticMaterial[numberOfMaterials]; + for(int i=0; iresolution; - cam.position = renderCam->positions[frame]; - cam.view = renderCam->views[frame]; - cam.up = renderCam->ups[frame]; - cam.fov = renderCam->fov; + + + ParameterSet ps; + ps.ka=pSet->ka; + ps.kd=pSet->kd; + ps.ks=pSet->ks; + ps.shadowRays=pSet->shadowRays; + ps.hasSubray=pSet->hasSubray; + //kernel launches - for(int bounce = 1; bounce <= 1; ++bounce) - { - raytraceRay<<>>(renderCam->resolution, (float)iterations, (float)bounce, cam, traceDepth, cudaimage, cudageoms, numberOfGeoms, cudamaterials, numberOfMaterials); +// clearImage<<>>(renderCam->resolution, cudaimage); + int subrays=pSet->hasSubray; + float subraycoeff=1.0f/(float)subrays; + + raypoolsize=(int)renderCam->resolution.x*(int)renderCam->resolution.y*pSet->hasSubray; + if(iterations<1.5f){ + cudaMalloc((void**)&raypool, raypoolsize*sizeof(parallelRay)); } - sendImageToPBO<<>>(PBOpos, renderCam->resolution, cudaimage); + int* flagPool; + cudaMalloc((void**)&flagPool, raypoolsize*sizeof(int)); + initializeRayPool<<>>(renderCam->resolution,(float)iterations,cam,raypool,flagPool, pSet->hasSubray); + + + for(int nowturn=0;nowturnkd; + int blocknum=raypoolsize/threadperblock; + blocknum=max(blocknum,1); + + //first step, get the first bounce and put them into the ray pool + computeRaypool<<>>(raypool, flagPool,raypoolsize, (float)iterations, traceMaxDepth, cudaimage, cam,textureInfo,numberOfTextures,cudaTexture, + cudageoms, numberOfGeoms , cudamats, ps); + //cudaThreadSynchronize(); + // parallelRay* raypoollocal=new parallelRay[raypoolsize]; + // cudaMemcpy(raypoollocal,raypool,raypoolsize*sizeof(parallelRay),cudaMemcpyDeviceToHost); + + // thrust::device_ptr d=thrust::device_pointer_cast(flagPool); + // thrust::device_vector v(raypoolsize); + // thrust::exclusive_scan(d, d+raypoolsize, v.begin()); + + + //// thrust::exclusive_scan(flagpoollocal, flagpoollocal+raypoolsize,flagpoollocal); + // //second step, remove terminated rays and make a new raypool + + + + // int head=0; + // int tail=raypoolsize-1; + // while(head=0 && raypoollocal[tail].terminated) tail--; + // if(head>=tail) break; + // raypoollocal[head]=raypoollocal[tail]; + // tail--; + // head++; + // } + // raypoolsize=tail+1; + // cudaMemcpy(raypool,raypoollocal,raypoolsize*sizeof(parallelRay),cudaMemcpyHostToDevice); + // delete raypoollocal; + // printf("bounce: %d, remain: %d\n",nowturn, raypoolsize); + thrust::device_ptr iteratorStart(raypool); + thrust::device_ptr iteratorEnd = iteratorStart + raypoolsize; + iteratorEnd = thrust::remove_if(iteratorStart, iteratorEnd, terminated()); + raypoolsize = (int)(iteratorEnd - iteratorStart); + } +// cudaMemcpy(renderCam->shadowVal, cudashadow,(int)renderCam->resolution.x*(int)renderCam->resolution.y*sizeof(glm::vec3), cudaMemcpyDeviceToHost); + glm::vec3* blurredimage = NULL; + cudaMalloc((void**)&blurredimage, (int)renderCam->resolution.x*(int)renderCam->resolution.y*sizeof(glm::vec3)); +// dofBlur<<>>(renderCam->resolution,(float)iterations,blurredimage, cudaimage, cudahitinfo); +// cudaMemcpy( cudaimage, blurredimage, (int)renderCam->resolution.x*(int)renderCam->resolution.y*sizeof(glm::vec3), cudaMemcpyDeviceToDevice); + + sendImageToPBO<<>>(PBOpos, renderCam->resolution, cudaimage,iterations); //retrieve image from GPU cudaMemcpy( renderCam->image, cudaimage, (int)renderCam->resolution.x*(int)renderCam->resolution.y*sizeof(glm::vec3), cudaMemcpyDeviceToHost); - + //free up stuff, or else we'll leak memory like a madman cudaFree( cudaimage ); cudaFree( cudageoms ); - cudaFree( cudamaterials ); - delete [] geomList; + cudaFree( cudamats ); + cudaFree( blurredimage); + cudaFree( flagPool); +// cudaFree( raypool); +// cudaFree( cudashadow); + + delete geomList; + delete matList; + + - // make certain the kernel has completed + // make certain the kernel has completed cudaThreadSynchronize(); checkCUDAError("Kernel failed!"); diff --git a/src/raytraceKernel.h b/src/raytraceKernel.h index 5fcf5a3..abbc166 100755 --- a/src/raytraceKernel.h +++ b/src/raytraceKernel.h @@ -10,16 +10,26 @@ #include #include +#include +#include +#include +#include +#include +#include + + #include #include #include "sceneStructs.h" #if CUDA_VERSION >= 5000 #include + #else #include #endif -void cudaRaytraceCore(uchar4* pos, camera* renderCam, int frame, int iterations, material* materials, int numberOfMaterials, geom* geoms, int numberOfGeoms); + +void cudaRaytraceCore(uchar4* pos, camera* renderCam, ParameterSet* pSet, int frame, int iterations, material* materials, int numberOfMaterials, geom* geoms, int numberOfGeoms, m_BMP* textures, int numberOfTextures); #endif diff --git a/src/scene.cpp b/src/scene.cpp index 415d627..a01bf03 100755 --- a/src/scene.cpp +++ b/src/scene.cpp @@ -19,7 +19,11 @@ scene::scene(string filename){ utilityCore::safeGetline(fp_in,line); if(!line.empty()){ vector tokens = utilityCore::tokenizeString(line); - if(strcmp(tokens[0].c_str(), "MATERIAL")==0){ + if(strcmp(tokens[0].c_str(), "PARAMETERS")==0){ + loadParameter(); + cout << " " << endl; + } + else if(strcmp(tokens[0].c_str(), "MATERIAL")==0){ loadMaterial(tokens[1]); cout << " " << endl; }else if(strcmp(tokens[0].c_str(), "OBJECT")==0){ @@ -29,11 +33,37 @@ scene::scene(string filename){ loadCamera(); cout << " " << endl; } + else if(strcmp(tokens[0].c_str(), "TEXTURE")==0){ + loadTextures(tokens[1]); + cout << " " << endl; + } } } } } +int scene::loadTextures(string textureid){ + int id = atoi(textureid.c_str()); + if(id!=bmps.size()){ + cout << "ERROR: TEXTURE ID does not match expected number of materials" << endl; + return -1; + }else{ + cout << "Loading Texture " << id << "..." << endl; + + + //load static properties + + string line; + utilityCore::safeGetline(fp_in,line); + vector tokens = utilityCore::tokenizeString(line); + if(strcmp(tokens[0].c_str(), "FILENAME")==0){ + + bmps.push_back(tokens[1]); + } + + return 1; + } +} int scene::loadObject(string objectid){ int id = atoi(objectid.c_str()); if(id!=objects.size()){ @@ -85,6 +115,10 @@ int scene::loadObject(string objectid){ vector translations; vector scales; vector rotations; + vector m_blurs; + + + while (!line.empty() && fp_in.good()){ //check frame number @@ -95,7 +129,7 @@ int scene::loadObject(string objectid){ } //load tranformations - for(int i=0; i<3; i++){ + for(int i=0; i<4; i++){ glm::vec3 translation; glm::vec3 rotation; glm::vec3 scale; utilityCore::safeGetline(fp_in,line); tokens = utilityCore::tokenizeString(line); @@ -105,7 +139,10 @@ int scene::loadObject(string objectid){ rotations.push_back(glm::vec3(atof(tokens[1].c_str()), atof(tokens[2].c_str()), atof(tokens[3].c_str()))); }else if(strcmp(tokens[0].c_str(), "SCALE")==0){ scales.push_back(glm::vec3(atof(tokens[1].c_str()), atof(tokens[2].c_str()), atof(tokens[3].c_str()))); - } + }else if(strcmp(tokens[0].c_str(), "MOBLUR")==0){ + m_blurs.push_back(glm::vec3(atof(tokens[1].c_str()), atof(tokens[2].c_str()), atof(tokens[3].c_str()))); + } + } frameCount++; @@ -118,6 +155,7 @@ int scene::loadObject(string objectid){ newObject.scales = new glm::vec3[frameCount]; newObject.transforms = new cudaMat4[frameCount]; newObject.inverseTransforms = new cudaMat4[frameCount]; + newObject.moblur = new glm::vec3[frameCount]; for(int i=0; i tokens = utilityCore::tokenizeString(line); + if(strcmp(tokens[0].c_str(), "KD")==0){ + newPset.kd = atof(tokens[1].c_str()); + }else if(strcmp(tokens[0].c_str(), "KS")==0){ + newPset.ks = atof(tokens[1].c_str()); + }else if(strcmp(tokens[0].c_str(), "KA")==0){ + newPset.ka = atof(tokens[1].c_str()); + }else if(strcmp(tokens[0].c_str(), "TILESIZE")==0){ + newPset.shadowRays = atoi(tokens[1].c_str()); + }else if(strcmp(tokens[0].c_str(), "SUBRAY")==0){ + newPset.hasSubray = atoi(tokens[1].c_str()); + } + } + parameterSet=newPset; + return 1; +} + int scene::loadCamera(){ cout << "Loading Camera ..." << endl; camera newCamera; float fovy; //load static properties - for(int i=0; i<4; i++){ + for(int i=0; i<5; i++){ string line; utilityCore::safeGetline(fp_in,line); vector tokens = utilityCore::tokenizeString(line); @@ -152,6 +218,8 @@ int scene::loadCamera(){ newCamera.iterations = atoi(tokens[1].c_str()); }else if(strcmp(tokens[0].c_str(), "FILE")==0){ newCamera.imageName = tokens[1]; + }else if(strcmp(tokens[0].c_str(), "AMBIENT")==0){ + newCamera.ambient = atof(tokens[1].c_str()); } } @@ -210,15 +278,18 @@ int scene::loadCamera(){ //set up render camera stuff renderCam.image = new glm::vec3[(int)renderCam.resolution.x*(int)renderCam.resolution.y]; + renderCam.shadowVal = new glm::vec3[(int)renderCam.resolution.x*(int)renderCam.resolution.y]; renderCam.rayList = new ray[(int)renderCam.resolution.x*(int)renderCam.resolution.y]; for(int i=0; i tokens = utilityCore::tokenizeString(line); @@ -255,9 +326,11 @@ int scene::loadMaterial(string materialid){ }else if(strcmp(tokens[0].c_str(), "RSCTCOEFF")==0){ newMaterial.reducedScatterCoefficient = atof(tokens[1].c_str()); }else if(strcmp(tokens[0].c_str(), "EMITTANCE")==0){ - newMaterial.emittance = atof(tokens[1].c_str()); - + newMaterial.emittance = atof(tokens[1].c_str()); + }else if(strcmp(tokens[0].c_str(), "TEXTUREIDX")==0){ + newMaterial.textureidx = atof(tokens[1].c_str()); } + } materials.push_back(newMaterial); return 1; diff --git a/src/scene.h b/src/scene.h index 9bfa71f..a554e1e 100755 --- a/src/scene.h +++ b/src/scene.h @@ -22,13 +22,17 @@ class scene{ int loadMaterial(string materialid); int loadObject(string objectid); int loadCamera(); + int loadParameter(); + int loadTextures(string textureid); public: scene(string filename); ~scene(); vector objects; vector materials; + vector bmps; camera renderCam; + ParameterSet parameterSet; }; #endif diff --git a/src/sceneStructs.h b/src/sceneStructs.h index b10f1cf..35cb91a 100755 --- a/src/sceneStructs.h +++ b/src/sceneStructs.h @@ -7,17 +7,47 @@ #define CUDASTRUCTS_H #include "glm/glm.hpp" +#include "EasyBMP.h" #include "cudaMat4.h" #include #include enum GEOMTYPE{ SPHERE, CUBE, MESH }; - +struct ParameterSet +{ + float ks,kd,ka; + int shadowRays, hasSubray; +}; struct ray { glm::vec3 origin; glm::vec3 direction; }; - +struct m_BMP +{ + glm::vec3* colors; + glm::vec2 resolution; +}; +struct BMPInfo +{ + int offset; + int width; + int height; +}; +struct parallelRay +{ + bool terminated; + glm::vec3 origin; + glm::vec3 direction; + int index; + int iters; + glm::vec3 coeff; +}; +struct vec6 +{ + glm::vec3 point; + glm::vec3 normal; + +}; struct geom { enum GEOMTYPE type; int materialid; @@ -25,6 +55,7 @@ struct geom { glm::vec3* translations; glm::vec3* rotations; glm::vec3* scales; + glm::vec3* moblur; cudaMat4* transforms; cudaMat4* inverseTransforms; }; @@ -35,6 +66,7 @@ struct staticGeom { glm::vec3 translation; glm::vec3 rotation; glm::vec3 scale; + glm::vec3 moblur; cudaMat4 transform; cudaMat4 inverseTransform; }; @@ -45,6 +77,7 @@ struct cameraData { glm::vec3 view; glm::vec3 up; glm::vec2 fov; + float ambient; }; struct camera { @@ -56,8 +89,10 @@ struct camera { glm::vec2 fov; unsigned int iterations; glm::vec3* image; + glm::vec3* shadowVal; ray* rayList; std::string imageName; + float ambient; }; struct material{ @@ -71,6 +106,33 @@ struct material{ glm::vec3 absorptionCoefficient; float reducedScatterCoefficient; float emittance; + int textureidx; +}; + +struct staticMaterial{ + glm::vec3 color; + float specularExponent; + glm::vec3 specularColor; //secondary hit specular info + float hasReflective; + float hasRefractive; + float indexOfRefraction; + float hasScatter; + glm::vec3 absorptionCoefficient; + float reducedScatterCoefficient; + float emittance; + int textureidx; +}; + +struct hitInfo +{ + bool hit; + glm::vec3 hitPoint; + glm::vec3 normal; + glm::vec3 incidentDir; + int hitID; + int materialid; + int firsthitmatid; + float dof; }; #endif //CUDASTRUCTS_H diff --git a/src/utilities.h b/src/utilities.h index 84ec55f..cee80a2 100755 --- a/src/utilities.h +++ b/src/utilities.h @@ -17,10 +17,11 @@ #include #include "cudaMat4.h" + #define PI 3.1415926535897932384626422832795028841971 #define TWO_PI 6.2831853071795864769252867665590057683943 #define SQRT_OF_ONE_THIRD 0.5773502691896257645091487805019574556476 -#define NATURAL_E 2.7182818284590452353602874713526624977572 +#define NATURAL_E 2.7182818284590452353602874713526624977572 #define EPSILON .000000001 #define ZERO_ABSORPTION_EPSILON 0.00001 #define RAY_BIAS_AMOUNT 0.0002 diff --git a/src/woodtexture.bmp b/src/woodtexture.bmp new file mode 100644 index 0000000..9c437a7 Binary files /dev/null and b/src/woodtexture.bmp differ