WIP Kraken updated OSX support

This commit is contained in:
2015-11-06 23:09:31 -08:00
parent 3913345a28
commit ee63579acb
48 changed files with 694 additions and 268 deletions

View File

@@ -180,6 +180,9 @@
E416AA9D1671375C000F6786 /* KRAnimationCurveManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E416AA9B1671375C000F6786 /* KRAnimationCurveManager.cpp */; }; E416AA9D1671375C000F6786 /* KRAnimationCurveManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E416AA9B1671375C000F6786 /* KRAnimationCurveManager.cpp */; };
E41843921678704000DBD6CF /* KRCollider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 104A335C1672D31B001C8BA6 /* KRCollider.cpp */; }; E41843921678704000DBD6CF /* KRCollider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 104A335C1672D31B001C8BA6 /* KRCollider.cpp */; };
E41B6BAA16BE437800B510EB /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E41B6BA916BE437800B510EB /* CoreAudio.framework */; }; E41B6BAA16BE437800B510EB /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E41B6BA916BE437800B510EB /* CoreAudio.framework */; };
E41CAB8D1B75D8DF00F3387D /* KrakenView.h in Headers */ = {isa = PBXBuildFile; fileRef = E41CAB8B1B75D8DF00F3387D /* KrakenView.h */; settings = {ATTRIBUTES = (Public, ); }; };
E41CAB8E1B75D8DF00F3387D /* KrakenView.mm in Sources */ = {isa = PBXBuildFile; fileRef = E41CAB8C1B75D8DF00F3387D /* KrakenView.mm */; };
E41CAB921B75DFF100F3387D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E41CAB911B75DFF100F3387D /* QuartzCore.framework */; };
E428C2F31669610500A16EDF /* KRAnimationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = E428C2F11669610500A16EDF /* KRAnimationManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; E428C2F31669610500A16EDF /* KRAnimationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = E428C2F11669610500A16EDF /* KRAnimationManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
E428C2F61669611600A16EDF /* KRAnimationManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E428C2F41669611600A16EDF /* KRAnimationManager.cpp */; }; E428C2F61669611600A16EDF /* KRAnimationManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E428C2F41669611600A16EDF /* KRAnimationManager.cpp */; };
E428C2F91669612500A16EDF /* KRAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = E428C2F71669612500A16EDF /* KRAnimation.h */; settings = {ATTRIBUTES = (Public, ); }; }; E428C2F91669612500A16EDF /* KRAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = E428C2F71669612500A16EDF /* KRAnimation.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -283,6 +286,8 @@
E499BF2216AE760F007FCDBE /* kraken.h in Headers */ = {isa = PBXBuildFile; fileRef = E4BBBB8C1512A40300F43B5B /* kraken.h */; settings = {ATTRIBUTES = (Public, ); }; }; E499BF2216AE760F007FCDBE /* kraken.h in Headers */ = {isa = PBXBuildFile; fileRef = E4BBBB8C1512A40300F43B5B /* kraken.h */; settings = {ATTRIBUTES = (Public, ); }; };
E499BF2316AE7636007FCDBE /* kraken-prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = E4BBBB8B1512A40300F43B5B /* kraken-prefix.pch */; }; E499BF2316AE7636007FCDBE /* kraken-prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = E4BBBB8B1512A40300F43B5B /* kraken-prefix.pch */; };
E499BF2516AE8C20007FCDBE /* KREngine.mm in Sources */ = {isa = PBXBuildFile; fileRef = E491016F13C99BDC0098455B /* KREngine.mm */; }; E499BF2516AE8C20007FCDBE /* KREngine.mm in Sources */ = {isa = PBXBuildFile; fileRef = E491016F13C99BDC0098455B /* KREngine.mm */; };
E4A0B8201B2007130059018B /* flare_osx.vsh in Resources */ = {isa = PBXBuildFile; fileRef = E42559B0184DD48B0081BB20 /* flare_osx.vsh */; };
E4A0B8211B2007160059018B /* flare_osx.fsh in Resources */ = {isa = PBXBuildFile; fileRef = E42559AE184DD4730081BB20 /* flare_osx.fsh */; };
E4AE635E1704FB0A00B460CD /* KRLODGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4AE635B1704FB0A00B460CD /* KRLODGroup.cpp */; }; E4AE635E1704FB0A00B460CD /* KRLODGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4AE635B1704FB0A00B460CD /* KRLODGroup.cpp */; };
E4AE63601704FB0A00B460CD /* KRLODGroup.h in Headers */ = {isa = PBXBuildFile; fileRef = E4AE635C1704FB0A00B460CD /* KRLODGroup.h */; settings = {ATTRIBUTES = (Public, ); }; }; E4AE63601704FB0A00B460CD /* KRLODGroup.h in Headers */ = {isa = PBXBuildFile; fileRef = E4AE635C1704FB0A00B460CD /* KRLODGroup.h */; settings = {ATTRIBUTES = (Public, ); }; };
E4AFC6B615F7C46800DDB4C8 /* KRAABB.cpp in Headers */ = {isa = PBXBuildFile; fileRef = E40BA45215EFF79500D7C3DD /* KRAABB.cpp */; settings = {ATTRIBUTES = (Public, ); }; }; E4AFC6B615F7C46800DDB4C8 /* KRAABB.cpp in Headers */ = {isa = PBXBuildFile; fileRef = E40BA45215EFF79500D7C3DD /* KRAABB.cpp */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -297,6 +302,8 @@
E4B175B5161F5FAF00B8FB80 /* KRTextureCube.h in Headers */ = {isa = PBXBuildFile; fileRef = E4B175B1161F5FAF00B8FB80 /* KRTextureCube.h */; settings = {ATTRIBUTES = (Public, ); }; }; E4B175B5161F5FAF00B8FB80 /* KRTextureCube.h in Headers */ = {isa = PBXBuildFile; fileRef = E4B175B1161F5FAF00B8FB80 /* KRTextureCube.h */; settings = {ATTRIBUTES = (Public, ); }; };
E4B2A4391523B027004CB0EC /* KRMaterial.h in Headers */ = {isa = PBXBuildFile; fileRef = E491017D13C99BDC0098455B /* KRMaterial.h */; settings = {ATTRIBUTES = (Public, ); }; }; E4B2A4391523B027004CB0EC /* KRMaterial.h in Headers */ = {isa = PBXBuildFile; fileRef = E491017D13C99BDC0098455B /* KRMaterial.h */; settings = {ATTRIBUTES = (Public, ); }; };
E4B2A43B1523B02E004CB0EC /* KRMaterial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E491017C13C99BDC0098455B /* KRMaterial.cpp */; }; E4B2A43B1523B02E004CB0EC /* KRMaterial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E491017C13C99BDC0098455B /* KRMaterial.cpp */; };
E4B74A621AD79F9600067A78 /* KRContext_osx.mm in Sources */ = {isa = PBXBuildFile; fileRef = E4B74A611AD79F9600067A78 /* KRContext_osx.mm */; };
E4B74A641AD7A02C00067A78 /* KRContext_ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = E4B74A631AD7A02C00067A78 /* KRContext_ios.mm */; };
E4BBBB8A1512A40300F43B5B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = E4BBBB881512A40300F43B5B /* InfoPlist.strings */; }; E4BBBB8A1512A40300F43B5B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = E4BBBB881512A40300F43B5B /* InfoPlist.strings */; };
E4BBBB8E1512A40300F43B5B /* kraken.mm in Sources */ = {isa = PBXBuildFile; fileRef = E4BBBB8D1512A40300F43B5B /* kraken.mm */; }; E4BBBB8E1512A40300F43B5B /* kraken.mm in Sources */ = {isa = PBXBuildFile; fileRef = E4BBBB8D1512A40300F43B5B /* kraken.mm */; };
E4BBBB9C1512A4A900F43B5B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4BBBB9A1512A48200F43B5B /* Foundation.framework */; }; E4BBBB9C1512A4A900F43B5B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4BBBB9A1512A48200F43B5B /* Foundation.framework */; };
@@ -393,7 +400,7 @@
E4F027E11697BFFF00D4427D /* KRAudioBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F027DD1697BFFF00D4427D /* KRAudioBuffer.h */; settings = {ATTRIBUTES = (Public, ); }; }; E4F027E11697BFFF00D4427D /* KRAudioBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F027DD1697BFFF00D4427D /* KRAudioBuffer.h */; settings = {ATTRIBUTES = (Public, ); }; };
E4F027F71698115600D4427D /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4F027F61698115600D4427D /* AudioToolbox.framework */; }; E4F027F71698115600D4427D /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4F027F61698115600D4427D /* AudioToolbox.framework */; };
E4F89BB518A6DB1200015637 /* KRTriangle3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F89BB218A6DB1200015637 /* KRTriangle3.cpp */; }; E4F89BB518A6DB1200015637 /* KRTriangle3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F89BB218A6DB1200015637 /* KRTriangle3.cpp */; };
E4F89BB718A6DB1200015637 /* KRTriangle3.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F89BB318A6DB1200015637 /* KRTriangle3.h */; }; E4F89BB718A6DB1200015637 /* KRTriangle3.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F89BB318A6DB1200015637 /* KRTriangle3.h */; settings = {ATTRIBUTES = (Public, ); }; };
E4F975331536220900FD60B2 /* KRNode.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F975311536220900FD60B2 /* KRNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; E4F975331536220900FD60B2 /* KRNode.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F975311536220900FD60B2 /* KRNode.h */; settings = {ATTRIBUTES = (Public, ); }; };
E4F975371536221C00FD60B2 /* KRNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F975351536221C00FD60B2 /* KRNode.cpp */; }; E4F975371536221C00FD60B2 /* KRNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F975351536221C00FD60B2 /* KRNode.cpp */; };
E4F9754015362CD400FD60B2 /* KRScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E414BAE81435585A00A668C4 /* KRScene.cpp */; }; E4F9754015362CD400FD60B2 /* KRScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E414BAE81435585A00A668C4 /* KRScene.cpp */; };
@@ -456,9 +463,12 @@
E41AE1DD16B124CA00980428 /* font.tga */ = {isa = PBXFileReference; lastKnownFileType = file; path = font.tga; sourceTree = "<group>"; }; E41AE1DD16B124CA00980428 /* font.tga */ = {isa = PBXFileReference; lastKnownFileType = file; path = font.tga; sourceTree = "<group>"; };
E41B6BA716BE436100B510EB /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; E41B6BA716BE436100B510EB /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
E41B6BA916BE437800B510EB /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/CoreAudio.framework; sourceTree = DEVELOPER_DIR; }; E41B6BA916BE437800B510EB /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/CoreAudio.framework; sourceTree = DEVELOPER_DIR; };
E41CAB8B1B75D8DF00F3387D /* KrakenView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KrakenView.h; sourceTree = "<group>"; };
E41CAB8C1B75D8DF00F3387D /* KrakenView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = KrakenView.mm; sourceTree = "<group>"; };
E41CAB911B75DFF100F3387D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; };
E42559AA184DD4490081BB20 /* flare.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = flare.fsh; sourceTree = "<group>"; }; E42559AA184DD4490081BB20 /* flare.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = flare.fsh; sourceTree = "<group>"; };
E42559AC184DD45A0081BB20 /* flare.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = flare.vsh; sourceTree = "<group>"; }; E42559AC184DD45A0081BB20 /* flare.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = flare.vsh; sourceTree = "<group>"; };
E42559AE184DD4730081BB20 /* flare_osx.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = flare_osx.fsh; sourceTree = "<group>"; }; E42559AE184DD4730081BB20 /* flare_osx.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; lineEnding = 0; path = flare_osx.fsh; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.glsl; };
E42559B0184DD48B0081BB20 /* flare_osx.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = flare_osx.vsh; sourceTree = "<group>"; }; E42559B0184DD48B0081BB20 /* flare_osx.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = flare_osx.vsh; sourceTree = "<group>"; };
E428C2F11669610500A16EDF /* KRAnimationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KRAnimationManager.h; sourceTree = "<group>"; }; E428C2F11669610500A16EDF /* KRAnimationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KRAnimationManager.h; sourceTree = "<group>"; };
E428C2F41669611600A16EDF /* KRAnimationManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KRAnimationManager.cpp; sourceTree = "<group>"; }; E428C2F41669611600A16EDF /* KRAnimationManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KRAnimationManager.cpp; sourceTree = "<group>"; };
@@ -588,12 +598,16 @@
E497B952151BEDA600D3DC67 /* KRResource+fbx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = "KRResource+fbx.cpp"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; E497B952151BEDA600D3DC67 /* KRResource+fbx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = "KRResource+fbx.cpp"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
E497B95C151BF05F00D3DC67 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = ../../../../MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/CoreServices.framework; sourceTree = SDKROOT; }; E497B95C151BF05F00D3DC67 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = ../../../../MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/CoreServices.framework; sourceTree = SDKROOT; };
E497B95E151BF09600D3DC67 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = ../../../../MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; E497B95E151BF09600D3DC67 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = ../../../../MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
E4A5C33E1BEDD6CC00CA40E5 /* kraken.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = kraken.h; sourceTree = "<group>"; };
E4A5C3401BEDD6CC00CA40E5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
E4AE635B1704FB0A00B460CD /* KRLODGroup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KRLODGroup.cpp; sourceTree = "<group>"; }; E4AE635B1704FB0A00B460CD /* KRLODGroup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KRLODGroup.cpp; sourceTree = "<group>"; };
E4AE635C1704FB0A00B460CD /* KRLODGroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KRLODGroup.h; sourceTree = "<group>"; }; E4AE635C1704FB0A00B460CD /* KRLODGroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KRLODGroup.h; sourceTree = "<group>"; };
E4B175AA161F5A1000B8FB80 /* KRTexture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KRTexture.cpp; sourceTree = "<group>"; }; E4B175AA161F5A1000B8FB80 /* KRTexture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KRTexture.cpp; sourceTree = "<group>"; };
E4B175AB161F5A1000B8FB80 /* KRTexture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = KRTexture.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; E4B175AB161F5A1000B8FB80 /* KRTexture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = KRTexture.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
E4B175B0161F5FAE00B8FB80 /* KRTextureCube.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KRTextureCube.cpp; sourceTree = "<group>"; }; E4B175B0161F5FAE00B8FB80 /* KRTextureCube.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KRTextureCube.cpp; sourceTree = "<group>"; };
E4B175B1161F5FAF00B8FB80 /* KRTextureCube.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KRTextureCube.h; sourceTree = "<group>"; }; E4B175B1161F5FAF00B8FB80 /* KRTextureCube.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KRTextureCube.h; sourceTree = "<group>"; };
E4B74A611AD79F9600067A78 /* KRContext_osx.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = KRContext_osx.mm; sourceTree = "<group>"; };
E4B74A631AD7A02C00067A78 /* KRContext_ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = KRContext_ios.mm; sourceTree = "<group>"; };
E4BBBB7E1512A40300F43B5B /* kraken.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = kraken.framework; sourceTree = BUILT_PRODUCTS_DIR; }; E4BBBB7E1512A40300F43B5B /* kraken.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = kraken.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E4BBBB871512A40300F43B5B /* Kraken-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Kraken-Info.plist"; sourceTree = "<group>"; }; E4BBBB871512A40300F43B5B /* Kraken-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Kraken-Info.plist"; sourceTree = "<group>"; };
E4BBBB891512A40300F43B5B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; }; E4BBBB891512A40300F43B5B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
@@ -623,24 +637,24 @@
E4CA11731639CBD1005D9400 /* KRViewport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KRViewport.h; sourceTree = "<group>"; }; E4CA11731639CBD1005D9400 /* KRViewport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KRViewport.h; sourceTree = "<group>"; };
E4CA11771639CC8E005D9400 /* KRViewport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KRViewport.cpp; sourceTree = "<group>"; }; E4CA11771639CC8E005D9400 /* KRViewport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KRViewport.cpp; sourceTree = "<group>"; };
E4CE184815FEEDA200F80870 /* font.pvr */ = {isa = PBXFileReference; lastKnownFileType = file; path = font.pvr; sourceTree = "<group>"; }; E4CE184815FEEDA200F80870 /* font.pvr */ = {isa = PBXFileReference; lastKnownFileType = file; path = font.pvr; sourceTree = "<group>"; };
E4E6F60D16BA5D8300E410F8 /* PostShader_osx.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = PostShader_osx.fsh; sourceTree = "<group>"; }; E4E6F60D16BA5D8300E410F8 /* PostShader_osx.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; lineEnding = 0; path = PostShader_osx.fsh; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.glsl; };
E4E6F60E16BA5D8300E410F8 /* PostShader_osx.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = PostShader_osx.vsh; sourceTree = "<group>"; }; E4E6F60E16BA5D8300E410F8 /* PostShader_osx.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = PostShader_osx.vsh; sourceTree = "<group>"; };
E4E6F60F16BA5D8300E410F8 /* sky_box_osx.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = sky_box_osx.fsh; sourceTree = "<group>"; }; E4E6F60F16BA5D8300E410F8 /* sky_box_osx.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; lineEnding = 0; path = sky_box_osx.fsh; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.glsl; };
E4E6F61016BA5D8300E410F8 /* debug_font_osx.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = debug_font_osx.fsh; sourceTree = "<group>"; }; E4E6F61016BA5D8300E410F8 /* debug_font_osx.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; lineEnding = 0; path = debug_font_osx.fsh; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.glsl; };
E4E6F61116BA5D8300E410F8 /* debug_font_osx.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = debug_font_osx.vsh; sourceTree = "<group>"; }; E4E6F61116BA5D8300E410F8 /* debug_font_osx.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = debug_font_osx.vsh; sourceTree = "<group>"; };
E4E6F61216BA5D8300E410F8 /* dust_particle_osx.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = dust_particle_osx.fsh; sourceTree = "<group>"; }; E4E6F61216BA5D8300E410F8 /* dust_particle_osx.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = dust_particle_osx.fsh; sourceTree = "<group>"; };
E4E6F61316BA5D8300E410F8 /* dust_particle_osx.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = dust_particle_osx.vsh; sourceTree = "<group>"; }; E4E6F61316BA5D8300E410F8 /* dust_particle_osx.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = dust_particle_osx.vsh; sourceTree = "<group>"; };
E4E6F61416BA5D8300E410F8 /* sprite_osx.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = sprite_osx.fsh; sourceTree = "<group>"; }; E4E6F61416BA5D8300E410F8 /* sprite_osx.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; lineEnding = 0; path = sprite_osx.fsh; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.glsl; };
E4E6F61516BA5D8300E410F8 /* sprite_osx.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = sprite_osx.vsh; sourceTree = "<group>"; }; E4E6F61516BA5D8300E410F8 /* sprite_osx.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = sprite_osx.vsh; sourceTree = "<group>"; };
E4E6F61616BA5D8300E410F8 /* light_directional_osx.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = light_directional_osx.fsh; sourceTree = "<group>"; }; E4E6F61616BA5D8300E410F8 /* light_directional_osx.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; lineEnding = 0; path = light_directional_osx.fsh; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.glsl; };
E4E6F61716BA5D8300E410F8 /* light_directional_osx.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = light_directional_osx.vsh; sourceTree = "<group>"; }; E4E6F61716BA5D8300E410F8 /* light_directional_osx.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = light_directional_osx.vsh; sourceTree = "<group>"; };
E4E6F61816BA5D8300E410F8 /* light_point_inside_osx.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = light_point_inside_osx.fsh; sourceTree = "<group>"; }; E4E6F61816BA5D8300E410F8 /* light_point_inside_osx.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; lineEnding = 0; path = light_point_inside_osx.fsh; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.glsl; };
E4E6F61916BA5D8300E410F8 /* light_point_inside_osx.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = light_point_inside_osx.vsh; sourceTree = "<group>"; }; E4E6F61916BA5D8300E410F8 /* light_point_inside_osx.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = light_point_inside_osx.vsh; sourceTree = "<group>"; };
E4E6F61A16BA5D8300E410F8 /* light_point_osx.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = light_point_osx.fsh; sourceTree = "<group>"; }; E4E6F61A16BA5D8300E410F8 /* light_point_osx.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; lineEnding = 0; path = light_point_osx.fsh; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.glsl; };
E4E6F61B16BA5D8300E410F8 /* light_point_osx.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = light_point_osx.vsh; sourceTree = "<group>"; }; E4E6F61B16BA5D8300E410F8 /* light_point_osx.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = light_point_osx.vsh; sourceTree = "<group>"; };
E4E6F61C16BA5D8300E410F8 /* ObjectShader_osx.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ObjectShader_osx.fsh; sourceTree = "<group>"; }; E4E6F61C16BA5D8300E410F8 /* ObjectShader_osx.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; lineEnding = 0; path = ObjectShader_osx.fsh; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.glsl; };
E4E6F61D16BA5D8300E410F8 /* ObjectShader_osx.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ObjectShader_osx.vsh; sourceTree = "<group>"; }; E4E6F61D16BA5D8300E410F8 /* ObjectShader_osx.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ObjectShader_osx.vsh; sourceTree = "<group>"; };
E4E6F61E16BA5D8300E410F8 /* occlusion_test_osx.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = occlusion_test_osx.fsh; sourceTree = "<group>"; }; E4E6F61E16BA5D8300E410F8 /* occlusion_test_osx.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; lineEnding = 0; path = occlusion_test_osx.fsh; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.glsl; };
E4E6F61F16BA5D8300E410F8 /* occlusion_test_osx.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = occlusion_test_osx.vsh; sourceTree = "<group>"; }; E4E6F61F16BA5D8300E410F8 /* occlusion_test_osx.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = occlusion_test_osx.vsh; sourceTree = "<group>"; };
E4E6F62016BA5D8300E410F8 /* ShadowShader_osx.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ShadowShader_osx.fsh; sourceTree = "<group>"; }; E4E6F62016BA5D8300E410F8 /* ShadowShader_osx.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ShadowShader_osx.fsh; sourceTree = "<group>"; };
E4E6F62116BA5D8300E410F8 /* ShadowShader_osx.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ShadowShader_osx.vsh; sourceTree = "<group>"; }; E4E6F62116BA5D8300E410F8 /* ShadowShader_osx.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ShadowShader_osx.vsh; sourceTree = "<group>"; };
@@ -719,6 +733,7 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
E41CAB921B75DFF100F3387D /* QuartzCore.framework in Frameworks */,
E45E03C018790DF5006DA23F /* libPVRTexLib.a in Frameworks */, E45E03C018790DF5006DA23F /* libPVRTexLib.a in Frameworks */,
E459040416C30CC5002B00A0 /* AudioUnit.framework in Frameworks */, E459040416C30CC5002B00A0 /* AudioUnit.framework in Frameworks */,
E41B6BAA16BE437800B510EB /* CoreAudio.framework in Frameworks */, E41B6BAA16BE437800B510EB /* CoreAudio.framework in Frameworks */,
@@ -1158,6 +1173,7 @@
E4C8E4E616B9B2D50031DDCB /* kraken_standard_assets_ios */, E4C8E4E616B9B2D50031DDCB /* kraken_standard_assets_ios */,
E4C8E4F616B9B2E20031DDCB /* kraken_standard_assets_osx */, E4C8E4F616B9B2E20031DDCB /* kraken_standard_assets_osx */,
E48C528519C570C50062E439 /* krakenTests */, E48C528519C570C50062E439 /* krakenTests */,
E4A5C33D1BEDD6CB00CA40E5 /* kraken */,
E491016213C99B9E0098455B /* Products */, E491016213C99B9E0098455B /* Products */,
); );
sourceTree = "<group>"; sourceTree = "<group>";
@@ -1182,6 +1198,8 @@
E45134B41746A4A300443C21 /* KRBehavior.cpp */, E45134B41746A4A300443C21 /* KRBehavior.cpp */,
E45134B51746A4A300443C21 /* KRBehavior.h */, E45134B51746A4A300443C21 /* KRBehavior.h */,
E48C697115374F7E00232E28 /* KRContext.cpp */, E48C697115374F7E00232E28 /* KRContext.cpp */,
E4B74A631AD7A02C00067A78 /* KRContext_ios.mm */,
E4B74A611AD79F9600067A78 /* KRContext_osx.mm */,
E48C696E15374F5A00232E28 /* KRContext.h */, E48C696E15374F5A00232E28 /* KRContext.h */,
E43B0AD415DDCA0C00A5CB9F /* KRContextObject.cpp */, E43B0AD415DDCA0C00A5CB9F /* KRContextObject.cpp */,
E43B0AD515DDCA0D00A5CB9F /* KRContextObject.h */, E43B0AD515DDCA0D00A5CB9F /* KRContextObject.h */,
@@ -1207,11 +1225,22 @@
path = kraken; path = kraken;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
E4A5C33D1BEDD6CB00CA40E5 /* kraken */ = {
isa = PBXGroup;
children = (
E4A5C33E1BEDD6CC00CA40E5 /* kraken.h */,
E4A5C3401BEDD6CC00CA40E5 /* Info.plist */,
);
path = kraken;
sourceTree = "<group>";
};
E4BBBB851512A40300F43B5B /* kraken_osx */ = { E4BBBB851512A40300F43B5B /* kraken_osx */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
E4BBBB8C1512A40300F43B5B /* kraken.h */, E4BBBB8C1512A40300F43B5B /* kraken.h */,
E4BBBB8D1512A40300F43B5B /* kraken.mm */, E4BBBB8D1512A40300F43B5B /* kraken.mm */,
E41CAB8B1B75D8DF00F3387D /* KrakenView.h */,
E41CAB8C1B75D8DF00F3387D /* KrakenView.mm */,
E4BBBB861512A40300F43B5B /* Supporting Files */, E4BBBB861512A40300F43B5B /* Supporting Files */,
E4BBBB931512A41500F43B5B /* Frameworks */, E4BBBB931512A41500F43B5B /* Frameworks */,
); );
@@ -1231,6 +1260,7 @@
E4BBBB931512A41500F43B5B /* Frameworks */ = { E4BBBB931512A41500F43B5B /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
E41CAB911B75DFF100F3387D /* QuartzCore.framework */,
E459040316C30CC5002B00A0 /* AudioUnit.framework */, E459040316C30CC5002B00A0 /* AudioUnit.framework */,
E41B6BA916BE437800B510EB /* CoreAudio.framework */, E41B6BA916BE437800B510EB /* CoreAudio.framework */,
E460292916682BD900261BB9 /* libfbxsdk.a */, E460292916682BD900261BB9 /* libfbxsdk.a */,
@@ -1478,7 +1508,6 @@
E4F027CA16979CCD00D4427D /* KRAudioManager.h in Headers */, E4F027CA16979CCD00D4427D /* KRAudioManager.h in Headers */,
E4F027D116979CE200D4427D /* KRAudioSample.h in Headers */, E4F027D116979CE200D4427D /* KRAudioSample.h in Headers */,
E4F027E11697BFFF00D4427D /* KRAudioBuffer.h in Headers */, E4F027E11697BFFF00D4427D /* KRAudioBuffer.h in Headers */,
E4F89BB718A6DB1200015637 /* KRTriangle3.h in Headers */,
E4943234169E08D200BCB891 /* KRAmbientZone.h in Headers */, E4943234169E08D200BCB891 /* KRAmbientZone.h in Headers */,
E414F9AF1694DA37000B3D58 /* KRUnknown.h in Headers */, E414F9AF1694DA37000B3D58 /* KRUnknown.h in Headers */,
E45E03BD18790DD1006DA23F /* PVRTTexture.h in Headers */, E45E03BD18790DD1006DA23F /* PVRTTexture.h in Headers */,
@@ -1508,7 +1537,9 @@
E4AE63601704FB0A00B460CD /* KRLODGroup.h in Headers */, E4AE63601704FB0A00B460CD /* KRLODGroup.h in Headers */,
E45134B91746A4A300443C21 /* KRBehavior.h in Headers */, E45134B91746A4A300443C21 /* KRBehavior.h in Headers */,
E43F70E81824D9AB00136169 /* KRStreamer.h in Headers */, E43F70E81824D9AB00136169 /* KRStreamer.h in Headers */,
E4F89BB718A6DB1200015637 /* KRTriangle3.h in Headers */,
E40F982F184A7A2700CFA4D8 /* KRMeshQuad.h in Headers */, E40F982F184A7A2700CFA4D8 /* KRMeshQuad.h in Headers */,
E41CAB8D1B75D8DF00F3387D /* KrakenView.h in Headers */,
E40F9835184A7BAC00CFA4D8 /* KRSprite.h in Headers */, E40F9835184A7BAC00CFA4D8 /* KRSprite.h in Headers */,
E48CF945173453990005EBBB /* KRFloat.h in Headers */, E48CF945173453990005EBBB /* KRFloat.h in Headers */,
E499BF1F16AE753E007FCDBE /* KRCollider.h in Headers */, E499BF1F16AE753E007FCDBE /* KRCollider.h in Headers */,
@@ -1695,6 +1726,7 @@
E4E6F6A616BA5E0A00E410F8 /* debug_font_osx.fsh in Resources */, E4E6F6A616BA5E0A00E410F8 /* debug_font_osx.fsh in Resources */,
E4E6F6A716BA5E0A00E410F8 /* debug_font_osx.vsh in Resources */, E4E6F6A716BA5E0A00E410F8 /* debug_font_osx.vsh in Resources */,
E4E6F6A816BA5E0A00E410F8 /* dust_particle_osx.fsh in Resources */, E4E6F6A816BA5E0A00E410F8 /* dust_particle_osx.fsh in Resources */,
E4A0B8201B2007130059018B /* flare_osx.vsh in Resources */,
E4E6F6A916BA5E0A00E410F8 /* dust_particle_osx.vsh in Resources */, E4E6F6A916BA5E0A00E410F8 /* dust_particle_osx.vsh in Resources */,
E4E6F6AA16BA5E0A00E410F8 /* sprite_osx.fsh in Resources */, E4E6F6AA16BA5E0A00E410F8 /* sprite_osx.fsh in Resources */,
E4E6F6AB16BA5E0A00E410F8 /* sprite_osx.vsh in Resources */, E4E6F6AB16BA5E0A00E410F8 /* sprite_osx.vsh in Resources */,
@@ -1714,6 +1746,7 @@
E4E6F6B916BA5E0A00E410F8 /* simple_blit_osx.vsh in Resources */, E4E6F6B916BA5E0A00E410F8 /* simple_blit_osx.vsh in Resources */,
E4E6F6BA16BA5E0A00E410F8 /* sky_box_osx.vsh in Resources */, E4E6F6BA16BA5E0A00E410F8 /* sky_box_osx.vsh in Resources */,
E4E6F6BB16BA5E0A00E410F8 /* visualize_overlay_osx.fsh in Resources */, E4E6F6BB16BA5E0A00E410F8 /* visualize_overlay_osx.fsh in Resources */,
E4A0B8211B2007160059018B /* flare_osx.fsh in Resources */,
E4E6F6BC16BA5E0A00E410F8 /* visualize_overlay_osx.vsh in Resources */, E4E6F6BC16BA5E0A00E410F8 /* visualize_overlay_osx.vsh in Resources */,
E4E6F6BD16BA5E0A00E410F8 /* volumetric_fog_downsampled_osx.fsh in Resources */, E4E6F6BD16BA5E0A00E410F8 /* volumetric_fog_downsampled_osx.fsh in Resources */,
E4E6F6BE16BA5E0A00E410F8 /* volumetric_fog_downsampled_osx.vsh in Resources */, E4E6F6BE16BA5E0A00E410F8 /* volumetric_fog_downsampled_osx.vsh in Resources */,
@@ -1754,6 +1787,7 @@
E4159BA319C5762F00622D1E /* KRMeshQuad.cpp in Sources */, E4159BA319C5762F00622D1E /* KRMeshQuad.cpp in Sources */,
E4159BA419C5762F00622D1E /* KRTextureManager.cpp in Sources */, E4159BA419C5762F00622D1E /* KRTextureManager.cpp in Sources */,
E4159BA519C5762F00622D1E /* KRTexture2D.cpp in Sources */, E4159BA519C5762F00622D1E /* KRTexture2D.cpp in Sources */,
E4B74A641AD7A02C00067A78 /* KRContext_ios.mm in Sources */,
E4159BA619C5762F00622D1E /* KRTexture.cpp in Sources */, E4159BA619C5762F00622D1E /* KRTexture.cpp in Sources */,
E4159BA719C5762F00622D1E /* KRTextureCube.cpp in Sources */, E4159BA719C5762F00622D1E /* KRTextureCube.cpp in Sources */,
E4159BA819C5762F00622D1E /* KRTexturePVR.cpp in Sources */, E4159BA819C5762F00622D1E /* KRTexturePVR.cpp in Sources */,
@@ -1840,6 +1874,7 @@
E4D13364153767ED0070068C /* KRShaderManager.cpp in Sources */, E4D13364153767ED0070068C /* KRShaderManager.cpp in Sources */,
E4AFC6B915F7C7B200DDB4C8 /* KROctree.cpp in Sources */, E4AFC6B915F7C7B200DDB4C8 /* KROctree.cpp in Sources */,
E46C214C15364DEC009CABF3 /* KRSceneManager.cpp in Sources */, E46C214C15364DEC009CABF3 /* KRSceneManager.cpp in Sources */,
E4B74A621AD79F9600067A78 /* KRContext_osx.mm in Sources */,
E48C697315374F7E00232E28 /* KRContext.cpp in Sources */, E48C697315374F7E00232E28 /* KRContext.cpp in Sources */,
E46A6B6D1559E97D000DBD37 /* KRResource+blend.cpp in Sources */, E46A6B6D1559E97D000DBD37 /* KRResource+blend.cpp in Sources */,
E40F982D184A7A2700CFA4D8 /* KRMeshQuad.cpp in Sources */, E40F982D184A7A2700CFA4D8 /* KRMeshQuad.cpp in Sources */,
@@ -1857,6 +1892,7 @@
E4CA10EA1637BD2B005D9400 /* KRTexturePVR.cpp in Sources */, E4CA10EA1637BD2B005D9400 /* KRTexturePVR.cpp in Sources */,
E4CA10F01637BD58005D9400 /* KRTextureTGA.cpp in Sources */, E4CA10F01637BD58005D9400 /* KRTextureTGA.cpp in Sources */,
E4F89BB518A6DB1200015637 /* KRTriangle3.cpp in Sources */, E4F89BB518A6DB1200015637 /* KRTriangle3.cpp in Sources */,
E41CAB8E1B75D8DF00F3387D /* KrakenView.mm in Sources */,
E4CA11791639CC90005D9400 /* KRViewport.cpp in Sources */, E4CA11791639CC90005D9400 /* KRViewport.cpp in Sources */,
E41843921678704000DBD6CF /* KRCollider.cpp in Sources */, E41843921678704000DBD6CF /* KRCollider.cpp in Sources */,
E4324BAF16444E120043185B /* KRParticleSystemNewtonian.cpp in Sources */, E4324BAF16444E120043185B /* KRParticleSystemNewtonian.cpp in Sources */,
@@ -1944,6 +1980,7 @@
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
@@ -1971,6 +2008,7 @@
ONLY_ACTIVE_ARCH = NO; ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = kraken; PRODUCT_NAME = kraken;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
TVOS_DEPLOYMENT_TARGET = 9.0;
VERSIONING_SYSTEM = "apple-generic"; VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = ""; VERSION_INFO_PREFIX = "";
}; };
@@ -1990,6 +2028,7 @@
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
@@ -2012,6 +2051,7 @@
ONLY_ACTIVE_ARCH = NO; ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = kraken; PRODUCT_NAME = kraken;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
TVOS_DEPLOYMENT_TARGET = 9.0;
VALIDATE_PRODUCT = YES; VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic"; VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = ""; VERSION_INFO_PREFIX = "";
@@ -2068,6 +2108,7 @@
ALWAYS_SEARCH_USER_PATHS = YES; ALWAYS_SEARCH_USER_PATHS = YES;
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1; DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (

26
kraken/Info.plist Normal file
View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.krakenengine.kraken</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>

View File

@@ -105,7 +105,7 @@ void KRCamera::renderFrame(float deltaTime, GLint renderBufferWidth, GLint rende
} }
m_last_frame_start = current_time; m_last_frame_start = current_time;
GLint defaultFBO; GLint defaultFBO = -1;
GLDEBUG(glGetIntegerv(GL_FRAMEBUFFER_BINDING, &defaultFBO)); GLDEBUG(glGetIntegerv(GL_FRAMEBUFFER_BINDING, &defaultFBO));
createBuffers(renderBufferWidth, renderBufferHeight); createBuffers(renderBufferWidth, renderBufferHeight);

