Skip to content

Commit

Permalink
Updated shaders code for Windows, now supports OpenGL and DirectX
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxgurugamer committed Nov 17, 2016
1 parent cda933e commit 4d35dae
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 16 deletions.
Binary file modified Src/.vs/HullCamera/v14/.suo
Binary file not shown.
28 changes: 22 additions & 6 deletions Src/CameraFilters/CameraFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,17 +186,33 @@ public static void LoadBundle()
return;

string bundleName;
switch (Application.platform)
Debug.Log("Application.platform: " + Application.platform.ToString());

switch (Application.platform)
{
case RuntimePlatform.OSXPlayer:
bundleName = "shaders.osx";
break;

case RuntimePlatform.LinuxPlayer:
bundleName = "shaders.linux";
break;

default:
case RuntimePlatform.LinuxPlayer:
bundleName = "shaders.linux";
break;

case RuntimePlatform.WindowsPlayer:
if (SystemInfo.graphicsDeviceVersion.Contains("OpenGL"))
{
Debug.Log("OpenGL found");
bundleName = "shaders.windows";
}
else
{
Debug.Log("Not OpenGL");
bundleName = "shaders.bundle";
}

break;

default:
bundleName = "shaders.windows";
break;
}
Expand Down
5 changes: 4 additions & 1 deletion Src/Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@
Got all cameras working with RPM

0.1.5
Code updated to support OSX & Linux with regards to the shaders, thanks @ThirdOfSeven
Code updated to support OSX & Linux with regards to the shaders, thanks @ThirdOfSeven

0.1.6
Added code to support Windows, both directX and OpenGL
2 changes: 1 addition & 1 deletion Src/HullcamVDSContinued.version
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"VERSION": {
"MAJOR": 0,
"MINOR": 1,
"PATCH": 5,
"PATCH": 6,
"BUILD": 0
},
"KSP_VERSION": {
Expand Down
9 changes: 5 additions & 4 deletions Src/buildrelease.bat
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ rmdir /s /q %HOMEDIR%\install\Gamedata\HullCameraVDS

copy bin\Release\HullCamera.dll ..\GameData\HullCameraVDS\Plugins
copy HullcamVDSContinued.version ..\GameData\HullCameraVDS\HullcamVDSContinued.version
copy ..\HullCameraAssets\Bundles\shaders ..\GameData\HullCameraVDS\Resources\shaders.bundle

copy ..\HullCameraAssets\Bundles-windows\shaders %H%\GameData\HullCameraVDS\Resources\shaders.windows
copy ..\HullCameraAssets\Bundles-osx\shaders %H%\GameData\HullCameraVDS\Resources\shaders.osx
copy ..\HullCameraAssets\Bundleslinux\shaders %H%\GameData\HullCameraVDS\Resources\shaders.linux
rem copy ..\HullCameraAssets\Bundles\shaders ..\GameData\HullCameraVDS\Resources\shaders.bundle

rem copy ..\HullCameraAssets\Bundles-windows\shaders %H%\GameData\HullCameraVDS\Resources\shaders.windows
rem copy ..\HullCameraAssets\Bundles-osx\shaders %H%\GameData\HullCameraVDS\Resources\shaders.osx
rem copy ..\HullCameraAssets\Bundles-linux\shaders %H%\GameData\HullCameraVDS\Resources\shaders.linux

xcopy /Y /E ..\GameData\HullCameraVDS %HOMEDIR%\install\Gamedata\HullCameraVDS\
copy /y ../LICENSE %HOMEDIR%\install\Gamedata\HullCameraVDS
Expand Down
8 changes: 4 additions & 4 deletions Src/deploy.bat
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ copy /y bin\Debug\HullCamera.dll ..\GameData\HullCameraVDS\Plugins
copy /y HullcamVDSContinued.version ..\GameData\HullCameraVDS\HullcamVDSContinued.version

xcopy /Y /E ..\GameData\HullCameraVDS %H%\GameData\HullCameraVDS
copy ..\HullCameraAssets\Bundles\shaders %H%\GameData\HullCameraVDS\Resources\shaders.bundle
rem copy ..\HullCameraAssets\Bundles\shaders %H%\GameData\HullCameraVDS\Resources\shaders.bundle

copy ..\HullCameraAssets\Bundles-windows\shaders %H%\GameData\HullCameraVDS\Resources\shaders.windows
copy ..\HullCameraAssets\Bundles-osx\shaders %H%\GameData\HullCameraVDS\Resources\shaders.osx
copy ..\HullCameraAssets\Bundleslinux\shaders %H%\GameData\HullCameraVDS\Resources\shaders.linux
rem copy ..\HullCameraAssets\Bundles-windows\shaders %H%\GameData\HullCameraVDS\Resources\shaders.windows
rem copy ..\HullCameraAssets\Bundles-osx\shaders %H%\GameData\HullCameraVDS\Resources\shaders.osx
rem copy ..\HullCameraAssets\Bundles-linux\shaders %H%\GameData\HullCameraVDS\Resources\shaders.linux

0 comments on commit 4d35dae

Please sign in to comment.