Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
gen-external-apklibs/
bin/
gen/
target/
17 changes: 4 additions & 13 deletions WorldWindAndroid/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="gov.nasa.worldwind"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="18" />
<!-- Specify that World Wind Android applications require SDK Platform Android 4.0.3, API 15. -->
<uses-sdk android:minSdkVersion="15" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1000000" android:versionName="1.0.0" package="gov.nasa.worldwind">
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="18"/>
<!-- Specify all of the Android features that World Wind requires: OpenGL ES 2.0. -->
<uses-feature android:glEsVersion="0x00020000" />
<uses-feature android:glEsVersion="0x00020000"/>
<!-- Specify all of the Android permissions that World Wind requires: internet. -->
<uses-permission android:name="android.permission.INTERNET" />
<application android:allowBackup="true" >
</application>
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
37 changes: 37 additions & 0 deletions WorldWindAndroid/library.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android" name="Android">
<configuration>
<option name="GEN_FOLDER_RELATIVE_PATH_APT" value="/bin/generated-sources/r" />
<option name="GEN_FOLDER_RELATIVE_PATH_AIDL" value="/bin/generated-sources/aidl" />
<option name="CUSTOM_APK_RESOURCE_FOLDER" value="/bin/generated-sources/combined-resources/res" />
<option name="APK_PATH" value="/bin/library.apk" />
<option name="LIBRARY_PROJECT" value="true" />
<option name="RUN_PROCESS_RESOURCES_MAVEN_TASK" value="false" />
<option name="COMPILE_CUSTOM_GENERATED_SOURCES" value="false" />
<includeAssetsFromLibraries>true</includeAssetsFromLibraries>
<resOverlayFolders>
<path>/res-overlay</path>
</resOverlayFolders>
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/bin/classes" />
<output-test url="file://$MODULE_DIR$/bin/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/bin/generated-sources/r" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/bin/classes" />
<excludeFolder url="file://$MODULE_DIR$/bin/generated-sources/combined-assets" />
<excludeFolder url="file://$MODULE_DIR$/bin/generated-sources/combined-resources" />
<excludeFolder url="file://$MODULE_DIR$/bin/generated-sources/extracted-dependencies" />
<excludeFolder url="file://$MODULE_DIR$/bin/maven-archiver" />
</content>
<orderEntry type="jdk" jdkName="Maven Android API 19 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="Maven: android:android:4.4_r1" level="project" />
</component>
</module>

58 changes: 58 additions & 0 deletions WorldWindAndroid/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
~ Copyright (C) 2014 United States Government as represented by the Administrator of the
~ National Aeronautics and Space Administration.
~ All Rights Reserved.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.github.trilogisit.worldwindandroid</groupId>
<artifactId>parent</artifactId>
<version>1.0.0</version>
</parent>

<artifactId>library</artifactId>
<packaging>aar</packaging>

<name>WorldWindAndroid</name>

<scm>
<url>https://github.com/TrilogisIT/WorldWindAndroid.git</url>
<connection>scm:git:git://github.com/TrilogisIT/WorldWindAndroid.git</connection>
<developerConnection>scm:git:git://github.com/TrilogisIT/WorldWindAndroid.git</developerConnection>
</scm>

<issueManagement>
<url>https://www.github.com/TrilogisIT/WorldWindAndroid/issues</url>
<system>GitHub Issues</system>
</issueManagement>

<dependencies>
<dependency>
<groupId>android</groupId>
<artifactId>android</artifactId>
<version>4.4_r1</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions WorldWindAndroid/res/drawable/ic_action_download_status.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>

<!--
~ Copyright (C) 2014 United States Government as represented by the Administrator of the
~ National Aeronautics and Space Administration.
~ All Rights Reserved.
-->

<scale xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_action_download"
android:scaleWidth="@dimen/statusBarIcon"
android:scaleHeight="@dimen/statusBarIcon">

</scale>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>

<!--
~ Copyright (C) 2014 United States Government as represented by the Administrator of the
~ National Aeronautics and Space Administration.
~ All Rights Reserved.
-->

<scale xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_action_network_wifi_off"
android:scaleWidth="@dimen/statusBarIcon"
android:scaleHeight="@dimen/statusBarIcon">

</scale>
14 changes: 14 additions & 0 deletions WorldWindAndroid/res/drawable/ic_action_network_wifi_status.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>

<!--
~ Copyright (C) 2014 United States Government as represented by the Administrator of the
~ National Aeronautics and Space Administration.
~ All Rights Reserved.
-->

<scale xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_action_network_wifi"
android:scaleWidth="@dimen/statusBarIcon"
android:scaleHeight="@dimen/statusBarIcon">

</scale>
74 changes: 74 additions & 0 deletions WorldWindAndroid/res/layout/statusbar.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>

<!--
~ Copyright (C) 2014 United States Government as represented by the Administrator of the
~ National Aeronautics and Space Administration.
~ All Rights Reserved.
-->