View File

@@ -18,6 +18,19 @@ int KRContext::KRENGINE_MAX_TEXTURE_DIM;
int KRContext::KRENGINE_MIN_TEXTURE_DIM; int KRContext::KRENGINE_MIN_TEXTURE_DIM;
int KRContext::KRENGINE_PRESTREAM_DISTANCE; int KRContext::KRENGINE_PRESTREAM_DISTANCE;
#if TARGET_OS_IPHONE
#elif TARGET_OS_MAC
#else
#error Unsupported Platform
#endif
const char *KRContext::extension_names[KRENGINE_NUM_EXTENSIONS] = { const char *KRContext::extension_names[KRENGINE_NUM_EXTENSIONS] = {
"GL_EXT_texture_storage" "GL_EXT_texture_storage"
}; };
@@ -48,7 +61,7 @@ KRContext::KRContext() : m_streamer(*this)
m_pUnknownManager = new KRUnknownManager(*this); m_pUnknownManager = new KRUnknownManager(*this);
m_streamingEnabled = true; m_streamingEnabled = true;
createDeviceContexts();
} }
KRContext::~KRContext() { KRContext::~KRContext() {
@@ -103,6 +116,8 @@ KRContext::~KRContext() {
delete m_pBundleManager; delete m_pBundleManager;
m_pBundleManager = NULL; m_pBundleManager = NULL;
} }
destroyDeviceContexts();
} }
void KRContext::SetLogCallback(log_callback *log_callback, void *user_data) void KRContext::SetLogCallback(log_callback *log_callback, void *user_data)

