Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

forcing correct DepthTest- and Stencil-settings (closes #150)

When Starling is used with a shared context (e.g. when combined with Away3D), someone could modify those settings. That change will make sure that those settings are as Starling requires them.
  • Loading branch information...
commit b53051fb8c85ca2acbd5cc0c4de0a46b10e25b28 1 parent db4e28d
@PrimaryFeather PrimaryFeather authored
View
12 samples/demo_mobile/.actionScriptProperties
@@ -10,14 +10,14 @@
<excludedEntries>
<libraryPathEntry kind="1" linkType="1" path="${PROJECT_FRAMEWORKS}/locale/{locale}"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/advancedgrids.swc" useDefaultLinkType="false"/>
- <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/automation_air.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/charts.swc" useDefaultLinkType="false"/>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/automation_air.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/netmon.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/spark.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/sparkskins.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/rpc.swc" useDefaultLinkType="false"/>
- <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/qtp_air.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/videoPlayer.swc" useDefaultLinkType="false"/>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/qtp_air.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flash-integration.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/authoringsupport.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/qtp.swc" useDefaultLinkType="false"/>
@@ -54,7 +54,6 @@
<flashCatalyst validateFlashCatalystCompatibility="false"/>
<buildTargets>
<buildTarget buildTargetName="com.adobe.flexide.multiplatform.ios.platform" iosSettingsVersion="1" provisioningFile="/Users/redge/Dropbox/Gamua/Projects/general/iphone_dev_data/gamua_development_pp.mobileprovision" releasePackageType="ipa-ad-hoc">
- <multiPlatformSettings enabled="true" includePlatformLibs="false" platformID="com.adobe.flexide.multiplatform.ios.platform" version="2"/>
<airSettings airCertificatePath="/Users/redge/Dropbox/Gamua/Projects/general/iphone_dev_data/daniel_developer_certificate.p12" airTimestamp="true" anePathSet="true" version="1">
<airExcludes>
<pathEntry path=".DS_Store"/>
@@ -62,25 +61,26 @@
</airExcludes>
<anePaths/>
</airSettings>
+ <multiPlatformSettings enabled="true" includePlatformLibs="false" platformID="com.adobe.flexide.multiplatform.ios.platform" version="2"/>
<actionScriptSettings version="1"/>
</buildTarget>
<buildTarget buildTargetName="default">
+ <multiPlatformSettings enabled="false" includePlatformLibs="false" platformID="default" version="2"/>
<airSettings airCertificatePath="" airTimestamp="true" anePathSet="false" version="1">
<airExcludes/>
<anePaths/>
</airSettings>
- <multiPlatformSettings enabled="false" includePlatformLibs="false" platformID="default" version="2"/>
<actionScriptSettings version="1"/>
</buildTarget>
<buildTarget buildTargetName="com.qnx.flexide.multiplatform.qnx.platform" extraPackagingOptions="" signBarFile="false">
+ <multiPlatformSettings enabled="false" includePlatformLibs="false" platformID="com.qnx.flexide.multiplatform.qnx.platform" version="2"/>
<airSettings airCertificatePath="" airTimestamp="true" anePathSet="true" version="1">
<airExcludes/>
<anePaths/>
</airSettings>
- <multiPlatformSettings enabled="false" includePlatformLibs="false" platformID="com.qnx.flexide.multiplatform.qnx.platform" version="2"/>
<actionScriptSettings version="1"/>
</buildTarget>
- <buildTarget airDownloadURL="" androidSettingsVersion="1" buildTargetName="com.adobe.flexide.multiplatform.android.platform">
+ <buildTarget airDownloadURL="https://market.android.com/details?id=com.adobe.air" androidSettingsVersion="1" buildTargetName="com.adobe.flexide.multiplatform.android.platform">
<airSettings airCertificatePath="/Users/redge/Dropbox/Gamua/Projects/general/android_dev_data/daniel-test-certificate.p12" airTimestamp="true" anePathSet="true" version="1">
<airExcludes/>
<anePaths/>
View
2  samples/demo_mobile/src/Startup_Android-app.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
-<application xmlns="http://ns.adobe.com/air/application/3.4">
+<application xmlns="http://ns.adobe.com/air/application/3.5">
<id>com.gamua.starling.demo</id> <!-- Bundle Identifier. Required. -->
<filename>Starling-Demo</filename> <!-- Used as the filename for the application. Required. -->
View
2  samples/demo_mobile/src/Startup_iOS-app.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
-<application xmlns="http://ns.adobe.com/air/application/3.4">
+<application xmlns="http://ns.adobe.com/air/application/3.5">
<id>com.gamua.starling.demo</id> <!-- Bundle Identifier. Required. -->
<filename>Starling-Demo</filename> <!-- Used as the filename for the application. Required. -->
View
5 starling/src/starling/core/Starling.as
@@ -13,6 +13,8 @@ package starling.core
import flash.display.Sprite;
import flash.display.Stage3D;
import flash.display3D.Context3D;
+ import flash.display3D.Context3DCompareMode;
+ import flash.display3D.Context3DTriangleFace;
import flash.display3D.Program3D;
import flash.errors.IllegalOperationError;
import flash.events.ErrorEvent;
@@ -355,6 +357,9 @@ package starling.core
if (!mShareContext)
RenderSupport.clear(mStage.color, 1.0);
+ mContext.setDepthTest(false, Context3DCompareMode.ALWAYS);
+ mContext.setCulling(Context3DTriangleFace.NONE);
+
mSupport.setOrthographicProjection(0, 0, mStage.stageWidth, mStage.stageHeight);
mSupport.renderTarget = null; // back buffer
Please sign in to comment.
Something went wrong with that request. Please try again.