<merge xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<TextView
android:id="@+id/online"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="8dp"
android:fontFamily="sans-seriff"
android:textSize="14sp"/>

<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true">

<TextView
android:id="@+id/latitude"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-seriff"
android:textSize="14sp"/>

<TextView
android:id="@+id/longitude"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:fontFamily="sans-seriff"
android:textSize="14sp"
android:text="Off Globe"/>

<TextView
android:id="@+id/altitude"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:fontFamily="sans-seriff"
android:textSize="14sp"/>

<TextView
android:id="@+id/elevation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:fontFamily="sans-seriff"
android:textSize="14sp"/>

</LinearLayout>

<TextView
android:id="@+id/heartBeat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="8dp"
android:fontFamily="sans-seriff"
android:textSize="14sp"
android:textColor="#FF0000"
android:text="Downloading"
android:drawableLeft="@drawable/ic_action_network_wifi_status"/>

</merge>
8 changes: 8 additions & 0 deletions WorldWindAndroid/res/raw/depth_frag.glsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

precision mediump float;


void main()
{
gl_FragColor = vec4(gl_FragCoord.z, 1);
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ varying vec2 vTextureCoord;

uniform sampler2D sTexture;

uniform lowp float uOpacity;

/*
* OpenGL ES fragment shader entry point. Called for each fragment rasterized when this shader's program is bound.
*/
void main()
{
gl_FragColor = texture2D(sTexture, vTextureCoord);
/*gl_FragColor = vec4(1,0,0,1);*/
gl_FragColor = vec4(gl_FragColor.rgb, gl_FragColor.a * uOpacity);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
* TODO.
*/
attribute vec4 vertexPoint;
attribute vec2 aTextureCoord;
attribute vec4 aTextureCoord;

/*
* Input uniform matrix defining the current modelview-projection transform matrix. Maps model coordinates to eye
* coordinates.
*/
uniform mat4 mvpMatrix;
uniform mat4 texMatrix;
varying vec2 vTextureCoord;

/*
Expand All @@ -18,5 +20,5 @@ void main()
{
/* Transform the surface vertex point from model coordinates to eye coordinates. */
gl_Position = mvpMatrix * vertexPoint;
vTextureCoord = aTextureCoord;
vTextureCoord = (texMatrix * aTextureCoord).st;
}
16 changes: 16 additions & 0 deletions WorldWindAndroid/res/raw/etc1alphafrag.glsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
precision mediump float;

varying vec2 vTextureCoord;

uniform sampler2D sTexture;
uniform sampler2D aTexture;

uniform lowp float uOpacity;

/*
* Read alpha component from 2nd etc1 texture
*/
void main()
{
gl_FragColor = vec4(texture2D(sTexture, vTextureCoord).rgb, texture2D(aTexture, vTextureCoord).r * uOpacity);
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ varying vec2 tileCoord;
*/
varying vec2 texCoord;

uniform lowp float uOpacity;

/*
* Local function that returns the tile's RGBA color at the specified texture coordinate. The tile coordinate vector is
* used to determine if the current fragment is inside or outside the tile's sector. This returns transparent black
Expand Down Expand Up @@ -60,4 +62,5 @@ void main()
/* because calling discard in a branch has been shown to increase the frame time by 3x on the Samsung Galaxy Tab */
/* 10.1. */
gl_FragColor = tileColor(tileTexture, tileCoord, texCoord);
gl_FragColor = vec4(gl_FragColor.rgb, gl_FragColor.a * uOpacity);
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ precision mediump float;

varying vec2 vTextureCoord;

varying vec4 vTextureColor;
uniform vec4 uTextureColor;

uniform sampler2D sTexture;

Expand All @@ -11,5 +11,5 @@ uniform sampler2D sTexture;
*/
void main()
{
gl_FragColor = texture2D(sTexture, vTextureCoord) * vTextureColor;
gl_FragColor = texture2D(sTexture, vTextureCoord) * uTextureColor;
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ precision mediump float;
* Input uniform vec4 defining the current color. Every fragment rasterized by this fragment shader is displayed in this
* color.
*/
uniform vec4 color;
uniform vec4 uColor;

uniform lowp float uOpacity;

/*
* OpenGL ES fragment shader entry point. Called for each fragment rasterized when this shader's program is bound.
*/
void main()
{
gl_FragColor = color;
gl_FragColor = vec4(uColor.rgb, uColor.a * uOpacity);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,21 @@ precision mediump float;
*/
varying vec4 primColor;

uniform lowp float uOpacity;

uniform vec4 uColor;

uniform bool uUseVertexColor;

/*
* OpenGL ES fragment shader entry point. Called for each fragment rasterized when this shader's program is bound.
*/
void main()
{
/* Assign the fragment color to the varying vertex color. */
gl_FragColor = primColor;
/* Assign the fragment color to the varying vertex color or uniform color. */
if(uUseVertexColor)
gl_FragColor = primColor;
else
gl_FragColor = uColor;
gl_FragColor = vec4(gl_FragColor.rgb, gl_FragColor.a * uOpacity);
}
Loading