View File

@@ -87,6 +87,13 @@ public:
void doStreaming(); void doStreaming();
void receivedMemoryWarning(); void receivedMemoryWarning();
static void activateStreamerContext();
static void activateRenderContext();
#if TARGET_OS_MAC
static void attachToView(void *view);
#endif
private: private:
KRBundleManager *m_pBundleManager; KRBundleManager *m_pBundleManager;
@@ -117,6 +124,9 @@ private:
static void *s_log_callback_user_data; static void *s_log_callback_user_data;
KRStreamer m_streamer; KRStreamer m_streamer;
static void createDeviceContexts();
void destroyDeviceContexts();
}; };
#endif #endif

40
kraken/KRContext_ios.mm Normal file
View File

@@ -0,0 +1,40 @@
//
// KRContext-ios.mm
// Kraken
//
// Created by Kearwood Gilbert on 11/1/2013.
// Copyright (c) 2013 Kearwood Software. All rights reserved.
//
#include "KREngine-common.h"
#include "KRContext.h"
EAGLContext *gStreamerContext = nil;
EAGLContext *gRenderContext = nil;
void KRContext::destroyDeviceContexts()
{
[gStreamerContext release];
[gRenderContext release];
}
void KRContext::createDeviceContexts()
{
gRenderContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
gTextureStreamerContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2 sharegroup: gStreamerContext.sharegroup];
// FIXME: need to add code check for iOS 7 and also this appears to cause crashing
//gTextureStreamerContext.multiThreaded = TRUE;
}
void KRContext::activateStreamerContext()
{
[EAGLContext setCurrentContext: gStreamerContext];
}
void KRContext::activateRenderContext()
{
[EAGLContext setCurrentContext: gRenderContext];
}

82
kraken/KRContext_osx.mm Normal file
View File

@@ -0,0 +1,82 @@
//
// KRContext-osx.mm
// Kraken
//
// Created by Kearwood Gilbert on 11/1/2013.
// Copyright (c) 2013 Kearwood Software. All rights reserved.
//
#include "KREngine-common.h"
#include "KRContext.h"
NSOpenGLContext *gStreamerContext = nil;
NSOpenGLContext *gRenderContext = nil;
void KRContext::destroyDeviceContexts()
{
[gStreamerContext release];
[gRenderContext release];
}
void KRContext::createDeviceContexts()
{
if(gRenderContext == nil) {
/*
NSOpenGLPixelFormatAttribute attribs[] =
{
NSOpenGLPFADoubleBuffer,
NSOpenGLPFADepthSize, 32,
NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core,
0
};
*/
NSOpenGLPixelFormatAttribute attribs[] = {
NSOpenGLPFADoubleBuffer,
NSOpenGLPFAAccelerated,
NSOpenGLPFAColorSize, 24,
NSOpenGLPFAAlphaSize, 8,
NSOpenGLPFADepthSize, 24,
NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core,
0
};
NSOpenGLPixelFormat *pixelFormat = [[[NSOpenGLPixelFormat alloc] initWithAttributes:attribs] autorelease];
gRenderContext = [[NSOpenGLContext alloc] initWithFormat: pixelFormat shareContext: nil ];
gStreamerContext = [[NSOpenGLContext alloc] initWithFormat: pixelFormat shareContext: gRenderContext ];
// set synch to VBL to eliminate tearing
GLint vblSynch = 1;
[gRenderContext setValues:&vblSynch forParameter:NSOpenGLCPSwapInterval];
/*
CGLEnable([gRenderContext CGLContextObj], kCGLCESurfaceBackingSize);
const GLint dim[2] = {1920, 1080};
[gRenderContext setValues: &dim[0] forParameter: NSOpenGLCPSurfaceBackingSize];
[gRenderContext update];
*/
}
}
void KRContext::activateStreamerContext()
{
createDeviceContexts();
[gStreamerContext makeCurrentContext];
}
void KRContext::activateRenderContext()
{
createDeviceContexts();
[gRenderContext update];
[gRenderContext makeCurrentContext];
}
void KRContext::attachToView(void *view)
{
createDeviceContexts();
NSView *v = (NSView *)view;
[gRenderContext setView: v];
[gRenderContext update];
}

View File

@@ -107,6 +107,16 @@ using std::hash;
#define GL_ANY_SAMPLES_PASSED_EXT GL_ANY_SAMPLES_PASSED #define GL_ANY_SAMPLES_PASSED_EXT GL_ANY_SAMPLES_PASSED
#define GL_QUERY_RESULT_EXT GL_QUERY_RESULT #define GL_QUERY_RESULT_EXT GL_QUERY_RESULT
#define GL_OES_mapbuffer 1
#define glMapBufferOES glMapBuffer
#define glUnmapBufferOES glUnmapBuffer
#define GL_WRITE_ONLY_OES GL_WRITE_ONLY
#define GL_OES_vertex_array_object 1
#define glGenVertexArraysOES glGenVertexArrays
#define glBindVertexArrayOES glBindVertexArray
#define glDeleteVertexArraysOES glDeleteVertexArrays
#endif #endif
#include <Accelerate/Accelerate.h> #include <Accelerate/Accelerate.h>

View File

@@ -558,7 +558,7 @@ bool KRShader::bind(KRCamera &camera, const KRViewport &viewport, const KRMat4 &
setUniform(KRENGINE_UNIFORM_VOLUMETRIC_ENVIRONMENT_FRAME, 2); setUniform(KRENGINE_UNIFORM_VOLUMETRIC_ENVIRONMENT_FRAME, 2);
#if DEBUG #if DEBUG
if(shander_changed) { if(shander_changed) { // FINDME!! KIP!! HACK!!
GLint logLength; GLint logLength;
GLint validate_status = GL_FALSE; GLint validate_status = GL_FALSE;

View File

@@ -145,7 +145,7 @@ KRShader *KRShaderManager::getShader(const std::string &shader_name, KRCamera *p
#if TARGET_OS_IPHONE #if TARGET_OS_IPHONE
#else #else
stream << "\n#version 120"; stream << "\n#version 150";
stream << "\n#define lowp"; stream << "\n#define lowp";
stream << "\n#define mediump"; stream << "\n#define mediump";
stream << "\n#define highp"; stream << "\n#define highp";

View File

@@ -14,19 +14,6 @@
#include <chrono> #include <chrono>
#if TARGET_OS_IPHONE
EAGLContext *gTextureStreamerContext = nil;
#elif TARGET_OS_MAC
NSOpenGLContext *gTextureStreamerContext = nil;
#else
#error Unsupported Platform
#endif
KRStreamer::KRStreamer(KRContext &context) : m_context(context) KRStreamer::KRStreamer(KRContext &context) : m_context(context)
{ {
m_running = false; m_running = false;
@@ -37,29 +24,7 @@ void KRStreamer::startStreamer()
{ {
if(!m_running) { if(!m_running) {
m_running = true; m_running = true;
KRContext::activateStreamerContext();
#if TARGET_OS_IPHONE
gTextureStreamerContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2 sharegroup: [EAGLContext currentContext].sharegroup];
// FIXME: need to add code check for iOS 7 and also this appears to cause crashing
//gTextureStreamerContext.multiThreaded = TRUE;
#elif TARGET_OS_MAC
NSOpenGLPixelFormatAttribute pixelFormatAttributes[] =
{
// NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersionLegacy,
0
};
NSOpenGLPixelFormat *pixelFormat = [[[NSOpenGLPixelFormat alloc] initWithAttributes:pixelFormatAttributes] autorelease];
gTextureStreamerContext = [[NSOpenGLContext alloc] initWithFormat: pixelFormat shareContext: [NSOpenGLContext currentContext] ];
#else
#error Unsupported Platform
#endif
m_thread = std::thread(&KRStreamer::run, this); m_thread = std::thread(&KRStreamer::run, this);
} }
@@ -72,8 +37,6 @@ KRStreamer::~KRStreamer()
m_thread.join(); m_thread.join();
m_running = false; m_running = false;
} }
[gTextureStreamerContext release];
} }
void KRStreamer::run() void KRStreamer::run()
@@ -82,13 +45,7 @@ void KRStreamer::run()
std::chrono::microseconds sleep_duration( 15000 ); std::chrono::microseconds sleep_duration( 15000 );
#if TARGET_OS_IPHONE KRContext::activateStreamerContext();
[EAGLContext setCurrentContext: gTextureStreamerContext];
#elif TARGET_OS_MAC
[gTextureStreamerContext makeCurrentContext];
#else
#error Unsupported Platform
#endif
while(!m_stop) while(!m_stop)
{ {

19
kraken/kraken.h Normal file
View File

@@ -0,0 +1,19 @@
//
// kraken.h
// kraken
//
// Created by Kearwood Gilbert on 2015-11-06.
// Copyright © 2015 Kearwood Software. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for kraken.
FOUNDATION_EXPORT double krakenVersionNumber;
//! Project version string for kraken.
FOUNDATION_EXPORT const unsigned char krakenVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <kraken/PublicHeader.h>

View File

@@ -23,7 +23,7 @@
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1</string> <string>1</string>
<key>NSHumanReadableCopyright</key> <key>NSHumanReadableCopyright</key>
<string>Copyright © 2014 Kearwood Software. All rights reserved.</string> <string>Copyright © 2015 Kearwood Software. All rights reserved.</string>
<key>NSPrincipalClass</key> <key>NSPrincipalClass</key>
<string></string> <string></string>
</dict> </dict>

16
kraken_osx/KrakenView.h Normal file
View File

@@ -0,0 +1,16 @@
//
// KrakenView.h
// Kraken
//
// Created by Kearwood Gilbert on 2015-08-07.
// Copyright © 2015 Kearwood Software. All rights reserved.
//
#import <Cocoa/Cocoa.h>
class KRCamera;
@interface KrakenView : NSView
@property (nonatomic, assign) KRCamera *camera;
- (void)drawFrameWithDeltaTime: (float)deltaTime;
@end

186
kraken_osx/KrakenView.mm Normal file
View File

@@ -0,0 +1,186 @@
//
// KrakenView.m
// Kraken
//
// Created by Kearwood Gilbert on 2015-08-07.
// Copyright © 2015 Kearwood Software. All rights reserved.
//
#import "KrakenView.h"
#include "KREngine-common.h"
#include "KREngine.h"
#import <Cocoa/Cocoa.h>
#import <QuartzCore/QuartzCore.h>
@interface KrakenView() {
CVDisplayLinkRef displayLink;
};
- (void)getFrameForTime:(const CVTimeStamp *)outputTime;
- (void)drawFrameWithDeltaTime: (float)deltaTime;
@end
@implementation KrakenView
- (void)dealloc
{
CVDisplayLinkRelease(displayLink);
[super dealloc];
}
- (void)drawFrameWithDeltaTime: (float)deltaTime
{
if(_camera) {
KRContext::activateRenderContext();
NSOpenGLContext *currentContext = [NSOpenGLContext currentContext];
// must lock GL context because display link is threaded
CGLLockContext((CGLContextObj)[currentContext CGLContextObj]);
GLint hasDrawable = 0;
[currentContext getValues: &hasDrawable forParameter:NSOpenGLCPHasDrawable];
if(!hasDrawable) {
KRContext::attachToView(self);
const GLint dim[2] = {1920, 1080};
[currentContext setValues: &dim[0] forParameter: NSOpenGLCPSurfaceBackingSize];
[currentContext update];
}
GLint backingDim[2] = {0, 0};
[currentContext getValues: &backingDim[0] forParameter:NSOpenGLCPSurfaceBackingSize];
GLint rendererID = 0;
[currentContext getValues: &rendererID forParameter:NSOpenGLCPCurrentRendererID];
GLint renderBufferWidth = 0, renderBufferHeight = 0;
// GLDEBUG(glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &renderBufferWidth));
// GLDEBUG(glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &renderBufferHeight));
renderBufferWidth = 1920;
renderBufferHeight = 1080;
glViewport(0, 0, renderBufferWidth, renderBufferHeight);
GLDEBUG(glClearColor(0.0f, 0.0f, 0.0f, 0.0f));
GLDEBUG(glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT));
[[KREngine sharedInstance] renderScene: &_camera->getScene() WithDeltaTime:deltaTime AndWidth:renderBufferWidth AndHeight:renderBufferHeight];
//[[KREngine sharedInstance] renderScene: &_camera->getScene() WithDeltaTime:deltaTime];
[currentContext flushBuffer];
CGLUnlockContext((CGLContextObj)[currentContext CGLContextObj]);
}
}
- (void)viewDidMoveToSuperview
{
// KRContext::attachToView(self);
// set up the display link
CVDisplayLinkCreateWithActiveCGDisplays(&displayLink);
CVDisplayLinkSetOutputCallback(displayLink, MyDisplayLinkCallback, self);
/*
CGLContextObj cglContext = (CGLContextObj)[context CGLContextObj];
CGLPixelFormatObj cglPixelFormat = (CGLPixelFormatObj)[[context.pixelFormat] CGLPixelFormatObj];
CVDisplayLinkSetCurrentCGDisplayFromOpenGLContext(displayLink, cglContext, cglPixelFormat);
*/
// ----====---- activate the display link ----====----
CVDisplayLinkStart(displayLink);
}
static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeStamp *now,
const CVTimeStamp *outputTime, CVOptionFlags flagsIn,
CVOptionFlags *flagsOut, void *displayLinkContext)
{
// go back to Obj-C for easy access to instance variables
[(KrakenView *)displayLinkContext getFrameForTime:outputTime];
return kCVReturnSuccess;
}
- (void)getFrameForTime:(const CVTimeStamp *)outputTime
{
// deltaTime is unused in this bare bones demo, but here's how to calculate it using display link info
float deltaTime = 1.0 / (outputTime->rateScalar * (double)outputTime->videoTimeScale / (double)outputTime->videoRefreshPeriod);
[self drawFrameWithDeltaTime: deltaTime];
}
/*
- (id)initWithCoder:(NSCoder *)aDecoder
{
self = [super initWithCoder:aDecoder];
if (self == nil)
{
NSLog(@"Unable to create a windowed OpenGL context.");
exit(0);
}
[self commonInit];
return self;
}
- (id)initWithFrame:(NSRect)frameRect
{
// context setup
NSOpenGLPixelFormat *windowedPixelFormat;
NSOpenGLPixelFormatAttribute attribs[] = {
NSOpenGLPFAWindow,
NSOpenGLPFAColorSize, 32,
NSOpenGLPFADepthSize, 24,
NSOpenGLPFAAccelerated,
NSOpenGLPFADoubleBuffer,
NSOpenGLPFASingleRenderer,
0 };
windowedPixelFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:attribs];
if (windowedPixelFormat == nil)
{
NSLog(@"Unable to create windowed pixel format.");
exit(0);
}
self = [super initWithFrame:frameRect pixelFormat:windowedPixelFormat];
if (self == nil)
{
NSLog(@"Unable to create a windowed OpenGL context.");
exit(0);
}
[windowedPixelFormat release];
[self commonInit];
return self;
}
- (void)reshape
{
NSSize viewBounds = [self bounds].size;
viewWidth = viewBounds.width;
viewHeight = viewBounds.height;
NSOpenGLContext *currentContext = [self openGLContext];
[currentContext makeCurrentContext];
// remember to lock the context before we touch it since display link is threaded
CGLLockContext((CGLContextObj)[currentContext CGLContextObj]);
// let the context know we've changed size
[[self openGLContext] update];
CGLUnlockContext((CGLContextObj)[currentContext CGLContextObj]);
}
*/
@end

View File

@@ -30,6 +30,5 @@
// //
void main() { void main() {
//gl_FragColor = vec4(0.00, 0.00, 0.00, 0.00); gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
gl_FragColor = vec4(0.00, 0.00, 0.00, 0.00);
} }

View File

@@ -27,6 +27,8 @@
//#extension GL_EXT_shadow_samplers : require //#extension GL_EXT_shadow_samplers : require
out vec4 colorOut;
#if ENABLE_RIM_COLOR == 1 #if ENABLE_RIM_COLOR == 1
uniform lowp vec3 rim_color; uniform lowp vec3 rim_color;
uniform mediump float rim_power; uniform mediump float rim_power;
@@ -61,20 +63,20 @@
#if HAS_NORMAL_MAP == 1 #if HAS_NORMAL_MAP == 1
uniform sampler2D normalTexture; uniform sampler2D normalTexture;
#else #else
varying mediump vec3 normal; in mediump vec3 normal;
#endif #endif
#if HAS_DIFFUSE_MAP == 1 || HAS_NORMAL_MAP == 1 || HAS_SPEC_MAP == 1 || HAS_REFLECTION_MAP == 1 #if HAS_DIFFUSE_MAP == 1 || HAS_NORMAL_MAP == 1 || HAS_SPEC_MAP == 1 || HAS_REFLECTION_MAP == 1
varying highp vec2 texCoord; in highp vec2 texCoord;
#endif #endif
#if HAS_NORMAL_MAP_OFFSET == 1 || HAS_NORMAL_MAP_SCALE == 1 #if HAS_NORMAL_MAP_OFFSET == 1 || HAS_NORMAL_MAP_SCALE == 1
varying highp vec2 normal_uv; in highp vec2 normal_uv;
#else #else
#define normal_uv texCoord #define normal_uv texCoord
#endif #endif
#else #else
#if HAS_DIFFUSE_MAP == 1 #if HAS_DIFFUSE_MAP == 1
varying highp vec2 texCoord; in highp vec2 texCoord;
#endif #endif
#endif #endif
@@ -86,7 +88,7 @@
#if GBUFFER_PASS == 1 #if GBUFFER_PASS == 1
#if HAS_NORMAL_MAP == 1 #if HAS_NORMAL_MAP == 1
varying highp mat3 tangent_to_view_matrix; in highp mat3 tangent_to_view_matrix;
#else #else
uniform highp mat4 model_view_inverse_transpose_matrix; uniform highp mat4 model_view_inverse_transpose_matrix;
#endif #endif
@@ -94,7 +96,7 @@
#if HAS_DIFFUSE_MAP == 1 && ALPHA_TEST == 1 #if HAS_DIFFUSE_MAP == 1 && ALPHA_TEST == 1
uniform sampler2D diffuseTexture; uniform sampler2D diffuseTexture;
#if HAS_DIFFUSE_MAP_OFFSET == 1 || HAS_DIFFUSE_MAP_SCALE == 1 #if HAS_DIFFUSE_MAP_OFFSET == 1 || HAS_DIFFUSE_MAP_SCALE == 1
varying highp vec2 diffuse_uv; in highp vec2 diffuse_uv;
#else #else
#define diffuse_uv texCoord #define diffuse_uv texCoord
#endif #endif
@@ -124,17 +126,17 @@
uniform lowp vec3 material_reflection; uniform lowp vec3 material_reflection;
uniform samplerCube reflectionCubeTexture; uniform samplerCube reflectionCubeTexture;
#if HAS_NORMAL_MAP == 1 #if HAS_NORMAL_MAP == 1
varying highp mat3 tangent_to_world_matrix; in highp mat3 tangent_to_world_matrix;
#define NEED_EYEVEC #define NEED_EYEVEC
uniform highp mat4 model_matrix; uniform highp mat4 model_matrix;
#else #else
varying mediump vec3 reflectionVec; in mediump vec3 reflectionVec;
#endif #endif
#endif #endif
#ifdef NEED_EYEVEC #ifdef NEED_EYEVEC
varying mediump vec3 eyeVec; in mediump vec3 eyeVec;
#endif #endif
@@ -144,46 +146,46 @@
#else #else
uniform sampler2D shadowTexture1; uniform sampler2D shadowTexture1;
#endif #endif
varying highp vec4 shadowMapCoord1; in highp vec4 shadowMapCoord1;
#endif #endif
#if HAS_LIGHT_MAP == 1 #if HAS_LIGHT_MAP == 1
uniform sampler2D lightmapTexture; uniform sampler2D lightmapTexture;
varying mediump vec2 lightmap_uv; in mediump vec2 lightmap_uv;
#endif #endif
#if SHADOW_QUALITY >= 2 #if SHADOW_QUALITY >= 2
uniform sampler2D shadowTexture2; uniform sampler2D shadowTexture2;
varying highp vec4 shadowMapCoord2; in highp vec4 shadowMapCoord2;
#endif #endif
#if SHADOW_QUALITY >= 3 #if SHADOW_QUALITY >= 3
uniform sampler2D shadowTexture3; uniform sampler2D shadowTexture3;
varying highp vec4 shadowMapCoord3; in highp vec4 shadowMapCoord3;
#endif #endif
#if ENABLE_PER_PIXEL == 1 #if ENABLE_PER_PIXEL == 1
varying mediump vec3 lightVec; in mediump vec3 lightVec;
varying mediump vec3 halfVec; in mediump vec3 halfVec;
#else #else
varying mediump float lamberFactor; in mediump float lamberFactor;
varying mediump float specularFactor; in mediump float specularFactor;
#endif #endif
#if (HAS_SPEC_MAP_OFFSET == 1|| HAS_SPEC_MAP_SCALE == 1) && ENABLE_PER_PIXEL == 1 #if (HAS_SPEC_MAP_OFFSET == 1|| HAS_SPEC_MAP_SCALE == 1) && ENABLE_PER_PIXEL == 1
varying mediump vec2 spec_uv; in mediump vec2 spec_uv;
#else #else
#define spec_uv texCoord #define spec_uv texCoord
#endif #endif
#if (HAS_REFLECTION_MAP_OFFSET == 1|| HAS_REFLECTION_MAP_SCALE == 1) && ENABLE_PER_PIXEL == 1 #if (HAS_REFLECTION_MAP_OFFSET == 1|| HAS_REFLECTION_MAP_SCALE == 1) && ENABLE_PER_PIXEL == 1
varying mediump vec2 reflection_uv; in mediump vec2 reflection_uv;
#else #else
#define reflection_uv texCoord #define reflection_uv texCoord
#endif #endif
#if HAS_DIFFUSE_MAP_OFFSET == 1 || HAS_DIFFUSE_MAP_SCALE == 1 #if HAS_DIFFUSE_MAP_OFFSET == 1 || HAS_DIFFUSE_MAP_SCALE == 1
varying highp vec2 diffuse_uv; in highp vec2 diffuse_uv;
#else #else
#define diffuse_uv texCoord #define diffuse_uv texCoord
#endif #endif
@@ -197,12 +199,12 @@
void main() void main()
{ {
#if ALPHA_TEST == 1 && HAS_DIFFUSE_MAP == 1 #if ALPHA_TEST == 1 && HAS_DIFFUSE_MAP == 1
mediump vec4 diffuseMaterial = texture2D(diffuseTexture, diffuse_uv); mediump vec4 diffuseMaterial = texture(diffuseTexture, diffuse_uv);
if(diffuseMaterial.a < 0.5) discard; if(diffuseMaterial.a < 0.5) discard;
#endif #endif
#if GBUFFER_PASS == 1 && ALPHA_TEST == 1 #if GBUFFER_PASS == 1 && ALPHA_TEST == 1
if(texture2D(diffuseTexture, diffuse_uv).a < 0.5) discard; if(texture(diffuseTexture, diffuse_uv).a < 0.5) discard;
#endif #endif
#if GBUFFER_PASS == 2 || GBUFFER_PASS == 3 #if GBUFFER_PASS == 2 || GBUFFER_PASS == 3
@@ -210,7 +212,7 @@ void main()
#endif #endif
#if GBUFFER_PASS == 3 #if GBUFFER_PASS == 3
lowp vec4 gbuffer_sample = texture2D(gbuffer_frame, gbuffer_uv); lowp vec4 gbuffer_sample = texture(gbuffer_frame, gbuffer_uv);
mediump vec3 gbuffer_lamber_factor = gbuffer_sample.rgb * 5.0; mediump vec3 gbuffer_lamber_factor = gbuffer_sample.rgb * 5.0;
lowp float gbuffer_specular_factor = gbuffer_sample.a; lowp float gbuffer_specular_factor = gbuffer_sample.a;
#endif #endif
@@ -218,18 +220,18 @@ void main()
#if GBUFFER_PASS == 1 #if GBUFFER_PASS == 1
#if HAS_NORMAL_MAP == 1 #if HAS_NORMAL_MAP == 1
// lookup normal from normal map, move from [0,1] to [-1, 1] range, normalize // lookup normal from normal map, move from [0,1] to [-1, 1] range, normalize
mediump vec3 normal = normalize(2.0 * texture2D(normalTexture,normal_uv).rgb - 1.0); mediump vec3 normal = normalize(2.0 * texture(normalTexture,normal_uv).rgb - 1.0);
mediump vec3 view_space_normal = tangent_to_view_matrix * normal; mediump vec3 view_space_normal = tangent_to_view_matrix * normal;
#else #else
mediump vec3 view_space_normal = vec3(model_view_inverse_transpose_matrix * vec4(normal, 1.0)); mediump vec3 view_space_normal = vec3(model_view_inverse_transpose_matrix * vec4(normal, 1.0));
#endif #endif
gl_FragColor = vec4(view_space_normal * 0.5 + 0.5, material_shininess / 100.0); colorOut = vec4(view_space_normal * 0.5 + 0.5, material_shininess / 100.0);
#else #else
#if HAS_DIFFUSE_MAP == 1 #if HAS_DIFFUSE_MAP == 1
#if ALPHA_TEST == 1 #if ALPHA_TEST == 1
diffuseMaterial.a = 1.0; diffuseMaterial.a = 1.0;
#else #else
mediump vec4 diffuseMaterial = texture2D(diffuseTexture, diffuse_uv); mediump vec4 diffuseMaterial = texture(diffuseTexture, diffuse_uv);
#endif #endif
#else #else
@@ -239,7 +241,7 @@ void main()
#if ENABLE_PER_PIXEL == 1 #if ENABLE_PER_PIXEL == 1
#if HAS_NORMAL_MAP == 1 #if HAS_NORMAL_MAP == 1
// lookup normal from normal map, move from [0,1] to [-1, 1] range, normalize // lookup normal from normal map, move from [0,1] to [-1, 1] range, normalize
mediump vec3 normal = normalize(2.0 * texture2D(normalTexture,normal_uv).rgb - 1.0); mediump vec3 normal = normalize(2.0 * texture(normalTexture,normal_uv).rgb - 1.0);
#endif #endif
#if GBUFFER_PASS == 3 #if GBUFFER_PASS == 3
@@ -277,7 +279,7 @@ void main()
#if DEBUG_PSSM == 1 #if DEBUG_PSSM == 1
diffuseMaterial = diffuseMaterial * vec4(0.75, 0.75, 0.5, 1.0) + vec4(0.0, 0.0, 0.5, 0.0); diffuseMaterial = diffuseMaterial * vec4(0.75, 0.75, 0.5, 1.0) + vec4(0.0, 0.0, 0.5, 0.0);
#endif #endif
shadowMapDepth = texture2D(shadowTexture1, shadowMapPos).z; shadowMapDepth = texture(shadowTexture1, shadowMapPos).z;
vertexShadowDepth = (shadowMapCoord1 / shadowMapCoord1.w).z; vertexShadowDepth = (shadowMapCoord1 / shadowMapCoord1.w).z;
} }
#endif #endif
@@ -292,14 +294,14 @@ void main()
diffuseMaterial = diffuseMaterial * vec4(0.75, 0.75, 0.5, 1.0) + vec4(0.0, 0.0, 0.5 * diffuseMaterial.a, 0.0); diffuseMaterial = diffuseMaterial * vec4(0.75, 0.75, 0.5, 1.0) + vec4(0.0, 0.0, 0.5 * diffuseMaterial.a, 0.0);
#endif #endif
highp vec2 shadowMapPos = (shadowMapCoord1 / shadowMapCoord1.w).st; highp vec2 shadowMapPos = (shadowMapCoord1 / shadowMapCoord1.w).st;
shadowMapDepth = texture2D(shadowTexture1, shadowMapPos).z; shadowMapDepth = texture(shadowTexture1, shadowMapPos).z;
vertexShadowDepth = (shadowMapCoord1 / shadowMapCoord1.w).z; vertexShadowDepth = (shadowMapCoord1 / shadowMapCoord1.w).z;
} else if(shadowMapCoord2.s >= -1.0 && shadowMapCoord2.s <= 1.0 && shadowMapCoord2.t >= -1.0 && shadowMapCoord2.t <= 1.0 && shadowMapCoord2.z >= 0.0 && shadowMapCoord2.z <= 1.0) { } else if(shadowMapCoord2.s >= -1.0 && shadowMapCoord2.s <= 1.0 && shadowMapCoord2.t >= -1.0 && shadowMapCoord2.t <= 1.0 && shadowMapCoord2.z >= 0.0 && shadowMapCoord2.z <= 1.0) {
#if DEBUG_PSSM == 1 #if DEBUG_PSSM == 1
diffuseMaterial = diffuseMaterial * vec4(0.75, 0.50, 0.75, 1.0) + vec4(0.0, 0.5 * diffuseMaterial.a, 0.0, 0.0); diffuseMaterial = diffuseMaterial * vec4(0.75, 0.50, 0.75, 1.0) + vec4(0.0, 0.5 * diffuseMaterial.a, 0.0, 0.0);
#endif #endif
highp vec2 shadowMapPos = (shadowMapCoord2 / shadowMapCoord2.w).st; highp vec2 shadowMapPos = (shadowMapCoord2 / shadowMapCoord2.w).st;
shadowMapDepth = texture2D(shadowTexture2, shadowMapPos).z; shadowMapDepth = texture(shadowTexture2, shadowMapPos).z;
vertexShadowDepth = (shadowMapCoord2 / shadowMapCoord2.w).z; vertexShadowDepth = (shadowMapCoord2 / shadowMapCoord2.w).z;
} }
#if SHADOW_QUALITY >= 3 #if SHADOW_QUALITY >= 3
@@ -308,7 +310,7 @@ void main()
diffuseMaterial = diffuseMaterial * vec4(0.50, 0.75, 0.75, 1.0) + vec4(0.5 * diffuseMaterial.a, 0.0, 0.0, 0.0); diffuseMaterial = diffuseMaterial * vec4(0.50, 0.75, 0.75, 1.0) + vec4(0.5 * diffuseMaterial.a, 0.0, 0.0, 0.0);
#endif #endif
highp vec2 shadowMapPos = (shadowMapCoord3 / shadowMapCoord3.w).st; highp vec2 shadowMapPos = (shadowMapCoord3 / shadowMapCoord3.w).st;
shadowMapDepth = texture2D(shadowTexture3, shadowMapPos).z; shadowMapDepth = texture(shadowTexture3, shadowMapPos).z;
vertexShadowDepth = (shadowMapCoord3 / shadowMapCoord3.w).z; vertexShadowDepth = (shadowMapCoord3 / shadowMapCoord3.w).z;
} }
@@ -330,38 +332,38 @@ void main()
#if ENABLE_AMBIENT == 1 #if ENABLE_AMBIENT == 1
// -------------------- Add ambient light and alpha component -------------------- // -------------------- Add ambient light and alpha component --------------------
gl_FragColor = vec4(vec3(diffuseMaterial) * material_ambient, 0.0); colorOut = vec4(vec3(diffuseMaterial) * material_ambient, 0.0);
#else #else
gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); colorOut = vec4(0.0, 0.0, 0.0, 0.0);
#endif #endif
#if ENABLE_DIFFUSE == 1 #if ENABLE_DIFFUSE == 1
// -------------------- Add diffuse light -------------------- // -------------------- Add diffuse light --------------------
gl_FragColor += diffuseMaterial * vec4(material_diffuse * lamberFactor, 1.0); colorOut += diffuseMaterial * vec4(material_diffuse * lamberFactor, 1.0);
#endif #endif
// -------------------- Apply material_alpha -------------------- // -------------------- Apply material_alpha --------------------
#if ALPHA_BLEND == 1 #if ALPHA_BLEND == 1
gl_FragColor.a = diffuseMaterial.a; colorOut.a = diffuseMaterial.a;
gl_FragColor *= material_alpha; colorOut *= material_alpha;
#endif #endif
// -------------------- Add specular light -------------------- // -------------------- Add specular light --------------------
// Additive, not masked against diffuse alpha // Additive, not masked against diffuse alpha
#if ENABLE_SPECULAR == 1 #if ENABLE_SPECULAR == 1
#if HAS_SPEC_MAP == 1 && ENABLE_PER_PIXEL == 1 #if HAS_SPEC_MAP == 1 && ENABLE_PER_PIXEL == 1
gl_FragColor.rgb += material_specular * vec3(texture2D(specularTexture, spec_uv)) * specularFactor; colorOut.rgb += material_specular * vec3(texture(specularTexture, spec_uv)) * specularFactor;
#else #else
gl_FragColor.rgb += material_specular * specularFactor; colorOut.rgb += material_specular * specularFactor;
#endif #endif
#endif #endif
// -------------------- Multiply light map -------------------- // -------------------- Multiply light map --------------------
#if HAS_LIGHT_MAP == 1 #if HAS_LIGHT_MAP == 1
mediump vec3 lightMapColor = vec3(texture2D(lightmapTexture, lightmap_uv)); mediump vec3 lightMapColor = vec3(texture(lightmapTexture, lightmap_uv));
//gl_FragColor = vec4(gl_FragColor.r * lightMapColor.r, gl_FragColor.g * lightMapColor.g, gl_FragColor.b * lightMapColor.b, gl_FragColor.a); //colorOut = vec4(colorOut.r * lightMapColor.r, colorOut.g * lightMapColor.g, colorOut.b * lightMapColor.b, colorOut.a);
gl_FragColor.rgb *= lightMapColor; colorOut.rgb *= lightMapColor;
#endif #endif
@@ -375,9 +377,9 @@ void main()
mediump vec3 reflectionVec = mat3(model_matrix) * (incidenceVec - 2.0 * dot(world_space_normal, incidenceVec) * world_space_normal); mediump vec3 reflectionVec = mat3(model_matrix) * (incidenceVec - 2.0 * dot(world_space_normal, incidenceVec) * world_space_normal);
#endif #endif
#if HAS_REFLECTION_MAP == 1 #if HAS_REFLECTION_MAP == 1
gl_FragColor += vec4(material_reflection, 0.0) * texture2D(reflectionTexture, reflection_uv) * vec4(textureCube(reflectionCubeTexture, reflectionVec).rgb, 1.0); colorOut += vec4(material_reflection, 0.0) * texture(reflectionTexture, reflection_uv) * vec4(texture(reflectionCubeTexture, reflectionVec).rgb, 1.0);
#else #else
gl_FragColor += vec4(material_reflection, 0.0) * vec4(textureCube(reflectionCubeTexture, reflectionVec).rgb, 1.0); colorOut += vec4(material_reflection, 0.0) * vec4(texture(reflectionCubeTexture, reflectionVec).rgb, 1.0);
#endif #endif
#endif #endif
@@ -402,9 +404,9 @@ void main()
#endif #endif
#if ALPHA_BLEND == 1 #if ALPHA_BLEND == 1
gl_FragColor.rgb = mix(fog_color.rgb * gl_FragColor.a, gl_FragColor.rgb, fog_alpha); colorOut.rgb = mix(fog_color.rgb * colorOut.a, colorOut.rgb, fog_alpha);
#else #else
gl_FragColor.rgb = mix(fog_color.rgb, gl_FragColor.rgb, fog_alpha); colorOut.rgb = mix(fog_color.rgb, colorOut.rgb, fog_alpha);
#endif #endif
#endif #endif
@@ -414,10 +416,10 @@ void main()
#if ENABLE_RIM_COLOR == 1 #if ENABLE_RIM_COLOR == 1
lowp float rim = 1.0 - clamp(dot(normalize(eyeVec), normal), 0.0, 1.0); lowp float rim = 1.0 - clamp(dot(normalize(eyeVec), normal), 0.0, 1.0);
gl_FragColor += vec4(rim_color, 1.0) * pow(rim, rim_power); colorOut += vec4(rim_color, 1.0) * pow(rim, rim_power);
#endif #endif
#if BONE_COUNT > 0 #if BONE_COUNT > 0
gl_FragColor.b = 1.0; colorOut.b = 1.0;
#endif #endif
} }

View File

@@ -30,16 +30,16 @@
// //
attribute highp vec3 vertex_position, vertex_normal; in highp vec3 vertex_position, vertex_normal;
#if HAS_NORMAL_MAP == 1 #if HAS_NORMAL_MAP == 1
attribute highp vec3 vertex_tangent; in highp vec3 vertex_tangent;
#endif #endif
attribute mediump vec2 vertex_uv; in mediump vec2 vertex_uv;
uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices
#if BONE_COUNT > 0 #if BONE_COUNT > 0
attribute highp vec4 bone_weights; in highp vec4 bone_weights;
attribute highp vec4 bone_indexes; in highp vec4 bone_indexes;
uniform highp mat4 bone_transforms[BONE_COUNT]; uniform highp mat4 bone_transforms[BONE_COUNT];
#else #else
#define vertex_position_skinned vertex_position #define vertex_position_skinned vertex_position
@@ -51,7 +51,7 @@ uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying t
#if ENABLE_PER_PIXEL == 1 || GBUFFER_PASS == 1 #if ENABLE_PER_PIXEL == 1 || GBUFFER_PASS == 1
#if HAS_DIFFUSE_MAP == 1 || HAS_NORMAL_MAP == 1 || HAS_SPEC_MAP == 1 || HAS_REFLECTION_MAP == 1 #if HAS_DIFFUSE_MAP == 1 || HAS_NORMAL_MAP == 1 || HAS_SPEC_MAP == 1 || HAS_REFLECTION_MAP == 1
varying highp vec2 texCoord; out highp vec2 texCoord;
#endif #endif
#if HAS_NORMAL_MAP == 1 #if HAS_NORMAL_MAP == 1
#if HAS_NORMAL_MAP_SCALE == 1 #if HAS_NORMAL_MAP_SCALE == 1
@@ -63,22 +63,22 @@ uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying t
#endif #endif
#if HAS_NORMAL_MAP_OFFSET == 1 || HAS_NORMAL_MAP_SCALE == 1 #if HAS_NORMAL_MAP_OFFSET == 1 || HAS_NORMAL_MAP_SCALE == 1
varying highp vec2 normal_uv; out highp vec2 normal_uv;
#endif #endif
#else #else
varying mediump vec3 normal; out mediump vec3 normal;
#endif #endif
#else #else
uniform mediump float material_shininess; uniform mediump float material_shininess;
#if HAS_DIFFUSE_MAP == 1 #if HAS_DIFFUSE_MAP == 1
varying highp vec2 texCoord; out highp vec2 texCoord;
#endif #endif
#endif #endif
#if GBUFFER_PASS == 1 #if GBUFFER_PASS == 1
#if HAS_NORMAL_MAP == 1 #if HAS_NORMAL_MAP == 1
uniform highp mat4 model_view_inverse_transpose_matrix; uniform highp mat4 model_view_inverse_transpose_matrix;
varying highp mat3 tangent_to_view_matrix; out highp mat3 tangent_to_view_matrix;
#endif #endif
#else #else
@@ -86,16 +86,16 @@ uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying t
uniform highp vec3 camera_position_model_space; uniform highp vec3 camera_position_model_space;
#if HAS_LIGHT_MAP == 1 #if HAS_LIGHT_MAP == 1
attribute mediump vec2 vertex_lightmap_uv; in mediump vec2 vertex_lightmap_uv;
varying mediump vec2 lightmap_uv; out mediump vec2 lightmap_uv;
#endif #endif
#if ENABLE_PER_PIXEL == 1 #if ENABLE_PER_PIXEL == 1
varying mediump vec3 lightVec; out mediump vec3 lightVec;
varying mediump vec3 halfVec; out mediump vec3 halfVec;
#if HAS_SPEC_MAP_OFFSET == 1 || HAS_SPEC_MAP_SCALE == 1 #if HAS_SPEC_MAP_OFFSET == 1 || HAS_SPEC_MAP_SCALE == 1
varying highp vec2 spec_uv; out highp vec2 spec_uv;
#endif #endif
#if HAS_SPEC_MAP_SCALE == 1 #if HAS_SPEC_MAP_SCALE == 1
@@ -107,7 +107,7 @@ uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying t
#endif #endif
#if HAS_REFLECTION_MAP_OFFSET == 1 || HAS_REFLECTION_MAP_SCALE == 1 #if HAS_REFLECTION_MAP_OFFSET == 1 || HAS_REFLECTION_MAP_SCALE == 1
varying highp vec2 reflection_uv; out highp vec2 reflection_uv;
#endif #endif
#if HAS_REFLECTION_MAP_SCALE == 1 #if HAS_REFLECTION_MAP_SCALE == 1
@@ -120,22 +120,22 @@ uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying t
#if SHADOW_QUALITY >= 1 #if SHADOW_QUALITY >= 1
uniform highp mat4 shadow_mvp1; uniform highp mat4 shadow_mvp1;
varying highp vec4 shadowMapCoord1; out highp vec4 shadowMapCoord1;
#endif #endif
#if SHADOW_QUALITY >= 2 #if SHADOW_QUALITY >= 2
uniform highp mat4 shadow_mvp2; uniform highp mat4 shadow_mvp2;
varying highp vec4 shadowMapCoord2; out highp vec4 shadowMapCoord2;
#endif #endif
#if SHADOW_QUALITY >= 3 #if SHADOW_QUALITY >= 3
uniform highp mat4 shadow_mvp3; uniform highp mat4 shadow_mvp3;
varying highp vec4 shadowMapCoord3; out highp vec4 shadowMapCoord3;
#endif #endif
#else #else
varying mediump float lamberFactor; out mediump float lamberFactor;
varying mediump float specularFactor; out mediump float specularFactor;
#endif #endif
#if ENABLE_RIM_COLOR == 1 #if ENABLE_RIM_COLOR == 1
@@ -146,15 +146,15 @@ uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying t
#if HAS_NORMAL_MAP == 1 #if HAS_NORMAL_MAP == 1
#define NEED_EYEVEC #define NEED_EYEVEC
uniform highp mat4 model_inverse_transpose_matrix; uniform highp mat4 model_inverse_transpose_matrix;
varying highp mat3 tangent_to_world_matrix; out highp mat3 tangent_to_world_matrix;
#else #else
uniform highp mat4 model_matrix; uniform highp mat4 model_matrix;
varying mediump vec3 reflectionVec; out mediump vec3 reflectionVec;
#endif #endif
#endif #endif
#ifdef NEED_EYEVEC #ifdef NEED_EYEVEC
varying mediump vec3 eyeVec; out mediump vec3 eyeVec;
#endif #endif
#if HAS_DIFFUSE_MAP_SCALE == 1 #if HAS_DIFFUSE_MAP_SCALE == 1
@@ -166,7 +166,7 @@ uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying t
#endif #endif
#if HAS_DIFFUSE_MAP_OFFSET == 1 || HAS_DIFFUSE_MAP_SCALE == 1 #if HAS_DIFFUSE_MAP_OFFSET == 1 || HAS_DIFFUSE_MAP_SCALE == 1
varying highp vec2 diffuse_uv; out highp vec2 diffuse_uv;
#endif #endif
#endif #endif

View File

@@ -31,32 +31,33 @@
#define PIXEL_SHIFT_3 0.003 #define PIXEL_SHIFT_3 0.003
#define PIXEL_SHIFT_4 0.004 #define PIXEL_SHIFT_4 0.004
varying mediump vec2 textureCoordinate; in vec2 textureCoordinate;
//precision lowp float;
#if ENABLE_VIDEO_BG == 1 #if ENABLE_VIDEO_BG == 1
uniform lowp sampler2D videoFrame; uniform sampler2D videoFrame;
#endif #endif
#if ENABLE_FADE_COLOR == 1 #if ENABLE_FADE_COLOR == 1
uniform lowp vec4 fade_color; uniform vec4 fade_color;
#endif #endif
uniform lowp sampler2D renderFrame; uniform sampler2D renderFrame;
uniform lowp sampler2D depthFrame; uniform sampler2D depthFrame;
#if VOLUMETRIC_ENVIRONMENT_DOWNSAMPLED == 1 #if VOLUMETRIC_ENVIRONMENT_DOWNSAMPLED == 1
uniform lowp sampler2D volumetricEnvironmentFrame; uniform sampler2D volumetricEnvironmentFrame;
#endif #endif
out vec4 colorOut;
void main() void main()
{ {
lowp vec4 renderColor = texture2D(renderFrame, textureCoordinate); vec4 renderColor = texture(renderFrame, textureCoordinate);
#if DOF_QUALITY > 0 || ENABLE_FLASH == 1 #if DOF_QUALITY > 0 || ENABLE_FLASH == 1
mediump float depth = texture2D(depthFrame, textureCoordinate).r; float depth = texture(depthFrame, textureCoordinate).r;
#endif #endif
mediump vec4 pixelColor = renderColor; vec4 pixelColor = renderColor;
#if DOF_QUALITY == 2 #if DOF_QUALITY == 2
@@ -67,43 +68,43 @@ void main()
// _XXXXX_ // _XXXXX_
// _XXXXX_ // _XXXXX_
// __XXX__ // __XXX__
mediump float cf1 = PIXEL_SHIFT_1; float cf1 = PIXEL_SHIFT_1;
mediump float cf2 = PIXEL_SHIFT_2; float cf2 = PIXEL_SHIFT_2;
mediump float bx1 = textureCoordinate.s + cf1; float bx1 = textureCoordinate.s + cf1;
mediump float bx2 = textureCoordinate.s + cf2; float bx2 = textureCoordinate.s + cf2;
mediump float bxm1 = textureCoordinate.s - cf1; float bxm1 = textureCoordinate.s - cf1;
mediump float bxm2 = textureCoordinate.s - cf2; float bxm2 = textureCoordinate.s - cf2;
mediump float by1 = textureCoordinate.t + cf1; float by1 = textureCoordinate.t + cf1;
mediump float by2 = textureCoordinate.t + cf2; float by2 = textureCoordinate.t + cf2;
mediump float bym1 = textureCoordinate.t - cf1; float bym1 = textureCoordinate.t - cf1;
mediump float bym2 = textureCoordinate.t - cf2; float bym2 = textureCoordinate.t - cf2;
pixelColor += texture2D(renderFrame, vec2(bx1, textureCoordinate.t)); pixelColor += texture(renderFrame, vec2(bx1, textureCoordinate.t));
pixelColor += texture2D(renderFrame, vec2(bxm1, textureCoordinate.t)); pixelColor += texture(renderFrame, vec2(bxm1, textureCoordinate.t));
pixelColor += texture2D(renderFrame, vec2(bx2, textureCoordinate.t)); pixelColor += texture(renderFrame, vec2(bx2, textureCoordinate.t));
pixelColor += texture2D(renderFrame, vec2(bxm2, textureCoordinate.t)); pixelColor += texture(renderFrame, vec2(bxm2, textureCoordinate.t));
pixelColor += texture2D(renderFrame, vec2(textureCoordinate.s, by1)); pixelColor += texture(renderFrame, vec2(textureCoordinate.s, by1));
pixelColor += texture2D(renderFrame, vec2(bx1, by1)); pixelColor += texture(renderFrame, vec2(bx1, by1));
pixelColor += texture2D(renderFrame, vec2(bxm1, by1)); pixelColor += texture(renderFrame, vec2(bxm1, by1));
pixelColor += texture2D(renderFrame, vec2(bx2, by1)); pixelColor += texture(renderFrame, vec2(bx2, by1));
pixelColor += texture2D(renderFrame, vec2(bxm2, by1)); pixelColor += texture(renderFrame, vec2(bxm2, by1));
pixelColor += texture2D(renderFrame, vec2(textureCoordinate.s, by2)); pixelColor += texture(renderFrame, vec2(textureCoordinate.s, by2));
pixelColor += texture2D(renderFrame, vec2(bx1, by2)); pixelColor += texture(renderFrame, vec2(bx1, by2));
pixelColor += texture2D(renderFrame, vec2(bxm1, by2)); pixelColor += texture(renderFrame, vec2(bxm1, by2));
pixelColor += texture2D(renderFrame, vec2(textureCoordinate.s,bym1)); pixelColor += texture(renderFrame, vec2(textureCoordinate.s,bym1));
pixelColor += texture2D(renderFrame, vec2(bx1,bym1)); pixelColor += texture(renderFrame, vec2(bx1,bym1));
pixelColor += texture2D(renderFrame, vec2(bxm1,bym1)); pixelColor += texture(renderFrame, vec2(bxm1,bym1));
pixelColor += texture2D(renderFrame, vec2(bx2,bym1)); pixelColor += texture(renderFrame, vec2(bx2,bym1));
pixelColor += texture2D(renderFrame, vec2(bxm2,bym1)); pixelColor += texture(renderFrame, vec2(bxm2,bym1));
pixelColor += texture2D(renderFrame, vec2(bx1, bym2)); pixelColor += texture(renderFrame, vec2(bx1, bym2));
pixelColor += texture2D(renderFrame, vec2(bx1, bym2)); pixelColor += texture(renderFrame, vec2(bx1, bym2));
pixelColor += texture2D(renderFrame, vec2(bxm1, bym2)); pixelColor += texture(renderFrame, vec2(bxm1, bym2));
pixelColor /= 21.0; pixelColor /= 21.0;
#endif #endif
@@ -117,26 +118,26 @@ void main()
// _XXXXX_ // _XXXXX_
// __XXX__ // __XXX__
// ___X___ // ___X___
pixelColor += texture2D(renderFrame, textureCoordinate + vec2(0, -PIXEL_SHIFT_2)); pixelColor += texture(renderFrame, textureCoordinate + vec2(0, -PIXEL_SHIFT_2));
pixelColor += texture2D(renderFrame, textureCoordinate + vec2(-PIXEL_SHIFT_1, -PIXEL_SHIFT_1)); pixelColor += texture(renderFrame, textureCoordinate + vec2(-PIXEL_SHIFT_1, -PIXEL_SHIFT_1));
pixelColor += texture2D(renderFrame, textureCoordinate + vec2(0, -PIXEL_SHIFT_1)); pixelColor += texture(renderFrame, textureCoordinate + vec2(0, -PIXEL_SHIFT_1));
pixelColor += texture2D(renderFrame, textureCoordinate + vec2(+PIXEL_SHIFT_1, -PIXEL_SHIFT_1)); pixelColor += texture(renderFrame, textureCoordinate + vec2(+PIXEL_SHIFT_1, -PIXEL_SHIFT_1));
pixelColor += texture2D(renderFrame, textureCoordinate + vec2(-PIXEL_SHIFT_2, 0)); pixelColor += texture(renderFrame, textureCoordinate + vec2(-PIXEL_SHIFT_2, 0));
pixelColor += texture2D(renderFrame, textureCoordinate + vec2(-PIXEL_SHIFT_1, 0)); pixelColor += texture(renderFrame, textureCoordinate + vec2(-PIXEL_SHIFT_1, 0));
pixelColor += texture2D(renderFrame, textureCoordinate + vec2(+PIXEL_SHIFT_1, 0)); pixelColor += texture(renderFrame, textureCoordinate + vec2(+PIXEL_SHIFT_1, 0));
pixelColor += texture2D(renderFrame, textureCoordinate + vec2(+PIXEL_SHIFT_2, 0)); pixelColor += texture(renderFrame, textureCoordinate + vec2(+PIXEL_SHIFT_2, 0));
pixelColor += texture2D(renderFrame, textureCoordinate + vec2(-PIXEL_SHIFT_1, -PIXEL_SHIFT_1)); pixelColor += texture(renderFrame, textureCoordinate + vec2(-PIXEL_SHIFT_1, -PIXEL_SHIFT_1));
pixelColor += texture2D(renderFrame, textureCoordinate + vec2(0, -PIXEL_SHIFT_1)); pixelColor += texture(renderFrame, textureCoordinate + vec2(0, -PIXEL_SHIFT_1));
pixelColor += texture2D(renderFrame, textureCoordinate + vec2(+PIXEL_SHIFT_1, -PIXEL_SHIFT_1)); pixelColor += texture(renderFrame, textureCoordinate + vec2(+PIXEL_SHIFT_1, -PIXEL_SHIFT_1));
pixelColor += texture2D(renderFrame, textureCoordinate + vec2(0, -PIXEL_SHIFT_2)); pixelColor += texture(renderFrame, textureCoordinate + vec2(0, -PIXEL_SHIFT_2));
pixelColor /= 13.0; pixelColor /= 13.0;
#endif #endif
// DOF_QUALITY == 1 // DOF_QUALITY == 1
#if DOF_QUALITY > 0 #if DOF_QUALITY > 0
mediump float focusDepth = texture2D(depthFrame, vec2(0.5, 0.5)).r; float focusDepth = texture(depthFrame, vec2(0.5, 0.5)).r;
mediump float blurAmount = clamp((depth - DOF_DEPTH - focusDepth) / DOF_FALLOFF, 0.0, 1.0); float blurAmount = clamp((depth - DOF_DEPTH - focusDepth) / DOF_FALLOFF, 0.0, 1.0);
pixelColor = pixelColor * blurAmount + renderColor * (1.0 - blurAmount); pixelColor = pixelColor * blurAmount + renderColor * (1.0 - blurAmount);
#endif #endif
@@ -160,7 +161,7 @@ void main()
// ---- VIDEO_BG END ---- // ---- VIDEO_BG END ----
#if VOLUMETRIC_ENVIRONMENT_DOWNSAMPLED == 1 #if VOLUMETRIC_ENVIRONMENT_DOWNSAMPLED == 1
pixelColor += texture2D(volumetricEnvironmentFrame, textureCoordinate); pixelColor += texture(volumetricEnvironmentFrame, textureCoordinate);
#endif #endif
@@ -177,13 +178,13 @@ void main()
pixelColor.rgb = mix(pixelColor.rgb, fade_color.rgb, fade_color.a); pixelColor.rgb = mix(pixelColor.rgb, fade_color.rgb, fade_color.a);
#endif #endif
gl_FragColor = pixelColor; colorOut = pixelColor;
//PASSTHROUGH STATEMENT //PASSTHROUGH STATEMENT
// gl_FragColor = texture2D(depthFrame, textureCoordinate); // colorOut = texture(depthFrame, textureCoordinate);
//gl_FragColor = vec4(vec3(blurAmount), 1.0); //colorOut = vec4(vec3(blurAmount), 1.0);
colorOut = vec4(0.0, 0.0, 1.0, 1.0); // FINDME, KIP!!, HACK!!
} }

View File

@@ -25,11 +25,11 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
uniform mediump vec2 viewport_downsample; uniform vec2 viewport_downsample;
attribute vec4 vertex_position; in vec4 vertex_position;
attribute lowp vec4 vertex_uv; in vec4 vertex_uv;
varying mediump vec2 textureCoordinate; out vec2 textureCoordinate;
void main() void main()
{ {

View File

@@ -25,9 +25,11 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
//varying mediump vec2 texCoord; //in mediump vec2 texCoord;
out vec4 colorOut;
void main() void main()
{ {
gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); colorOut = vec4(1.0, 1.0, 1.0, 1.0);
} }

View File

@@ -28,7 +28,7 @@
#define SHADOW_BIAS 0.01 #define SHADOW_BIAS 0.01
attribute highp vec4 vertex_position; in highp vec4 vertex_position;
uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices
void main() void main()

View File

@@ -25,12 +25,14 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
varying mediump vec2 textureCoordinate; out vec4 colorOut;
in mediump vec2 textureCoordinate;
uniform sampler2D diffuseTexture; uniform sampler2D diffuseTexture;
void main() void main()
{ {
vec4 font_color = texture2D(diffuseTexture, textureCoordinate); vec4 font_color = texture(diffuseTexture, textureCoordinate);
gl_FragColor = vec4(font_color.r, font_color.g, font_color.b, font_color.r + 0.50); colorOut = vec4(font_color.r, font_color.g, font_color.b, font_color.r + 0.50);
} }

View File

@@ -25,10 +25,10 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
varying mediump vec2 textureCoordinate; out mediump vec2 textureCoordinate;
attribute vec4 vertex_position; in vec4 vertex_position;
attribute lowp vec2 vertex_uv; in lowp vec2 vertex_uv;
uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices
void main() void main()

View File

@@ -31,13 +31,15 @@
//#extension GL_EXT_shadow_samplers : require //#extension GL_EXT_shadow_samplers : require
varying mediump vec2 texCoord; out vec4 colorOut;
varying mediump vec4 shadowMapCoord1; in mediump vec2 texCoord;
in mediump vec4 shadowMapCoord1;
uniform sampler2DShadow shadowTexture1; uniform sampler2DShadow shadowTexture1;
uniform mediump vec3 light_color; uniform mediump vec3 light_color;
varying lowp float intensity_modulate; in lowp float intensity_modulate;
void main() { void main() {
gl_FragColor = vec4(light_color, 1.0) * shadow2DProj(shadowTexture1, shadowMapCoord1) * max(1.0 - texCoord.x*texCoord.x-texCoord.y*texCoord.y, 0.0) * intensity_modulate; colorOut = vec4(light_color, 1.0) * shadow2DProj(shadowTexture1, shadowMapCoord1) * max(1.0 - texCoord.x*texCoord.x-texCoord.y*texCoord.y, 0.0) * intensity_modulate;
} }

View File

@@ -29,19 +29,19 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
attribute mediump vec2 vertex_uv; in mediump vec2 vertex_uv;
uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices
uniform mediump vec4 viewport; uniform mediump vec4 viewport;
uniform mediump float flare_size; uniform mediump float flare_size;
attribute vec4 vertex_position; in vec4 vertex_position;
uniform highp vec3 particle_origin; uniform highp vec3 particle_origin;
uniform highp mat4 shadow_mvp1; uniform highp mat4 shadow_mvp1;
varying mediump vec4 shadowMapCoord1; out mediump vec4 shadowMapCoord1;
varying mediump vec2 texCoord; out mediump vec2 texCoord;
uniform highp float time_absolute; uniform highp float time_absolute;
varying lowp float intensity_modulate; out lowp float intensity_modulate;
void main() { void main() {
highp vec4 offset_center = vertex_position + vec4(particle_origin, 0.0); highp vec4 offset_center = vertex_position + vec4(particle_origin, 0.0);

View File

@@ -29,10 +29,12 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
varying mediump vec2 texCoord; out vec4 colorOut;
in vec2 texCoord;
uniform sampler2D diffuseTexture; uniform sampler2D diffuseTexture;
uniform lowp float material_alpha; uniform float material_alpha;
void main() { void main() {
gl_FragColor = vec4(vec3(texture2D(diffuseTexture, texCoord)), 1.0) * material_alpha; colorOut = vec4(vec3(texture(diffuseTexture, texCoord)), 1.0) * material_alpha;
} }

View File

@@ -29,12 +29,12 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
attribute mediump vec2 vertex_uv; in vec2 vertex_uv;
uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices uniform mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices
uniform mediump vec4 viewport; uniform vec4 viewport;
uniform mediump float flare_size; uniform float flare_size;
varying mediump vec2 texCoord; out vec2 texCoord;
void main() { void main() {
texCoord = vertex_uv; texCoord = vertex_uv;

View File

@@ -25,6 +25,7 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
out vec4 colorOut;
uniform sampler2D gbuffer_frame; uniform sampler2D gbuffer_frame;
uniform sampler2D gbuffer_depth; uniform sampler2D gbuffer_depth;
@@ -37,14 +38,14 @@ uniform mediump vec4 viewport;
void main() void main()
{ {
lowp vec2 gbuffer_uv = vec2(gl_FragCoord.xy / viewport.zw); // FINDME, TODO - Dependent Texture Read adding latency, due to calculation of texture UV within fragment -- move to vertex shader? lowp vec2 gbuffer_uv = vec2(gl_FragCoord.xy / viewport.zw); // FINDME, TODO - Dependent Texture Read adding latency, due to calculation of texture UV within fragment -- move to vertex shader?
lowp vec4 gbuffer_sample = texture2D(gbuffer_frame, gbuffer_uv); lowp vec4 gbuffer_sample = texture(gbuffer_frame, gbuffer_uv);
mediump vec3 gbuffer_normal = normalize(2.0 * gbuffer_sample.rgb - 1.0); mediump vec3 gbuffer_normal = normalize(2.0 * gbuffer_sample.rgb - 1.0);
mediump float gbuffer_specular_exponent = gbuffer_sample.a * 100.0; mediump float gbuffer_specular_exponent = gbuffer_sample.a * 100.0;
mediump vec3 view_space_vertex_position = vec3( mediump vec3 view_space_vertex_position = vec3(
((2.0 * gl_FragCoord.xy) - (2.0 * viewport.xy)) / (viewport.zw) - 1.0, ((2.0 * gl_FragCoord.xy) - (2.0 * viewport.xy)) / (viewport.zw) - 1.0,
(2.0 * -texture2D(gbuffer_depth, gbuffer_uv).r - gl_DepthRange.near - gl_DepthRange.far) / (gl_DepthRange.far - gl_DepthRange.near) (2.0 * -texture(gbuffer_depth, gbuffer_uv).r - gl_DepthRange.near - gl_DepthRange.far) / (gl_DepthRange.far - gl_DepthRange.near)
); );
//mediump float lamberFactor = max(0.0,dot(light_direction_view_space, gbuffer_normal)) * 0.2; //mediump float lamberFactor = max(0.0,dot(light_direction_view_space, gbuffer_normal)) * 0.2;
@@ -56,5 +57,5 @@ void main()
specularFactor = pow(dot(halfVec,gbuffer_normal), gbuffer_specular_exponent); specularFactor = pow(dot(halfVec,gbuffer_normal), gbuffer_specular_exponent);
gl_FragColor = vec4(light_color * lamberFactor, specularFactor) * light_intensity; colorOut = vec4(light_color * lamberFactor, specularFactor) * light_intensity;
} }

View File

@@ -25,7 +25,7 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
attribute vec4 vertex_position; in vec4 vertex_position;
void main() void main()
{ {

View File

@@ -25,6 +25,7 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
out vec4 colorOut;
uniform sampler2D gbuffer_frame; uniform sampler2D gbuffer_frame;
uniform sampler2D gbuffer_depth; uniform sampler2D gbuffer_depth;
@@ -43,14 +44,14 @@ void main()
{ {
lowp vec2 gbuffer_uv = vec2(gl_FragCoord.xy / viewport.zw); // FINDME, TODO - Dependent Texture Read adding latency, due to calculation of texture UV within fragment -- move to vertex shader? lowp vec2 gbuffer_uv = vec2(gl_FragCoord.xy / viewport.zw); // FINDME, TODO - Dependent Texture Read adding latency, due to calculation of texture UV within fragment -- move to vertex shader?
lowp vec4 gbuffer_sample = texture2D(gbuffer_frame, gbuffer_uv); lowp vec4 gbuffer_sample = texture(gbuffer_frame, gbuffer_uv);
mediump vec3 gbuffer_normal = normalize(2.0 * gbuffer_sample.rgb - 1.0); mediump vec3 gbuffer_normal = normalize(2.0 * gbuffer_sample.rgb - 1.0);
mediump float gbuffer_specular_exponent = gbuffer_sample.a * 100.0; mediump float gbuffer_specular_exponent = gbuffer_sample.a * 100.0;
mediump vec4 clip_space_vertex_position = vec4( mediump vec4 clip_space_vertex_position = vec4(
gl_FragCoord.xy / viewport.zw * 2.0 - 1.0, gl_FragCoord.xy / viewport.zw * 2.0 - 1.0,
texture2D(gbuffer_depth, gbuffer_uv).r * 2.0 - 1.0, texture(gbuffer_depth, gbuffer_uv).r * 2.0 - 1.0,
1.0 1.0
); );
@@ -69,5 +70,5 @@ void main()
specularFactor = pow(dot(halfVec,gbuffer_normal), gbuffer_specular_exponent); specularFactor = pow(dot(halfVec,gbuffer_normal), gbuffer_specular_exponent);
//} //}
gl_FragColor = vec4(light_color * lamberFactor, specularFactor) * light_attenuation; colorOut = vec4(light_color * lamberFactor, specularFactor) * light_attenuation;
} }

View File

@@ -25,7 +25,7 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
attribute vec4 vertex_position; in vec4 vertex_position;
void main() void main()
{ {

View File

@@ -25,6 +25,7 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
out vec4 colorOut;
uniform sampler2D gbuffer_frame; uniform sampler2D gbuffer_frame;
uniform sampler2D gbuffer_depth; uniform sampler2D gbuffer_depth;
@@ -43,14 +44,14 @@ void main()
{ {
lowp vec2 gbuffer_uv = vec2(gl_FragCoord.xy / viewport.zw); // FINDME, TODO - Dependent Texture Read adding latency, due to calculation of texture UV within fragment -- move to vertex shader? lowp vec2 gbuffer_uv = vec2(gl_FragCoord.xy / viewport.zw); // FINDME, TODO - Dependent Texture Read adding latency, due to calculation of texture UV within fragment -- move to vertex shader?
lowp vec4 gbuffer_sample = texture2D(gbuffer_frame, gbuffer_uv); lowp vec4 gbuffer_sample = texture(gbuffer_frame, gbuffer_uv);
mediump vec3 gbuffer_normal = normalize(2.0 * gbuffer_sample.rgb - 1.0); mediump vec3 gbuffer_normal = normalize(2.0 * gbuffer_sample.rgb - 1.0);
mediump float gbuffer_specular_exponent = gbuffer_sample.a * 100.0; mediump float gbuffer_specular_exponent = gbuffer_sample.a * 100.0;
mediump vec4 clip_space_vertex_position = vec4( mediump vec4 clip_space_vertex_position = vec4(
gl_FragCoord.xy / viewport.zw * 2.0 - 1.0, gl_FragCoord.xy / viewport.zw * 2.0 - 1.0,
texture2D(gbuffer_depth, gbuffer_uv).r * 2.0 - 1.0, texture(gbuffer_depth, gbuffer_uv).r * 2.0 - 1.0,
1.0 1.0
); );
@@ -69,5 +70,5 @@ void main()
specularFactor = pow(dot(halfVec,gbuffer_normal), gbuffer_specular_exponent); specularFactor = pow(dot(halfVec,gbuffer_normal), gbuffer_specular_exponent);
//} //}
gl_FragColor = vec4(light_color * lamberFactor, specularFactor) * light_attenuation; colorOut = vec4(light_color * lamberFactor, specularFactor) * light_attenuation;
} }

View File

@@ -25,7 +25,7 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
attribute vec4 vertex_position; in vec4 vertex_position;
uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices
void main() void main()

View File

@@ -29,7 +29,9 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
out vec4 colorOut;
void main() { void main() {
//gl_FragColor = vec4(0.00, 0.00, 0.00, 0.00); //colorOut = vec4(0.00, 0.00, 0.00, 0.00);
gl_FragColor = vec4(0.00, 0.00, 0.00, 0.00); colorOut = vec4(0.00, 0.00, 0.00, 0.00);
} }

View File

@@ -25,7 +25,7 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
attribute vec4 vertex_position; in vec4 vertex_position;
uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices
void main() void main()

View File

@@ -25,11 +25,13 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
varying mediump vec2 textureCoordinate; out vec4 colorOut;
in mediump vec2 textureCoordinate;
uniform sampler2D diffuseTexture; uniform sampler2D diffuseTexture;
void main() void main()
{ {
gl_FragColor = texture2D(diffuseTexture, textureCoordinate); colorOut = texture(diffuseTexture, textureCoordinate);
} }

View File

@@ -25,10 +25,10 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
varying mediump vec2 textureCoordinate; out mediump vec2 textureCoordinate;
attribute vec4 vertex_position; in vec4 vertex_position;
attribute lowp vec4 vertex_uv; in lowp vec4 vertex_uv;
uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices
void main() void main()

View File

@@ -29,10 +29,12 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
out vec4 colorOut;
uniform samplerCube diffuseTexture; uniform samplerCube diffuseTexture;
varying mediump vec3 texCoord; in mediump vec3 texCoord;
void main() { void main() {
gl_FragColor = textureCube(diffuseTexture, normalize(texCoord)); colorOut = textureCube(diffuseTexture, normalize(texCoord));
} }

View File

@@ -30,12 +30,9 @@
// //
// //
attribute vec4 vertex_position; in vec4 vertex_position;
//attribute lowp vec4 vertex_uv;
//
//varying mediump vec2 textureCoordinate;
varying mediump vec3 texCoord; out mediump vec3 texCoord;
uniform highp mat4 inv_mvp_matrix_no_translate; // Inverse of the model-view-projection matrix, without view translation component uniform highp mat4 inv_mvp_matrix_no_translate; // Inverse of the model-view-projection matrix, without view translation component
uniform mediump vec4 viewport; uniform mediump vec4 viewport;

View File

@@ -29,10 +29,12 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
varying mediump vec2 texCoord; out vec4 colorOut;
in mediump vec2 texCoord;
uniform sampler2D diffuseTexture; uniform sampler2D diffuseTexture;
uniform lowp float material_alpha; uniform lowp float material_alpha;
void main() { void main() {
gl_FragColor = vec4(vec3(texture2D(diffuseTexture, texCoord)), 1.0) * material_alpha; colorOut = vec4(vec3(texture(diffuseTexture, texCoord)), 1.0) * material_alpha;
} }

View File

@@ -29,11 +29,11 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
attribute mediump vec2 vertex_uv; in mediump vec2 vertex_uv;
uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices
uniform mediump vec4 viewport; uniform mediump vec4 viewport;
varying mediump vec2 texCoord; out mediump vec2 texCoord;
void main() { void main() {
texCoord = vertex_uv; texCoord = vertex_uv;

View File

@@ -29,7 +29,9 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
out vec4 colorOut;
void main() { void main() {
gl_FragColor = vec4(0.0, 0.05, 0.05, 0.0); colorOut = vec4(0.0, 0.05, 0.05, 0.0);
} }

View File

@@ -29,7 +29,7 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
attribute vec4 vertex_position; in vec4 vertex_position;
uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices
void main() void main()

View File

@@ -25,7 +25,9 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
varying mediump vec4 shadowMapCoord1; out vec4 colorOut;
in mediump vec4 shadowMapCoord1;
uniform sampler2DShadow shadowTexture1; uniform sampler2DShadow shadowTexture1;
uniform lowp sampler2D depthFrame; uniform lowp sampler2D depthFrame;
uniform mediump vec4 viewport; uniform mediump vec4 viewport;
@@ -33,7 +35,7 @@ uniform mediump vec3 light_color;
void main() void main()
{ {
if(gl_FragCoord.z > texture2D(depthFrame, vec2(gl_FragCoord.xy / viewport.zw)).r) discard; if(gl_FragCoord.z > texture(depthFrame, vec2(gl_FragCoord.xy / viewport.zw)).r) discard;
gl_FragColor = vec4(light_color, 1.0) * shadow2DProj(shadowTexture1, shadowMapCoord1); colorOut = vec4(light_color, 1.0) * shadow2DProj(shadowTexture1, shadowMapCoord1);
} }

View File

@@ -25,13 +25,13 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
attribute highp vec4 vertex_position; in highp vec4 vertex_position;
uniform highp mat4 inv_mvp_matrix; uniform highp mat4 inv_mvp_matrix;
uniform highp vec2 slice_depth_scale; // First component is the depth for the nearest plane, in view space. Second component is the distance between planes, in view space uniform highp vec2 slice_depth_scale; // First component is the depth for the nearest plane, in view space. Second component is the distance between planes, in view space
uniform highp mat4 shadow_mvp1; uniform highp mat4 shadow_mvp1;
varying mediump vec4 shadowMapCoord1; out mediump vec4 shadowMapCoord1;
uniform highp mat4 projection_matrix; uniform highp mat4 projection_matrix;

View File

@@ -25,11 +25,13 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
varying mediump vec4 shadowMapCoord1; out vec4 colorOut;
in mediump vec4 shadowMapCoord1;
uniform sampler2DShadow shadowTexture1; uniform sampler2DShadow shadowTexture1;
uniform mediump vec3 light_color; uniform mediump vec3 light_color;
void main() void main()
{ {
gl_FragColor = vec4(light_color, 1.0) * shadow2DProj(shadowTexture1, shadowMapCoord1); colorOut = vec4(light_color, 1.0) * shadow2DProj(shadowTexture1, shadowMapCoord1);
} }

View File

@@ -25,13 +25,13 @@
// or implied, of Kearwood Gilbert. // or implied, of Kearwood Gilbert.
// //
attribute highp vec4 vertex_position; in highp vec4 vertex_position;
uniform highp mat4 inv_mvp_matrix; uniform highp mat4 inv_mvp_matrix;
uniform highp vec2 slice_depth_scale; // First component is the depth for the nearest plane, in view space. Second component is the distance between planes, in view space uniform highp vec2 slice_depth_scale; // First component is the depth for the nearest plane, in view space. Second component is the distance between planes, in view space
uniform highp mat4 shadow_mvp1; uniform highp mat4 shadow_mvp1;
varying mediump vec4 shadowMapCoord1; out mediump vec4 shadowMapCoord1;
uniform highp mat4 projection_matrix; uniform highp mat4 projection_matrix;