Compare commits
179 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2cbd92a01b | ||
|
|
ba0e737c7b | ||
|
|
45b59eb6df | ||
|
|
a7d50fa8fa | ||
|
|
2f27803fc5 | ||
|
|
71a4ba1c19 | ||
|
|
271cab1212 | ||
|
|
1051aacc7c | ||
|
|
fb8e6dab20 | ||
|
|
4e37ae26c9 | ||
|
|
905f27b2c2 | ||
|
|
9d6935cf48 | ||
|
|
6b0e521c75 | ||
|
|
c906c468f8 | ||
|
|
f7272dcdcd | ||
|
|
14283ff5cc | ||
|
|
e4608b17c3 | ||
|
|
d81c32b97c | ||
|
|
e69c5724bf | ||
|
|
da0a5673d2 | ||
|
|
4cdd2a2bfb | ||
|
|
80afa86ae4 | ||
|
|
311cc19134 | ||
|
|
9809398517 | ||
|
|
7498d58878 | ||
|
|
73e17ef4a1 | ||
|
|
bda48858ba | ||
|
|
4d35b72b25 | ||
|
|
8faa374303 | ||
|
|
573ec687ac | ||
|
|
4b685819d1 | ||
|
|
889ce83bdf | ||
|
|
30304a8ddc | ||
|
|
4b12e28f3c | ||
|
|
f92fc4b405 | ||
|
|
b5076c9cd2 | ||
|
|
5eda5b78a6 | ||
|
|
207993a6e2 | ||
|
|
4162d9b488 | ||
|
|
8bfca4917a | ||
|
|
2aedfaba34 | ||
|
|
4811abb3d3 | ||
|
|
f6e51898b7 | ||
|
|
12070cee74 | ||
|
|
6af46cf8cc | ||
|
|
5b58e5282b | ||
|
|
0e54dc715c | ||
|
|
627a316e4d | ||
|
|
2efa8808c0 | ||
|
|
b9c7d4cbb1 | ||
|
|
f348296a8c | ||
|
|
7cfbe1c115 | ||
|
|
31077cb637 | ||
|
|
8e685b7ebb | ||
|
|
ca3871eb61 | ||
|
|
ebe4095438 | ||
|
|
ec50f11e3e | ||
|
|
446d0133cf | ||
|
|
b4a98ef1a9 | ||
|
|
ba123910a4 | ||
|
|
23d65486e6 | ||
|
|
c0c8abe3a7 | ||
|
|
f599a14506 | ||
|
|
46349724a8 | ||
|
|
915cdae09c | ||
|
|
bac510370a | ||
|
|
45cf4057d1 | ||
|
|
f6f00c2521 | ||
|
|
f6af3d7410 | ||
|
|
7c2976819f | ||
|
|
eb3efa7a69 | ||
|
|
16132f7ae3 | ||
|
|
c06b2712a0 | ||
|
|
28b16a3232 | ||
|
|
0a8e56ea05 | ||
|
|
1f0b5509ed | ||
|
|
777d33a4de | ||
|
|
5887d5c6a2 | ||
|
|
a443e732f5 | ||
|
|
fc452a76e7 | ||
|
|
48a5c36c31 | ||
|
|
bab34aab2b | ||
|
|
98ab1f7100 | ||
|
|
1734f3f87a | ||
|
|
3a8e50d703 | ||
|
|
235decb041 | ||
|
|
6bbedd0f2b | ||
|
|
ce87e89b4f | ||
|
|
1af38a7306 | ||
|
|
d219632825 | ||
|
|
84d6b311ea | ||
|
|
c32652c066 | ||
|
|
11a5d841f9 | ||
|
|
25c75a009d | ||
|
|
b611b979e4 | ||
|
|
540d6c23f9 | ||
|
|
5eb27b7553 | ||
|
|
ef87bae51f | ||
|
|
8c2f788069 | ||
|
|
cae68ffec9 | ||
|
|
929d1fc78b | ||
|
|
608edc2d46 | ||
|
|
a0c7a70e00 | ||
|
|
a3cdace8d2 | ||
|
|
de2fe89ecd | ||
|
|
73b530a807 | ||
|
|
4b418b9bb9 | ||
|
|
e514e29010 | ||
|
|
8d34090eb8 | ||
|
|
93d6c1bf14 | ||
|
|
a1c45d1dc3 | ||
|
|
69421c0381 | ||
|
|
1efed2bef8 | ||
|
|
98474b187d | ||
|
|
abd08ab884 | ||
|
|
e18f3577f0 | ||
|
|
8ac26e9567 | ||
|
|
c984eae2d5 | ||
|
|
d806d6bcca | ||
|
|
a62d77583b | ||
|
|
6f4ab468a7 | ||
|
|
20352f2053 | ||
|
|
357ec99b44 | ||
|
|
0271e9df23 | ||
|
|
04a18f82e1 | ||
|
|
576d5f741d | ||
|
|
01958b7d34 | ||
|
|
41d5d21bc6 | ||
|
|
b0f155a377 | ||
|
|
a517b76e9e | ||
|
|
70dd6554c3 | ||
|
|
62132937da | ||
|
|
2784d78737 | ||
|
|
b5036f4cfd | ||
|
|
2388c352d5 | ||
|
|
09a6cf2497 | ||
|
|
e20b941eb9 | ||
|
|
1dba14ec9a | ||
|
|
e773d868f1 | ||
|
|
07afebba4e | ||
|
|
7146875c05 | ||
|
|
42627d5881 | ||
|
|
bb87c8a51b | ||
|
|
b69570aa68 | ||
|
|
699e9e37f3 | ||
|
|
63b62e3c82 | ||
|
|
6a2b2afdba | ||
|
|
292c092be3 | ||
|
|
85c604c1ee | ||
|
|
a530070ecf | ||
|
|
f853e54d77 | ||
|
|
928ece7853 | ||
|
|
9524c9d74d | ||
|
|
61318bff8a | ||
|
|
7c2d2d3759 | ||
|
|
34f4432818 | ||
|
|
596679d1f9 | ||
|
|
14c6b6fe8f | ||
|
|
e6006a0228 | ||
|
|
f44f083378 | ||
|
|
f258bae8fd | ||
|
|
47f9251c87 | ||
|
|
650a82a681 | ||
|
|
219b943d59 | ||
|
|
98717e7b46 | ||
|
|
bb924181b4 | ||
|
|
7c92d1045a | ||
|
|
e0f6afaf43 | ||
|
|
d36320967c | ||
|
|
33528a3e61 | ||
|
|
131e1a183c | ||
|
|
6fa1c5aa94 | ||
|
|
62055a1aa1 | ||
|
|
da09a62605 | ||
|
|
7a7ceb6d60 | ||
|
|
3bba870c90 | ||
|
|
272ce1d9b6 | ||
|
|
de259c27d7 | ||
|
|
74a7150cff |
@@ -1,11 +1,11 @@
|
|||||||
sudo: false
|
sudo: false
|
||||||
language: android
|
language: android
|
||||||
jdk:
|
jdk:
|
||||||
- oraclejdk8
|
- openjdk8
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- ANDROID=28
|
- ANDROID=28
|
||||||
- ANDROID_BUILD_TOOLS=28.0.2
|
- ANDROID_BUILD_TOOLS=28.0.3
|
||||||
- GRADLE_OPTS="-Xmx2048m"
|
- GRADLE_OPTS="-Xmx2048m"
|
||||||
- secure: sW674wuFZOuoX7jHQHDbX3j8NxL8JxR07cyq+CrrqJ537dU9lxWQmMBRUpOb+p/q7sQ74PUtiKJkmFgKCSJSAKY+nr6GJ8P/q6u5TUKbmUWODSn8znehX2zualfvFwpF4PILok/wUzXBQE62jn4lUua7cMdsHRMNHbLmKqBoVL0meObDDjsaJ/RCbOPuruy3FmgvXPp0+Y4zl1GsklDSyjFzg4LBzjAk9Ryvh1O4zvJBkkyfCgurLKCnOKIPy3v5fPMS9oDfO1aarAVGoZZe416pvTW4hb8cdB6kn9XWYDob4NDFX/sP5k7XIhd/NAIn9LrKFg0sLtATaKLX+BcasF1CgDR/u6+SEeQd5QaRF7Go2Nq5Ltuu4OIFONI2qhEeVDDK6Otf2WSWj9KPno2GHuumBfbg4ypWoJgmZrMXk8JeVV/OP/0jIQz3p/7yfF21X1XBEqYaVHPAMKdEYYkCSa46KfACyOt6LfnkuCHtoTOpFo7sq0omIA2HOtpIx1u3vMBUyAbQqT6cokkKB1b6gNTFwhHc+8ybfLFPljJB8cWshI+V/b06S6fekRmvTNxvDykWNsdlkENBYqc9hMfjcT4hO4K+76SWN62mimQYODvFyfTVMC7WkQ3k/XEnmqUPV5XkbaILbS1d/tA57N148FiJ5/QXtI6Y94imubYyVqU=
|
- secure: sW674wuFZOuoX7jHQHDbX3j8NxL8JxR07cyq+CrrqJ537dU9lxWQmMBRUpOb+p/q7sQ74PUtiKJkmFgKCSJSAKY+nr6GJ8P/q6u5TUKbmUWODSn8znehX2zualfvFwpF4PILok/wUzXBQE62jn4lUua7cMdsHRMNHbLmKqBoVL0meObDDjsaJ/RCbOPuruy3FmgvXPp0+Y4zl1GsklDSyjFzg4LBzjAk9Ryvh1O4zvJBkkyfCgurLKCnOKIPy3v5fPMS9oDfO1aarAVGoZZe416pvTW4hb8cdB6kn9XWYDob4NDFX/sP5k7XIhd/NAIn9LrKFg0sLtATaKLX+BcasF1CgDR/u6+SEeQd5QaRF7Go2Nq5Ltuu4OIFONI2qhEeVDDK6Otf2WSWj9KPno2GHuumBfbg4ypWoJgmZrMXk8JeVV/OP/0jIQz3p/7yfF21X1XBEqYaVHPAMKdEYYkCSa46KfACyOt6LfnkuCHtoTOpFo7sq0omIA2HOtpIx1u3vMBUyAbQqT6cokkKB1b6gNTFwhHc+8ybfLFPljJB8cWshI+V/b06S6fekRmvTNxvDykWNsdlkENBYqc9hMfjcT4hO4K+76SWN62mimQYODvFyfTVMC7WkQ3k/XEnmqUPV5XkbaILbS1d/tA57N148FiJ5/QXtI6Y94imubYyVqU=
|
||||||
- secure: AdKSZKA4gMuKXI4X4dQNJqcMv5OmPIHdN8fpy55Y9yoOQPQHZE3Zwc4QDWBh20q298jyEC854tVTPTysdZ7h+2s2FhsprYv1Bt/QNzKIrLpeIMj2quuVGMbdPuk08y55gost94KwVLJv0sIDpRlB/PEQkA7Mg/UDsT9zR8E1Ms5x+ul2C8e1ag0zzNl1wVnT5jY8WCp74uA/XXCcJl/80qT1stUERazCKwbKNo007hi7rdm4HA7YGevORq8e2r67je+WIBZUAwrHT0Zjuo4ibwUii4LdwvjuN3w0Z6e9Wf4x5bBqGgnih0T31uom2yPjNx+U/c2AWI+Nxfy/SEF2U+9bjBEZ3ZhI7F1B9ofXo2mhvvsVDiUrymMBbG2V64C9kAzeUh7xIBTqIrbdtpAEBV9FlLAtF2swVTwtCgZgcVTOt3RKXCi3X3nk3cuH7PAorFa/QGfT4xxVu2011FVAt2Rm7SD0ZWztZTSTz/4Nt/egtGBOJfrCc7oLEygLzDmLqsqCwCROITVQjWLjrtqDyLteaNiSXeNIQMKun3izApbXnHmXB+FV3R3EZocboqk3v5bmPTahnG6Ghc2zknWyyxSx+O9qIfOpHUL8JMJiT82lUQUeibtCn7DCE8wVQ/gYC5i+a+KO/d3NemSzIFlZ8aoUiEPYq18dYlsDXeLXwF0=
|
- secure: AdKSZKA4gMuKXI4X4dQNJqcMv5OmPIHdN8fpy55Y9yoOQPQHZE3Zwc4QDWBh20q298jyEC854tVTPTysdZ7h+2s2FhsprYv1Bt/QNzKIrLpeIMj2quuVGMbdPuk08y55gost94KwVLJv0sIDpRlB/PEQkA7Mg/UDsT9zR8E1Ms5x+ul2C8e1ag0zzNl1wVnT5jY8WCp74uA/XXCcJl/80qT1stUERazCKwbKNo007hi7rdm4HA7YGevORq8e2r67je+WIBZUAwrHT0Zjuo4ibwUii4LdwvjuN3w0Z6e9Wf4x5bBqGgnih0T31uom2yPjNx+U/c2AWI+Nxfy/SEF2U+9bjBEZ3ZhI7F1B9ofXo2mhvvsVDiUrymMBbG2V64C9kAzeUh7xIBTqIrbdtpAEBV9FlLAtF2swVTwtCgZgcVTOt3RKXCi3X3nk3cuH7PAorFa/QGfT4xxVu2011FVAt2Rm7SD0ZWztZTSTz/4Nt/egtGBOJfrCc7oLEygLzDmLqsqCwCROITVQjWLjrtqDyLteaNiSXeNIQMKun3izApbXnHmXB+FV3R3EZocboqk3v5bmPTahnG6Ghc2zknWyyxSx+O9qIfOpHUL8JMJiT82lUQUeibtCn7DCE8wVQ/gYC5i+a+KO/d3NemSzIFlZ8aoUiEPYq18dYlsDXeLXwF0=
|
||||||
|
|||||||
38
README.md
38
README.md
@@ -4,13 +4,15 @@
|
|||||||
|
|
||||||
# V™
|
# V™
|
||||||
|
|
||||||
VTM was developed within the [OpenScienceMap](https://github.com/opensciencemap) project.
|
<img src="docs/logo/VTM.svg" style="bottom:0;" width="200" align="right">
|
||||||
|
|
||||||
**This fork continues VTM development. And provides compatibility with latest [Mapsforge](https://github.com/mapsforge/mapsforge).**
|
VTM (Vector Tile Map) was developed within the [OpenScienceMap](https://github.com/opensciencemap) project.
|
||||||
|
|
||||||
See the **[integration guide](docs/Integration.md)** and [changelog](docs/Changelog.md). And read through [how to contribute](.github/CONTRIBUTING.md) guidelines.
|
**This fork continues VTM development and provides compatibility with latest [Mapsforge](https://github.com/mapsforge/mapsforge).**
|
||||||
|
|
||||||
If you have any questions or problems, don't hesitate to ask our public [mailing list](https://groups.google.com/group/mapsforge-dev) for help.
|
See the **[integration guide](docs/Integration.md)** and [changelog](docs/Changelog.md). And read through [how to contribute](docs/CONTRIBUTING.md) guidelines.
|
||||||
|
|
||||||
|
If you have any questions or problems, don't hesitate to ask our public [forum](https://groups.google.com/group/mapsforge-dev) for help.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
- Java map library
|
- Java map library
|
||||||
@@ -19,7 +21,7 @@ If you have any questions or problems, don't hesitate to ask our public [mailing
|
|||||||
- Support for multiple tile sources:
|
- Support for multiple tile sources:
|
||||||
- OpenScienceMap vector tiles
|
- OpenScienceMap vector tiles
|
||||||
- Mapsforge vector maps
|
- Mapsforge vector maps
|
||||||
- Mapbox vector tiles (e.g. Mapzen, Nextzen, OpenMapTiles)
|
- Mapbox vector tiles (e.g. Mapilion, Mapzen, Nextzen, OpenMapTiles)
|
||||||
- GeoJSON vector tiles (e.g. Mapzen, Nextzen)
|
- GeoJSON vector tiles (e.g. Mapzen, Nextzen)
|
||||||
- Raster tiles: any quadtree-scheme tiles as texture
|
- Raster tiles: any quadtree-scheme tiles as texture
|
||||||
- Backends:
|
- Backends:
|
||||||
@@ -59,16 +61,24 @@ This library contains code from several projects:
|
|||||||
- **osmdroid** (Apache 2.0): some overlay classes (https://github.com/osmdroid/osmdroid)
|
- **osmdroid** (Apache 2.0): some overlay classes (https://github.com/osmdroid/osmdroid)
|
||||||
- **tessellate** (SGI Free Software License B 2.0): (https://github.com/cscheid/tessellate)
|
- **tessellate** (SGI Free Software License B 2.0): (https://github.com/cscheid/tessellate)
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
VTM library is under [LGPL v3 license](http://www.gnu.org/licenses/lgpl-3.0), with an important simplification: the constraints mentioned in sections LGPL v3 §4(d) and §4(e) are waived.
|
||||||
|
|
||||||
|
This means that you are allowed to convey a Combined Work without providing the user any way to recombine or relink the application and without providing any shared library mechanism.
|
||||||
|
|
||||||
|
In other words, you are allowed to include VTM library in your Android application, without making your application open source.
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
### Android
|
| Android | iOS |
|
||||||

|
| ------------- | ------------- |
|
||||||
|
|<img src="docs/images/android.png" width="1000">|<img src="docs/images/ios.png" width="1000">|
|
||||||
|
|
||||||
### iOS
|
| Desktop |
|
||||||

|
| ------------- |
|
||||||
|
||
|
||||||
|
|
||||||
### Desktop
|
| Browser |
|
||||||

|
| ------------- |
|
||||||
|
||
|
||||||
### Browser
|
|
||||||

|
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.1.4'
|
classpath 'com.android.tools.build:gradle:3.3.2'
|
||||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
|
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -14,8 +14,8 @@ allprojects {
|
|||||||
version = 'master-SNAPSHOT'
|
version = 'master-SNAPSHOT'
|
||||||
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
|
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
|
||||||
|
|
||||||
ext.androidBuildVersionTools = "28.0.2"
|
ext.androidBuildVersionTools = "28.0.3"
|
||||||
ext.gdxVersion = "1.9.8"
|
ext.gdxVersion = "1.9.9"
|
||||||
ext.gwtVersion = "2.8.0"
|
ext.gwtVersion = "2.8.0"
|
||||||
ext.slf4jVersion = "1.7.25"
|
ext.slf4jVersion = "1.7.25"
|
||||||
|
|
||||||
|
|||||||
@@ -9,12 +9,14 @@
|
|||||||
| [Hunt Cyprus](https://play.google.com/store/apps/developer?id=Talent+S.A.) | Map and navigation application for hunters | Proprietary/Free and Commercial | Android | Closed |
|
| [Hunt Cyprus](https://play.google.com/store/apps/developer?id=Talent+S.A.) | Map and navigation application for hunters | Proprietary/Free and Commercial | Android | Closed |
|
||||||
| [Kurviger](https://kurviger.de/en) | Route planner specialized on motorcyclists | Proprietary/Free and Commercial | Android | Closed |
|
| [Kurviger](https://kurviger.de/en) | Route planner specialized on motorcyclists | Proprietary/Free and Commercial | Android | Closed |
|
||||||
| [MapTrek](http://maptrek.mobi) | Application for outdoor activities | GPL3/Free and Commercial | Android | Open |
|
| [MapTrek](http://maptrek.mobi) | Application for outdoor activities | GPL3/Free and Commercial | Android | Open |
|
||||||
|
| [MyRunningApp](https://play.google.com/store/apps/details?id=it.nimarsolutions.rungpstracker) | Fitness app | Proprietary/Free | Android | Closed |
|
||||||
| [MyTourbook](http://mytourbook.sourceforge.net/mytourbook/) | Visualize and analyze tours | GPL2/Free | Desktop | Open |
|
| [MyTourbook](http://mytourbook.sourceforge.net/mytourbook/) | Visualize and analyze tours | GPL2/Free | Desktop | Open |
|
||||||
| [Navi Cyprus](https://play.google.com/store/apps/developer?id=Talent+S.A.) | Map and navigation application | Proprietary/Free and Commercial | Android | Closed |
|
| [Navi Cyprus](https://play.google.com/store/apps/developer?id=Talent+S.A.) | Map and navigation application | Proprietary/Free and Commercial | Android | Closed |
|
||||||
|
| [Pocket Maps](https://github.com/junjunguo/PocketMaps) | Offline maps, routing & tracking functions | MIT/Free | Android | Open |
|
||||||
| Tokyo Ogiqvo | Visualize App | Commercial | [Android](https://play.google.com/store/apps/details?id=com.ogiqvo.view.tokyo&hl=ja), [iOS](https://itunes.apple.com/us/app/tokyo-ogiqvo/id1097100677?mt=8) | Closed |
|
| Tokyo Ogiqvo | Visualize App | Commercial | [Android](https://play.google.com/store/apps/details?id=com.ogiqvo.view.tokyo&hl=ja), [iOS](https://itunes.apple.com/us/app/tokyo-ogiqvo/id1097100677?mt=8) | Closed |
|
||||||
| [topoGuide](http://www.topoguide.gr/index-en.php) | Digital guides for the outdoor | Proprietary/Free and Commercial | Android | Closed |
|
| [topoGuide](http://www.topoguide.gr/index-en.php) | Digital guides for the outdoor | Proprietary/Free and Commercial | Android | Closed |
|
||||||
| [Ubitrek](https://play.google.com/store/apps/details?id=ubicarta.ubitrek) | Hiking with IGN maps | Proprietary/Free | Android | Closed |
|
| [Ubitrek](https://play.google.com/store/apps/details?id=ubicarta.ubitrek) | Hiking with IGN maps | Proprietary/Free | Android | Closed |
|
||||||
| [VTM with Eclipse RCP](https://github.com/wolfgang-ch/vtm-with-rcp) | VTM with an Eclipse RCP application | GPL3/Free | Desktop | Open |
|
| [VTM with Eclipse RCP](https://github.com/wolfgang-ch/vtm-with-rcp) | VTM with an Eclipse RCP application | GPL3/Free | Desktop | Open |
|
||||||
| [XCTrack](http://xctrack.org/) | Flight computer for paraglider pilots | Proprietary/Free | Android | Closed |
|
| [XCTrack](http://xctrack.org/) | Flight computer for paraglider pilots | Proprietary/Free | Android | Closed |
|
||||||
|
|
||||||
You know an application that is missing here? Please inform us by sending a message via our public [mailing list](https://groups.google.com/group/mapsforge-dev).
|
You know an application that is missing here? Please inform us by sending a message via our public [forum](https://groups.google.com/group/mapsforge-dev).
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
As an open source project, we welcome new contributors and appreciate your help.
|
As an open source project, we welcome new contributors and appreciate your help.
|
||||||
|
|
||||||
Before you start working on an unresolved issue or try to implement a new feature, please contact us via our public [mailing list](https://groups.google.com/group/mapsforge-dev).
|
Before you start working on an unresolved issue or try to implement a new feature, please contact us via our public [forum](https://groups.google.com/group/mapsforge-dev).
|
||||||
|
|
||||||
You may also create a new issue on [Github](https://github.com/mapsforge/vtm/issues) or comment on an existing one to describe your ideas. We will then discuss the best way to realize your proposal and figure out how we can help you to get started quickly.
|
You may also create a new issue on [Github](https://github.com/mapsforge/vtm/issues) or comment on an existing one to describe your ideas. We will then discuss the best way to realize your proposal and figure out how we can help you to get started quickly.
|
||||||
|
|
||||||
@@ -10,6 +10,6 @@ If you are only requesting a small change in the code, you may attach a patch fi
|
|||||||
|
|
||||||
Also please keep the pull request commits squashed, in order to avoid the clutter in repository and have only the finally changed files together. One way is described [here](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html).
|
Also please keep the pull request commits squashed, in order to avoid the clutter in repository and have only the finally changed files together. One way is described [here](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html).
|
||||||
|
|
||||||
Regarding syntax make sure your IDE uses for indentation 4 spaces (no tabs) and follow the conventions you already see in the code.
|
Regarding code make sure your IDE uses UTF-8 encoding, for indentation 4 spaces (no tabs) and follow the conventions you already see in the code.
|
||||||
|
|
||||||
Please note that the VTM project is licenced under the [GNU LGPL3 licence](http://www.gnu.org/licenses/lgpl.html). Thus, all your contributions are going to be published under this license.
|
Please note that the VTM project is licenced under the [GNU LGPL3 licence](http://www.gnu.org/licenses/lgpl.html). Thus, all your contributions are going to be published under this license.
|
||||||
@@ -1,5 +1,31 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## Version 0.11.0 (2019-03-25)
|
||||||
|
|
||||||
|
- Render themes: tag transform [#420](https://github.com/mapsforge/vtm/issues/420)
|
||||||
|
- Render themes: PNG scaling [#595](https://github.com/mapsforge/vtm/issues/595)
|
||||||
|
- Building shadows [#575](https://github.com/mapsforge/vtm/issues/575)
|
||||||
|
- Map scaling improvements [#401](https://github.com/mapsforge/vtm/issues/401)
|
||||||
|
- PathLayer(s) scaled width [#594](https://github.com/mapsforge/vtm/issues/594)
|
||||||
|
- Mapilion MVT vector tiles & Hillshading [#614](https://github.com/mapsforge/vtm/issues/614)
|
||||||
|
- Overpass tile source [#663](https://github.com/mapsforge/vtm/issues/663)
|
||||||
|
- vtm-gdx-poi3d module [#600](https://github.com/mapsforge/vtm/pull/600)
|
||||||
|
- vtm-models module [#580](https://github.com/mapsforge/vtm/issues/580)
|
||||||
|
- `ViewController` refactor [#625](https://github.com/mapsforge/vtm/pull/625)
|
||||||
|
- `getMapViewCenter`, `setMapViewCenter` with pivotX, pivotY
|
||||||
|
- `ThemeCallback.getColor` refactor [#274](https://github.com/mapsforge/vtm/issues/274)
|
||||||
|
- Enable physical fling and fling on rotation / scale
|
||||||
|
- `Parameters.ANIMATOR2`
|
||||||
|
- Enable optimal placement of labels or symbols on polygons
|
||||||
|
- `Parameters.POLY_LABEL`
|
||||||
|
- Enable placement of symbols on polygons
|
||||||
|
- `Parameters.POLY_SYMBOL`
|
||||||
|
- OpenGL ES 3.0 support [#646](https://github.com/mapsforge/vtm/issues/646)
|
||||||
|
- OpenGL ES 2.0 complete [#642](https://github.com/mapsforge/vtm/pull/642)
|
||||||
|
- libGDX 1.9.9 [#635](https://github.com/mapsforge/vtm/issues/635)
|
||||||
|
- Many other minor improvements and bug fixes
|
||||||
|
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.11.0)
|
||||||
|
|
||||||
## Version 0.10.0 (2018-08-28)
|
## Version 0.10.0 (2018-08-28)
|
||||||
|
|
||||||
- Map overzoom [#393](https://github.com/mapsforge/vtm/issues/393)
|
- Map overzoom [#393](https://github.com/mapsforge/vtm/issues/393)
|
||||||
@@ -15,11 +41,11 @@
|
|||||||
- Internal render themes improvements [#488](https://github.com/mapsforge/vtm/pull/488)
|
- Internal render themes improvements [#488](https://github.com/mapsforge/vtm/pull/488)
|
||||||
- Map view roll [#474](https://github.com/mapsforge/vtm/pull/474)
|
- Map view roll [#474](https://github.com/mapsforge/vtm/pull/474)
|
||||||
- Physical fling and fling on rotation / scale [#497](https://github.com/mapsforge/vtm/pull/497) [#499](https://github.com/mapsforge/vtm/pull/499)
|
- Physical fling and fling on rotation / scale [#497](https://github.com/mapsforge/vtm/pull/497) [#499](https://github.com/mapsforge/vtm/pull/499)
|
||||||
- `Parameters.ANIMATOR2 = true;`
|
- `Parameters.ANIMATOR2`
|
||||||
- Scale factor for short vertices calculation [#537](https://github.com/mapsforge/vtm/issues/537)
|
- Scale factor for short vertices calculation [#537](https://github.com/mapsforge/vtm/issues/537)
|
||||||
- `Parameters.CUSTOM_COORD_SCALE = false;`
|
- `Parameters.CUSTOM_COORD_SCALE`
|
||||||
- Polygon symbols default disabled [#405](https://github.com/mapsforge/vtm/issues/405)
|
- Polygon symbols default disabled [#405](https://github.com/mapsforge/vtm/issues/405)
|
||||||
- `Parameters.POLY_SYMBOL = true;`
|
- `Parameters.POLY_SYMBOL`
|
||||||
- Map fractional zoom [#487](https://github.com/mapsforge/vtm/issues/487)
|
- Map fractional zoom [#487](https://github.com/mapsforge/vtm/issues/487)
|
||||||
- Render theme fallback internal resources [#477](https://github.com/mapsforge/vtm/issues/477)
|
- Render theme fallback internal resources [#477](https://github.com/mapsforge/vtm/issues/477)
|
||||||
- Fix layers synchronization [#507](https://github.com/mapsforge/vtm/issues/507)
|
- Fix layers synchronization [#507](https://github.com/mapsforge/vtm/issues/507)
|
||||||
@@ -68,7 +94,7 @@
|
|||||||
- BuildingLayer expects height tags in meters
|
- BuildingLayer expects height tags in meters
|
||||||
- Polygon symbol positioning [#405](https://github.com/mapsforge/vtm/issues/405)
|
- Polygon symbol positioning [#405](https://github.com/mapsforge/vtm/issues/405)
|
||||||
- PolyLabel default disabled [#402](https://github.com/mapsforge/vtm/issues/402)
|
- PolyLabel default disabled [#402](https://github.com/mapsforge/vtm/issues/402)
|
||||||
- `Parameters.POLY_LABEL = true;`
|
- `Parameters.POLY_LABEL`
|
||||||
- vtm-theme-comparator module [#387](https://github.com/mapsforge/vtm/issues/387)
|
- vtm-theme-comparator module [#387](https://github.com/mapsforge/vtm/issues/387)
|
||||||
- Feature parameters [#403](https://github.com/mapsforge/vtm/issues/403)
|
- Feature parameters [#403](https://github.com/mapsforge/vtm/issues/403)
|
||||||
- vtm-android-gdx module enhancements [#435](https://github.com/mapsforge/vtm/issues/435)
|
- vtm-android-gdx module enhancements [#435](https://github.com/mapsforge/vtm/issues/435)
|
||||||
@@ -81,13 +107,13 @@
|
|||||||
## Version 0.8.0 (2017-07-19)
|
## Version 0.8.0 (2017-07-19)
|
||||||
|
|
||||||
- Real time (SVG) texture atlas [#63](https://github.com/mapsforge/vtm/issues/63)
|
- Real time (SVG) texture atlas [#63](https://github.com/mapsforge/vtm/issues/63)
|
||||||
- `Parameters.TEXTURE_ATLAS = true;`
|
- `Parameters.TEXTURE_ATLAS`
|
||||||
- Marker clustering [#312](https://github.com/mapsforge/vtm/issues/312)
|
- Marker clustering [#312](https://github.com/mapsforge/vtm/issues/312)
|
||||||
- Osmagray theme [#300](https://github.com/mapsforge/vtm/issues/300)
|
- Osmagray theme [#300](https://github.com/mapsforge/vtm/issues/300)
|
||||||
- Symbol rotation [#294](https://github.com/mapsforge/vtm/issues/294)
|
- Symbol rotation [#294](https://github.com/mapsforge/vtm/issues/294)
|
||||||
- Location renderer improvements [#317](https://github.com/mapsforge/vtm/issues/317)
|
- Location renderer improvements [#317](https://github.com/mapsforge/vtm/issues/317)
|
||||||
- POT textures [#334](https://github.com/mapsforge/vtm/issues/334)
|
- POT textures [#334](https://github.com/mapsforge/vtm/issues/334)
|
||||||
- `Parameters.POT_TEXTURES = true;`
|
- `Parameters.POT_TEXTURES`
|
||||||
- OkHttp external cache [#135](https://github.com/mapsforge/vtm/issues/135)
|
- OkHttp external cache [#135](https://github.com/mapsforge/vtm/issues/135)
|
||||||
- Texture atlas improvements [#301](https://github.com/mapsforge/vtm/pull/301) [#304](https://github.com/mapsforge/vtm/pull/304)
|
- Texture atlas improvements [#301](https://github.com/mapsforge/vtm/pull/301) [#304](https://github.com/mapsforge/vtm/pull/304)
|
||||||
- vtm-json module [#367](https://github.com/mapsforge/vtm/issues/367)
|
- vtm-json module [#367](https://github.com/mapsforge/vtm/issues/367)
|
||||||
@@ -108,7 +134,7 @@
|
|||||||
|
|
||||||
- Mapsforge multiple map files [#208](https://github.com/mapsforge/vtm/issues/208)
|
- Mapsforge multiple map files [#208](https://github.com/mapsforge/vtm/issues/208)
|
||||||
- New gestures implementation [#253](https://github.com/mapsforge/vtm/issues/253)
|
- New gestures implementation [#253](https://github.com/mapsforge/vtm/issues/253)
|
||||||
- `Parameters.MAP_EVENT_LAYER2 = true;`
|
- `Parameters.MAP_EVENT_LAYER2`
|
||||||
- Polygon label position enhancements [#80](https://github.com/mapsforge/vtm/issues/80)
|
- Polygon label position enhancements [#80](https://github.com/mapsforge/vtm/issues/80)
|
||||||
- vtm-web modules update [#51](https://github.com/mapsforge/vtm/issues/51)
|
- vtm-web modules update [#51](https://github.com/mapsforge/vtm/issues/51)
|
||||||
- Mapzen MVT vector tiles [#57](https://github.com/mapsforge/vtm/issues/57)
|
- Mapzen MVT vector tiles [#57](https://github.com/mapsforge/vtm/issues/57)
|
||||||
@@ -144,7 +170,7 @@
|
|||||||
- Location renderer and layer [#171](https://github.com/mapsforge/vtm/issues/171)
|
- Location renderer and layer [#171](https://github.com/mapsforge/vtm/issues/171)
|
||||||
- Map scale bar [#84](https://github.com/mapsforge/vtm/issues/84)
|
- Map scale bar [#84](https://github.com/mapsforge/vtm/issues/84)
|
||||||
- Tile size based on scale factor [#183](https://github.com/mapsforge/vtm/issues/183)
|
- Tile size based on scale factor [#183](https://github.com/mapsforge/vtm/issues/183)
|
||||||
- `Parameters.CUSTOM_TILE_SIZE = false;`
|
- `Parameters.CUSTOM_TILE_SIZE`
|
||||||
- libGDX layer gestures [#151](https://github.com/mapsforge/vtm/issues/151)
|
- libGDX layer gestures [#151](https://github.com/mapsforge/vtm/issues/151)
|
||||||
- Render theme area tessellation option [#37](https://github.com/mapsforge/vtm/issues/37)
|
- Render theme area tessellation option [#37](https://github.com/mapsforge/vtm/issues/37)
|
||||||
- Render theme resources optional location prefixes [#66](https://github.com/mapsforge/vtm/issues/66)
|
- Render theme resources optional location prefixes [#66](https://github.com/mapsforge/vtm/issues/66)
|
||||||
|
|||||||
5
docs/ISSUE_TEMPLATE.md
Normal file
5
docs/ISSUE_TEMPLATE.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
For questions or discussion please always use our Forum first and make sure you read our Contributing Guide.
|
||||||
|
|
||||||
|
- Forum: https://groups.google.com/group/mapsforge-dev
|
||||||
|
|
||||||
|
- Contributing Guide: https://github.com/mapsforge/vtm/blob/master/docs/CONTRIBUTING.md
|
||||||
@@ -36,8 +36,8 @@ implementation 'org.mapsforge:vtm-android-gdx:[CURRENT-VERSION]:natives-armeabi-
|
|||||||
implementation 'org.mapsforge:vtm-android-gdx:[CURRENT-VERSION]:natives-arm64-v8a'
|
implementation 'org.mapsforge:vtm-android-gdx:[CURRENT-VERSION]:natives-arm64-v8a'
|
||||||
implementation 'org.mapsforge:vtm-android-gdx:[CURRENT-VERSION]:natives-x86'
|
implementation 'org.mapsforge:vtm-android-gdx:[CURRENT-VERSION]:natives-x86'
|
||||||
implementation 'org.mapsforge:vtm-android-gdx:[CURRENT-VERSION]:natives-x86_64'
|
implementation 'org.mapsforge:vtm-android-gdx:[CURRENT-VERSION]:natives-x86_64'
|
||||||
implementation 'com.badlogicgames.gdx:gdx:1.9.8'
|
implementation 'com.badlogicgames.gdx:gdx:1.9.9'
|
||||||
implementation 'com.badlogicgames.gdx:gdx-backend-android:1.9.8'
|
implementation 'com.badlogicgames.gdx:gdx-backend-android:1.9.9'
|
||||||
implementation 'com.caverock:androidsvg:1.3'
|
implementation 'com.caverock:androidsvg:1.3'
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -56,9 +56,9 @@ implementation 'org.mapsforge:vtm-desktop:[CURRENT-VERSION]'
|
|||||||
implementation 'org.mapsforge:vtm-desktop:[CURRENT-VERSION]:natives-linux'
|
implementation 'org.mapsforge:vtm-desktop:[CURRENT-VERSION]:natives-linux'
|
||||||
implementation 'org.mapsforge:vtm-desktop:[CURRENT-VERSION]:natives-osx'
|
implementation 'org.mapsforge:vtm-desktop:[CURRENT-VERSION]:natives-osx'
|
||||||
implementation 'org.mapsforge:vtm-desktop:[CURRENT-VERSION]:natives-windows'
|
implementation 'org.mapsforge:vtm-desktop:[CURRENT-VERSION]:natives-windows'
|
||||||
implementation 'com.badlogicgames.gdx:gdx:1.9.8'
|
implementation 'com.badlogicgames.gdx:gdx:1.9.9'
|
||||||
implementation 'com.badlogicgames.gdx:gdx-platform:1.9.8:natives-desktop'
|
implementation 'com.badlogicgames.gdx:gdx-platform:1.9.9:natives-desktop'
|
||||||
implementation 'com.badlogicgames.gdx:gdx-backend-lwjgl:1.9.8'
|
implementation 'com.badlogicgames.gdx:gdx-backend-lwjgl:1.9.9'
|
||||||
implementation 'org.lwjgl.lwjgl:lwjgl:2.9.3'
|
implementation 'org.lwjgl.lwjgl:lwjgl:2.9.3'
|
||||||
implementation 'org.lwjgl.lwjgl:lwjgl-platform:2.9.3:natives-linux'
|
implementation 'org.lwjgl.lwjgl:lwjgl-platform:2.9.3:natives-linux'
|
||||||
implementation 'org.lwjgl.lwjgl:lwjgl-platform:2.9.3:natives-osx'
|
implementation 'org.lwjgl.lwjgl:lwjgl-platform:2.9.3:natives-osx'
|
||||||
|
|||||||
@@ -8,4 +8,4 @@
|
|||||||
- [OpenAndroMaps](http://www.openandromaps.org/en/)
|
- [OpenAndroMaps](http://www.openandromaps.org/en/)
|
||||||
- [OpenMaps](http://openmaps.eu/)
|
- [OpenMaps](http://openmaps.eu/)
|
||||||
|
|
||||||
You know a Mapsforge map provider that is missing here? Please inform us by sending a message via our public [mailing list](https://groups.google.com/group/mapsforge-dev).
|
You know a Mapsforge map provider that is missing here? Please inform us by sending a message via our public [forum](https://groups.google.com/group/mapsforge-dev).
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
**This article describes how to use XML-based render-themes to style maps.**
|
**This article describes how to use XML-based render-themes to style maps.**
|
||||||
|
|
||||||
If you have any questions or problems, don't hesitate to ask our public [mapsforge-dev](https://groups.google.com/group/mapsforge-dev) mailing list for help. You can also report bugs and improvement requests via our [issue tracker](https://github.com/mapsforge/vtm/issues).
|
If you have any questions or problems, don't hesitate to ask our public [forum](https://groups.google.com/group/mapsforge-dev) for help. You can also report bugs and improvement requests via our [issue tracker](https://github.com/mapsforge/vtm/issues).
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
@@ -14,13 +14,13 @@ It is always recommended to study the [default](https://github.com/mapsforge/vtm
|
|||||||
|
|
||||||
## Rules
|
## Rules
|
||||||
|
|
||||||
A rule element `<m/>` has several attributes to specify which map elements the rule matches. Non of them is required.
|
A rule element `<m/>` (_match_) has several attributes to specify which map elements the rule matches. Non of them is required.
|
||||||
|
|
||||||
|**Attribute**|**Valid values**|**Description**|**Default**|
|
|**Attribute**|**Valid values**|**Description**|**Default**|
|
||||||
|-------------|----------------|---------------|------------|
|
|-------------|----------------|---------------|------------|
|
||||||
|e|<ul><li>node</li><li>way</li><li>any</li></ul>|Defines which map element type will be matched.|*any*|
|
|e|<ul><li>node</li><li>way</li><li>any</li></ul>|Defines which map element type will be matched.|*any*|
|
||||||
|k|[string](http://www.w3.org/TR/xmlschema-2/#string)|The key of the OpenStreetMap tag. <ul><li>A vertical bar "`\|`" can be used to specify multiple keys.</li>|any key|
|
|k|[string](http://www.w3.org/TR/xmlschema-2/#string)|The key of the tile source tag. <ul><li>A vertical bar "`\|`" can be used to specify multiple keys.</li>|any key|
|
||||||
|v|[string](http://www.w3.org/TR/xmlschema-2/#string)|The value of the OpenStreetMap tag. <ul><li>A vertical bar "`\|`" can be used to specify multiple values.</li><li>A minus sign "`-`" excludes the other values after "`\|`". It never works alone.</li><li>A tilde "`~`" matches if the map element does not have a tag with the specified key.</li>|any value|
|
|v|[string](http://www.w3.org/TR/xmlschema-2/#string)|The value of the tile source tag. <ul><li>A vertical bar "`\|`" can be used to specify multiple values.</li><li>A minus sign "`-`" excludes the other values after "`\|`". It never works alone.</li><li>A tilde "`~`" matches if the map element does not have a tag with the specified key.</li>|any value|
|
||||||
|closed|<ul><li>yes</li><li>no</li><li>any</li></ul>|Defines which ways will be matched. A way is considered as closed if its first node and its last node are equal.|*any*|
|
|closed|<ul><li>yes</li><li>no</li><li>any</li></ul>|Defines which ways will be matched. A way is considered as closed if its first node and its last node are equal.|*any*|
|
||||||
|select|<ul><li>first</li><li>when-matched</li><li>any</li></ul>|<ul><li>Only add the first matching sub-rule in this rule section (the others are ignored)</li><li>Select all matches of the enclosing rule section</li><li>Select all (whether it was matched or not)</li></ul>|*any*|
|
|select|<ul><li>first</li><li>when-matched</li><li>any</li></ul>|<ul><li>Only add the first matching sub-rule in this rule section (the others are ignored)</li><li>Select all matches of the enclosing rule section</li><li>Select all (whether it was matched or not)</li></ul>|*any*|
|
||||||
|zoom-min|[unsigned byte](http://www.w3.org/TR/xmlschema-2/#unsignedByte)|The minimum zoom level on which the rule will be matched.|*0*|
|
|zoom-min|[unsigned byte](http://www.w3.org/TR/xmlschema-2/#unsignedByte)|The minimum zoom level on which the rule will be matched.|*0*|
|
||||||
|
|||||||
@@ -6,3 +6,12 @@ e.g. for `vtm-playground` can change the [mainClassName](../vtm-playground/build
|
|||||||
```groovy
|
```groovy
|
||||||
./gradlew :vtm-playground:run -Pargs=/path/to/map
|
./gradlew :vtm-playground:run -Pargs=/path/to/map
|
||||||
```
|
```
|
||||||
|
|
||||||
|
To create a standalone executable jar, adapt the main class in [build gradle](../vtm-playground/build.gradle), then run:
|
||||||
|
```groovy
|
||||||
|
./gradlew :vtm-playground:fatJar
|
||||||
|
```
|
||||||
|
The jar file can be found in `build/libs` folder. Depending on the main class, pass args on execution via command line:
|
||||||
|
```
|
||||||
|
java -jar vtm-playground-master-SNAPSHOT-jar-with-dependencies.jar /path/to/map
|
||||||
|
```
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 717 KiB After Width: | Height: | Size: 2.5 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 791 KiB After Width: | Height: | Size: 1.3 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 580 KiB After Width: | Height: | Size: 1.6 MiB |
22
docs/web.md
22
docs/web.md
@@ -5,3 +5,25 @@
|
|||||||
Then go to [http://localhost:8080/vtm-web-app](http://localhost:8080/vtm-web-app) in the web browser to see the map.
|
Then go to [http://localhost:8080/vtm-web-app](http://localhost:8080/vtm-web-app) in the web browser to see the map.
|
||||||
|
|
||||||
Hold right mouse button to change view direction.
|
Hold right mouse button to change view direction.
|
||||||
|
|
||||||
|
#### Debugging GWT app
|
||||||
|
|
||||||
|
Using GWT SuperDevMode is the recommended way for development. Debugging in IDE is often not possible.
|
||||||
|
|
||||||
|
For an introduction see [GWT](http://www.gwtproject.org/articles/superdevmode.html) and [libGDX](http://www.badlogicgames.com/wordpress/?p=3073) documentations.
|
||||||
|
|
||||||
|
- Serve the website as usual with `./gradlew :vtm-web-app:farmRun` command.
|
||||||
|
|
||||||
|
- The codeserver must be executed on another shell.
|
||||||
|
```bash
|
||||||
|
export _JAVA_OPTIONS="-Xmx1024m"
|
||||||
|
./gradlew :vtm-web-app:gwtSuperDev
|
||||||
|
```
|
||||||
|
|
||||||
|
- Open the link of codeserver: `The code server is ready at http://127.0.0.1:xxxx/`
|
||||||
|
|
||||||
|
- Drag the two bookmarklets to your browser's bookmark bar.
|
||||||
|
|
||||||
|
- Visit your [web page](http://localhost:8080/vtm-web-app) and click **Dev Mode On** to start development mode.
|
||||||
|
|
||||||
|
- Press **F12** to open the developer tools of your browser. Now you can debug your code under **Sources**.
|
||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,5 @@
|
|||||||
#Wed Mar 28 09:56:50 EEST 2018
|
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
|
|
||||||
|
|||||||
@@ -6,5 +6,4 @@ dependencies {
|
|||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main.java.srcDirs = ['src']
|
main.java.srcDirs = ['src']
|
||||||
main.resources.srcDirs = ['src']
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -245,6 +245,9 @@
|
|||||||
<xs:attribute name="line-color" type="tns:color" use="optional" />
|
<xs:attribute name="line-color" type="tns:color" use="optional" />
|
||||||
<xs:attribute name="side-color" type="tns:color" use="required" />
|
<xs:attribute name="side-color" type="tns:color" use="required" />
|
||||||
<xs:attribute name="top-color" type="tns:color" use="required" />
|
<xs:attribute name="top-color" type="tns:color" use="required" />
|
||||||
|
<xs:attribute name="hsv-h" default="0" type="xs:double" use="optional" />
|
||||||
|
<xs:attribute name="hsv-s" default="1" type="xs:double" use="optional" />
|
||||||
|
<xs:attribute name="hsv-v" default="1" type="xs:double" use="optional" />
|
||||||
<!-- 12m default -->
|
<!-- 12m default -->
|
||||||
<xs:attribute name="default-height" default="12" type="xs:positiveInteger" use="optional" />
|
<xs:attribute name="default-height" default="12" type="xs:positiveInteger" use="optional" />
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
@@ -301,11 +304,24 @@
|
|||||||
<xs:attribute name="id" type="xs:string" use="required" />
|
<xs:attribute name="id" type="xs:string" use="required" />
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
|
|
||||||
|
<!-- tag-transform element -->
|
||||||
|
<xs:complexType name="tag-transform">
|
||||||
|
<xs:attribute name="k" type="xs:string" use="required" />
|
||||||
|
<xs:attribute name="v" type="xs:string" use="optional" />
|
||||||
|
<xs:attribute name="k-lib" type="xs:string" use="required" />
|
||||||
|
<xs:attribute name="v-lib" type="xs:string" use="optional" />
|
||||||
|
</xs:complexType>
|
||||||
|
|
||||||
<!-- rendertheme element -->
|
<!-- rendertheme element -->
|
||||||
<xs:complexType name="rendertheme">
|
<xs:complexType name="rendertheme">
|
||||||
<xs:sequence maxOccurs="1" minOccurs="0">
|
<xs:sequence maxOccurs="1" minOccurs="0">
|
||||||
<xs:element name="stylemenu" maxOccurs="1" minOccurs="0" type="tns:stylemenu" />
|
<xs:element name="stylemenu" maxOccurs="1" minOccurs="0" type="tns:stylemenu" />
|
||||||
|
|
||||||
|
<!-- tag definitions -->
|
||||||
|
<xs:choice maxOccurs="unbounded" minOccurs="0">
|
||||||
|
<xs:element name="tag-transform" type="tns:tag-transform" />
|
||||||
|
</xs:choice>
|
||||||
|
|
||||||
<!-- style definitions -->
|
<!-- style definitions -->
|
||||||
<xs:sequence maxOccurs="256" minOccurs="0">
|
<xs:sequence maxOccurs="256" minOccurs="0">
|
||||||
<xs:choice maxOccurs="unbounded" minOccurs="0">
|
<xs:choice maxOccurs="unbounded" minOccurs="0">
|
||||||
|
|||||||
@@ -7,12 +7,14 @@ include ':vtm-app'
|
|||||||
include ':vtm-desktop'
|
include ':vtm-desktop'
|
||||||
include ':vtm-extras'
|
include ':vtm-extras'
|
||||||
include ':vtm-gdx'
|
include ':vtm-gdx'
|
||||||
|
include ':vtm-gdx-poi3d'
|
||||||
include ':vtm-http'
|
include ':vtm-http'
|
||||||
include ':vtm-ios'
|
include ':vtm-ios'
|
||||||
include ':vtm-ios-example'
|
include ':vtm-ios-example'
|
||||||
include ':vtm-jeo'
|
include ':vtm-jeo'
|
||||||
include ':vtm-json'
|
include ':vtm-json'
|
||||||
include ':vtm-jts'
|
include ':vtm-jts'
|
||||||
|
include ':vtm-models'
|
||||||
include ':vtm-mvt'
|
include ':vtm-mvt'
|
||||||
include ':vtm-playground'
|
include ':vtm-playground'
|
||||||
include ':vtm-tests'
|
include ':vtm-tests'
|
||||||
|
|||||||
@@ -22,9 +22,6 @@
|
|||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
|
||||||
android:name=".Animator2Activity"
|
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".AtlasMarkerOverlayActivity"
|
android:name=".AtlasMarkerOverlayActivity"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize" />
|
android:configChanges="keyboardHidden|orientation|screenSize" />
|
||||||
@@ -46,6 +43,9 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".GdxActivity"
|
android:name=".GdxActivity"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize" />
|
android:configChanges="keyboardHidden|orientation|screenSize" />
|
||||||
|
<activity
|
||||||
|
android:name=".GdxPoi3DActivity"
|
||||||
|
android:configChanges="keyboardHidden|orientation|screenSize" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".JeoIndoorActivity"
|
android:name=".JeoIndoorActivity"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize" />
|
android:configChanges="keyboardHidden|orientation|screenSize" />
|
||||||
@@ -64,6 +64,9 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".MapEventLayer2Activity"
|
android:name=".MapEventLayer2Activity"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize" />
|
android:configChanges="keyboardHidden|orientation|screenSize" />
|
||||||
|
<activity
|
||||||
|
android:name=".MapilionMvtActivity"
|
||||||
|
android:configChanges="keyboardHidden|orientation|screenSize" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".MapsforgeActivity"
|
android:name=".MapsforgeActivity"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize" />
|
android:configChanges="keyboardHidden|orientation|screenSize" />
|
||||||
@@ -73,9 +76,6 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".MapsforgeActivity$ThemeFilePicker"
|
android:name=".MapsforgeActivity$ThemeFilePicker"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize" />
|
android:configChanges="keyboardHidden|orientation|screenSize" />
|
||||||
<activity
|
|
||||||
android:name=".MapsforgePolyLabelActivity"
|
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".MapsforgeS3DBActivity"
|
android:name=".MapsforgeS3DBActivity"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize" />
|
android:configChanges="keyboardHidden|orientation|screenSize" />
|
||||||
@@ -106,6 +106,9 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".OSciMapS3DBActivity"
|
android:name=".OSciMapS3DBActivity"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize" />
|
android:configChanges="keyboardHidden|orientation|screenSize" />
|
||||||
|
<activity
|
||||||
|
android:name=".OverpassActivity"
|
||||||
|
android:configChanges="keyboardHidden|orientation|screenSize" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".PathOverlayActivity"
|
android:name=".PathOverlayActivity"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize" />
|
android:configChanges="keyboardHidden|orientation|screenSize" />
|
||||||
@@ -124,6 +127,9 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".RotateMarkerOverlayActivity"
|
android:name=".RotateMarkerOverlayActivity"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize" />
|
android:configChanges="keyboardHidden|orientation|screenSize" />
|
||||||
|
<activity
|
||||||
|
android:name=".ShadowActivity"
|
||||||
|
android:configChanges="keyboardHidden|orientation|screenSize" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".SimpleMapActivity"
|
android:name=".SimpleMapActivity"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize" />
|
android:configChanges="keyboardHidden|orientation|screenSize" />
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ configurations.all {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project(':vtm-android')
|
implementation project(':vtm-android')
|
||||||
|
implementation project(':vtm-extras')
|
||||||
implementation project(':vtm-http')
|
implementation project(':vtm-http')
|
||||||
implementation project(':vtm-jeo')
|
implementation project(':vtm-jeo')
|
||||||
implementation project(':vtm-json')
|
implementation project(':vtm-json')
|
||||||
@@ -19,7 +20,7 @@ dependencies {
|
|||||||
|
|
||||||
implementation project(':vtm-android-gdx')
|
implementation project(':vtm-android-gdx')
|
||||||
implementation project(':vtm-gdx')
|
implementation project(':vtm-gdx')
|
||||||
implementation "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
|
implementation project(':vtm-gdx-poi3d')
|
||||||
|
|
||||||
implementation 'org.mapsforge:mapsforge-poi-android:master-SNAPSHOT'
|
implementation 'org.mapsforge:mapsforge-poi-android:master-SNAPSHOT'
|
||||||
implementation 'org.mapsforge:sqlite-android:master-SNAPSHOT:natives-armeabi-v7a'
|
implementation 'org.mapsforge:sqlite-android:master-SNAPSHOT:natives-armeabi-v7a'
|
||||||
@@ -48,7 +49,6 @@ android {
|
|||||||
main {
|
main {
|
||||||
manifest.srcFile 'AndroidManifest.xml'
|
manifest.srcFile 'AndroidManifest.xml'
|
||||||
java.srcDirs = ['src']
|
java.srcDirs = ['src']
|
||||||
resources.srcDirs = ['src']
|
|
||||||
res.srcDirs = ['res']
|
res.srcDirs = ['res']
|
||||||
assets.srcDirs = ['assets']
|
assets.srcDirs = ['assets']
|
||||||
file("${rootDir}/vtm-android/natives").eachDir() { dir ->
|
file("${rootDir}/vtm-android/natives").eachDir() { dir ->
|
||||||
|
|||||||
58
vtm-android-example/res/layout/activity_map_poi.xml
Normal file
58
vtm-android-example/res/layout/activity_map_poi.xml
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<org.oscim.android.MapView
|
||||||
|
android:id="@+id/mapView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ToggleButton
|
||||||
|
android:id="@+id/toggleControls"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="top|start"
|
||||||
|
android:onClick="onToggleControls" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/controls"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="#bb000000"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
|
<ListView
|
||||||
|
android:id="@+id/search_list"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/add_item"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/add" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/start_search"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/search" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
36
vtm-android-example/res/layout/activity_shadow.xml
Normal file
36
vtm-android-example/res/layout/activity_shadow.xml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<org.oscim.android.MapView
|
||||||
|
android:id="@+id/mapView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="#cc000000"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<SeekBar
|
||||||
|
android:id="@+id/seekBarShadow"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:max="2000"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:progress="400" />
|
||||||
|
|
||||||
|
<ToggleButton
|
||||||
|
android:id="@+id/toggleCurrentSun"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical|center_horizontal"
|
||||||
|
android:onClick="onToggleCurrentSun"
|
||||||
|
android:textOn="@string/now" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
33
vtm-android-example/res/layout/item_poi_search.xml
Normal file
33
vtm-android-example/res/layout/item_poi_search.xml
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/key"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:hint="@string/search_key"
|
||||||
|
android:inputType="text"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textColor="@android:color/white" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/value"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:hint="@string/search_value"
|
||||||
|
android:inputType="text"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textColor="@android:color/white" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/remove"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/remove" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@@ -7,10 +7,6 @@
|
|||||||
<string name="theme_tubes">Tubes</string>
|
<string name="theme_tubes">Tubes</string>
|
||||||
<string name="theme_newtron">NewTron</string>
|
<string name="theme_newtron">NewTron</string>
|
||||||
<string name="theme_external">External theme</string>
|
<string name="theme_external">External theme</string>
|
||||||
<string name="ok">OK</string>
|
|
||||||
<string name="cancel">Cancel</string>
|
|
||||||
<string name="error">Error</string>
|
|
||||||
<string name="file_invalid">The selected file is invalid.</string>
|
|
||||||
<string name="styler_mode_line">Line</string>
|
<string name="styler_mode_line">Line</string>
|
||||||
<string name="styler_mode_area">Area</string>
|
<string name="styler_mode_area">Area</string>
|
||||||
<string name="styler_mode_outline">Outline</string>
|
<string name="styler_mode_outline">Outline</string>
|
||||||
@@ -19,5 +15,15 @@
|
|||||||
<string name="style_2">Hide nature</string>
|
<string name="style_2">Hide nature</string>
|
||||||
<string name="menu_gridlayer">Grid</string>
|
<string name="menu_gridlayer">Grid</string>
|
||||||
<string name="dialog_reverse_geocoding_title">Reverse Geocoding</string>
|
<string name="dialog_reverse_geocoding_title">Reverse Geocoding</string>
|
||||||
|
<string name="add">Add</string>
|
||||||
|
<string name="cancel">Cancel</string>
|
||||||
|
<string name="error">Error</string>
|
||||||
|
<string name="file_invalid">The selected file is invalid.</string>
|
||||||
|
<string name="ok">OK</string>
|
||||||
|
<string name="remove">Remove</string>
|
||||||
|
<string name="search">Search</string>
|
||||||
|
<string name="search_key">\'*\' or OSM key</string>
|
||||||
|
<string name="search_value">void or value</string>
|
||||||
|
<string name="now">Now</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
public class BaseMapActivity extends MapActivity {
|
public class BaseMapActivity extends MapActivity {
|
||||||
static final Logger log = LoggerFactory.getLogger(BaseMapActivity.class);
|
static final Logger log = LoggerFactory.getLogger(BaseMapActivity.class);
|
||||||
|
|
||||||
final static boolean USE_CACHE = false;
|
static final boolean USE_CACHE = false;
|
||||||
|
|
||||||
VectorTileLayer mBaseLayer;
|
VectorTileLayer mBaseLayer;
|
||||||
TileSource mTileSource;
|
TileSource mTileSource;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public class BitmapTileActivity extends MapActivity {
|
|||||||
|
|
||||||
static final Logger log = LoggerFactory.getLogger(BitmapTileActivity.class);
|
static final Logger log = LoggerFactory.getLogger(BitmapTileActivity.class);
|
||||||
|
|
||||||
private final static boolean USE_CACHE = false;
|
private static final boolean USE_CACHE = false;
|
||||||
|
|
||||||
private final BitmapTileSource mTileSource;
|
private final BitmapTileSource mTileSource;
|
||||||
protected BitmapTileLayer mBitmapLayer;
|
protected BitmapTileLayer mBitmapLayer;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
* Copyright 2016-2018 devemux86
|
* Copyright 2016-2018 devemux86
|
||||||
* Copyright 2018 Gustl22
|
* Copyright 2018-2019 Gustl22
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
*
|
*
|
||||||
@@ -23,16 +23,26 @@ import android.util.DisplayMetrics;
|
|||||||
|
|
||||||
import com.badlogic.gdx.backends.android.AndroidApplication;
|
import com.badlogic.gdx.backends.android.AndroidApplication;
|
||||||
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
|
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
|
||||||
|
import com.badlogic.gdx.graphics.glutils.GLVersion;
|
||||||
import com.badlogic.gdx.utils.SharedLibraryLoader;
|
import com.badlogic.gdx.utils.SharedLibraryLoader;
|
||||||
|
|
||||||
import org.oscim.android.MapPreferences;
|
import org.oscim.android.MapPreferences;
|
||||||
import org.oscim.android.canvas.AndroidGraphics;
|
import org.oscim.android.canvas.AndroidGraphics;
|
||||||
import org.oscim.backend.CanvasAdapter;
|
import org.oscim.backend.CanvasAdapter;
|
||||||
|
import org.oscim.backend.DateTime;
|
||||||
|
import org.oscim.backend.DateTimeAdapter;
|
||||||
import org.oscim.backend.GLAdapter;
|
import org.oscim.backend.GLAdapter;
|
||||||
import org.oscim.core.Tile;
|
import org.oscim.core.Tile;
|
||||||
import org.oscim.gdx.AndroidGL;
|
import org.oscim.gdx.AndroidGL;
|
||||||
|
import org.oscim.gdx.AndroidGL30;
|
||||||
import org.oscim.gdx.GdxAssets;
|
import org.oscim.gdx.GdxAssets;
|
||||||
import org.oscim.gdx.GdxMap;
|
import org.oscim.gdx.GdxMap;
|
||||||
|
import org.oscim.gdx.poi3d.Poi3DLayer;
|
||||||
|
import org.oscim.layers.tile.buildings.BuildingLayer;
|
||||||
|
import org.oscim.layers.tile.buildings.S3DBLayer;
|
||||||
|
import org.oscim.layers.tile.vector.VectorTileLayer;
|
||||||
|
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
||||||
|
import org.oscim.theme.VtmThemes;
|
||||||
import org.oscim.tiling.TileSource;
|
import org.oscim.tiling.TileSource;
|
||||||
import org.oscim.tiling.source.OkHttpEngine;
|
import org.oscim.tiling.source.OkHttpEngine;
|
||||||
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
|
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
|
||||||
@@ -40,13 +50,25 @@ import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
|
|||||||
public class GdxActivity extends AndroidApplication {
|
public class GdxActivity extends AndroidApplication {
|
||||||
MapPreferences mPrefs;
|
MapPreferences mPrefs;
|
||||||
|
|
||||||
|
private boolean mPoi3d;
|
||||||
|
private boolean mS3db;
|
||||||
|
|
||||||
|
public GdxActivity() {
|
||||||
|
this(false, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public GdxActivity(boolean s3db, boolean poi3d) {
|
||||||
|
mS3db = s3db;
|
||||||
|
mPoi3d = poi3d;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
AndroidGraphics.init();
|
AndroidGraphics.init();
|
||||||
GdxAssets.init("");
|
GdxAssets.init("");
|
||||||
GLAdapter.init(new AndroidGL());
|
DateTimeAdapter.init(new DateTime());
|
||||||
|
|
||||||
DisplayMetrics metrics = getResources().getDisplayMetrics();
|
DisplayMetrics metrics = getResources().getDisplayMetrics();
|
||||||
CanvasAdapter.dpi = (int) (metrics.scaledDensity * CanvasAdapter.DEFAULT_DPI);
|
CanvasAdapter.dpi = (int) (metrics.scaledDensity * CanvasAdapter.DEFAULT_DPI);
|
||||||
@@ -63,13 +85,31 @@ public class GdxActivity extends AndroidApplication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class GdxMapAndroid extends GdxMap {
|
class GdxMapAndroid extends GdxMap {
|
||||||
|
@Override
|
||||||
|
protected void initGLAdapter(GLVersion version) {
|
||||||
|
if (version.getMajorVersion() >= 3)
|
||||||
|
GLAdapter.init(new AndroidGL30());
|
||||||
|
else
|
||||||
|
GLAdapter.init(new AndroidGL());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createLayers() {
|
public void createLayers() {
|
||||||
TileSource ts = OSciMap4TileSource.builder()
|
TileSource tileSource = OSciMap4TileSource.builder()
|
||||||
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
||||||
.build();
|
.build();
|
||||||
initDefaultLayers(ts, false, true, true);
|
VectorTileLayer l = mMap.setBaseMap(tileSource);
|
||||||
|
mMap.setTheme(VtmThemes.DEFAULT);
|
||||||
|
|
||||||
|
if (mS3db)
|
||||||
|
mMap.layers().add(new S3DBLayer(mMap, l));
|
||||||
|
else
|
||||||
|
mMap.layers().add(new BuildingLayer(mMap, l));
|
||||||
|
|
||||||
|
if (mPoi3d)
|
||||||
|
mMap.layers().add(new Poi3DLayer(mMap, l));
|
||||||
|
|
||||||
|
mMap.layers().add(new LabelLayer(mMap, l));
|
||||||
mPrefs.load(getMap());
|
mPrefs.load(getMap());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2018 devemux86
|
* Copyright 2018 Gustl22
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify it under the
|
* This program is free software: you can redistribute it and/or modify it under the
|
||||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||||
@@ -14,19 +14,9 @@
|
|||||||
*/
|
*/
|
||||||
package org.oscim.android.test;
|
package org.oscim.android.test;
|
||||||
|
|
||||||
import org.oscim.utils.Parameters;
|
public class GdxPoi3DActivity extends GdxActivity {
|
||||||
|
|
||||||
public class Animator2Activity extends MarkerOverlayActivity {
|
public GdxPoi3DActivity() {
|
||||||
|
super(false, true);
|
||||||
public Animator2Activity() {
|
|
||||||
super();
|
|
||||||
Parameters.ANIMATOR2 = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onDestroy() {
|
|
||||||
super.onDestroy();
|
|
||||||
|
|
||||||
Parameters.ANIMATOR2 = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2018 devemux86
|
* Copyright 2018-2019 devemux86
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify it under the
|
* This program is free software: you can redistribute it and/or modify it under the
|
||||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||||
@@ -35,13 +35,12 @@ import java.io.File;
|
|||||||
/**
|
/**
|
||||||
* A very basic Android app example.
|
* A very basic Android app example.
|
||||||
* <p>
|
* <p>
|
||||||
* You'll need a map with filename germany.map from download.mapsforge.org in device storage.
|
* You'll need a map with filename berlin.map from download.mapsforge.org in device storage.
|
||||||
* Can be berlin.map renamed as germany.map because of smaller size.
|
|
||||||
*/
|
*/
|
||||||
public class GettingStarted extends Activity {
|
public class GettingStarted extends Activity {
|
||||||
|
|
||||||
// Name of the map file in device storage
|
// Name of the map file in device storage
|
||||||
private static final String MAP_FILE = "germany.map";
|
private static final String MAP_FILE = "berlin.map";
|
||||||
|
|
||||||
private MapView mapView;
|
private MapView mapView;
|
||||||
private MapScaleBar mapScaleBar;
|
private MapScaleBar mapScaleBar;
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ public class MapActivity extends Activity {
|
|||||||
this(R.layout.activity_map);
|
this(R.layout.activity_map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(mContentView);
|
setContentView(mContentView);
|
||||||
|
|||||||
@@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2018-2019 devemux86
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify it under the
|
||||||
|
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||||
|
* Foundation, either version 3 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License along with
|
||||||
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.oscim.android.test;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import org.oscim.android.cache.TileCache;
|
||||||
|
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
||||||
|
import org.oscim.layers.tile.buildings.BuildingLayer;
|
||||||
|
import org.oscim.layers.tile.vector.VectorTileLayer;
|
||||||
|
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
||||||
|
import org.oscim.theme.VtmThemes;
|
||||||
|
import org.oscim.tiling.source.OkHttpEngine;
|
||||||
|
import org.oscim.tiling.source.UrlTileSource;
|
||||||
|
import org.oscim.tiling.source.bitmap.DefaultSources;
|
||||||
|
import org.oscim.tiling.source.mvt.MapilionMvtTileSource;
|
||||||
|
|
||||||
|
public class MapilionMvtActivity extends MapActivity {
|
||||||
|
|
||||||
|
// Metered API key for demonstration purposes
|
||||||
|
private static final String API_KEY = "3b3d8353-0fb8-4513-bfe0-d620b2d77c45";
|
||||||
|
|
||||||
|
private static final boolean USE_CACHE = false;
|
||||||
|
|
||||||
|
private TileCache mCache;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
OkHttpEngine.OkHttpFactory factory = new OkHttpEngine.OkHttpFactory();
|
||||||
|
|
||||||
|
UrlTileSource tileSource = MapilionMvtTileSource.builder()
|
||||||
|
.apiKey(API_KEY)
|
||||||
|
.httpFactory(factory)
|
||||||
|
//.locale("en")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
if (USE_CACHE) {
|
||||||
|
// Cache the tiles into a local SQLite database
|
||||||
|
mCache = new TileCache(this, null, "tile.db");
|
||||||
|
mCache.setCacheSize(512 * (1 << 10));
|
||||||
|
tileSource.setCache(mCache);
|
||||||
|
}
|
||||||
|
|
||||||
|
VectorTileLayer l = mMap.setBaseMap(tileSource);
|
||||||
|
mMap.setTheme(VtmThemes.OPENMAPTILES);
|
||||||
|
|
||||||
|
// Hillshading
|
||||||
|
UrlTileSource shadedTileSource = DefaultSources.MAPILION_HILLSHADE_2
|
||||||
|
.apiKey(API_KEY)
|
||||||
|
.httpFactory(factory)
|
||||||
|
.build();
|
||||||
|
mMap.layers().add(new BitmapTileLayer(mMap, shadedTileSource));
|
||||||
|
|
||||||
|
mMap.layers().add(new BuildingLayer(mMap, l));
|
||||||
|
mMap.layers().add(new LabelLayer(mMap, l));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
|
||||||
|
if (mCache != null)
|
||||||
|
mCache.dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -80,6 +80,11 @@ public class MapsforgeActivity extends MapActivity {
|
|||||||
mS3db = s3db;
|
mS3db = s3db;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MapsforgeActivity(boolean s3db, int contentView) {
|
||||||
|
super(contentView);
|
||||||
|
mS3db = s3db;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ package org.oscim.android.test;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import org.oscim.android.cache.TileCache;
|
import org.oscim.android.cache.TileCache;
|
||||||
import org.oscim.layers.TileGridLayer;
|
|
||||||
import org.oscim.layers.tile.buildings.BuildingLayer;
|
import org.oscim.layers.tile.buildings.BuildingLayer;
|
||||||
import org.oscim.layers.tile.vector.VectorTileLayer;
|
import org.oscim.layers.tile.vector.VectorTileLayer;
|
||||||
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
||||||
@@ -54,8 +53,6 @@ public class MapzenGeojsonActivity extends MapActivity {
|
|||||||
|
|
||||||
mMap.layers().add(new BuildingLayer(mMap, l));
|
mMap.layers().add(new BuildingLayer(mMap, l));
|
||||||
mMap.layers().add(new LabelLayer(mMap, l));
|
mMap.layers().add(new LabelLayer(mMap, l));
|
||||||
|
|
||||||
mMap.layers().add(new TileGridLayer(mMap));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ package org.oscim.android.test;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import org.oscim.android.cache.TileCache;
|
import org.oscim.android.cache.TileCache;
|
||||||
import org.oscim.layers.TileGridLayer;
|
|
||||||
import org.oscim.layers.tile.buildings.BuildingLayer;
|
import org.oscim.layers.tile.buildings.BuildingLayer;
|
||||||
import org.oscim.layers.tile.vector.VectorTileLayer;
|
import org.oscim.layers.tile.vector.VectorTileLayer;
|
||||||
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
||||||
@@ -55,8 +54,6 @@ public class MapzenMvtActivity extends MapActivity {
|
|||||||
|
|
||||||
mMap.layers().add(new BuildingLayer(mMap, l));
|
mMap.layers().add(new BuildingLayer(mMap, l));
|
||||||
mMap.layers().add(new LabelLayer(mMap, l));
|
mMap.layers().add(new LabelLayer(mMap, l));
|
||||||
|
|
||||||
mMap.layers().add(new TileGridLayer(mMap));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ public class MultiMapViewActivity extends Activity {
|
|||||||
private MapView mMapView1, mMapView2;
|
private MapView mMapView1, mMapView2;
|
||||||
private MapPreferences mPrefs1, mPrefs2;
|
private MapPreferences mPrefs1, mPrefs2;
|
||||||
|
|
||||||
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_map_multi);
|
setContentView(R.layout.activity_map_multi);
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ package org.oscim.android.test;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import org.oscim.android.cache.TileCache;
|
import org.oscim.android.cache.TileCache;
|
||||||
import org.oscim.layers.TileGridLayer;
|
|
||||||
import org.oscim.layers.tile.buildings.BuildingLayer;
|
import org.oscim.layers.tile.buildings.BuildingLayer;
|
||||||
import org.oscim.layers.tile.vector.VectorTileLayer;
|
import org.oscim.layers.tile.vector.VectorTileLayer;
|
||||||
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
||||||
@@ -54,8 +53,6 @@ public class NextzenGeojsonActivity extends MapActivity {
|
|||||||
|
|
||||||
mMap.layers().add(new BuildingLayer(mMap, l));
|
mMap.layers().add(new BuildingLayer(mMap, l));
|
||||||
mMap.layers().add(new LabelLayer(mMap, l));
|
mMap.layers().add(new LabelLayer(mMap, l));
|
||||||
|
|
||||||
mMap.layers().add(new TileGridLayer(mMap));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ package org.oscim.android.test;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import org.oscim.android.cache.TileCache;
|
import org.oscim.android.cache.TileCache;
|
||||||
import org.oscim.layers.TileGridLayer;
|
|
||||||
import org.oscim.layers.tile.buildings.BuildingLayer;
|
import org.oscim.layers.tile.buildings.BuildingLayer;
|
||||||
import org.oscim.layers.tile.vector.VectorTileLayer;
|
import org.oscim.layers.tile.vector.VectorTileLayer;
|
||||||
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
||||||
@@ -54,8 +53,6 @@ public class NextzenMvtActivity extends MapActivity {
|
|||||||
|
|
||||||
mMap.layers().add(new BuildingLayer(mMap, l));
|
mMap.layers().add(new BuildingLayer(mMap, l));
|
||||||
mMap.layers().add(new LabelLayer(mMap, l));
|
mMap.layers().add(new LabelLayer(mMap, l));
|
||||||
|
|
||||||
mMap.layers().add(new TileGridLayer(mMap));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ package org.oscim.android.test;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import org.oscim.android.cache.TileCache;
|
import org.oscim.android.cache.TileCache;
|
||||||
import org.oscim.layers.TileGridLayer;
|
|
||||||
import org.oscim.layers.tile.buildings.BuildingLayer;
|
import org.oscim.layers.tile.buildings.BuildingLayer;
|
||||||
import org.oscim.layers.tile.vector.VectorTileLayer;
|
import org.oscim.layers.tile.vector.VectorTileLayer;
|
||||||
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
||||||
@@ -54,8 +53,6 @@ public class OpenMapTilesMvtActivity extends MapActivity {
|
|||||||
|
|
||||||
mMap.layers().add(new BuildingLayer(mMap, l));
|
mMap.layers().add(new BuildingLayer(mMap, l));
|
||||||
mMap.layers().add(new LabelLayer(mMap, l));
|
mMap.layers().add(new LabelLayer(mMap, l));
|
||||||
|
|
||||||
mMap.layers().add(new TileGridLayer(mMap));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2019 Gustl22
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify it under the
|
||||||
|
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||||
|
* Foundation, either version 3 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License along with
|
||||||
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.oscim.android.test;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
||||||
|
import org.oscim.layers.tile.buildings.BuildingLayer;
|
||||||
|
import org.oscim.layers.tile.buildings.S3DBLayer;
|
||||||
|
import org.oscim.layers.tile.vector.VectorTileLayer;
|
||||||
|
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
||||||
|
import org.oscim.map.Viewport;
|
||||||
|
import org.oscim.theme.VtmThemes;
|
||||||
|
import org.oscim.tiling.TileSource;
|
||||||
|
import org.oscim.tiling.source.OkHttpEngine;
|
||||||
|
import org.oscim.tiling.source.bitmap.DefaultSources;
|
||||||
|
import org.oscim.tiling.source.overpass.OverpassTileSource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use Overpass API data for vector layer.
|
||||||
|
* Only for developing as can be error-prone.
|
||||||
|
* Take care of overpass provider licenses.
|
||||||
|
*/
|
||||||
|
public class OverpassActivity extends MapActivity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
TileSource tileSource = OverpassTileSource.builder()
|
||||||
|
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
||||||
|
.zoomMin(15)
|
||||||
|
.zoomMax(17)
|
||||||
|
.build();
|
||||||
|
VectorTileLayer l = mMap.setBaseMap(tileSource);
|
||||||
|
|
||||||
|
TileSource bitmapTileSource = DefaultSources.OPENSTREETMAP
|
||||||
|
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
||||||
|
.zoomMax(15)
|
||||||
|
.fadeSteps(new BitmapTileLayer.FadeStep[]{
|
||||||
|
new BitmapTileLayer.FadeStep(15, 16, 1f, 0f),
|
||||||
|
new BitmapTileLayer.FadeStep(16, Viewport.MAX_ZOOM_LEVEL, 0f, 0f)
|
||||||
|
})
|
||||||
|
.build();
|
||||||
|
mMap.layers().add(new BitmapTileLayer(mMap, bitmapTileSource));
|
||||||
|
|
||||||
|
BuildingLayer.RAW_DATA = true;
|
||||||
|
mMap.layers().add(new S3DBLayer(mMap, l));
|
||||||
|
mMap.layers().add(new LabelLayer(mMap, l));
|
||||||
|
|
||||||
|
mMap.setTheme(VtmThemes.DEFAULT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
|
||||||
|
BuildingLayer.RAW_DATA = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2017-2018 devemux86
|
* Copyright 2017-2018 devemux86
|
||||||
|
* Copyright 2018 Gustl22
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify it under the
|
* This program is free software: you can redistribute it and/or modify it under the
|
||||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||||
@@ -14,12 +15,24 @@
|
|||||||
*/
|
*/
|
||||||
package org.oscim.android.test;
|
package org.oscim.android.test;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.Editable;
|
||||||
|
import android.text.TextWatcher;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.ListView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
import android.widget.ToggleButton;
|
||||||
|
|
||||||
|
import org.mapsforge.core.model.Tag;
|
||||||
import org.mapsforge.poi.android.storage.AndroidPoiPersistenceManagerFactory;
|
import org.mapsforge.poi.android.storage.AndroidPoiPersistenceManagerFactory;
|
||||||
import org.mapsforge.poi.storage.ExactMatchPoiCategoryFilter;
|
import org.mapsforge.poi.storage.ExactMatchPoiCategoryFilter;
|
||||||
import org.mapsforge.poi.storage.PoiCategoryFilter;
|
import org.mapsforge.poi.storage.PoiCategoryFilter;
|
||||||
@@ -70,10 +83,49 @@ public class PoiSearchActivity extends MapsforgeActivity implements ItemizedLaye
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PoiSearchActivity() {
|
||||||
|
super(false, R.layout.activity_map_poi);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initSearch() {
|
||||||
|
final List<Pattern> searchPatterns = new ArrayList<>();
|
||||||
|
|
||||||
|
final PatternAdapter adapter = new PatternAdapter(this, searchPatterns);
|
||||||
|
ListView searchList = (ListView) findViewById(R.id.search_list);
|
||||||
|
searchList.setAdapter(adapter);
|
||||||
|
|
||||||
|
Button addItem = (Button) findViewById(R.id.add_item);
|
||||||
|
addItem.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
searchPatterns.add(new Pattern("", ""));
|
||||||
|
adapter.notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Button startSearch = (Button) findViewById(R.id.start_search);
|
||||||
|
startSearch.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
// Clear overlays
|
||||||
|
mMarkerLayer.removeAllItems();
|
||||||
|
mMap.render();
|
||||||
|
|
||||||
|
// POI search
|
||||||
|
List<Tag> tags = new ArrayList<>();
|
||||||
|
for (Pattern pattern : searchPatterns)
|
||||||
|
tags.add(new Tag(pattern.key, pattern.val));
|
||||||
|
new PoiSearchTask(PoiSearchActivity.this, null, tags).execute(mMap.getBoundingBox(0));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
initSearch();
|
||||||
|
|
||||||
// Map events receiver
|
// Map events receiver
|
||||||
mMap.layers().add(new PoiSearchActivity.MapEventsReceiver(mMap));
|
mMap.layers().add(new PoiSearchActivity.MapEventsReceiver(mMap));
|
||||||
}
|
}
|
||||||
@@ -128,6 +180,11 @@ public class PoiSearchActivity extends MapsforgeActivity implements ItemizedLaye
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onToggleControls(View view) {
|
||||||
|
findViewById(R.id.controls).setVisibility(((ToggleButton) view).isChecked() ?
|
||||||
|
View.VISIBLE : View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
private class MapEventsReceiver extends Layer implements GestureListener {
|
private class MapEventsReceiver extends Layer implements GestureListener {
|
||||||
|
|
||||||
MapEventsReceiver(Map map) {
|
MapEventsReceiver(Map map) {
|
||||||
@@ -141,20 +198,100 @@ public class PoiSearchActivity extends MapsforgeActivity implements ItemizedLaye
|
|||||||
mMarkerLayer.removeAllItems();
|
mMarkerLayer.removeAllItems();
|
||||||
mMap.render();
|
mMap.render();
|
||||||
// POI search
|
// POI search
|
||||||
new PoiSearchTask(PoiSearchActivity.this, POI_CATEGORY).execute(mMap.getBoundingBox(0));
|
new PoiSearchTask(PoiSearchActivity.this, POI_CATEGORY, null).execute(mMap.getBoundingBox(0));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class Pattern {
|
||||||
|
String key;
|
||||||
|
String val;
|
||||||
|
|
||||||
|
Pattern(String key, String val) {
|
||||||
|
this.key = key;
|
||||||
|
this.val = val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class PatternAdapter extends ArrayAdapter<Pattern> {
|
||||||
|
PatternAdapter(Context context, List<Pattern> patterns) {
|
||||||
|
super(context, 0, patterns);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
|
Pattern pattern = getItem(position);
|
||||||
|
assert pattern != null;
|
||||||
|
// Check if an existing view is being reused, otherwise inflate the view
|
||||||
|
if (convertView == null)
|
||||||
|
convertView = LayoutInflater.from(getContext()).inflate(R.layout.item_poi_search, parent, false);
|
||||||
|
|
||||||
|
// Populate the data
|
||||||
|
EditText etKey = (EditText) convertView.findViewById(R.id.key);
|
||||||
|
etKey.removeTextChangedListener((PatternTextWatcher) etKey.getTag()); // remove previous listeners
|
||||||
|
etKey.setText(pattern.key); // set text when no listener is attached
|
||||||
|
PatternTextWatcher ptwKey = new PatternTextWatcher(pattern, true);
|
||||||
|
etKey.setTag(ptwKey);
|
||||||
|
etKey.addTextChangedListener(ptwKey);
|
||||||
|
|
||||||
|
EditText etValue = (EditText) convertView.findViewById(R.id.value);
|
||||||
|
etValue.removeTextChangedListener((PatternTextWatcher) etValue.getTag());
|
||||||
|
etValue.setText(pattern.val);
|
||||||
|
PatternTextWatcher ptwVal = new PatternTextWatcher(pattern, false);
|
||||||
|
etValue.setTag(ptwVal);
|
||||||
|
etValue.addTextChangedListener(ptwVal);
|
||||||
|
|
||||||
|
Button remove = (Button) convertView.findViewById(R.id.remove);
|
||||||
|
remove.setTag(pattern);
|
||||||
|
remove.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Pattern pat = (Pattern) v.getTag();
|
||||||
|
remove(pat);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return convertView;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class PatternTextWatcher implements TextWatcher {
|
||||||
|
private Pattern pattern;
|
||||||
|
private boolean isKey;
|
||||||
|
|
||||||
|
PatternTextWatcher(Pattern pattern, boolean isKey) {
|
||||||
|
this.pattern = pattern;
|
||||||
|
this.isKey = isKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable s) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
if (isKey)
|
||||||
|
pattern.key = s.toString();
|
||||||
|
else
|
||||||
|
pattern.val = s.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private class PoiSearchTask extends AsyncTask<BoundingBox, Void, Collection<PointOfInterest>> {
|
private class PoiSearchTask extends AsyncTask<BoundingBox, Void, Collection<PointOfInterest>> {
|
||||||
private final WeakReference<PoiSearchActivity> weakActivity;
|
private final WeakReference<PoiSearchActivity> weakActivity;
|
||||||
private final String category;
|
private final String category;
|
||||||
|
private final List<Tag> patterns;
|
||||||
|
|
||||||
private PoiSearchTask(PoiSearchActivity activity, String category) {
|
private PoiSearchTask(PoiSearchActivity activity, String category, List<Tag> patterns) {
|
||||||
this.weakActivity = new WeakReference<>(activity);
|
this.weakActivity = new WeakReference<>(activity);
|
||||||
this.category = category;
|
this.category = category;
|
||||||
|
this.patterns = patterns;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -163,11 +300,12 @@ public class PoiSearchActivity extends MapsforgeActivity implements ItemizedLaye
|
|||||||
try {
|
try {
|
||||||
PoiCategoryManager categoryManager = mPersistenceManager.getCategoryManager();
|
PoiCategoryManager categoryManager = mPersistenceManager.getCategoryManager();
|
||||||
PoiCategoryFilter categoryFilter = new ExactMatchPoiCategoryFilter();
|
PoiCategoryFilter categoryFilter = new ExactMatchPoiCategoryFilter();
|
||||||
|
if (category != null)
|
||||||
categoryFilter.addCategory(categoryManager.getPoiCategoryByTitle(category));
|
categoryFilter.addCategory(categoryManager.getPoiCategoryByTitle(category));
|
||||||
org.mapsforge.core.model.BoundingBox bb = new org.mapsforge.core.model.BoundingBox(
|
org.mapsforge.core.model.BoundingBox bb = new org.mapsforge.core.model.BoundingBox(
|
||||||
params[0].getMinLatitude(), params[0].getMinLongitude(),
|
params[0].getMinLatitude(), params[0].getMinLongitude(),
|
||||||
params[0].getMaxLatitude(), params[0].getMaxLongitude());
|
params[0].getMaxLatitude(), params[0].getMaxLongitude());
|
||||||
return mPersistenceManager.findInRect(bb, categoryFilter, null, Integer.MAX_VALUE);
|
return mPersistenceManager.findInRect(bb, categoryFilter, patterns, Integer.MAX_VALUE);
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
log.error(t.getMessage(), t);
|
log.error(t.getMessage(), t);
|
||||||
}
|
}
|
||||||
@@ -180,7 +318,8 @@ public class PoiSearchActivity extends MapsforgeActivity implements ItemizedLaye
|
|||||||
if (activity == null) {
|
if (activity == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Toast.makeText(activity, category + ": " + (pointOfInterests != null ? pointOfInterests.size() : 0), Toast.LENGTH_SHORT).show();
|
Toast.makeText(activity, (category != null ? category : "Results") + ": "
|
||||||
|
+ (pointOfInterests != null ? pointOfInterests.size() : 0), Toast.LENGTH_SHORT).show();
|
||||||
if (pointOfInterests == null) {
|
if (pointOfInterests == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import org.oscim.event.MotionEvent;
|
|||||||
import org.oscim.layers.Layer;
|
import org.oscim.layers.Layer;
|
||||||
import org.oscim.layers.TileGridLayer;
|
import org.oscim.layers.TileGridLayer;
|
||||||
import org.oscim.map.Map;
|
import org.oscim.map.Map;
|
||||||
|
import org.oscim.tiling.OverzoomTileDataSource;
|
||||||
import org.oscim.tiling.source.mapfile.MapDatabase;
|
import org.oscim.tiling.source.mapfile.MapDatabase;
|
||||||
import org.oscim.tiling.source.mapfile.MapReadResult;
|
import org.oscim.tiling.source.mapfile.MapReadResult;
|
||||||
import org.oscim.tiling.source.mapfile.PointOfInterest;
|
import org.oscim.tiling.source.mapfile.PointOfInterest;
|
||||||
@@ -96,7 +97,7 @@ public class ReverseGeocodeActivity extends MapsforgeActivity {
|
|||||||
int tileYMax = MercatorProjection.pixelYToTileY(pixelY + touchRadius, (byte) mMap.getMapPosition().getZoomLevel());
|
int tileYMax = MercatorProjection.pixelYToTileY(pixelY + touchRadius, (byte) mMap.getMapPosition().getZoomLevel());
|
||||||
Tile upperLeft = new Tile(tileXMin, tileYMin, (byte) mMap.getMapPosition().getZoomLevel());
|
Tile upperLeft = new Tile(tileXMin, tileYMin, (byte) mMap.getMapPosition().getZoomLevel());
|
||||||
Tile lowerRight = new Tile(tileXMax, tileYMax, (byte) mMap.getMapPosition().getZoomLevel());
|
Tile lowerRight = new Tile(tileXMax, tileYMax, (byte) mMap.getMapPosition().getZoomLevel());
|
||||||
MapReadResult mapReadResult = ((MapDatabase) mTileSource.getDataSource()).readLabels(upperLeft, lowerRight);
|
MapReadResult mapReadResult = ((MapDatabase) ((OverzoomTileDataSource) mTileSource.getDataSource()).getDataSource()).readLabels(upperLeft, lowerRight);
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010, 2011, 2012, 2013 mapsforge.org
|
* Copyright 2010, 2011, 2012, 2013 mapsforge.org
|
||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
* Copyright 2016-2018 devemux86
|
* Copyright 2016-2019 devemux86
|
||||||
|
* Copyright 2016 mar-v-in
|
||||||
|
* Copyright 2016 Mathieu de Brito
|
||||||
* Copyright 2017-2018 Longri
|
* Copyright 2017-2018 Longri
|
||||||
* Copyright 2017 nebular
|
* Copyright 2017 nebular
|
||||||
|
* Copyright 2018 boldtrn
|
||||||
|
* Copyright 2018-2019 Gustl22
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
*
|
*
|
||||||
@@ -83,6 +87,7 @@ public class Samples extends Activity {
|
|||||||
linearLayout.addView(createLabel(null));
|
linearLayout.addView(createLabel(null));
|
||||||
linearLayout.addView(createButton(SimpleMapActivity.class));
|
linearLayout.addView(createButton(SimpleMapActivity.class));
|
||||||
linearLayout.addView(createButton(MapsforgeActivity.class));
|
linearLayout.addView(createButton(MapsforgeActivity.class));
|
||||||
|
linearLayout.addView(createButton(MapilionMvtActivity.class));
|
||||||
/*linearLayout.addView(createButton(MapzenMvtActivity.class));
|
/*linearLayout.addView(createButton(MapzenMvtActivity.class));
|
||||||
linearLayout.addView(createButton(MapzenGeojsonActivity.class));*/
|
linearLayout.addView(createButton(MapzenGeojsonActivity.class));*/
|
||||||
linearLayout.addView(createButton(NextzenMvtActivity.class));
|
linearLayout.addView(createButton(NextzenMvtActivity.class));
|
||||||
@@ -103,10 +108,10 @@ public class Samples extends Activity {
|
|||||||
|
|
||||||
linearLayout.addView(createLabel("Vector Features"));
|
linearLayout.addView(createLabel("Vector Features"));
|
||||||
linearLayout.addView(createButton(MapsforgeStyleActivity.class));
|
linearLayout.addView(createButton(MapsforgeStyleActivity.class));
|
||||||
linearLayout.addView(createButton(MapsforgePolyLabelActivity.class));
|
|
||||||
linearLayout.addView(createButton(MapsforgeS3DBActivity.class));
|
linearLayout.addView(createButton(MapsforgeS3DBActivity.class));
|
||||||
linearLayout.addView(createButton(AtlasThemeActivity.class));
|
linearLayout.addView(createButton(AtlasThemeActivity.class));
|
||||||
linearLayout.addView(createButton(POTTextureActivity.class));
|
linearLayout.addView(createButton(POTTextureActivity.class));
|
||||||
|
linearLayout.addView(createButton(ShadowActivity.class));
|
||||||
|
|
||||||
linearLayout.addView(createLabel("Raster Maps"));
|
linearLayout.addView(createLabel("Raster Maps"));
|
||||||
linearLayout.addView(createButton(BitmapTileActivity.class));
|
linearLayout.addView(createButton(BitmapTileActivity.class));
|
||||||
@@ -122,7 +127,6 @@ public class Samples extends Activity {
|
|||||||
linearLayout.addView(createButton(VectorLayerActivity.class));
|
linearLayout.addView(createButton(VectorLayerActivity.class));
|
||||||
|
|
||||||
linearLayout.addView(createLabel("User Interaction"));
|
linearLayout.addView(createLabel("User Interaction"));
|
||||||
linearLayout.addView(createButton(Animator2Activity.class));
|
|
||||||
linearLayout.addView(createButton(MapEventLayer2Activity.class));
|
linearLayout.addView(createButton(MapEventLayer2Activity.class));
|
||||||
linearLayout.addView(createButton(LayerGroupActivity.class));
|
linearLayout.addView(createButton(LayerGroupActivity.class));
|
||||||
|
|
||||||
@@ -134,5 +138,7 @@ public class Samples extends Activity {
|
|||||||
linearLayout.addView(createButton(OSciMapS3DBActivity.class));
|
linearLayout.addView(createButton(OSciMapS3DBActivity.class));
|
||||||
linearLayout.addView(createButton(ThemeStylerActivity.class));
|
linearLayout.addView(createButton(ThemeStylerActivity.class));
|
||||||
linearLayout.addView(createButton(JeoIndoorActivity.class));
|
linearLayout.addView(createButton(JeoIndoorActivity.class));
|
||||||
|
linearLayout.addView(createButton(GdxPoi3DActivity.class));
|
||||||
|
linearLayout.addView(createButton(OverpassActivity.class));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2019 Gustl22
|
||||||
|
* Copyright 2019 devemux86
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify it under the
|
||||||
|
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||||
|
* Foundation, either version 3 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License along with
|
||||||
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.oscim.android.test;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.SeekBar;
|
||||||
|
import android.widget.ToggleButton;
|
||||||
|
|
||||||
|
import org.oscim.renderer.ExtrusionRenderer;
|
||||||
|
import org.oscim.renderer.light.Sun;
|
||||||
|
|
||||||
|
public class ShadowActivity extends SimpleMapActivity implements SeekBar.OnSeekBarChangeListener {
|
||||||
|
|
||||||
|
private SeekBar mSeekBar;
|
||||||
|
|
||||||
|
public ShadowActivity() {
|
||||||
|
super(true, R.layout.activity_shadow);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
mSeekBar = findViewById(R.id.seekBarShadow);
|
||||||
|
mSeekBar.setOnSeekBarChangeListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
||||||
|
int id = seekBar.getId();
|
||||||
|
if (id == R.id.seekBarShadow) {
|
||||||
|
Sun sun = mBuildingLayer.getExtrusionRenderer().getSun();
|
||||||
|
sun.setProgress(progress / 1000f);
|
||||||
|
sun.updatePosition();
|
||||||
|
sun.updateColor();
|
||||||
|
|
||||||
|
mMap.updateMap(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStartTrackingTouch(SeekBar seekBar) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStopTrackingTouch(SeekBar seekBar) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onToggleCurrentSun(View view) {
|
||||||
|
boolean isCurrentSun = ((ToggleButton) view).isChecked();
|
||||||
|
mSeekBar.setEnabled(!isCurrentSun);
|
||||||
|
ExtrusionRenderer extrusionRenderer = mBuildingLayer.getExtrusionRenderer();
|
||||||
|
extrusionRenderer.enableCurrentSunPos(isCurrentSun);
|
||||||
|
extrusionRenderer.getSun().update();
|
||||||
|
mSeekBar.setProgress((int) (extrusionRenderer.getSun().getProgress() * 1000));
|
||||||
|
mMap.updateMap(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
* Copyright 2016-2018 devemux86
|
* Copyright 2016-2019 devemux86
|
||||||
|
* Copyright 2019 Gustl22
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
*
|
*
|
||||||
@@ -39,6 +40,23 @@ import org.oscim.theme.VtmThemes;
|
|||||||
public class SimpleMapActivity extends BaseMapActivity {
|
public class SimpleMapActivity extends BaseMapActivity {
|
||||||
private DefaultMapScaleBar mapScaleBar;
|
private DefaultMapScaleBar mapScaleBar;
|
||||||
|
|
||||||
|
BuildingLayer mBuildingLayer;
|
||||||
|
private boolean mShadow;
|
||||||
|
|
||||||
|
public SimpleMapActivity() {
|
||||||
|
this(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SimpleMapActivity(boolean shadow) {
|
||||||
|
super();
|
||||||
|
mShadow = shadow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SimpleMapActivity(boolean shadow, int contentView) {
|
||||||
|
super(contentView);
|
||||||
|
mShadow = shadow;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
@@ -48,7 +66,8 @@ public class SimpleMapActivity extends BaseMapActivity {
|
|||||||
|
|
||||||
void createLayers() {
|
void createLayers() {
|
||||||
GroupLayer groupLayer = new GroupLayer(mMap);
|
GroupLayer groupLayer = new GroupLayer(mMap);
|
||||||
groupLayer.layers.add(new BuildingLayer(mMap, mBaseLayer));
|
mBuildingLayer = new BuildingLayer(mMap, mBaseLayer, false, mShadow);
|
||||||
|
groupLayer.layers.add(mBuildingLayer);
|
||||||
groupLayer.layers.add(new LabelLayer(mMap, mBaseLayer));
|
groupLayer.layers.add(new LabelLayer(mMap, mBaseLayer));
|
||||||
mMap.layers().add(groupLayer);
|
mMap.layers().add(groupLayer);
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import android.widget.SeekBar;
|
|||||||
import android.widget.SeekBar.OnSeekBarChangeListener;
|
import android.widget.SeekBar.OnSeekBarChangeListener;
|
||||||
import android.widget.ToggleButton;
|
import android.widget.ToggleButton;
|
||||||
|
|
||||||
|
import org.oscim.backend.canvas.Color;
|
||||||
import org.oscim.layers.tile.buildings.BuildingLayer;
|
import org.oscim.layers.tile.buildings.BuildingLayer;
|
||||||
import org.oscim.layers.tile.vector.VectorTileLayer;
|
import org.oscim.layers.tile.vector.VectorTileLayer;
|
||||||
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
||||||
@@ -24,9 +25,6 @@ import org.oscim.theme.styles.RenderStyle;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import static org.oscim.utils.ColorUtil.modHsv;
|
|
||||||
import static org.oscim.utils.ColorUtil.shiftHue;
|
|
||||||
|
|
||||||
public class ThemeStylerActivity extends BaseMapActivity implements OnSeekBarChangeListener {
|
public class ThemeStylerActivity extends BaseMapActivity implements OnSeekBarChangeListener {
|
||||||
final Logger log = LoggerFactory.getLogger(ThemeStylerActivity.class);
|
final Logger log = LoggerFactory.getLogger(ThemeStylerActivity.class);
|
||||||
|
|
||||||
@@ -90,13 +88,10 @@ public class ThemeStylerActivity extends BaseMapActivity implements OnSeekBarCha
|
|||||||
}
|
}
|
||||||
|
|
||||||
int modColor(int color, HSV hsv) {
|
int modColor(int color, HSV hsv) {
|
||||||
return modHsv(shiftHue(color, hsv.hue), 1, hsv.sat, hsv.val, true);
|
return hsv.mod(color, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class HSV {
|
public static class HSV extends Color.HSV {
|
||||||
public double hue = 0;
|
|
||||||
public double sat = 1;
|
|
||||||
public double val = 1;
|
|
||||||
public boolean changed;
|
public boolean changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,16 +119,16 @@ public class ThemeStylerActivity extends BaseMapActivity implements OnSeekBarCha
|
|||||||
c = outlineColor;
|
c = outlineColor;
|
||||||
|
|
||||||
if (id == R.id.seekBarS)
|
if (id == R.id.seekBarS)
|
||||||
c.sat = progress / 50f;
|
c.saturation = progress / 50f;
|
||||||
else if (id == R.id.seekBarV)
|
else if (id == R.id.seekBarV)
|
||||||
c.val = progress / 50f;
|
c.value = progress / 50f;
|
||||||
else if (id == R.id.seekBarH)
|
else if (id == R.id.seekBarH)
|
||||||
c.hue = progress / 100f;
|
c.hue = progress / 100f;
|
||||||
|
|
||||||
log.debug((modArea ? "area" : "line")
|
log.debug((modArea ? "area" : "line")
|
||||||
+ " h:" + c.hue
|
+ " h:" + c.hue
|
||||||
+ " s:" + c.sat
|
+ " s:" + c.saturation
|
||||||
+ " v:" + c.val);
|
+ " v:" + c.value);
|
||||||
|
|
||||||
VectorTileLayer l = (VectorTileLayer) mMap.layers().get(1);
|
VectorTileLayer l = (VectorTileLayer) mMap.layers().get(1);
|
||||||
RenderTheme t = (RenderTheme) l.getTheme();
|
RenderTheme t = (RenderTheme) l.getTheme();
|
||||||
@@ -181,8 +176,8 @@ public class ThemeStylerActivity extends BaseMapActivity implements OnSeekBarCha
|
|||||||
}
|
}
|
||||||
if (c == null)
|
if (c == null)
|
||||||
return;
|
return;
|
||||||
((SeekBar) findViewById(R.id.seekBarS)).setProgress((int) (c.sat * 50));
|
((SeekBar) findViewById(R.id.seekBarS)).setProgress((int) (c.saturation * 50));
|
||||||
((SeekBar) findViewById(R.id.seekBarV)).setProgress((int) (c.val * 50));
|
((SeekBar) findViewById(R.id.seekBarV)).setProgress((int) (c.value * 50));
|
||||||
((SeekBar) findViewById(R.id.seekBarH)).setProgress((int) (c.hue * 100));
|
((SeekBar) findViewById(R.id.seekBarH)).setProgress((int) (c.hue * 100));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ apply plugin: 'com.github.dcendents.android-maven'
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':vtm')
|
api project(':vtm')
|
||||||
|
api "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
@@ -25,7 +26,6 @@ android {
|
|||||||
main {
|
main {
|
||||||
manifest.srcFile 'AndroidManifest.xml'
|
manifest.srcFile 'AndroidManifest.xml'
|
||||||
java.srcDirs = ['src']
|
java.srcDirs = ['src']
|
||||||
resources.srcDirs = ['src']
|
|
||||||
}
|
}
|
||||||
debug.setRoot('build-types/debug')
|
debug.setRoot('build-types/debug')
|
||||||
release.setRoot('build-types/release')
|
release.setRoot('build-types/release')
|
||||||
@@ -40,11 +40,11 @@ android.libraryVariants.all { variant ->
|
|||||||
return
|
return
|
||||||
|
|
||||||
def jar = project.tasks.create "jar${name.capitalize()}", Jar
|
def jar = project.tasks.create "jar${name.capitalize()}", Jar
|
||||||
jar.dependsOn variant.javaCompiler
|
jar.dependsOn variant.javaCompileProvider
|
||||||
jar.exclude '**/BuildConfig.class'
|
jar.exclude '**/BuildConfig.class'
|
||||||
jar.exclude '**/R.class'
|
jar.exclude '**/R.class'
|
||||||
jar.exclude '**/R$*.class'
|
jar.exclude '**/R$*.class'
|
||||||
jar.from variant.javaCompiler.destinationDir
|
jar.from variant.javaCompileProvider.get().destinationDir
|
||||||
artifacts.add('archives', jar)
|
artifacts.add('archives', jar)
|
||||||
|
|
||||||
file('natives').eachDir() { dir ->
|
file('natives').eachDir() { dir ->
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
|
* Copyright 2019 Gustl22
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
*
|
*
|
||||||
@@ -19,6 +20,8 @@ package org.oscim.gdx;
|
|||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.opengl.GLES20;
|
import android.opengl.GLES20;
|
||||||
|
|
||||||
|
import com.badlogic.gdx.backends.android.AndroidGL20;
|
||||||
|
|
||||||
import org.oscim.backend.GL;
|
import org.oscim.backend.GL;
|
||||||
|
|
||||||
import java.nio.Buffer;
|
import java.nio.Buffer;
|
||||||
@@ -28,6 +31,8 @@ import java.nio.IntBuffer;
|
|||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
public class AndroidGL implements GL {
|
public class AndroidGL implements GL {
|
||||||
|
|
||||||
|
private static final AndroidGL20 androidGL = new AndroidGL20();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachShader(int program, int shader) {
|
public void attachShader(int program, int shader) {
|
||||||
GLES20.glAttachShader(program, shader);
|
GLES20.glAttachShader(program, shader);
|
||||||
@@ -103,11 +108,21 @@ public class AndroidGL implements GL {
|
|||||||
return GLES20.glCreateShader(type);
|
return GLES20.glCreateShader(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteBuffer(int buffer) {
|
||||||
|
androidGL.glDeleteBuffer(buffer);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteBuffers(int n, IntBuffer buffers) {
|
public void deleteBuffers(int n, IntBuffer buffers) {
|
||||||
GLES20.glDeleteBuffers(n, buffers);
|
GLES20.glDeleteBuffers(n, buffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteFramebuffer(int framebuffer) {
|
||||||
|
androidGL.glDeleteFramebuffer(framebuffer);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteFramebuffers(int n, IntBuffer framebuffers) {
|
public void deleteFramebuffers(int n, IntBuffer framebuffers) {
|
||||||
GLES20.glDeleteFramebuffers(n, framebuffers);
|
GLES20.glDeleteFramebuffers(n, framebuffers);
|
||||||
@@ -118,6 +133,11 @@ public class AndroidGL implements GL {
|
|||||||
GLES20.glDeleteProgram(program);
|
GLES20.glDeleteProgram(program);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteRenderbuffer(int renderbuffer) {
|
||||||
|
androidGL.glDeleteRenderbuffer(renderbuffer);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteRenderbuffers(int n, IntBuffer renderbuffers) {
|
public void deleteRenderbuffers(int n, IntBuffer renderbuffers) {
|
||||||
GLES20.glDeleteRenderbuffers(n, renderbuffers);
|
GLES20.glDeleteRenderbuffers(n, renderbuffers);
|
||||||
@@ -160,6 +180,11 @@ public class AndroidGL implements GL {
|
|||||||
GLES20.glFramebufferTexture2D(target, attachment, textarget, texture, level);
|
GLES20.glFramebufferTexture2D(target, attachment, textarget, texture, level);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genBuffer() {
|
||||||
|
return androidGL.glGenBuffer();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void genBuffers(int n, IntBuffer buffers) {
|
public void genBuffers(int n, IntBuffer buffers) {
|
||||||
GLES20.glGenBuffers(n, buffers);
|
GLES20.glGenBuffers(n, buffers);
|
||||||
@@ -170,11 +195,21 @@ public class AndroidGL implements GL {
|
|||||||
GLES20.glGenerateMipmap(target);
|
GLES20.glGenerateMipmap(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genFramebuffer() {
|
||||||
|
return androidGL.glGenFramebuffer();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void genFramebuffers(int n, IntBuffer framebuffers) {
|
public void genFramebuffers(int n, IntBuffer framebuffers) {
|
||||||
GLES20.glGenFramebuffers(n, framebuffers);
|
GLES20.glGenFramebuffers(n, framebuffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genRenderbuffer() {
|
||||||
|
return androidGL.glGenRenderbuffer();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void genRenderbuffers(int n, IntBuffer renderbuffers) {
|
public void genRenderbuffers(int n, IntBuffer renderbuffers) {
|
||||||
GLES20.glGenRenderbuffers(n, renderbuffers);
|
GLES20.glGenRenderbuffers(n, renderbuffers);
|
||||||
@@ -187,14 +222,12 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getActiveUniform(int program, int index, IntBuffer size, Buffer type) {
|
public String getActiveUniform(int program, int index, IntBuffer size, Buffer type) {
|
||||||
//return GLES20.glGetActiveUniform(program, index, bufsize, length, size, type, name);
|
return androidGL.glGetActiveUniform(program, index, size, type);
|
||||||
throw new UnsupportedOperationException("missing implementation");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getAttachedShaders(int program, int maxcount, Buffer count, IntBuffer shaders) {
|
public void getAttachedShaders(int program, int maxcount, Buffer count, IntBuffer shaders) {
|
||||||
throw new UnsupportedOperationException("missing implementation");
|
androidGL.glGetAttachedShaders(program, maxcount, count, shaders);
|
||||||
//GLES20.glGetAttachedShaders(program, maxcount, count, shaders);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -204,8 +237,7 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getBooleanv(int pname, Buffer params) {
|
public void getBooleanv(int pname, Buffer params) {
|
||||||
throw new UnsupportedOperationException("missing implementation");
|
androidGL.glGetBooleanv(pname, params);
|
||||||
//GLES20.glGetBooleanv(pname, params);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -260,11 +292,6 @@ public class AndroidGL implements GL {
|
|||||||
GLES20.glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
|
GLES20.glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void getShaderSource(int shader, int bufsize, Buffer length, String source) {
|
|
||||||
throw new UnsupportedOperationException("missing implementation");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getTexParameterfv(int target, int pname, FloatBuffer params) {
|
public void getTexParameterfv(int target, int pname, FloatBuffer params) {
|
||||||
GLES20.glGetTexParameterfv(target, pname, params);
|
GLES20.glGetTexParameterfv(target, pname, params);
|
||||||
@@ -308,8 +335,7 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getVertexAttribPointerv(int index, int pname, Buffer pointer) {
|
public void getVertexAttribPointerv(int index, int pname, Buffer pointer) {
|
||||||
//GLES20.glGetVertexAttribPointerv(index, pname, pointer);
|
androidGL.glGetVertexAttribPointerv(index, pname, pointer);
|
||||||
throw new UnsupportedOperationException("missing implementation");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -431,6 +457,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform1fv(int location, int count, float[] v, int offset) {
|
||||||
|
GLES20.glUniform1fv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform1i(int location, int x) {
|
public void uniform1i(int location, int x) {
|
||||||
GLES20.glUniform1i(location, x);
|
GLES20.glUniform1i(location, x);
|
||||||
@@ -443,6 +474,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform1iv(int location, int count, int[] v, int offset) {
|
||||||
|
GLES20.glUniform1iv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform2f(int location, float x, float y) {
|
public void uniform2f(int location, float x, float y) {
|
||||||
GLES20.glUniform2f(location, x, y);
|
GLES20.glUniform2f(location, x, y);
|
||||||
@@ -455,6 +491,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform2fv(int location, int count, float[] v, int offset) {
|
||||||
|
GLES20.glUniform2fv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform2i(int location, int x, int y) {
|
public void uniform2i(int location, int x, int y) {
|
||||||
GLES20.glUniform2i(location, x, y);
|
GLES20.glUniform2i(location, x, y);
|
||||||
@@ -467,6 +508,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform2iv(int location, int count, int[] v, int offset) {
|
||||||
|
GLES20.glUniform2iv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform3f(int location, float x, float y, float z) {
|
public void uniform3f(int location, float x, float y, float z) {
|
||||||
GLES20.glUniform3f(location, x, y, z);
|
GLES20.glUniform3f(location, x, y, z);
|
||||||
@@ -479,6 +525,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform3fv(int location, int count, float[] v, int offset) {
|
||||||
|
GLES20.glUniform3fv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform3i(int location, int x, int y, int z) {
|
public void uniform3i(int location, int x, int y, int z) {
|
||||||
GLES20.glUniform3i(location, x, y, z);
|
GLES20.glUniform3i(location, x, y, z);
|
||||||
@@ -491,6 +542,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform3iv(int location, int count, int[] v, int offset) {
|
||||||
|
GLES20.glUniform3iv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform4f(int location, float x, float y, float z, float w) {
|
public void uniform4f(int location, float x, float y, float z, float w) {
|
||||||
GLES20.glUniform4f(location, x, y, z, w);
|
GLES20.glUniform4f(location, x, y, z, w);
|
||||||
@@ -501,6 +557,11 @@ public class AndroidGL implements GL {
|
|||||||
GLES20.glUniform4fv(location, count, v);
|
GLES20.glUniform4fv(location, count, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform4fv(int location, int count, float[] v, int offset) {
|
||||||
|
GLES20.glUniform4fv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform4i(int location, int x, int y, int z, int w) {
|
public void uniform4i(int location, int x, int y, int z, int w) {
|
||||||
GLES20.glUniform4i(location, x, y, z, w);
|
GLES20.glUniform4i(location, x, y, z, w);
|
||||||
@@ -513,24 +574,44 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform4iv(int location, int count, int[] v, int offset) {
|
||||||
|
GLES20.glUniform4iv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniformMatrix2fv(int location, int count, boolean transpose, FloatBuffer value) {
|
public void uniformMatrix2fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
GLES20.glUniformMatrix2fv(location, count, transpose, value);
|
GLES20.glUniformMatrix2fv(location, count, transpose, value);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix2fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
GLES20.glUniformMatrix2fv(location, count, transpose, value, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniformMatrix3fv(int location, int count, boolean transpose, FloatBuffer value) {
|
public void uniformMatrix3fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
GLES20.glUniformMatrix3fv(location, count, transpose, value);
|
GLES20.glUniformMatrix3fv(location, count, transpose, value);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix3fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
GLES20.glUniformMatrix3fv(location, count, transpose, value, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniformMatrix4fv(int location, int count, boolean transpose, FloatBuffer value) {
|
public void uniformMatrix4fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
GLES20.glUniformMatrix4fv(location, count, transpose, value);
|
GLES20.glUniformMatrix4fv(location, count, transpose, value);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix4fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
GLES20.glUniformMatrix4fv(location, count, transpose, value, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void useProgram(int program) {
|
public void useProgram(int program) {
|
||||||
GLES20.glUseProgram(program);
|
GLES20.glUseProgram(program);
|
||||||
@@ -656,15 +737,13 @@ public class AndroidGL implements GL {
|
|||||||
@Override
|
@Override
|
||||||
public void compressedTexImage2D(int target, int level, int internalformat, int width,
|
public void compressedTexImage2D(int target, int level, int internalformat, int width,
|
||||||
int height, int border, int imageSize, Buffer data) {
|
int height, int border, int imageSize, Buffer data) {
|
||||||
throw new UnsupportedOperationException("missing implementation");
|
androidGL.glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void compressedTexSubImage2D(int target, int level, int xoffset, int yoffset,
|
public void compressedTexSubImage2D(int target, int level, int xoffset, int yoffset,
|
||||||
int width, int height, int format, int imageSize, Buffer data) {
|
int width, int height, int format, int imageSize, Buffer data) {
|
||||||
throw new UnsupportedOperationException("missing implementation");
|
androidGL.glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -691,6 +770,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteTexture(int texture) {
|
||||||
|
androidGL.glDeleteTexture(texture);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void depthFunc(int func) {
|
public void depthFunc(int func) {
|
||||||
GLES20.glDepthFunc(func);
|
GLES20.glDepthFunc(func);
|
||||||
@@ -757,6 +841,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genTexture() {
|
||||||
|
return androidGL.glGenTexture();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getError() {
|
public int getError() {
|
||||||
return GLES20.glGetError();
|
return GLES20.glGetError();
|
||||||
@@ -837,8 +926,7 @@ public class AndroidGL implements GL {
|
|||||||
@Override
|
@Override
|
||||||
public void texSubImage2D(int target, int level, int xoffset, int yoffset, int width,
|
public void texSubImage2D(int target, int level, int xoffset, int yoffset, int width,
|
||||||
int height, int format, int type, Buffer pixels) {
|
int height, int format, int type, Buffer pixels) {
|
||||||
GLES20
|
GLES20.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
|
||||||
.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
878
vtm-android-gdx/src/org/oscim/gdx/AndroidGL30.java
Normal file
878
vtm-android-gdx/src/org/oscim/gdx/AndroidGL30.java
Normal file
@@ -0,0 +1,878 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2019 Gustl22
|
||||||
|
*
|
||||||
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify it under the
|
||||||
|
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||||
|
* Foundation, either version 3 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License along with
|
||||||
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright 2014 See AUTHORS file.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
package org.oscim.gdx;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.opengl.GLES30;
|
||||||
|
|
||||||
|
import org.oscim.backend.GL30;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See https://github.com/libgdx/libgdx/blob/master/backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidGL30.java
|
||||||
|
*/
|
||||||
|
@SuppressLint("NewApi")
|
||||||
|
public class AndroidGL30 extends AndroidGL implements GL30 {
|
||||||
|
@Override
|
||||||
|
public void readBuffer(int mode) {
|
||||||
|
GLES30.glReadBuffer(mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawRangeElements(int mode, int start, int end, int count, int type, java.nio.Buffer indices) {
|
||||||
|
GLES30.glDrawRangeElements(mode, start, end, count, type, indices);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawRangeElements(int mode, int start, int end, int count, int type, int offset) {
|
||||||
|
GLES30.glDrawRangeElements(mode, start, end, count, type, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void texImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int format,
|
||||||
|
int type, java.nio.Buffer pixels) {
|
||||||
|
if (pixels == null)
|
||||||
|
GLES30.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, 0);
|
||||||
|
else
|
||||||
|
GLES30.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void texImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int format,
|
||||||
|
int type, int offset) {
|
||||||
|
GLES30.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void texSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth,
|
||||||
|
int format, int type, java.nio.Buffer pixels) {
|
||||||
|
GLES30.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void texSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth,
|
||||||
|
int format, int type, int offset) {
|
||||||
|
GLES30.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void copyTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width,
|
||||||
|
int height) {
|
||||||
|
GLES30.glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void compressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int
|
||||||
|
// imageSize, java.nio.Buffer data) {
|
||||||
|
// GLES30.glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void compressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int
|
||||||
|
// imageSize, int offset) {
|
||||||
|
// GLES30.glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, offset);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void compressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int
|
||||||
|
// depth, int format, int imageSize, java.nio.Buffer data) {
|
||||||
|
// GLES30.glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void compressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int
|
||||||
|
// depth, int format, int imageSize, int offset) {
|
||||||
|
// GLES30.glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genQueries(int n, int[] ids, int offset) {
|
||||||
|
GLES30.glGenQueries(n, ids, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genQueries(int n, java.nio.IntBuffer ids) {
|
||||||
|
GLES30.glGenQueries(n, ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteQueries(int n, int[] ids, int offset) {
|
||||||
|
GLES30.glDeleteQueries(n, ids, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteQueries(int n, java.nio.IntBuffer ids) {
|
||||||
|
GLES30.glDeleteQueries(n, ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isQuery(int id) {
|
||||||
|
return GLES30.glIsQuery(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void beginQuery(int target, int id) {
|
||||||
|
GLES30.glBeginQuery(target, id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void endQuery(int target) {
|
||||||
|
GLES30.glEndQuery(target);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void getQueryiv(int target, int pname, int[] params, int offset) {
|
||||||
|
// GLES30.glGetQueryiv(target, pname, params, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getQueryiv(int target, int pname, java.nio.IntBuffer params) {
|
||||||
|
GLES30.glGetQueryiv(target, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void getQueryObjectuiv(int id, int pname, int[] params, int offset) {
|
||||||
|
// GLES30.glGetQueryObjectuiv(id, pname, params, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getQueryObjectuiv(int id, int pname, java.nio.IntBuffer params) {
|
||||||
|
GLES30.glGetQueryObjectuiv(id, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean unmapBuffer(int target) {
|
||||||
|
return GLES30.glUnmapBuffer(target);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public java.nio.Buffer getBufferPointerv(int target, int pname) {
|
||||||
|
return GLES30.glGetBufferPointerv(target, pname);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void drawBuffers(int n, int[] bufs, int offset) {
|
||||||
|
// GLES30.glDrawBuffers(n, bufs, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawBuffers(int n, java.nio.IntBuffer bufs) {
|
||||||
|
GLES30.glDrawBuffers(n, bufs);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void uniformMatrix2x3fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
// GLES30.glUniformMatrix2x3fv(location, count, transpose, value, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix2x3fv(int location, int count, boolean transpose, java.nio.FloatBuffer value) {
|
||||||
|
GLES30.glUniformMatrix2x3fv(location, count, transpose, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void uniformMatrix3x2fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
// GLES30.glUniformMatrix3x2fv(location, count, transpose, value, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix3x2fv(int location, int count, boolean transpose, java.nio.FloatBuffer value) {
|
||||||
|
GLES30.glUniformMatrix3x2fv(location, count, transpose, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void uniformMatrix2x4fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
// GLES30.glUniformMatrix2x4fv(location, count, transpose, value, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix2x4fv(int location, int count, boolean transpose, java.nio.FloatBuffer value) {
|
||||||
|
GLES30.glUniformMatrix2x4fv(location, count, transpose, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void uniformMatrix4x2fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
// GLES30.glUniformMatrix4x2fv(location, count, transpose, value, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix4x2fv(int location, int count, boolean transpose, java.nio.FloatBuffer value) {
|
||||||
|
GLES30.glUniformMatrix4x2fv(location, count, transpose, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void uniformMatrix3x4fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
// GLES30.glUniformMatrix3x4fv(location, count, transpose, value, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix3x4fv(int location, int count, boolean transpose, java.nio.FloatBuffer value) {
|
||||||
|
GLES30.glUniformMatrix3x4fv(location, count, transpose, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void uniformMatrix4x3fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
// GLES30.glUniformMatrix4x3fv(location, count, transpose, value, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix4x3fv(int location, int count, boolean transpose, java.nio.FloatBuffer value) {
|
||||||
|
GLES30.glUniformMatrix4x3fv(location, count, transpose, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void blitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1,
|
||||||
|
int mask, int filter) {
|
||||||
|
GLES30.glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderbufferStorageMultisample(int target, int samples, int internalformat, int width, int height) {
|
||||||
|
GLES30.glRenderbufferStorageMultisample(target, samples, internalformat, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void framebufferTextureLayer(int target, int attachment, int texture, int level, int layer) {
|
||||||
|
GLES30.glFramebufferTextureLayer(target, attachment, texture, level, layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public java.nio.Buffer mapBufferRange(int target, int offset, int length, int access) {
|
||||||
|
// return GLES30.glMapBufferRange(target, offset, length, access);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void flushMappedBufferRange(int target, int offset, int length) {
|
||||||
|
GLES30.glFlushMappedBufferRange(target, offset, length);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindVertexArray(int array) {
|
||||||
|
GLES30.glBindVertexArray(array);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteVertexArrays(int n, int[] arrays, int offset) {
|
||||||
|
GLES30.glDeleteVertexArrays(n, arrays, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteVertexArrays(int n, java.nio.IntBuffer arrays) {
|
||||||
|
GLES30.glDeleteVertexArrays(n, arrays);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genVertexArrays(int n, int[] arrays, int offset) {
|
||||||
|
GLES30.glGenVertexArrays(n, arrays, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genVertexArrays(int n, java.nio.IntBuffer arrays) {
|
||||||
|
GLES30.glGenVertexArrays(n, arrays);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isVertexArray(int array) {
|
||||||
|
return GLES30.glIsVertexArray(array);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void getIntegeri_v(int target, int index, int[] data, int offset) {
|
||||||
|
// GLES30.glGetIntegeri_v(target, index, data, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void getIntegeri_v(int target, int index, java.nio.IntBuffer data) {
|
||||||
|
// GLES30.glGetIntegeri_v(target, index, data);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void beginTransformFeedback(int primitiveMode) {
|
||||||
|
GLES30.glBeginTransformFeedback(primitiveMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void endTransformFeedback() {
|
||||||
|
GLES30.glEndTransformFeedback();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindBufferRange(int target, int index, int buffer, int offset, int size) {
|
||||||
|
GLES30.glBindBufferRange(target, index, buffer, offset, size);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindBufferBase(int target, int index, int buffer) {
|
||||||
|
GLES30.glBindBufferBase(target, index, buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void transformFeedbackVaryings(int program, String[] varyings, int bufferMode) {
|
||||||
|
GLES30.glTransformFeedbackVaryings(program, varyings, bufferMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void getTransformFeedbackVarying(int program, int index, int bufsize, int[] length, int lengthOffset, int[] size, int
|
||||||
|
// sizeOffset, int[] type, int typeOffset, byte[] name, int nameOffset) {
|
||||||
|
// GLES30.glGetTransformFeedbackVarying(program, index, bufsize, length, lengthOffset, size, sizeOffset, type, typeOffset, name,
|
||||||
|
// nameOffset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void getTransformFeedbackVarying(int program, int index, int bufsize, java.nio.IntBuffer length, java.nio.IntBuffer
|
||||||
|
// size, java.nio.IntBuffer type, byte name) {
|
||||||
|
// GLES30.glGetTransformFeedbackVarying(program, index, bufsize, length, size, type, name);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public String getTransformFeedbackVarying(int program, int index, int[] size, int sizeOffset, int[] type, int typeOffset) {
|
||||||
|
// return GLES30.glGetTransformFeedbackVarying(program, index, size, sizeOffset, type, typeOffset);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public String getTransformFeedbackVarying(int program, int index, java.nio.IntBuffer size, java.nio.IntBuffer type) {
|
||||||
|
// return GLES30.glGetTransformFeedbackVarying(program, index, size, type);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void vertexAttribIPointer(int index, int size, int type, int stride, int offset) {
|
||||||
|
GLES30.glVertexAttribIPointer(index, size, type, stride, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void getVertexAttribIiv(int index, int pname, int[] params, int offset) {
|
||||||
|
// GLES30.glGetVertexAttribIiv(index, pname, params, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getVertexAttribIiv(int index, int pname, java.nio.IntBuffer params) {
|
||||||
|
GLES30.glGetVertexAttribIiv(index, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void getVertexAttribIuiv(int index, int pname, int[] params, int offset) {
|
||||||
|
// GLES30.glGetVertexAttribIuiv(index, pname, params, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getVertexAttribIuiv(int index, int pname, java.nio.IntBuffer params) {
|
||||||
|
GLES30.glGetVertexAttribIuiv(index, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void vertexAttribI4i(int index, int x, int y, int z, int w) {
|
||||||
|
GLES30.glVertexAttribI4i(index, x, y, z, w);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void vertexAttribI4ui(int index, int x, int y, int z, int w) {
|
||||||
|
GLES30.glVertexAttribI4ui(index, x, y, z, w);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void vertexAttribI4iv(int index, int[] v, int offset) {
|
||||||
|
// GLES30.glVertexAttribI4iv(index, v, offset);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void vertexAttribI4iv(int index, java.nio.IntBuffer v) {
|
||||||
|
// GLES30.glVertexAttribI4iv(index, v);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void vertexAttribI4uiv(int index, int[] v, int offset) {
|
||||||
|
// GLES30.glVertexAttribI4uiv(index, v, offset);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void vertexAttribI4uiv(int index, java.nio.IntBuffer v) {
|
||||||
|
// GLES30.glVertexAttribI4uiv(index, v);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getUniformuiv(int program, int location, int[] params, int offset) {
|
||||||
|
// GLES30.glGetUniformuiv(program, location, params, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getUniformuiv(int program, int location, java.nio.IntBuffer params) {
|
||||||
|
GLES30.glGetUniformuiv(program, location, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getFragDataLocation(int program, String name) {
|
||||||
|
return GLES30.glGetFragDataLocation(program, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void uniform1ui(int location, int v0) {
|
||||||
|
// GLES30.glUniform1ui(location, v0);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void uniform2ui(int location, int v0, int v1) {
|
||||||
|
// GLES30.glUniform2ui(location, v0, v1);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void uniform3ui(int location, int v0, int v1, int v2) {
|
||||||
|
// GLES30.glUniform3ui(location, v0, v1, v2);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void uniform4ui(int location, int v0, int v1, int v2, int v3) {
|
||||||
|
// GLES30.glUniform4ui(location, v0, v1, v2, v3);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void uniform1uiv(int location, int count, int[] value, int offset) {
|
||||||
|
// GLES30.glUniform1uiv(location, count, value, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform1uiv(int location, int count, java.nio.IntBuffer value) {
|
||||||
|
GLES30.glUniform1uiv(location, count, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void uniform2uiv(int location, int count, int[] value, int offset) {
|
||||||
|
// GLES30.glUniform2uiv(location, count, value, offset);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void uniform2uiv(int location, int count, java.nio.IntBuffer value) {
|
||||||
|
// GLES30.glUniform2uiv(location, count, value);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void uniform3uiv(int location, int count, int[] value, int offset) {
|
||||||
|
// GLES30.glUniform3uiv(location, count, value, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform3uiv(int location, int count, java.nio.IntBuffer value) {
|
||||||
|
GLES30.glUniform3uiv(location, count, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void uniform4uiv(int location, int count, int[] value, int offset) {
|
||||||
|
// GLES30.glUniform4uiv(location, count, value, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform4uiv(int location, int count, java.nio.IntBuffer value) {
|
||||||
|
GLES30.glUniform4uiv(location, count, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void clearBufferiv(int buffer, int drawbuffer, int[] value, int offset) {
|
||||||
|
// GLES30.glClearBufferiv(buffer, drawbuffer, value, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearBufferiv(int buffer, int drawbuffer, java.nio.IntBuffer value) {
|
||||||
|
GLES30.glClearBufferiv(buffer, drawbuffer, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void clearBufferuiv(int buffer, int drawbuffer, int[] value, int offset) {
|
||||||
|
// GLES30.glClearBufferuiv(buffer, drawbuffer, value, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearBufferuiv(int buffer, int drawbuffer, java.nio.IntBuffer value) {
|
||||||
|
GLES30.glClearBufferuiv(buffer, drawbuffer, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void clearBufferfv(int buffer, int drawbuffer, float[] value, int offset) {
|
||||||
|
// GLES30.glClearBufferfv(buffer, drawbuffer, value, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearBufferfv(int buffer, int drawbuffer, java.nio.FloatBuffer value) {
|
||||||
|
GLES30.glClearBufferfv(buffer, drawbuffer, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearBufferfi(int buffer, int drawbuffer, float depth, int stencil) {
|
||||||
|
GLES30.glClearBufferfi(buffer, drawbuffer, depth, stencil);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getStringi(int name, int index) {
|
||||||
|
return GLES30.glGetStringi(name, index);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void copyBufferSubData(int readTarget, int writeTarget, int readOffset, int writeOffset, int size) {
|
||||||
|
GLES30.glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getUniformIndices(int program, String[] uniformNames, int[] uniformIndices, int uniformIndicesOffset) {
|
||||||
|
// GLES30.glGetUniformIndices(program, uniformNames, uniformIndices, uniformIndicesOffset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getUniformIndices(int program, String[] uniformNames, java.nio.IntBuffer uniformIndices) {
|
||||||
|
GLES30.glGetUniformIndices(program, uniformNames, uniformIndices);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void getActiveUniformsiv(int program, int uniformCount, int[] uniformIndices, int uniformIndicesOffset, int pname,
|
||||||
|
// int[] params, int paramsOffset) {
|
||||||
|
// GLES30.glGetActiveUniformsiv(program, uniformCount, uniformIndices, uniformIndicesOffset, pname, params, paramsOffset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getActiveUniformsiv(int program, int uniformCount, java.nio.IntBuffer uniformIndices, int pname,
|
||||||
|
java.nio.IntBuffer params) {
|
||||||
|
GLES30.glGetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getUniformBlockIndex(int program, String uniformBlockName) {
|
||||||
|
return GLES30.glGetUniformBlockIndex(program, uniformBlockName);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getActiveUniformBlockiv(int program, int uniformBlockIndex, int pname, int[] params, int offset) {
|
||||||
|
// GLES30.glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getActiveUniformBlockiv(int program, int uniformBlockIndex, int pname, java.nio.IntBuffer params) {
|
||||||
|
GLES30.glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getActiveUniformBlockName(int program, int uniformBlockIndex, int bufSize, int[] length, int lengthOffset, byte[]
|
||||||
|
// uniformBlockName, int uniformBlockNameOffset) {
|
||||||
|
// GLES30.glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, lengthOffset, uniformBlockName,
|
||||||
|
// uniformBlockNameOffset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getActiveUniformBlockName(int program, int uniformBlockIndex, java.nio.Buffer length,
|
||||||
|
java.nio.Buffer uniformBlockName) {
|
||||||
|
GLES30.glGetActiveUniformBlockName(program, uniformBlockIndex, length, uniformBlockName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getActiveUniformBlockName(int program, int uniformBlockIndex) {
|
||||||
|
return GLES30.glGetActiveUniformBlockName(program, uniformBlockIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformBlockBinding(int program, int uniformBlockIndex, int uniformBlockBinding) {
|
||||||
|
GLES30.glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawArraysInstanced(int mode, int first, int count, int instanceCount) {
|
||||||
|
GLES30.glDrawArraysInstanced(mode, first, count, instanceCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void drawElementsInstanced(int mode, int count, int type, java.nio.Buffer indices, int instanceCount) {
|
||||||
|
// GLES30.glDrawElementsInstanced(mode, count, type, indices, instanceCount);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawElementsInstanced(int mode, int count, int type, int indicesOffset, int instanceCount) {
|
||||||
|
GLES30.glDrawElementsInstanced(mode, count, type, indicesOffset, instanceCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public long fenceSync(int condition, int flags) {
|
||||||
|
// return GLES30.glFenceSync(condition, flags);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public boolean isSync(long sync) {
|
||||||
|
// return GLES30.glIsSync(sync);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void deleteSync(long sync) {
|
||||||
|
// GLES30.glDeleteSync(sync);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public int clientWaitSync(long sync, int flags, long timeout) {
|
||||||
|
// return GLES30.glClientWaitSync(sync, flags, timeout);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void waitSync(long sync, int flags, long timeout) {
|
||||||
|
// GLES30.glWaitSync(sync, flags, timeout);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getInteger64v(int pname, long[] params, int offset) {
|
||||||
|
// GLES30.glGetInteger64v(pname, params, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getInteger64v(int pname, java.nio.LongBuffer params) {
|
||||||
|
GLES30.glGetInteger64v(pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void getSynciv(long sync, int pname, int bufSize, int[] length, int lengthOffset, int[] values, int valuesOffset) {
|
||||||
|
// GLES30.glGetSynciv(sync, pname, bufSize, length, lengthOffset, values, valuesOffset);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getSynciv(long sync, int pname, int bufSize, java.nio.IntBuffer length, java.nio.IntBuffer values) {
|
||||||
|
// GLES30.glGetSynciv(sync, pname, bufSize, length, values);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getInteger64i_v(int target, int index, long[] data, int offset) {
|
||||||
|
// GLES30.glGetInteger64i_v(target, index, data, offset);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getInteger64i_v(int target, int index, java.nio.LongBuffer data) {
|
||||||
|
// GLES30.glGetInteger64i_v(target, index, data);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getBufferParameteri64v(int target, int pname, long[] params, int offset) {
|
||||||
|
// GLES30.glGetBufferParameteri64v(target, pname, params, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getBufferParameteri64v(int target, int pname, java.nio.LongBuffer params) {
|
||||||
|
GLES30.glGetBufferParameteri64v(target, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genSamplers(int count, int[] samplers, int offset) {
|
||||||
|
GLES30.glGenSamplers(count, samplers, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genSamplers(int count, java.nio.IntBuffer samplers) {
|
||||||
|
GLES30.glGenSamplers(count, samplers);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteSamplers(int count, int[] samplers, int offset) {
|
||||||
|
GLES30.glDeleteSamplers(count, samplers, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteSamplers(int count, java.nio.IntBuffer samplers) {
|
||||||
|
GLES30.glDeleteSamplers(count, samplers);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isSampler(int sampler) {
|
||||||
|
return GLES30.glIsSampler(sampler);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindSampler(int unit, int sampler) {
|
||||||
|
GLES30.glBindSampler(unit, sampler);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void samplerParameteri(int sampler, int pname, int param) {
|
||||||
|
GLES30.glSamplerParameteri(sampler, pname, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void samplerParameteriv(int sampler, int pname, int[] param, int offset) {
|
||||||
|
// GLES30.glSamplerParameteriv(sampler, pname, param, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void samplerParameteriv(int sampler, int pname, java.nio.IntBuffer param) {
|
||||||
|
GLES30.glSamplerParameteriv(sampler, pname, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void samplerParameterf(int sampler, int pname, float param) {
|
||||||
|
GLES30.glSamplerParameterf(sampler, pname, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void samplerParameterfv(int sampler, int pname, float[] param, int offset) {
|
||||||
|
// GLES30.glSamplerParameterfv(sampler, pname, param, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void samplerParameterfv(int sampler, int pname, java.nio.FloatBuffer param) {
|
||||||
|
GLES30.glSamplerParameterfv(sampler, pname, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getSamplerParameteriv(int sampler, int pname, int[] params, int offset) {
|
||||||
|
// GLES30.glGetSamplerParameteriv(sampler, pname, params, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getSamplerParameteriv(int sampler, int pname, java.nio.IntBuffer params) {
|
||||||
|
GLES30.glGetSamplerParameteriv(sampler, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void getSamplerParameterfv(int sampler, int pname, float[] params, int offset) {
|
||||||
|
// GLES30.glGetSamplerParameterfv(sampler, pname, params, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getSamplerParameterfv(int sampler, int pname, java.nio.FloatBuffer params) {
|
||||||
|
GLES30.glGetSamplerParameterfv(sampler, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void vertexAttribDivisor(int index, int divisor) {
|
||||||
|
GLES30.glVertexAttribDivisor(index, divisor);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindTransformFeedback(int target, int id) {
|
||||||
|
GLES30.glBindTransformFeedback(target, id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteTransformFeedbacks(int n, int[] ids, int offset) {
|
||||||
|
GLES30.glDeleteTransformFeedbacks(n, ids, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteTransformFeedbacks(int n, java.nio.IntBuffer ids) {
|
||||||
|
GLES30.glDeleteTransformFeedbacks(n, ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genTransformFeedbacks(int n, int[] ids, int offset) {
|
||||||
|
GLES30.glGenTransformFeedbacks(n, ids, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genTransformFeedbacks(int n, java.nio.IntBuffer ids) {
|
||||||
|
GLES30.glGenTransformFeedbacks(n, ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isTransformFeedback(int id) {
|
||||||
|
return GLES30.glIsTransformFeedback(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void pauseTransformFeedback() {
|
||||||
|
GLES30.glPauseTransformFeedback();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void resumeTransformFeedback() {
|
||||||
|
GLES30.glResumeTransformFeedback();
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void getProgramBinary(int program, int bufSize, int[] length, int lengthOffset, int[] binaryFormat, int
|
||||||
|
// binaryFormatOffset, java.nio.Buffer binary) {
|
||||||
|
// GLES30.glGetProgramBinary(program, bufSize, length, lengthOffset, binaryFormat, binaryFormatOffset, binary);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getProgramBinary(int program, int bufSize, java.nio.IntBuffer length, java.nio.IntBuffer binaryFormat,
|
||||||
|
// java.nio.Buffer binary) {
|
||||||
|
// GLES30.glGetProgramBinary(program, bufSize, length, binaryFormat, binary);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void programBinary(int program, int binaryFormat, java.nio.Buffer binary, int length) {
|
||||||
|
// GLES30.glProgramBinary(program, binaryFormat, binary, length);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void programParameteri(int program, int pname, int value) {
|
||||||
|
GLES30.glProgramParameteri(program, pname, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void invalidateFramebuffer(int target, int numAttachments, int[] attachments, int offset) {
|
||||||
|
// GLES30.glInvalidateFramebuffer(target, numAttachments, attachments, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void invalidateFramebuffer(int target, int numAttachments, java.nio.IntBuffer attachments) {
|
||||||
|
GLES30.glInvalidateFramebuffer(target, numAttachments, attachments);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void invalidateSubFramebuffer(int target, int numAttachments, int[] attachments, int offset, int x, int y, int width,
|
||||||
|
// int height) {
|
||||||
|
// GLES30.glInvalidateSubFramebuffer(target, numAttachments, attachments, offset, x, y, width, height);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void invalidateSubFramebuffer(int target, int numAttachments, java.nio.IntBuffer attachments, int x, int y,
|
||||||
|
int width, int height) {
|
||||||
|
GLES30.glInvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void texStorage2D(int target, int levels, int internalformat, int width, int height) {
|
||||||
|
// GLES30.glTexStorage2D(target, levels, internalformat, width, height);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void texStorage3D(int target, int levels, int internalformat, int width, int height, int depth) {
|
||||||
|
// GLES30.glTexStorage3D(target, levels, internalformat, width, height, depth);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getInternalformativ(int target, int internalformat, int pname, int bufSize, int[] params, int offset) {
|
||||||
|
// GLES30.glGetInternalformativ(target, internalformat, pname, bufSize, params, offset);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getInternalformativ(int target, int internalformat, int pname, int bufSize, java.nio.IntBuffer params) {
|
||||||
|
// GLES30.glGetInternalformativ(target, internalformat, pname, bufSize, params);
|
||||||
|
// }
|
||||||
|
}
|
||||||
@@ -26,7 +26,6 @@ android {
|
|||||||
main {
|
main {
|
||||||
manifest.srcFile 'AndroidManifest.xml'
|
manifest.srcFile 'AndroidManifest.xml'
|
||||||
java.srcDirs = ['src']
|
java.srcDirs = ['src']
|
||||||
resources.srcDirs = ['src']
|
|
||||||
}
|
}
|
||||||
debug.setRoot('build-types/debug')
|
debug.setRoot('build-types/debug')
|
||||||
release.setRoot('build-types/release')
|
release.setRoot('build-types/release')
|
||||||
@@ -41,11 +40,11 @@ android.libraryVariants.all { variant ->
|
|||||||
return
|
return
|
||||||
|
|
||||||
def jar = project.tasks.create "jar${name.capitalize()}", Jar
|
def jar = project.tasks.create "jar${name.capitalize()}", Jar
|
||||||
jar.dependsOn variant.javaCompiler
|
jar.dependsOn variant.javaCompileProvider
|
||||||
jar.exclude '**/BuildConfig.class'
|
jar.exclude '**/BuildConfig.class'
|
||||||
jar.exclude '**/R.class'
|
jar.exclude '**/R.class'
|
||||||
jar.exclude '**/R$*.class'
|
jar.exclude '**/R$*.class'
|
||||||
jar.from variant.javaCompiler.destinationDir
|
jar.from variant.javaCompileProvider.get().destinationDir
|
||||||
artifacts.add('archives', jar)
|
artifacts.add('archives', jar)
|
||||||
|
|
||||||
file('natives').eachDir() { dir ->
|
file('natives').eachDir() { dir ->
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2012 Hannes Janetzek
|
* Copyright 2012 Hannes Janetzek
|
||||||
* Copyright 2016-2018 devemux86
|
* Copyright 2016-2019 devemux86
|
||||||
* Copyright 2018 Gustl22
|
* Copyright 2018-2019 Gustl22
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
*
|
*
|
||||||
@@ -31,10 +31,14 @@ import android.view.WindowManager;
|
|||||||
|
|
||||||
import org.oscim.android.canvas.AndroidGraphics;
|
import org.oscim.android.canvas.AndroidGraphics;
|
||||||
import org.oscim.android.gl.AndroidGL;
|
import org.oscim.android.gl.AndroidGL;
|
||||||
|
import org.oscim.android.gl.AndroidGL30;
|
||||||
import org.oscim.android.gl.GlConfigChooser;
|
import org.oscim.android.gl.GlConfigChooser;
|
||||||
|
import org.oscim.android.gl.GlContextFactory;
|
||||||
import org.oscim.android.input.AndroidMotionEvent;
|
import org.oscim.android.input.AndroidMotionEvent;
|
||||||
import org.oscim.android.input.GestureHandler;
|
import org.oscim.android.input.GestureHandler;
|
||||||
import org.oscim.backend.CanvasAdapter;
|
import org.oscim.backend.CanvasAdapter;
|
||||||
|
import org.oscim.backend.DateTime;
|
||||||
|
import org.oscim.backend.DateTimeAdapter;
|
||||||
import org.oscim.backend.GLAdapter;
|
import org.oscim.backend.GLAdapter;
|
||||||
import org.oscim.core.Tile;
|
import org.oscim.core.Tile;
|
||||||
import org.oscim.map.Map;
|
import org.oscim.map.Map;
|
||||||
@@ -43,6 +47,9 @@ import org.oscim.utils.Parameters;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import javax.microedition.khronos.egl.EGLConfig;
|
import javax.microedition.khronos.egl.EGLConfig;
|
||||||
import javax.microedition.khronos.opengles.GL10;
|
import javax.microedition.khronos.opengles.GL10;
|
||||||
|
|
||||||
@@ -57,6 +64,13 @@ public class MapView extends GLSurfaceView {
|
|||||||
|
|
||||||
static final Logger log = LoggerFactory.getLogger(MapView.class);
|
static final Logger log = LoggerFactory.getLogger(MapView.class);
|
||||||
|
|
||||||
|
private static final Pattern GL_PATTERN = Pattern.compile("OpenGL ES (\\d(\\.\\d){0,2})");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Target OpenGL ES version, if not available fall back to OpenGL ES 2.0
|
||||||
|
*/
|
||||||
|
public static double targetGLESVersion = 3.0;
|
||||||
|
|
||||||
private static void init() {
|
private static void init() {
|
||||||
System.loadLibrary("vtm-jni");
|
System.loadLibrary("vtm-jni");
|
||||||
}
|
}
|
||||||
@@ -88,7 +102,7 @@ public class MapView extends GLSurfaceView {
|
|||||||
/* Setup android backend */
|
/* Setup android backend */
|
||||||
AndroidGraphics.init();
|
AndroidGraphics.init();
|
||||||
AndroidAssets.init(context);
|
AndroidAssets.init(context);
|
||||||
GLAdapter.init(new AndroidGL());
|
DateTimeAdapter.init(new DateTime());
|
||||||
|
|
||||||
DisplayMetrics metrics = getResources().getDisplayMetrics();
|
DisplayMetrics metrics = getResources().getDisplayMetrics();
|
||||||
CanvasAdapter.dpi = (int) (metrics.scaledDensity * CanvasAdapter.DEFAULT_DPI);
|
CanvasAdapter.dpi = (int) (metrics.scaledDensity * CanvasAdapter.DEFAULT_DPI);
|
||||||
@@ -113,8 +127,13 @@ public class MapView extends GLSurfaceView {
|
|||||||
mMap = new AndroidMap(this);
|
mMap = new AndroidMap(this);
|
||||||
|
|
||||||
/* Initialize Renderer */
|
/* Initialize Renderer */
|
||||||
setEGLConfigChooser(new GlConfigChooser());
|
try {
|
||||||
|
setEGLContextFactory(new GlContextFactory());
|
||||||
|
} catch (Throwable t) {
|
||||||
|
log.error("Falling back to GLES 2", t);
|
||||||
setEGLContextClientVersion(2);
|
setEGLContextClientVersion(2);
|
||||||
|
}
|
||||||
|
setEGLConfigChooser(new GlConfigChooser());
|
||||||
|
|
||||||
if (GLAdapter.debug)
|
if (GLAdapter.debug)
|
||||||
setDebugFlags(GLSurfaceView.DEBUG_CHECK_GL_ERROR
|
setDebugFlags(GLSurfaceView.DEBUG_CHECK_GL_ERROR
|
||||||
@@ -139,10 +158,12 @@ public class MapView extends GLSurfaceView {
|
|||||||
mMap.destroy();
|
mMap.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
mMap.pause(true);
|
mMap.pause(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
mMap.pause(false);
|
mMap.pause(false);
|
||||||
}
|
}
|
||||||
@@ -222,6 +243,11 @@ public class MapView extends GLSurfaceView {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateMap() {
|
||||||
|
updateMap(true);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateMap(boolean redraw) {
|
public void updateMap(boolean redraw) {
|
||||||
synchronized (mRedrawCb) {
|
synchronized (mRedrawCb) {
|
||||||
@@ -284,8 +310,59 @@ public class MapView extends GLSurfaceView {
|
|||||||
super(map);
|
super(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return GL version as [major, minor, release]
|
||||||
|
*/
|
||||||
|
private int[] extractVersion(String versionString) {
|
||||||
|
int[] version = new int[3];
|
||||||
|
Matcher matcher = GL_PATTERN.matcher(versionString);
|
||||||
|
if (matcher.find()) {
|
||||||
|
String[] split = matcher.group(1).split("\\.");
|
||||||
|
version[0] = parseInt(split[0], 2);
|
||||||
|
version[1] = split.length < 2 ? 0 : parseInt(split[1], 0);
|
||||||
|
version[2] = split.length < 3 ? 0 : parseInt(split[2], 0);
|
||||||
|
} else {
|
||||||
|
log.error("Invalid version string: " + versionString);
|
||||||
|
version[0] = 2;
|
||||||
|
version[1] = 0;
|
||||||
|
version[2] = 0;
|
||||||
|
}
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Forgiving parsing of GL major, minor and release versions as some manufacturers don't adhere to spec.
|
||||||
|
**/
|
||||||
|
private int parseInt(String value, int defaultValue) {
|
||||||
|
try {
|
||||||
|
return Integer.parseInt(value);
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
log.error("Error parsing number: " + value + ", assuming: " + defaultValue);
|
||||||
|
return defaultValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSurfaceCreated(GL10 gl, EGLConfig config) {
|
public void onSurfaceCreated(GL10 gl, EGLConfig config) {
|
||||||
|
try {
|
||||||
|
// Create a minimum supported OpenGL ES context, then check:
|
||||||
|
String versionString = gl.glGetString(GL10.GL_VERSION);
|
||||||
|
log.info("Version: " + versionString);
|
||||||
|
// The version format is displayed as: "OpenGL ES <major>.<minor>"
|
||||||
|
// followed by optional content provided by the implementation.
|
||||||
|
|
||||||
|
// OpenGL<space>ES<space><version number><space><vendor-specific information>.
|
||||||
|
int[] version = extractVersion(versionString);
|
||||||
|
int majorVersion = version[0];
|
||||||
|
if (majorVersion >= 3)
|
||||||
|
GLAdapter.init(new AndroidGL30());
|
||||||
|
else
|
||||||
|
GLAdapter.init(new AndroidGL());
|
||||||
|
} catch (Throwable t) {
|
||||||
|
log.error("Falling back to GLES 2", t);
|
||||||
|
GLAdapter.init(new AndroidGL());
|
||||||
|
}
|
||||||
|
|
||||||
super.onSurfaceCreated();
|
super.onSurfaceCreated();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,8 +42,8 @@ import java.util.ArrayList;
|
|||||||
|
|
||||||
public class TileCache implements ITileCache {
|
public class TileCache implements ITileCache {
|
||||||
|
|
||||||
final static org.slf4j.Logger log = LoggerFactory.getLogger(TileCache.class);
|
static final org.slf4j.Logger log = LoggerFactory.getLogger(TileCache.class);
|
||||||
final static boolean dbg = false;
|
static final boolean dbg = false;
|
||||||
|
|
||||||
class CacheTileReader implements TileReader {
|
class CacheTileReader implements TileReader {
|
||||||
final InputStream mInputStream;
|
final InputStream mInputStream;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
* Copyright 2016 Longri
|
* Copyright 2016 Longri
|
||||||
* Copyright 2016 devemux86
|
* Copyright 2016-2018 devemux86
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
*
|
*
|
||||||
@@ -23,6 +23,8 @@ import android.graphics.BitmapFactory;
|
|||||||
import android.opengl.GLES20;
|
import android.opengl.GLES20;
|
||||||
import android.opengl.GLUtils;
|
import android.opengl.GLUtils;
|
||||||
|
|
||||||
|
import org.oscim.backend.CanvasAdapter;
|
||||||
|
import org.oscim.utils.GraphicUtils;
|
||||||
import org.oscim.utils.IOUtils;
|
import org.oscim.utils.IOUtils;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
@@ -31,7 +33,7 @@ import java.io.InputStream;
|
|||||||
import static android.graphics.Bitmap.Config.ARGB_8888;
|
import static android.graphics.Bitmap.Config.ARGB_8888;
|
||||||
|
|
||||||
public class AndroidBitmap implements org.oscim.backend.canvas.Bitmap {
|
public class AndroidBitmap implements org.oscim.backend.canvas.Bitmap {
|
||||||
final Bitmap mBitmap;
|
Bitmap mBitmap;
|
||||||
|
|
||||||
public AndroidBitmap(InputStream inputStream) {
|
public AndroidBitmap(InputStream inputStream) {
|
||||||
Bitmap bitmap = BitmapFactory.decodeStream(inputStream);
|
Bitmap bitmap = BitmapFactory.decodeStream(inputStream);
|
||||||
@@ -43,6 +45,12 @@ public class AndroidBitmap implements org.oscim.backend.canvas.Bitmap {
|
|||||||
mBitmap = bitmap;
|
mBitmap = bitmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public AndroidBitmap(InputStream inputStream, int width, int height, int percent) {
|
||||||
|
this(inputStream);
|
||||||
|
float[] newSize = GraphicUtils.imageSize(getWidth(), getHeight(), CanvasAdapter.getScale(), width, height, percent);
|
||||||
|
scaleTo((int) newSize[0], (int) newSize[1]);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isValid() {
|
public boolean isValid() {
|
||||||
return mBitmap != null;
|
return mBitmap != null;
|
||||||
@@ -117,4 +125,17 @@ public class AndroidBitmap implements org.oscim.backend.canvas.Bitmap {
|
|||||||
IOUtils.closeQuietly(outputStream);
|
IOUtils.closeQuietly(outputStream);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void scaleTo(int width, int height) {
|
||||||
|
if (getWidth() != width || getHeight() != height) {
|
||||||
|
// The effect of the filter argument to createScaledBitmap is not well documented in the
|
||||||
|
// official android docs, but according to
|
||||||
|
// http://stackoverflow.com/questions/2895065/what-does-the-filter-parameter-to-createscaledbitmap-do
|
||||||
|
// passing true results in smoother edges, less pixelation.
|
||||||
|
// If smoother corners improve the readability of map labels is perhaps debatable.
|
||||||
|
android.graphics.Bitmap scaledBitmap = android.graphics.Bitmap.createScaledBitmap(mBitmap, width, height, true);
|
||||||
|
mBitmap = scaledBitmap;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010, 2011, 2012 mapsforge.org
|
* Copyright 2010, 2011, 2012 mapsforge.org
|
||||||
* Copyright 2016-2017 devemux86
|
* Copyright 2016-2018 devemux86
|
||||||
* Copyright 2017 Longri
|
* Copyright 2017 Longri
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
@@ -58,6 +58,11 @@ public final class AndroidGraphics extends CanvasAdapter {
|
|||||||
return new AndroidBitmap(inputStream);
|
return new AndroidBitmap(inputStream);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Bitmap decodeBitmapImpl(InputStream inputStream, int width, int height, int percent) {
|
||||||
|
return new AndroidBitmap(inputStream, width, height, percent);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Bitmap decodeSvgBitmapImpl(InputStream inputStream, int width, int height, int percent) throws IOException {
|
public Bitmap decodeSvgBitmapImpl(InputStream inputStream, int width, int height, int percent) throws IOException {
|
||||||
return new AndroidSvgBitmap(inputStream, width, height, percent);
|
return new AndroidSvgBitmap(inputStream, width, height, percent);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010, 2011, 2012 mapsforge.org
|
* Copyright 2010, 2011, 2012 mapsforge.org
|
||||||
* Copyright 2013-2014 Ludwig M Brinckmann
|
* Copyright 2013-2014 Ludwig M Brinckmann
|
||||||
* Copyright 2014-2017 devemux86
|
* Copyright 2014-2018 devemux86
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify it under the
|
* This program is free software: you can redistribute it and/or modify it under the
|
||||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||||
@@ -24,6 +24,7 @@ import android.graphics.RectF;
|
|||||||
import com.caverock.androidsvg.SVG;
|
import com.caverock.androidsvg.SVG;
|
||||||
|
|
||||||
import org.oscim.backend.CanvasAdapter;
|
import org.oscim.backend.CanvasAdapter;
|
||||||
|
import org.oscim.utils.GraphicUtils;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
@@ -41,34 +42,12 @@ public class AndroidSvgBitmap extends AndroidBitmap {
|
|||||||
|
|
||||||
double scale = scaleFactor / Math.sqrt((picture.getHeight() * picture.getWidth()) / defaultSize);
|
double scale = scaleFactor / Math.sqrt((picture.getHeight() * picture.getWidth()) / defaultSize);
|
||||||
|
|
||||||
float bitmapWidth = (float) (picture.getWidth() * scale);
|
float[] bmpSize = GraphicUtils.imageSize(picture.getWidth(), picture.getHeight(), (float) scale, width, height, percent);
|
||||||
float bitmapHeight = (float) (picture.getHeight() * scale);
|
|
||||||
|
|
||||||
float aspectRatio = (1f * picture.getWidth()) / picture.getHeight();
|
android.graphics.Bitmap bitmap = android.graphics.Bitmap.createBitmap((int) Math.ceil(bmpSize[0]),
|
||||||
|
(int) Math.ceil(bmpSize[1]), Bitmap.Config.ARGB_8888);
|
||||||
if (width != 0 && height != 0) {
|
|
||||||
// both width and height set, override any other setting
|
|
||||||
bitmapWidth = width;
|
|
||||||
bitmapHeight = height;
|
|
||||||
} else if (width == 0 && height != 0) {
|
|
||||||
// only width set, calculate from aspect ratio
|
|
||||||
bitmapWidth = height * aspectRatio;
|
|
||||||
bitmapHeight = height;
|
|
||||||
} else if (width != 0 && height == 0) {
|
|
||||||
// only height set, calculate from aspect ratio
|
|
||||||
bitmapHeight = width / aspectRatio;
|
|
||||||
bitmapWidth = width;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (percent != 100) {
|
|
||||||
bitmapWidth *= percent / 100f;
|
|
||||||
bitmapHeight *= percent / 100f;
|
|
||||||
}
|
|
||||||
|
|
||||||
android.graphics.Bitmap bitmap = android.graphics.Bitmap.createBitmap((int) Math.ceil(bitmapWidth),
|
|
||||||
(int) Math.ceil(bitmapHeight), Bitmap.Config.ARGB_8888);
|
|
||||||
Canvas canvas = new Canvas(bitmap);
|
Canvas canvas = new Canvas(bitmap);
|
||||||
canvas.drawPicture(picture, new RectF(0, 0, bitmapWidth, bitmapHeight));
|
canvas.drawPicture(picture, new RectF(0, 0, bmpSize[0], bmpSize[1]));
|
||||||
|
|
||||||
return bitmap;
|
return bitmap;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
|
* Copyright 2019 Gustl22
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
*
|
*
|
||||||
@@ -25,6 +26,9 @@ import java.nio.Buffer;
|
|||||||
import java.nio.FloatBuffer;
|
import java.nio.FloatBuffer;
|
||||||
import java.nio.IntBuffer;
|
import java.nio.IntBuffer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO Unimplemented methods: https://github.com/libgdx/libgdx/blob/master/gdx/jni/android/AndroidGL20.cpp
|
||||||
|
*/
|
||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
public class AndroidGL implements GL {
|
public class AndroidGL implements GL {
|
||||||
|
|
||||||
@@ -103,11 +107,21 @@ public class AndroidGL implements GL {
|
|||||||
return GLES20.glCreateShader(type);
|
return GLES20.glCreateShader(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteBuffer(int buffer) {
|
||||||
|
throw new UnsupportedOperationException("missing implementation");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteBuffers(int n, IntBuffer buffers) {
|
public void deleteBuffers(int n, IntBuffer buffers) {
|
||||||
GLES20.glDeleteBuffers(n, buffers);
|
GLES20.glDeleteBuffers(n, buffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteFramebuffer(int framebuffer) {
|
||||||
|
throw new UnsupportedOperationException("missing implementation");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteFramebuffers(int n, IntBuffer framebuffers) {
|
public void deleteFramebuffers(int n, IntBuffer framebuffers) {
|
||||||
GLES20.glDeleteFramebuffers(n, framebuffers);
|
GLES20.glDeleteFramebuffers(n, framebuffers);
|
||||||
@@ -118,6 +132,11 @@ public class AndroidGL implements GL {
|
|||||||
GLES20.glDeleteProgram(program);
|
GLES20.glDeleteProgram(program);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteRenderbuffer(int renderbuffer) {
|
||||||
|
throw new UnsupportedOperationException("missing implementation");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteRenderbuffers(int n, IntBuffer renderbuffers) {
|
public void deleteRenderbuffers(int n, IntBuffer renderbuffers) {
|
||||||
GLES20.glDeleteRenderbuffers(n, renderbuffers);
|
GLES20.glDeleteRenderbuffers(n, renderbuffers);
|
||||||
@@ -160,6 +179,11 @@ public class AndroidGL implements GL {
|
|||||||
GLES20.glFramebufferTexture2D(target, attachment, textarget, texture, level);
|
GLES20.glFramebufferTexture2D(target, attachment, textarget, texture, level);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genBuffer() {
|
||||||
|
throw new UnsupportedOperationException("missing implementation");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void genBuffers(int n, IntBuffer buffers) {
|
public void genBuffers(int n, IntBuffer buffers) {
|
||||||
GLES20.glGenBuffers(n, buffers);
|
GLES20.glGenBuffers(n, buffers);
|
||||||
@@ -170,11 +194,21 @@ public class AndroidGL implements GL {
|
|||||||
GLES20.glGenerateMipmap(target);
|
GLES20.glGenerateMipmap(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genFramebuffer() {
|
||||||
|
throw new UnsupportedOperationException("missing implementation");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void genFramebuffers(int n, IntBuffer framebuffers) {
|
public void genFramebuffers(int n, IntBuffer framebuffers) {
|
||||||
GLES20.glGenFramebuffers(n, framebuffers);
|
GLES20.glGenFramebuffers(n, framebuffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genRenderbuffer() {
|
||||||
|
throw new UnsupportedOperationException("missing implementation");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void genRenderbuffers(int n, IntBuffer renderbuffers) {
|
public void genRenderbuffers(int n, IntBuffer renderbuffers) {
|
||||||
GLES20.glGenRenderbuffers(n, renderbuffers);
|
GLES20.glGenRenderbuffers(n, renderbuffers);
|
||||||
@@ -260,11 +294,6 @@ public class AndroidGL implements GL {
|
|||||||
GLES20.glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
|
GLES20.glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void getShaderSource(int shader, int bufsize, Buffer length, String source) {
|
|
||||||
throw new UnsupportedOperationException("missing implementation");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getTexParameterfv(int target, int pname, FloatBuffer params) {
|
public void getTexParameterfv(int target, int pname, FloatBuffer params) {
|
||||||
GLES20.glGetTexParameterfv(target, pname, params);
|
GLES20.glGetTexParameterfv(target, pname, params);
|
||||||
@@ -431,6 +460,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform1fv(int location, int count, float[] v, int offset) {
|
||||||
|
GLES20.glUniform1fv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform1i(int location, int x) {
|
public void uniform1i(int location, int x) {
|
||||||
GLES20.glUniform1i(location, x);
|
GLES20.glUniform1i(location, x);
|
||||||
@@ -443,6 +477,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform1iv(int location, int count, int[] v, int offset) {
|
||||||
|
GLES20.glUniform1iv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform2f(int location, float x, float y) {
|
public void uniform2f(int location, float x, float y) {
|
||||||
GLES20.glUniform2f(location, x, y);
|
GLES20.glUniform2f(location, x, y);
|
||||||
@@ -455,6 +494,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform2fv(int location, int count, float[] v, int offset) {
|
||||||
|
GLES20.glUniform2fv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform2i(int location, int x, int y) {
|
public void uniform2i(int location, int x, int y) {
|
||||||
GLES20.glUniform2i(location, x, y);
|
GLES20.glUniform2i(location, x, y);
|
||||||
@@ -467,6 +511,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform2iv(int location, int count, int[] v, int offset) {
|
||||||
|
GLES20.glUniform2iv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform3f(int location, float x, float y, float z) {
|
public void uniform3f(int location, float x, float y, float z) {
|
||||||
GLES20.glUniform3f(location, x, y, z);
|
GLES20.glUniform3f(location, x, y, z);
|
||||||
@@ -479,6 +528,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform3fv(int location, int count, float[] v, int offset) {
|
||||||
|
GLES20.glUniform3fv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform3i(int location, int x, int y, int z) {
|
public void uniform3i(int location, int x, int y, int z) {
|
||||||
GLES20.glUniform3i(location, x, y, z);
|
GLES20.glUniform3i(location, x, y, z);
|
||||||
@@ -491,6 +545,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform3iv(int location, int count, int[] v, int offset) {
|
||||||
|
GLES20.glUniform3iv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform4f(int location, float x, float y, float z, float w) {
|
public void uniform4f(int location, float x, float y, float z, float w) {
|
||||||
GLES20.glUniform4f(location, x, y, z, w);
|
GLES20.glUniform4f(location, x, y, z, w);
|
||||||
@@ -501,6 +560,11 @@ public class AndroidGL implements GL {
|
|||||||
GLES20.glUniform4fv(location, count, v);
|
GLES20.glUniform4fv(location, count, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform4fv(int location, int count, float[] v, int offset) {
|
||||||
|
GLES20.glUniform4fv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform4i(int location, int x, int y, int z, int w) {
|
public void uniform4i(int location, int x, int y, int z, int w) {
|
||||||
GLES20.glUniform4i(location, x, y, z, w);
|
GLES20.glUniform4i(location, x, y, z, w);
|
||||||
@@ -513,24 +577,44 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform4iv(int location, int count, int[] v, int offset) {
|
||||||
|
GLES20.glUniform4iv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniformMatrix2fv(int location, int count, boolean transpose, FloatBuffer value) {
|
public void uniformMatrix2fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
GLES20.glUniformMatrix2fv(location, count, transpose, value);
|
GLES20.glUniformMatrix2fv(location, count, transpose, value);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix2fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
GLES20.glUniformMatrix2fv(location, count, transpose, value, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniformMatrix3fv(int location, int count, boolean transpose, FloatBuffer value) {
|
public void uniformMatrix3fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
GLES20.glUniformMatrix3fv(location, count, transpose, value);
|
GLES20.glUniformMatrix3fv(location, count, transpose, value);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix3fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
GLES20.glUniformMatrix3fv(location, count, transpose, value, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniformMatrix4fv(int location, int count, boolean transpose, FloatBuffer value) {
|
public void uniformMatrix4fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
GLES20.glUniformMatrix4fv(location, count, transpose, value);
|
GLES20.glUniformMatrix4fv(location, count, transpose, value);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix4fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
GLES20.glUniformMatrix4fv(location, count, transpose, value, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void useProgram(int program) {
|
public void useProgram(int program) {
|
||||||
GLES20.glUseProgram(program);
|
GLES20.glUseProgram(program);
|
||||||
@@ -691,6 +775,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteTexture(int texture) {
|
||||||
|
throw new UnsupportedOperationException("missing implementation");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void depthFunc(int func) {
|
public void depthFunc(int func) {
|
||||||
GLES20.glDepthFunc(func);
|
GLES20.glDepthFunc(func);
|
||||||
@@ -757,6 +846,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genTexture() {
|
||||||
|
throw new UnsupportedOperationException("missing implementation");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getError() {
|
public int getError() {
|
||||||
return GLES20.glGetError();
|
return GLES20.glGetError();
|
||||||
@@ -837,8 +931,7 @@ public class AndroidGL implements GL {
|
|||||||
@Override
|
@Override
|
||||||
public void texSubImage2D(int target, int level, int xoffset, int yoffset, int width,
|
public void texSubImage2D(int target, int level, int xoffset, int yoffset, int width,
|
||||||
int height, int format, int type, Buffer pixels) {
|
int height, int format, int type, Buffer pixels) {
|
||||||
GLES20
|
GLES20.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
|
||||||
.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
878
vtm-android/src/org/oscim/android/gl/AndroidGL30.java
Normal file
878
vtm-android/src/org/oscim/android/gl/AndroidGL30.java
Normal file
@@ -0,0 +1,878 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2019 Gustl22
|
||||||
|
*
|
||||||
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify it under the
|
||||||
|
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||||
|
* Foundation, either version 3 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License along with
|
||||||
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright 2014 See AUTHORS file.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
package org.oscim.android.gl;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.opengl.GLES30;
|
||||||
|
|
||||||
|
import org.oscim.backend.GL30;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See https://github.com/libgdx/libgdx/blob/master/backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidGL30.java
|
||||||
|
*/
|
||||||
|
@SuppressLint("NewApi")
|
||||||
|
public class AndroidGL30 extends AndroidGL implements GL30 {
|
||||||
|
@Override
|
||||||
|
public void readBuffer(int mode) {
|
||||||
|
GLES30.glReadBuffer(mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawRangeElements(int mode, int start, int end, int count, int type, java.nio.Buffer indices) {
|
||||||
|
GLES30.glDrawRangeElements(mode, start, end, count, type, indices);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawRangeElements(int mode, int start, int end, int count, int type, int offset) {
|
||||||
|
GLES30.glDrawRangeElements(mode, start, end, count, type, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void texImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int format,
|
||||||
|
int type, java.nio.Buffer pixels) {
|
||||||
|
if (pixels == null)
|
||||||
|
GLES30.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, 0);
|
||||||
|
else
|
||||||
|
GLES30.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void texImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int format,
|
||||||
|
int type, int offset) {
|
||||||
|
GLES30.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void texSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth,
|
||||||
|
int format, int type, java.nio.Buffer pixels) {
|
||||||
|
GLES30.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void texSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth,
|
||||||
|
int format, int type, int offset) {
|
||||||
|
GLES30.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void copyTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width,
|
||||||
|
int height) {
|
||||||
|
GLES30.glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void compressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int
|
||||||
|
// imageSize, java.nio.Buffer data) {
|
||||||
|
// GLES30.glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void compressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int
|
||||||
|
// imageSize, int offset) {
|
||||||
|
// GLES30.glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, offset);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void compressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int
|
||||||
|
// depth, int format, int imageSize, java.nio.Buffer data) {
|
||||||
|
// GLES30.glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void compressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int
|
||||||
|
// depth, int format, int imageSize, int offset) {
|
||||||
|
// GLES30.glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genQueries(int n, int[] ids, int offset) {
|
||||||
|
GLES30.glGenQueries(n, ids, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genQueries(int n, java.nio.IntBuffer ids) {
|
||||||
|
GLES30.glGenQueries(n, ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteQueries(int n, int[] ids, int offset) {
|
||||||
|
GLES30.glDeleteQueries(n, ids, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteQueries(int n, java.nio.IntBuffer ids) {
|
||||||
|
GLES30.glDeleteQueries(n, ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isQuery(int id) {
|
||||||
|
return GLES30.glIsQuery(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void beginQuery(int target, int id) {
|
||||||
|
GLES30.glBeginQuery(target, id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void endQuery(int target) {
|
||||||
|
GLES30.glEndQuery(target);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void getQueryiv(int target, int pname, int[] params, int offset) {
|
||||||
|
// GLES30.glGetQueryiv(target, pname, params, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getQueryiv(int target, int pname, java.nio.IntBuffer params) {
|
||||||
|
GLES30.glGetQueryiv(target, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void getQueryObjectuiv(int id, int pname, int[] params, int offset) {
|
||||||
|
// GLES30.glGetQueryObjectuiv(id, pname, params, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getQueryObjectuiv(int id, int pname, java.nio.IntBuffer params) {
|
||||||
|
GLES30.glGetQueryObjectuiv(id, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean unmapBuffer(int target) {
|
||||||
|
return GLES30.glUnmapBuffer(target);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public java.nio.Buffer getBufferPointerv(int target, int pname) {
|
||||||
|
return GLES30.glGetBufferPointerv(target, pname);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void drawBuffers(int n, int[] bufs, int offset) {
|
||||||
|
// GLES30.glDrawBuffers(n, bufs, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawBuffers(int n, java.nio.IntBuffer bufs) {
|
||||||
|
GLES30.glDrawBuffers(n, bufs);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void uniformMatrix2x3fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
// GLES30.glUniformMatrix2x3fv(location, count, transpose, value, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix2x3fv(int location, int count, boolean transpose, java.nio.FloatBuffer value) {
|
||||||
|
GLES30.glUniformMatrix2x3fv(location, count, transpose, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void uniformMatrix3x2fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
// GLES30.glUniformMatrix3x2fv(location, count, transpose, value, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix3x2fv(int location, int count, boolean transpose, java.nio.FloatBuffer value) {
|
||||||
|
GLES30.glUniformMatrix3x2fv(location, count, transpose, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void uniformMatrix2x4fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
// GLES30.glUniformMatrix2x4fv(location, count, transpose, value, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix2x4fv(int location, int count, boolean transpose, java.nio.FloatBuffer value) {
|
||||||
|
GLES30.glUniformMatrix2x4fv(location, count, transpose, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void uniformMatrix4x2fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
// GLES30.glUniformMatrix4x2fv(location, count, transpose, value, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix4x2fv(int location, int count, boolean transpose, java.nio.FloatBuffer value) {
|
||||||
|
GLES30.glUniformMatrix4x2fv(location, count, transpose, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void uniformMatrix3x4fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
// GLES30.glUniformMatrix3x4fv(location, count, transpose, value, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix3x4fv(int location, int count, boolean transpose, java.nio.FloatBuffer value) {
|
||||||
|
GLES30.glUniformMatrix3x4fv(location, count, transpose, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void uniformMatrix4x3fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
// GLES30.glUniformMatrix4x3fv(location, count, transpose, value, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix4x3fv(int location, int count, boolean transpose, java.nio.FloatBuffer value) {
|
||||||
|
GLES30.glUniformMatrix4x3fv(location, count, transpose, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void blitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1,
|
||||||
|
int mask, int filter) {
|
||||||
|
GLES30.glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderbufferStorageMultisample(int target, int samples, int internalformat, int width, int height) {
|
||||||
|
GLES30.glRenderbufferStorageMultisample(target, samples, internalformat, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void framebufferTextureLayer(int target, int attachment, int texture, int level, int layer) {
|
||||||
|
GLES30.glFramebufferTextureLayer(target, attachment, texture, level, layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public java.nio.Buffer mapBufferRange(int target, int offset, int length, int access) {
|
||||||
|
// return GLES30.glMapBufferRange(target, offset, length, access);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void flushMappedBufferRange(int target, int offset, int length) {
|
||||||
|
GLES30.glFlushMappedBufferRange(target, offset, length);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindVertexArray(int array) {
|
||||||
|
GLES30.glBindVertexArray(array);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteVertexArrays(int n, int[] arrays, int offset) {
|
||||||
|
GLES30.glDeleteVertexArrays(n, arrays, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteVertexArrays(int n, java.nio.IntBuffer arrays) {
|
||||||
|
GLES30.glDeleteVertexArrays(n, arrays);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genVertexArrays(int n, int[] arrays, int offset) {
|
||||||
|
GLES30.glGenVertexArrays(n, arrays, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genVertexArrays(int n, java.nio.IntBuffer arrays) {
|
||||||
|
GLES30.glGenVertexArrays(n, arrays);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isVertexArray(int array) {
|
||||||
|
return GLES30.glIsVertexArray(array);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void getIntegeri_v(int target, int index, int[] data, int offset) {
|
||||||
|
// GLES30.glGetIntegeri_v(target, index, data, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void getIntegeri_v(int target, int index, java.nio.IntBuffer data) {
|
||||||
|
// GLES30.glGetIntegeri_v(target, index, data);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void beginTransformFeedback(int primitiveMode) {
|
||||||
|
GLES30.glBeginTransformFeedback(primitiveMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void endTransformFeedback() {
|
||||||
|
GLES30.glEndTransformFeedback();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindBufferRange(int target, int index, int buffer, int offset, int size) {
|
||||||
|
GLES30.glBindBufferRange(target, index, buffer, offset, size);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindBufferBase(int target, int index, int buffer) {
|
||||||
|
GLES30.glBindBufferBase(target, index, buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void transformFeedbackVaryings(int program, String[] varyings, int bufferMode) {
|
||||||
|
GLES30.glTransformFeedbackVaryings(program, varyings, bufferMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void getTransformFeedbackVarying(int program, int index, int bufsize, int[] length, int lengthOffset, int[] size, int
|
||||||
|
// sizeOffset, int[] type, int typeOffset, byte[] name, int nameOffset) {
|
||||||
|
// GLES30.glGetTransformFeedbackVarying(program, index, bufsize, length, lengthOffset, size, sizeOffset, type, typeOffset, name,
|
||||||
|
// nameOffset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void getTransformFeedbackVarying(int program, int index, int bufsize, java.nio.IntBuffer length, java.nio.IntBuffer
|
||||||
|
// size, java.nio.IntBuffer type, byte name) {
|
||||||
|
// GLES30.glGetTransformFeedbackVarying(program, index, bufsize, length, size, type, name);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public String getTransformFeedbackVarying(int program, int index, int[] size, int sizeOffset, int[] type, int typeOffset) {
|
||||||
|
// return GLES30.glGetTransformFeedbackVarying(program, index, size, sizeOffset, type, typeOffset);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public String getTransformFeedbackVarying(int program, int index, java.nio.IntBuffer size, java.nio.IntBuffer type) {
|
||||||
|
// return GLES30.glGetTransformFeedbackVarying(program, index, size, type);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void vertexAttribIPointer(int index, int size, int type, int stride, int offset) {
|
||||||
|
GLES30.glVertexAttribIPointer(index, size, type, stride, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void getVertexAttribIiv(int index, int pname, int[] params, int offset) {
|
||||||
|
// GLES30.glGetVertexAttribIiv(index, pname, params, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getVertexAttribIiv(int index, int pname, java.nio.IntBuffer params) {
|
||||||
|
GLES30.glGetVertexAttribIiv(index, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void getVertexAttribIuiv(int index, int pname, int[] params, int offset) {
|
||||||
|
// GLES30.glGetVertexAttribIuiv(index, pname, params, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getVertexAttribIuiv(int index, int pname, java.nio.IntBuffer params) {
|
||||||
|
GLES30.glGetVertexAttribIuiv(index, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void vertexAttribI4i(int index, int x, int y, int z, int w) {
|
||||||
|
GLES30.glVertexAttribI4i(index, x, y, z, w);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void vertexAttribI4ui(int index, int x, int y, int z, int w) {
|
||||||
|
GLES30.glVertexAttribI4ui(index, x, y, z, w);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void vertexAttribI4iv(int index, int[] v, int offset) {
|
||||||
|
// GLES30.glVertexAttribI4iv(index, v, offset);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void vertexAttribI4iv(int index, java.nio.IntBuffer v) {
|
||||||
|
// GLES30.glVertexAttribI4iv(index, v);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void vertexAttribI4uiv(int index, int[] v, int offset) {
|
||||||
|
// GLES30.glVertexAttribI4uiv(index, v, offset);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void vertexAttribI4uiv(int index, java.nio.IntBuffer v) {
|
||||||
|
// GLES30.glVertexAttribI4uiv(index, v);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getUniformuiv(int program, int location, int[] params, int offset) {
|
||||||
|
// GLES30.glGetUniformuiv(program, location, params, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getUniformuiv(int program, int location, java.nio.IntBuffer params) {
|
||||||
|
GLES30.glGetUniformuiv(program, location, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getFragDataLocation(int program, String name) {
|
||||||
|
return GLES30.glGetFragDataLocation(program, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void uniform1ui(int location, int v0) {
|
||||||
|
// GLES30.glUniform1ui(location, v0);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void uniform2ui(int location, int v0, int v1) {
|
||||||
|
// GLES30.glUniform2ui(location, v0, v1);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void uniform3ui(int location, int v0, int v1, int v2) {
|
||||||
|
// GLES30.glUniform3ui(location, v0, v1, v2);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void uniform4ui(int location, int v0, int v1, int v2, int v3) {
|
||||||
|
// GLES30.glUniform4ui(location, v0, v1, v2, v3);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void uniform1uiv(int location, int count, int[] value, int offset) {
|
||||||
|
// GLES30.glUniform1uiv(location, count, value, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform1uiv(int location, int count, java.nio.IntBuffer value) {
|
||||||
|
GLES30.glUniform1uiv(location, count, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void uniform2uiv(int location, int count, int[] value, int offset) {
|
||||||
|
// GLES30.glUniform2uiv(location, count, value, offset);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void uniform2uiv(int location, int count, java.nio.IntBuffer value) {
|
||||||
|
// GLES30.glUniform2uiv(location, count, value);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void uniform3uiv(int location, int count, int[] value, int offset) {
|
||||||
|
// GLES30.glUniform3uiv(location, count, value, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform3uiv(int location, int count, java.nio.IntBuffer value) {
|
||||||
|
GLES30.glUniform3uiv(location, count, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void uniform4uiv(int location, int count, int[] value, int offset) {
|
||||||
|
// GLES30.glUniform4uiv(location, count, value, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform4uiv(int location, int count, java.nio.IntBuffer value) {
|
||||||
|
GLES30.glUniform4uiv(location, count, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void clearBufferiv(int buffer, int drawbuffer, int[] value, int offset) {
|
||||||
|
// GLES30.glClearBufferiv(buffer, drawbuffer, value, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearBufferiv(int buffer, int drawbuffer, java.nio.IntBuffer value) {
|
||||||
|
GLES30.glClearBufferiv(buffer, drawbuffer, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void clearBufferuiv(int buffer, int drawbuffer, int[] value, int offset) {
|
||||||
|
// GLES30.glClearBufferuiv(buffer, drawbuffer, value, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearBufferuiv(int buffer, int drawbuffer, java.nio.IntBuffer value) {
|
||||||
|
GLES30.glClearBufferuiv(buffer, drawbuffer, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void clearBufferfv(int buffer, int drawbuffer, float[] value, int offset) {
|
||||||
|
// GLES30.glClearBufferfv(buffer, drawbuffer, value, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearBufferfv(int buffer, int drawbuffer, java.nio.FloatBuffer value) {
|
||||||
|
GLES30.glClearBufferfv(buffer, drawbuffer, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearBufferfi(int buffer, int drawbuffer, float depth, int stencil) {
|
||||||
|
GLES30.glClearBufferfi(buffer, drawbuffer, depth, stencil);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getStringi(int name, int index) {
|
||||||
|
return GLES30.glGetStringi(name, index);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void copyBufferSubData(int readTarget, int writeTarget, int readOffset, int writeOffset, int size) {
|
||||||
|
GLES30.glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getUniformIndices(int program, String[] uniformNames, int[] uniformIndices, int uniformIndicesOffset) {
|
||||||
|
// GLES30.glGetUniformIndices(program, uniformNames, uniformIndices, uniformIndicesOffset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getUniformIndices(int program, String[] uniformNames, java.nio.IntBuffer uniformIndices) {
|
||||||
|
GLES30.glGetUniformIndices(program, uniformNames, uniformIndices);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void getActiveUniformsiv(int program, int uniformCount, int[] uniformIndices, int uniformIndicesOffset, int pname,
|
||||||
|
// int[] params, int paramsOffset) {
|
||||||
|
// GLES30.glGetActiveUniformsiv(program, uniformCount, uniformIndices, uniformIndicesOffset, pname, params, paramsOffset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getActiveUniformsiv(int program, int uniformCount, java.nio.IntBuffer uniformIndices, int pname,
|
||||||
|
java.nio.IntBuffer params) {
|
||||||
|
GLES30.glGetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getUniformBlockIndex(int program, String uniformBlockName) {
|
||||||
|
return GLES30.glGetUniformBlockIndex(program, uniformBlockName);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getActiveUniformBlockiv(int program, int uniformBlockIndex, int pname, int[] params, int offset) {
|
||||||
|
// GLES30.glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getActiveUniformBlockiv(int program, int uniformBlockIndex, int pname, java.nio.IntBuffer params) {
|
||||||
|
GLES30.glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getActiveUniformBlockName(int program, int uniformBlockIndex, int bufSize, int[] length, int lengthOffset, byte[]
|
||||||
|
// uniformBlockName, int uniformBlockNameOffset) {
|
||||||
|
// GLES30.glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, lengthOffset, uniformBlockName,
|
||||||
|
// uniformBlockNameOffset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getActiveUniformBlockName(int program, int uniformBlockIndex, java.nio.Buffer length,
|
||||||
|
java.nio.Buffer uniformBlockName) {
|
||||||
|
GLES30.glGetActiveUniformBlockName(program, uniformBlockIndex, length, uniformBlockName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getActiveUniformBlockName(int program, int uniformBlockIndex) {
|
||||||
|
return GLES30.glGetActiveUniformBlockName(program, uniformBlockIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformBlockBinding(int program, int uniformBlockIndex, int uniformBlockBinding) {
|
||||||
|
GLES30.glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawArraysInstanced(int mode, int first, int count, int instanceCount) {
|
||||||
|
GLES30.glDrawArraysInstanced(mode, first, count, instanceCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void drawElementsInstanced(int mode, int count, int type, java.nio.Buffer indices, int instanceCount) {
|
||||||
|
// GLES30.glDrawElementsInstanced(mode, count, type, indices, instanceCount);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawElementsInstanced(int mode, int count, int type, int indicesOffset, int instanceCount) {
|
||||||
|
GLES30.glDrawElementsInstanced(mode, count, type, indicesOffset, instanceCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public long fenceSync(int condition, int flags) {
|
||||||
|
// return GLES30.glFenceSync(condition, flags);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public boolean isSync(long sync) {
|
||||||
|
// return GLES30.glIsSync(sync);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void deleteSync(long sync) {
|
||||||
|
// GLES30.glDeleteSync(sync);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public int clientWaitSync(long sync, int flags, long timeout) {
|
||||||
|
// return GLES30.glClientWaitSync(sync, flags, timeout);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void waitSync(long sync, int flags, long timeout) {
|
||||||
|
// GLES30.glWaitSync(sync, flags, timeout);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getInteger64v(int pname, long[] params, int offset) {
|
||||||
|
// GLES30.glGetInteger64v(pname, params, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getInteger64v(int pname, java.nio.LongBuffer params) {
|
||||||
|
GLES30.glGetInteger64v(pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void getSynciv(long sync, int pname, int bufSize, int[] length, int lengthOffset, int[] values, int valuesOffset) {
|
||||||
|
// GLES30.glGetSynciv(sync, pname, bufSize, length, lengthOffset, values, valuesOffset);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getSynciv(long sync, int pname, int bufSize, java.nio.IntBuffer length, java.nio.IntBuffer values) {
|
||||||
|
// GLES30.glGetSynciv(sync, pname, bufSize, length, values);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getInteger64i_v(int target, int index, long[] data, int offset) {
|
||||||
|
// GLES30.glGetInteger64i_v(target, index, data, offset);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getInteger64i_v(int target, int index, java.nio.LongBuffer data) {
|
||||||
|
// GLES30.glGetInteger64i_v(target, index, data);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getBufferParameteri64v(int target, int pname, long[] params, int offset) {
|
||||||
|
// GLES30.glGetBufferParameteri64v(target, pname, params, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getBufferParameteri64v(int target, int pname, java.nio.LongBuffer params) {
|
||||||
|
GLES30.glGetBufferParameteri64v(target, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genSamplers(int count, int[] samplers, int offset) {
|
||||||
|
GLES30.glGenSamplers(count, samplers, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genSamplers(int count, java.nio.IntBuffer samplers) {
|
||||||
|
GLES30.glGenSamplers(count, samplers);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteSamplers(int count, int[] samplers, int offset) {
|
||||||
|
GLES30.glDeleteSamplers(count, samplers, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteSamplers(int count, java.nio.IntBuffer samplers) {
|
||||||
|
GLES30.glDeleteSamplers(count, samplers);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isSampler(int sampler) {
|
||||||
|
return GLES30.glIsSampler(sampler);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindSampler(int unit, int sampler) {
|
||||||
|
GLES30.glBindSampler(unit, sampler);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void samplerParameteri(int sampler, int pname, int param) {
|
||||||
|
GLES30.glSamplerParameteri(sampler, pname, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void samplerParameteriv(int sampler, int pname, int[] param, int offset) {
|
||||||
|
// GLES30.glSamplerParameteriv(sampler, pname, param, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void samplerParameteriv(int sampler, int pname, java.nio.IntBuffer param) {
|
||||||
|
GLES30.glSamplerParameteriv(sampler, pname, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void samplerParameterf(int sampler, int pname, float param) {
|
||||||
|
GLES30.glSamplerParameterf(sampler, pname, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void samplerParameterfv(int sampler, int pname, float[] param, int offset) {
|
||||||
|
// GLES30.glSamplerParameterfv(sampler, pname, param, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void samplerParameterfv(int sampler, int pname, java.nio.FloatBuffer param) {
|
||||||
|
GLES30.glSamplerParameterfv(sampler, pname, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getSamplerParameteriv(int sampler, int pname, int[] params, int offset) {
|
||||||
|
// GLES30.glGetSamplerParameteriv(sampler, pname, params, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getSamplerParameteriv(int sampler, int pname, java.nio.IntBuffer params) {
|
||||||
|
GLES30.glGetSamplerParameteriv(sampler, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void getSamplerParameterfv(int sampler, int pname, float[] params, int offset) {
|
||||||
|
// GLES30.glGetSamplerParameterfv(sampler, pname, params, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getSamplerParameterfv(int sampler, int pname, java.nio.FloatBuffer params) {
|
||||||
|
GLES30.glGetSamplerParameterfv(sampler, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void vertexAttribDivisor(int index, int divisor) {
|
||||||
|
GLES30.glVertexAttribDivisor(index, divisor);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindTransformFeedback(int target, int id) {
|
||||||
|
GLES30.glBindTransformFeedback(target, id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteTransformFeedbacks(int n, int[] ids, int offset) {
|
||||||
|
GLES30.glDeleteTransformFeedbacks(n, ids, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteTransformFeedbacks(int n, java.nio.IntBuffer ids) {
|
||||||
|
GLES30.glDeleteTransformFeedbacks(n, ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genTransformFeedbacks(int n, int[] ids, int offset) {
|
||||||
|
GLES30.glGenTransformFeedbacks(n, ids, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genTransformFeedbacks(int n, java.nio.IntBuffer ids) {
|
||||||
|
GLES30.glGenTransformFeedbacks(n, ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isTransformFeedback(int id) {
|
||||||
|
return GLES30.glIsTransformFeedback(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void pauseTransformFeedback() {
|
||||||
|
GLES30.glPauseTransformFeedback();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void resumeTransformFeedback() {
|
||||||
|
GLES30.glResumeTransformFeedback();
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void getProgramBinary(int program, int bufSize, int[] length, int lengthOffset, int[] binaryFormat, int
|
||||||
|
// binaryFormatOffset, java.nio.Buffer binary) {
|
||||||
|
// GLES30.glGetProgramBinary(program, bufSize, length, lengthOffset, binaryFormat, binaryFormatOffset, binary);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getProgramBinary(int program, int bufSize, java.nio.IntBuffer length, java.nio.IntBuffer binaryFormat,
|
||||||
|
// java.nio.Buffer binary) {
|
||||||
|
// GLES30.glGetProgramBinary(program, bufSize, length, binaryFormat, binary);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void programBinary(int program, int binaryFormat, java.nio.Buffer binary, int length) {
|
||||||
|
// GLES30.glProgramBinary(program, binaryFormat, binary, length);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void programParameteri(int program, int pname, int value) {
|
||||||
|
GLES30.glProgramParameteri(program, pname, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void invalidateFramebuffer(int target, int numAttachments, int[] attachments, int offset) {
|
||||||
|
// GLES30.glInvalidateFramebuffer(target, numAttachments, attachments, offset);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void invalidateFramebuffer(int target, int numAttachments, java.nio.IntBuffer attachments) {
|
||||||
|
GLES30.glInvalidateFramebuffer(target, numAttachments, attachments);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void invalidateSubFramebuffer(int target, int numAttachments, int[] attachments, int offset, int x, int y, int width,
|
||||||
|
// int height) {
|
||||||
|
// GLES30.glInvalidateSubFramebuffer(target, numAttachments, attachments, offset, x, y, width, height);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void invalidateSubFramebuffer(int target, int numAttachments, java.nio.IntBuffer attachments, int x, int y,
|
||||||
|
int width, int height) {
|
||||||
|
GLES30.glInvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void texStorage2D(int target, int levels, int internalformat, int width, int height) {
|
||||||
|
// GLES30.glTexStorage2D(target, levels, internalformat, width, height);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void texStorage3D(int target, int levels, int internalformat, int width, int height, int depth) {
|
||||||
|
// GLES30.glTexStorage3D(target, levels, internalformat, width, height, depth);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getInternalformativ(int target, int internalformat, int pname, int bufSize, int[] params, int offset) {
|
||||||
|
// GLES30.glGetInternalformativ(target, internalformat, pname, bufSize, params, offset);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void getInternalformativ(int target, int internalformat, int pname, int bufSize, java.nio.IntBuffer params) {
|
||||||
|
// GLES30.glGetInternalformativ(target, internalformat, pname, bufSize, params);
|
||||||
|
// }
|
||||||
|
}
|
||||||
@@ -20,7 +20,7 @@ public class GlConfigChooser implements GLSurfaceView.EGLConfigChooser {
|
|||||||
EGL10.EGL_ALPHA_SIZE, 8,
|
EGL10.EGL_ALPHA_SIZE, 8,
|
||||||
EGL10.EGL_DEPTH_SIZE, 16,
|
EGL10.EGL_DEPTH_SIZE, 16,
|
||||||
// Requires that setEGLContextClientVersion(2) is called on the view.
|
// Requires that setEGLContextClientVersion(2) is called on the view.
|
||||||
EGL10.EGL_RENDERABLE_TYPE, 4 /* EGL_OPENGL_ES2_BIT */,
|
EGL10.EGL_RENDERABLE_TYPE, 4 /*EGL14.EGL_OPENGL_ES2_BIT*/ /*0x40 /*EGLExt.EGL_OPENGL_ES3_BIT_KHR*/,
|
||||||
EGL10.EGL_STENCIL_SIZE, 8,
|
EGL10.EGL_STENCIL_SIZE, 8,
|
||||||
EGL10.EGL_NONE};
|
EGL10.EGL_NONE};
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ public class GlConfigChooser implements GLSurfaceView.EGLConfigChooser {
|
|||||||
EGL10.EGL_BLUE_SIZE, 8,
|
EGL10.EGL_BLUE_SIZE, 8,
|
||||||
EGL10.EGL_ALPHA_SIZE, 8,
|
EGL10.EGL_ALPHA_SIZE, 8,
|
||||||
EGL10.EGL_DEPTH_SIZE, 16,
|
EGL10.EGL_DEPTH_SIZE, 16,
|
||||||
EGL10.EGL_RENDERABLE_TYPE, 4 /* EGL_OPENGL_ES2_BIT */,
|
EGL10.EGL_RENDERABLE_TYPE, 4 /*EGL14.EGL_OPENGL_ES2_BIT*/ /*0x40 /*EGLExt.EGL_OPENGL_ES3_BIT_KHR*/,
|
||||||
EGL10.EGL_STENCIL_SIZE, 8,
|
EGL10.EGL_STENCIL_SIZE, 8,
|
||||||
EGL10.EGL_NONE};
|
EGL10.EGL_NONE};
|
||||||
|
|
||||||
|
|||||||
83
vtm-android/src/org/oscim/android/gl/GlContextFactory.java
Normal file
83
vtm-android/src/org/oscim/android/gl/GlContextFactory.java
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2019 Gustl22
|
||||||
|
* Copyright 2019 devemux86
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify it under the
|
||||||
|
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||||
|
* Foundation, either version 3 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License along with
|
||||||
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2009 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
|
||||||
|
* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language
|
||||||
|
* governing permissions and limitations under the License.
|
||||||
|
*/
|
||||||
|
package org.oscim.android.gl;
|
||||||
|
|
||||||
|
import android.opengl.GLSurfaceView;
|
||||||
|
|
||||||
|
import org.oscim.android.MapView;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import javax.microedition.khronos.egl.EGL10;
|
||||||
|
import javax.microedition.khronos.egl.EGLConfig;
|
||||||
|
import javax.microedition.khronos.egl.EGLContext;
|
||||||
|
import javax.microedition.khronos.egl.EGLDisplay;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* https://developer.android.com/guide/topics/graphics/opengl.html#version-check
|
||||||
|
* <p>
|
||||||
|
* https://github.com/libgdx/libgdx/blob/master/backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/surfaceview/GLSurfaceView20.java
|
||||||
|
*/
|
||||||
|
public class GlContextFactory implements GLSurfaceView.EGLContextFactory {
|
||||||
|
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(GlContextFactory.class);
|
||||||
|
|
||||||
|
private static final int EGL_CONTEXT_CLIENT_VERSION = 0x3098;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EGLContext createContext(EGL10 egl, EGLDisplay display, EGLConfig eglConfig) {
|
||||||
|
log.info("creating OpenGL ES " + MapView.targetGLESVersion + " context");
|
||||||
|
checkEglError("Before eglCreateContext " + MapView.targetGLESVersion, egl);
|
||||||
|
int[] attrib_list = {EGL_CONTEXT_CLIENT_VERSION, (int) MapView.targetGLESVersion, EGL10.EGL_NONE};
|
||||||
|
EGLContext context = egl.eglCreateContext(display, eglConfig, EGL10.EGL_NO_CONTEXT, attrib_list);
|
||||||
|
boolean success = checkEglError("After eglCreateContext " + MapView.targetGLESVersion, egl);
|
||||||
|
|
||||||
|
if ((!success || context == null) && MapView.targetGLESVersion > 2) {
|
||||||
|
log.warn("Falling back to GLES 2");
|
||||||
|
MapView.targetGLESVersion = 2.0;
|
||||||
|
return createContext(egl, display, eglConfig);
|
||||||
|
}
|
||||||
|
log.info("Returning a GLES " + MapView.targetGLESVersion + " context");
|
||||||
|
return context;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void destroyContext(EGL10 egl, EGLDisplay display, EGLContext context) {
|
||||||
|
egl.eglDestroyContext(display, context);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean checkEglError(String prompt, EGL10 egl) {
|
||||||
|
int error;
|
||||||
|
boolean result = true;
|
||||||
|
while ((error = egl.eglGetError()) != EGL10.EGL_SUCCESS) {
|
||||||
|
result = false;
|
||||||
|
log.error(String.format("%s: EGL error: 0x%x", prompt, error));
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -28,7 +28,6 @@ android {
|
|||||||
main {
|
main {
|
||||||
manifest.srcFile 'AndroidManifest.xml'
|
manifest.srcFile 'AndroidManifest.xml'
|
||||||
java.srcDirs = ['src']
|
java.srcDirs = ['src']
|
||||||
resources.srcDirs = ['src']
|
|
||||||
res.srcDirs = ['res']
|
res.srcDirs = ['res']
|
||||||
assets.srcDirs = ['assets']
|
assets.srcDirs = ['assets']
|
||||||
file("${rootDir}/vtm-android/natives").eachDir() { dir ->
|
file("${rootDir}/vtm-android/natives").eachDir() { dir ->
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
|
|
||||||
public class App extends Application {
|
public class App extends Application {
|
||||||
|
|
||||||
public final static Logger log = LoggerFactory.getLogger(App.class);
|
public static final Logger log = LoggerFactory.getLogger(App.class);
|
||||||
|
|
||||||
public static Map map;
|
public static Map map;
|
||||||
public static MapView view;
|
public static MapView view;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
* Copyright 2016-2018 devemux86
|
* Copyright 2016-2019 devemux86
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
*
|
*
|
||||||
@@ -19,6 +19,7 @@ package org.oscim.app;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
import android.os.Environment;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
|
|
||||||
import org.oscim.android.cache.TileCache;
|
import org.oscim.android.cache.TileCache;
|
||||||
@@ -41,9 +42,11 @@ import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
public class MapLayers {
|
public class MapLayers {
|
||||||
|
|
||||||
final static Logger log = LoggerFactory.getLogger(MapLayers.class);
|
static final Logger log = LoggerFactory.getLogger(MapLayers.class);
|
||||||
|
|
||||||
abstract static class Config {
|
abstract static class Config {
|
||||||
final String name;
|
final String name;
|
||||||
@@ -56,15 +59,18 @@ public class MapLayers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static Config[] configs = new Config[]{new Config("OPENSCIENCEMAP4") {
|
static Config[] configs = new Config[]{new Config("OPENSCIENCEMAP4") {
|
||||||
|
@Override
|
||||||
TileSource init() {
|
TileSource init() {
|
||||||
return new OSciMap4TileSource();
|
return new OSciMap4TileSource();
|
||||||
}
|
}
|
||||||
}, new Config("MAPSFORGE") {
|
}, new Config("MAPSFORGE") {
|
||||||
|
@Override
|
||||||
TileSource init() {
|
TileSource init() {
|
||||||
return new MapFileTileSource().setOption("file",
|
return new MapFileTileSource().setOption("file",
|
||||||
"/storage/sdcard0/germany.map");
|
new File(Environment.getExternalStorageDirectory(), "berlin.map").getAbsolutePath());
|
||||||
}
|
}
|
||||||
}, new Config("MAPNIK_VECTOR") {
|
}, new Config("MAPNIK_VECTOR") {
|
||||||
|
@Override
|
||||||
TileSource init() {
|
TileSource init() {
|
||||||
return new MapnikVectorTileSource();
|
return new MapnikVectorTileSource();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,11 +48,11 @@ public class POISearch {
|
|||||||
ItemizedOverlayWithBubble<ExtendedMarkerItem> poiMarkers;
|
ItemizedOverlayWithBubble<ExtendedMarkerItem> poiMarkers;
|
||||||
MarkerSymbol[] mMarkers;
|
MarkerSymbol[] mMarkers;
|
||||||
|
|
||||||
private final static int MDEFAULT = 0;
|
private static final int MDEFAULT = 0;
|
||||||
private final static int MFLICKR = 1;
|
private static final int MFLICKR = 1;
|
||||||
private final static int MPICASA = 2;
|
private static final int MPICASA = 2;
|
||||||
private final static int MWIKI16 = 3;
|
private static final int MWIKI16 = 3;
|
||||||
private final static int MWIKI32 = 4;
|
private static final int MWIKI32 = 4;
|
||||||
|
|
||||||
POISearch() {
|
POISearch() {
|
||||||
mPOIs = new ArrayList<POI>();
|
mPOIs = new ArrayList<POI>();
|
||||||
@@ -89,12 +89,12 @@ public class POISearch {
|
|||||||
return mPOIs;
|
return mPOIs;
|
||||||
}
|
}
|
||||||
|
|
||||||
final static String TAG_WIKIPEDIA = "wikipedia";
|
static final String TAG_WIKIPEDIA = "wikipedia";
|
||||||
final static String TAG_FLICKR = "flickr";
|
static final String TAG_FLICKR = "flickr";
|
||||||
final static String TAG_PICASA = "picasa";
|
static final String TAG_PICASA = "picasa";
|
||||||
final static String TAG_FOURSQUARE = "foursquare";
|
static final String TAG_FOURSQUARE = "foursquare";
|
||||||
|
|
||||||
//private final static String TAG_NOMINATIM = "nominatim";
|
//private static final String TAG_NOMINATIM = "nominatim";
|
||||||
|
|
||||||
class POITask extends AsyncTask<Object, Void, List<POI>> {
|
class POITask extends AsyncTask<Object, Void, List<POI>> {
|
||||||
String mTag;
|
String mTag;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class TileMap extends MapActivity implements MapEventsReceiver {
|
public class TileMap extends MapActivity implements MapEventsReceiver {
|
||||||
final static Logger log = LoggerFactory.getLogger(TileMap.class);
|
static final Logger log = LoggerFactory.getLogger(TileMap.class);
|
||||||
|
|
||||||
private static final int DIALOG_ENTER_COORDINATES = 0;
|
private static final int DIALOG_ENTER_COORDINATES = 0;
|
||||||
private static final int DIALOG_LOCATION_PROVIDER_DISABLED = 2;
|
private static final int DIALOG_LOCATION_PROVIDER_DISABLED = 2;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ import org.oscim.utils.FastMath;
|
|||||||
public class Compass extends Layer implements SensorEventListener, Map.UpdateListener,
|
public class Compass extends Layer implements SensorEventListener, Map.UpdateListener,
|
||||||
LocationRenderer.Callback {
|
LocationRenderer.Callback {
|
||||||
|
|
||||||
// final static Logger log = LoggerFactory.getLogger(Compass.class);
|
// static final Logger log = LoggerFactory.getLogger(Compass.class);
|
||||||
|
|
||||||
public enum Mode {
|
public enum Mode {
|
||||||
OFF, C2D, C3D,
|
OFF, C2D, C3D,
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class LocationHandler implements LocationListener {
|
public class LocationHandler implements LocationListener {
|
||||||
private final static Logger log = LoggerFactory.getLogger(LocationHandler.class);
|
private static final Logger log = LoggerFactory.getLogger(LocationHandler.class);
|
||||||
|
|
||||||
public enum Mode {
|
public enum Mode {
|
||||||
OFF,
|
OFF,
|
||||||
@@ -40,8 +40,8 @@ public class LocationHandler implements LocationListener {
|
|||||||
SNAP,
|
SNAP,
|
||||||
}
|
}
|
||||||
|
|
||||||
private final static int DIALOG_LOCATION_PROVIDER_DISABLED = 2;
|
private static final int DIALOG_LOCATION_PROVIDER_DISABLED = 2;
|
||||||
private final static int SHOW_LOCATION_ZOOM = 14;
|
private static final int SHOW_LOCATION_ZOOM = 14;
|
||||||
|
|
||||||
private final LocationManager mLocationManager;
|
private final LocationManager mLocationManager;
|
||||||
private final LocationLayerImpl mLocationLayer;
|
private final LocationLayerImpl mLocationLayer;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class CacheSizePreference extends Preference implements OnSeekBarChangeListener {
|
public class CacheSizePreference extends Preference implements OnSeekBarChangeListener {
|
||||||
final static Logger log = LoggerFactory.getLogger(CacheSizePreference.class);
|
static final Logger log = LoggerFactory.getLogger(CacheSizePreference.class);
|
||||||
|
|
||||||
private static final String NS_OCIM_APP = "http://app.oscim.org";
|
private static final String NS_OCIM_APP = "http://app.oscim.org";
|
||||||
private static final int DEFAULT_VALUE = 50;
|
private static final int DEFAULT_VALUE = 50;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public class DistanceTouchOverlay extends Layer implements Map.InputListener,
|
|||||||
private float mPrevX1, mPrevX2, mPrevY1, mPrevY2;
|
private float mPrevX1, mPrevX2, mPrevY1, mPrevY2;
|
||||||
private float mCurX1, mCurX2, mCurY1, mCurY2;
|
private float mCurX1, mCurX2, mCurY1, mCurY2;
|
||||||
|
|
||||||
// private final static int POINTER_UP = -1;
|
// private static final int POINTER_UP = -1;
|
||||||
// private int mPointer1 = POINTER_UP;
|
// private int mPointer1 = POINTER_UP;
|
||||||
// private int mPointer2 = POINTER_UP;
|
// private int mPointer2 = POINTER_UP;
|
||||||
|
|
||||||
|
|||||||
@@ -20,10 +20,10 @@ import java.util.HashMap;
|
|||||||
*/
|
*/
|
||||||
public class FlickrPOIProvider implements POIProvider {
|
public class FlickrPOIProvider implements POIProvider {
|
||||||
|
|
||||||
final static Logger log = LoggerFactory.getLogger(FlickrPOIProvider.class);
|
static final Logger log = LoggerFactory.getLogger(FlickrPOIProvider.class);
|
||||||
|
|
||||||
protected String mApiKey;
|
protected String mApiKey;
|
||||||
private final static String PHOTO_URL = "http://www.flickr.com/photos/%s/%s/sizes/o/in/photostream/";
|
private static final String PHOTO_URL = "http://www.flickr.com/photos/%s/%s/sizes/o/in/photostream/";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param apiKey the registered API key to give to Flickr service.
|
* @param apiKey the registered API key to give to Flickr service.
|
||||||
@@ -149,6 +149,7 @@ public class FlickrPOIProvider implements POIProvider {
|
|||||||
* Null if
|
* Null if
|
||||||
* technical issue.
|
* technical issue.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ArrayList<POI> getPOIInside(BoundingBox boundingBox, String query, int maxResults) {
|
public ArrayList<POI> getPOIInside(BoundingBox boundingBox, String query, int maxResults) {
|
||||||
String url = getUrlInside(boundingBox, maxResults);
|
String url = getUrlInside(boundingBox, maxResults);
|
||||||
return getThem(url);
|
return getThem(url);
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ import java.util.ArrayList;
|
|||||||
|
|
||||||
public class FourSquareProvider implements POIProvider {
|
public class FourSquareProvider implements POIProvider {
|
||||||
|
|
||||||
final static Logger log = LoggerFactory.getLogger(FourSquareProvider.class);
|
static final Logger log = LoggerFactory.getLogger(FourSquareProvider.class);
|
||||||
|
|
||||||
// https://developer.foursquare.com/docs/venues/search
|
// https://developer.foursquare.com/docs/venues/search
|
||||||
// https://developer.foursquare.com/docs/responses/venue
|
// https://developer.foursquare.com/docs/responses/venue
|
||||||
@@ -137,6 +137,7 @@ public class FourSquareProvider implements POIProvider {
|
|||||||
* Null if
|
* Null if
|
||||||
* technical issue.
|
* technical issue.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ArrayList<POI> getPOIInside(BoundingBox boundingBox, String query, int maxResults) {
|
public ArrayList<POI> getPOIInside(BoundingBox boundingBox, String query, int maxResults) {
|
||||||
String url = getUrlInside(boundingBox, query, maxResults);
|
String url = getUrlInside(boundingBox, query, maxResults);
|
||||||
return getThem(url);
|
return getThem(url);
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import javax.xml.parsers.SAXParserFactory;
|
|||||||
*/
|
*/
|
||||||
public class GeoNamesPOIProvider {
|
public class GeoNamesPOIProvider {
|
||||||
|
|
||||||
final static Logger log = LoggerFactory.getLogger(GeoNamesPOIProvider.class);
|
static final Logger log = LoggerFactory.getLogger(GeoNamesPOIProvider.class);
|
||||||
|
|
||||||
protected String mUserName;
|
protected String mUserName;
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import java.util.Locale;
|
|||||||
*/
|
*/
|
||||||
public class GeocoderNominatim {
|
public class GeocoderNominatim {
|
||||||
|
|
||||||
final static Logger log = LoggerFactory.getLogger(GeocoderNominatim.class);
|
static final Logger log = LoggerFactory.getLogger(GeocoderNominatim.class);
|
||||||
|
|
||||||
public static final String NOMINATIM_SERVICE_URL = "http://nominatim.openstreetmap.org/";
|
public static final String NOMINATIM_SERVICE_URL = "http://nominatim.openstreetmap.org/";
|
||||||
public static final String MAPQUEST_SERVICE_URL = "http://open.mapquestapi.com/nominatim/v1/";
|
public static final String MAPQUEST_SERVICE_URL = "http://open.mapquestapi.com/nominatim/v1/";
|
||||||
@@ -51,7 +51,7 @@ public class GeocoderNominatim {
|
|||||||
init(context, Locale.getDefault());
|
init(context, Locale.getDefault());
|
||||||
}
|
}
|
||||||
|
|
||||||
static public boolean isPresent() {
|
public static boolean isPresent() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import java.util.ArrayList;
|
|||||||
*/
|
*/
|
||||||
public class NominatimPOIProvider implements POIProvider {
|
public class NominatimPOIProvider implements POIProvider {
|
||||||
|
|
||||||
final static Logger log = LoggerFactory.getLogger(NominatimPOIProvider.class);
|
static final Logger log = LoggerFactory.getLogger(NominatimPOIProvider.class);
|
||||||
|
|
||||||
/* As the doc lacks a lot of features, source code may help:
|
/* As the doc lacks a lot of features, source code may help:
|
||||||
* https://trac.openstreetmap
|
* https://trac.openstreetmap
|
||||||
@@ -150,6 +150,7 @@ public class NominatimPOIProvider implements POIProvider {
|
|||||||
* @param maxResults ...
|
* @param maxResults ...
|
||||||
* @return list of POIs, null if technical issue.
|
* @return list of POIs, null if technical issue.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ArrayList<POI> getPOIInside(BoundingBox boundingBox, String type, int maxResults) {
|
public ArrayList<POI> getPOIInside(BoundingBox boundingBox, String type, int maxResults) {
|
||||||
String url = getUrlInside(boundingBox, type, maxResults);
|
String url = getUrlInside(boundingBox, type, maxResults);
|
||||||
return getThem(url);
|
return getThem(url);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import java.util.List;
|
|||||||
|
|
||||||
public class OverpassPOIProvider implements POIProvider {
|
public class OverpassPOIProvider implements POIProvider {
|
||||||
|
|
||||||
final static Logger log = LoggerFactory
|
static final Logger log = LoggerFactory
|
||||||
.getLogger(OverpassPOIProvider.class);
|
.getLogger(OverpassPOIProvider.class);
|
||||||
|
|
||||||
public static final String TAG_KEY_WEBSITE = "website".intern();
|
public static final String TAG_KEY_WEBSITE = "website".intern();
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import javax.xml.parsers.SAXParserFactory;
|
|||||||
*/
|
*/
|
||||||
public class PicasaPOIProvider implements POIProvider {
|
public class PicasaPOIProvider implements POIProvider {
|
||||||
|
|
||||||
final static Logger log = LoggerFactory.getLogger(PicasaPOIProvider.class);
|
static final Logger log = LoggerFactory.getLogger(PicasaPOIProvider.class);
|
||||||
|
|
||||||
String mAccessToken;
|
String mAccessToken;
|
||||||
|
|
||||||
@@ -95,6 +95,7 @@ public class PicasaPOIProvider implements POIProvider {
|
|||||||
* @return list of POI, Picasa photos inside the bounding box. Null if
|
* @return list of POI, Picasa photos inside the bounding box. Null if
|
||||||
* technical issue.
|
* technical issue.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public List<POI> getPOIInside(BoundingBox boundingBox, String query, int maxResults) {
|
public List<POI> getPOIInside(BoundingBox boundingBox, String query, int maxResults) {
|
||||||
String url = getUrlInside(boundingBox, maxResults, query);
|
String url = getUrlInside(boundingBox, maxResults, query);
|
||||||
return getThem(url);
|
return getThem(url);
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import java.util.List;
|
|||||||
* @see OSRMRouteProvider
|
* @see OSRMRouteProvider
|
||||||
*/
|
*/
|
||||||
public class Route {
|
public class Route {
|
||||||
//final static Logger log = LoggerFactory.getLogger(Route.class);
|
//static final Logger log = LoggerFactory.getLogger(Route.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see #STATUS_INVALID STATUS_INVALID
|
* @see #STATUS_INVALID STATUS_INVALID
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import java.util.List;
|
|||||||
* @author M.Kergall
|
* @author M.Kergall
|
||||||
*/
|
*/
|
||||||
public class RouteLeg implements Parcelable {
|
public class RouteLeg implements Parcelable {
|
||||||
//final static Logger log = LoggerFactory.getLogger(RouteLeg.class);
|
//static final Logger log = LoggerFactory.getLogger(RouteLeg.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* in km
|
* in km
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ import javax.xml.parsers.SAXParserFactory;
|
|||||||
*/
|
*/
|
||||||
public class GoogleRouteProvider extends RouteProvider {
|
public class GoogleRouteProvider extends RouteProvider {
|
||||||
|
|
||||||
final static Logger log = LoggerFactory.getLogger(GoogleRouteProvider.class);
|
static final Logger log = LoggerFactory.getLogger(GoogleRouteProvider.class);
|
||||||
|
|
||||||
static final String GOOGLE_DIRECTIONS_SERVICE = "http://maps.googleapis.com/maps/api/directions/xml?";
|
static final String GOOGLE_DIRECTIONS_SERVICE = "http://maps.googleapis.com/maps/api/directions/xml?";
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import javax.xml.parsers.SAXParserFactory;
|
|||||||
*/
|
*/
|
||||||
public class MapQuestRouteProvider extends RouteProvider {
|
public class MapQuestRouteProvider extends RouteProvider {
|
||||||
|
|
||||||
final static Logger log = LoggerFactory.getLogger(MapQuestRouteProvider.class);
|
static final Logger log = LoggerFactory.getLogger(MapQuestRouteProvider.class);
|
||||||
|
|
||||||
static final String MAPQUEST_GUIDANCE_SERVICE = "http://open.mapquestapi.com/guidance/v0/route?";
|
static final String MAPQUEST_GUIDANCE_SERVICE = "http://open.mapquestapi.com/guidance/v0/route?";
|
||||||
|
|
||||||
|
|||||||
@@ -30,10 +30,10 @@ import java.util.Locale;
|
|||||||
*/
|
*/
|
||||||
public class OSRMRouteProvider extends RouteProvider {
|
public class OSRMRouteProvider extends RouteProvider {
|
||||||
|
|
||||||
final static Logger log = LoggerFactory.getLogger(OSRMRouteProvider.class);
|
static final Logger log = LoggerFactory.getLogger(OSRMRouteProvider.class);
|
||||||
|
|
||||||
// 1 for 6 digit precision, 10 for 5
|
// 1 for 6 digit precision, 10 for 5
|
||||||
private final static int ENCODING_PRECISION = 1;
|
private static final int ENCODING_PRECISION = 1;
|
||||||
|
|
||||||
//static final String OSRM_SERVICE = "http://city.informatik.uni-bremen.de:5000/viaroute?";
|
//static final String OSRM_SERVICE = "http://city.informatik.uni-bremen.de:5000/viaroute?";
|
||||||
//static final String OSRM_SERVICE = "http://city.informatik.uni-bremen.de:5001/viaroute?";
|
//static final String OSRM_SERVICE = "http://city.informatik.uni-bremen.de:5001/viaroute?";
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ import okhttp3.Response;
|
|||||||
* connection.close();</pre>
|
* connection.close();</pre>
|
||||||
*/
|
*/
|
||||||
public class HttpConnection {
|
public class HttpConnection {
|
||||||
private final static int TIMEOUT_CONNECTION = 3000; //ms
|
private static final int TIMEOUT_CONNECTION = 3000; //ms
|
||||||
private final static int TIMEOUT_SOCKET = 10000; //ms
|
private static final int TIMEOUT_SOCKET = 10000; //ms
|
||||||
|
|
||||||
private static OkHttpClient client;
|
private static OkHttpClient client;
|
||||||
private InputStream stream;
|
private InputStream stream;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
* Copyright 2016-2017 devemux86
|
* Copyright 2016-2018 devemux86
|
||||||
* Copyright 2016-2017 Longri
|
* Copyright 2016-2017 Longri
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
@@ -21,13 +21,18 @@ package org.oscim.awt;
|
|||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.utils.BufferUtils;
|
import com.badlogic.gdx.utils.BufferUtils;
|
||||||
|
|
||||||
|
import org.oscim.backend.CanvasAdapter;
|
||||||
import org.oscim.backend.GL;
|
import org.oscim.backend.GL;
|
||||||
import org.oscim.backend.canvas.Bitmap;
|
import org.oscim.backend.canvas.Bitmap;
|
||||||
import org.oscim.renderer.bucket.TextureBucket;
|
import org.oscim.renderer.bucket.TextureBucket;
|
||||||
|
import org.oscim.utils.GraphicUtils;
|
||||||
import org.oscim.utils.IOUtils;
|
import org.oscim.utils.IOUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.awt.AlphaComposite;
|
||||||
|
import java.awt.Graphics2D;
|
||||||
|
import java.awt.RenderingHints;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -41,17 +46,10 @@ public class AwtBitmap implements Bitmap {
|
|||||||
private static final Logger log = LoggerFactory.getLogger(AwtBitmap.class);
|
private static final Logger log = LoggerFactory.getLogger(AwtBitmap.class);
|
||||||
|
|
||||||
BufferedImage bitmap;
|
BufferedImage bitmap;
|
||||||
int width;
|
|
||||||
int height;
|
|
||||||
|
|
||||||
boolean internal;
|
|
||||||
|
|
||||||
public AwtBitmap(int width, int height, int format) {
|
public AwtBitmap(int width, int height, int format) {
|
||||||
bitmap = new BufferedImage(width, height, format != 0 ? format : BufferedImage.TYPE_INT_ARGB);
|
bitmap = new BufferedImage(width, height, format != 0 ? format : BufferedImage.TYPE_INT_ARGB);
|
||||||
this.width = width;
|
|
||||||
this.height = height;
|
|
||||||
|
|
||||||
internal = true;
|
|
||||||
// if (!this.bitmap.isAlphaPremultiplied())
|
// if (!this.bitmap.isAlphaPremultiplied())
|
||||||
// this.bitmap.coerceData(true);
|
// this.bitmap.coerceData(true);
|
||||||
}
|
}
|
||||||
@@ -59,17 +57,19 @@ public class AwtBitmap implements Bitmap {
|
|||||||
AwtBitmap(InputStream inputStream) throws IOException {
|
AwtBitmap(InputStream inputStream) throws IOException {
|
||||||
|
|
||||||
this.bitmap = ImageIO.read(inputStream);
|
this.bitmap = ImageIO.read(inputStream);
|
||||||
this.width = this.bitmap.getWidth();
|
|
||||||
this.height = this.bitmap.getHeight();
|
|
||||||
if (!this.bitmap.isAlphaPremultiplied()
|
if (!this.bitmap.isAlphaPremultiplied()
|
||||||
&& this.bitmap.getType() == BufferedImage.TYPE_INT_ARGB)
|
&& this.bitmap.getType() == BufferedImage.TYPE_INT_ARGB)
|
||||||
this.bitmap.coerceData(true);
|
this.bitmap.coerceData(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AwtBitmap(InputStream inputStream, int width, int height, int percent) throws IOException {
|
||||||
|
this(inputStream);
|
||||||
|
float[] newSize = GraphicUtils.imageSize(getWidth(), getHeight(), CanvasAdapter.getScale(), width, height, percent);
|
||||||
|
scaleTo((int) newSize[0], (int) newSize[1]);
|
||||||
|
}
|
||||||
|
|
||||||
public AwtBitmap(BufferedImage bitmap) {
|
public AwtBitmap(BufferedImage bitmap) {
|
||||||
this.bitmap = bitmap;
|
this.bitmap = bitmap;
|
||||||
this.width = this.bitmap.getWidth();
|
|
||||||
this.height = this.bitmap.getHeight();
|
|
||||||
if (!this.bitmap.isAlphaPremultiplied()
|
if (!this.bitmap.isAlphaPremultiplied()
|
||||||
&& this.bitmap.getType() == BufferedImage.TYPE_INT_ARGB)
|
&& this.bitmap.getType() == BufferedImage.TYPE_INT_ARGB)
|
||||||
this.bitmap.coerceData(true);
|
this.bitmap.coerceData(true);
|
||||||
@@ -77,12 +77,12 @@ public class AwtBitmap implements Bitmap {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getWidth() {
|
public int getWidth() {
|
||||||
return width;
|
return bitmap.getWidth();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getHeight() {
|
public int getHeight() {
|
||||||
return height;
|
return bitmap.getHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -94,13 +94,13 @@ public class AwtBitmap implements Bitmap {
|
|||||||
public void eraseColor(int transparent) {
|
public void eraseColor(int transparent) {
|
||||||
}
|
}
|
||||||
|
|
||||||
private final static IntBuffer tmpBuffer = BufferUtils
|
private static final IntBuffer tmpBuffer = BufferUtils
|
||||||
.newIntBuffer(TextureBucket.TEXTURE_HEIGHT
|
.newIntBuffer(TextureBucket.TEXTURE_HEIGHT
|
||||||
* TextureBucket.TEXTURE_WIDTH);
|
* TextureBucket.TEXTURE_WIDTH);
|
||||||
private final static int[] tmpPixel = new int[TextureBucket.TEXTURE_HEIGHT
|
private static final int[] tmpPixel = new int[TextureBucket.TEXTURE_HEIGHT
|
||||||
* TextureBucket.TEXTURE_WIDTH];
|
* TextureBucket.TEXTURE_WIDTH];
|
||||||
|
|
||||||
private final static boolean WRITE_TEX = false;
|
private static final boolean WRITE_TEX = false;
|
||||||
private int dbgCnt;
|
private int dbgCnt;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -108,17 +108,17 @@ public class AwtBitmap implements Bitmap {
|
|||||||
int[] pixels;
|
int[] pixels;
|
||||||
IntBuffer buffer;
|
IntBuffer buffer;
|
||||||
|
|
||||||
if (width * height < TextureBucket.TEXTURE_HEIGHT * TextureBucket.TEXTURE_WIDTH) {
|
if (bitmap.getWidth() * bitmap.getHeight() < TextureBucket.TEXTURE_HEIGHT * TextureBucket.TEXTURE_WIDTH) {
|
||||||
pixels = tmpPixel;
|
pixels = tmpPixel;
|
||||||
buffer = tmpBuffer;
|
buffer = tmpBuffer;
|
||||||
buffer.clear();
|
buffer.clear();
|
||||||
} else {
|
} else {
|
||||||
pixels = new int[width * height];
|
pixels = new int[bitmap.getWidth() * bitmap.getHeight()];
|
||||||
buffer = BufferUtils.newIntBuffer(width * height);
|
buffer = BufferUtils.newIntBuffer(bitmap.getWidth() * bitmap.getHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME dont convert to argb when there data is greyscale
|
// FIXME dont convert to argb when there data is greyscale
|
||||||
bitmap.getRGB(0, 0, width, height, pixels, 0, width);
|
bitmap.getRGB(0, 0, bitmap.getWidth(), bitmap.getHeight(), pixels, 0, bitmap.getWidth());
|
||||||
|
|
||||||
if (WRITE_TEX) {
|
if (WRITE_TEX) {
|
||||||
try {
|
try {
|
||||||
@@ -131,7 +131,7 @@ public class AwtBitmap implements Bitmap {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0, n = width * height; i < n; i++) {
|
for (int i = 0, n = bitmap.getWidth() * bitmap.getHeight(); i < n; i++) {
|
||||||
int c = pixels[i];
|
int c = pixels[i];
|
||||||
if (c == 0)
|
if (c == 0)
|
||||||
continue;
|
continue;
|
||||||
@@ -143,11 +143,11 @@ public class AwtBitmap implements Bitmap {
|
|||||||
pixels[i] = (c & 0xff000000) | r << 16 | g << 8 | b;
|
pixels[i] = (c & 0xff000000) | r << 16 | g << 8 | b;
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer.put(pixels, 0, width * height);
|
buffer.put(pixels, 0, bitmap.getWidth() * bitmap.getHeight());
|
||||||
buffer.flip();
|
buffer.flip();
|
||||||
|
|
||||||
Gdx.gl20.glTexImage2D(GL.TEXTURE_2D, 0, GL.RGBA, width,
|
Gdx.gl20.glTexImage2D(GL.TEXTURE_2D, 0, GL.RGBA, bitmap.getWidth(),
|
||||||
height, 0, GL.RGBA, GL.UNSIGNED_BYTE, buffer);
|
bitmap.getHeight(), 0, GL.RGBA, GL.UNSIGNED_BYTE, buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -173,4 +173,19 @@ public class AwtBitmap implements Bitmap {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void scaleTo(int width, int height) {
|
||||||
|
if (getWidth() != width || getHeight() != height) {
|
||||||
|
BufferedImage resizedImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
|
||||||
|
Graphics2D graphics = resizedImage.createGraphics();
|
||||||
|
graphics.setComposite(AlphaComposite.Src);
|
||||||
|
graphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
|
||||||
|
graphics.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
|
||||||
|
graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
|
||||||
|
graphics.drawImage(bitmap, 0, 0, width, height, null);
|
||||||
|
graphics.dispose();
|
||||||
|
bitmap = resizedImage;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
* Copyright 2016 devemux86
|
* Copyright 2016-2018 devemux86
|
||||||
* Copyright 2017 Longri
|
* Copyright 2017 Longri
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
@@ -108,6 +108,11 @@ public class AwtGraphics extends CanvasAdapter {
|
|||||||
return new AwtBitmap(inputStream);
|
return new AwtBitmap(inputStream);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Bitmap decodeBitmapImpl(InputStream inputStream, int width, int height, int percent) throws IOException {
|
||||||
|
return new AwtBitmap(inputStream, width, height, percent);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Bitmap decodeSvgBitmapImpl(InputStream inputStream, int width, int height, int percent) throws IOException {
|
public Bitmap decodeSvgBitmapImpl(InputStream inputStream, int width, int height, int percent) throws IOException {
|
||||||
return new AwtSvgBitmap(inputStream, width, height, percent);
|
return new AwtSvgBitmap(inputStream, width, height, percent);
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import com.kitfox.svg.SVGDiagram;
|
|||||||
import com.kitfox.svg.app.beans.SVGIcon;
|
import com.kitfox.svg.app.beans.SVGIcon;
|
||||||
|
|
||||||
import org.oscim.backend.CanvasAdapter;
|
import org.oscim.backend.CanvasAdapter;
|
||||||
|
import org.oscim.utils.GraphicUtils;
|
||||||
|
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
@@ -39,34 +40,12 @@ public class AwtSvgBitmap extends AwtBitmap {
|
|||||||
|
|
||||||
double scale = scaleFactor / Math.sqrt((diagram.getHeight() * diagram.getWidth()) / defaultSize);
|
double scale = scaleFactor / Math.sqrt((diagram.getHeight() * diagram.getWidth()) / defaultSize);
|
||||||
|
|
||||||
float bitmapWidth = (float) (diagram.getWidth() * scale);
|
float[] bmpSize = GraphicUtils.imageSize(diagram.getWidth(), diagram.getHeight(), (float) scale, width, height, percent);
|
||||||
float bitmapHeight = (float) (diagram.getHeight() * scale);
|
|
||||||
|
|
||||||
float aspectRatio = diagram.getWidth() / diagram.getHeight();
|
|
||||||
|
|
||||||
if (width != 0 && height != 0) {
|
|
||||||
// both width and height set, override any other setting
|
|
||||||
bitmapWidth = width;
|
|
||||||
bitmapHeight = height;
|
|
||||||
} else if (width == 0 && height != 0) {
|
|
||||||
// only width set, calculate from aspect ratio
|
|
||||||
bitmapWidth = height * aspectRatio;
|
|
||||||
bitmapHeight = height;
|
|
||||||
} else if (width != 0 && height == 0) {
|
|
||||||
// only height set, calculate from aspect ratio
|
|
||||||
bitmapHeight = width / aspectRatio;
|
|
||||||
bitmapWidth = width;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (percent != 100) {
|
|
||||||
bitmapWidth *= percent / 100f;
|
|
||||||
bitmapHeight *= percent / 100f;
|
|
||||||
}
|
|
||||||
|
|
||||||
SVGIcon icon = new SVGIcon();
|
SVGIcon icon = new SVGIcon();
|
||||||
icon.setAntiAlias(true);
|
icon.setAntiAlias(true);
|
||||||
icon.setAutosize(SVGIcon.AUTOSIZE_STRETCH);
|
icon.setAutosize(SVGIcon.AUTOSIZE_STRETCH);
|
||||||
icon.setPreferredSize(new Dimension((int) bitmapWidth, (int) bitmapHeight));
|
icon.setPreferredSize(new Dimension((int) bmpSize[0], (int) bmpSize[1]));
|
||||||
icon.setSvgURI(uri);
|
icon.setSvgURI(uri);
|
||||||
BufferedImage bufferedImage = new BufferedImage(icon.getIconWidth(), icon.getIconHeight(), BufferedImage.TYPE_INT_ARGB);
|
BufferedImage bufferedImage = new BufferedImage(icon.getIconWidth(), icon.getIconHeight(), BufferedImage.TYPE_INT_ARGB);
|
||||||
icon.paintIcon(null, bufferedImage.createGraphics(), 0, 0);
|
icon.paintIcon(null, bufferedImage.createGraphics(), 0, 0);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
* Copyright 2016-2018 devemux86
|
* Copyright 2016-2018 devemux86
|
||||||
* Copyright 2018 Gustl22
|
* Copyright 2018-2019 Gustl22
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
*
|
*
|
||||||
@@ -21,9 +21,12 @@ package org.oscim.gdx;
|
|||||||
import com.badlogic.gdx.Files;
|
import com.badlogic.gdx.Files;
|
||||||
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
|
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
|
||||||
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
|
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
|
||||||
|
import com.badlogic.gdx.graphics.glutils.GLVersion;
|
||||||
import com.badlogic.gdx.utils.SharedLibraryLoader;
|
import com.badlogic.gdx.utils.SharedLibraryLoader;
|
||||||
|
|
||||||
import org.oscim.awt.AwtGraphics;
|
import org.oscim.awt.AwtGraphics;
|
||||||
|
import org.oscim.backend.DateTime;
|
||||||
|
import org.oscim.backend.DateTimeAdapter;
|
||||||
import org.oscim.backend.GLAdapter;
|
import org.oscim.backend.GLAdapter;
|
||||||
import org.oscim.core.Tile;
|
import org.oscim.core.Tile;
|
||||||
import org.oscim.tiling.TileSource;
|
import org.oscim.tiling.TileSource;
|
||||||
@@ -42,7 +45,7 @@ public class GdxMapApp extends GdxMap {
|
|||||||
// init globals
|
// init globals
|
||||||
AwtGraphics.init();
|
AwtGraphics.init();
|
||||||
GdxAssets.init("assets/");
|
GdxAssets.init("assets/");
|
||||||
GLAdapter.init(new LwjglGL20());
|
DateTimeAdapter.init(new DateTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
@@ -71,8 +74,8 @@ public class GdxMapApp extends GdxMap {
|
|||||||
cfg.addIcon(path, Files.FileType.Internal);
|
cfg.addIcon(path, Files.FileType.Internal);
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg.width = 800;
|
cfg.width = 1024;
|
||||||
cfg.height = 600;
|
cfg.height = 768;
|
||||||
cfg.stencil = 8;
|
cfg.stencil = 8;
|
||||||
//cfg.samples = 2;
|
//cfg.samples = 2;
|
||||||
cfg.foregroundFPS = 30;
|
cfg.foregroundFPS = 30;
|
||||||
@@ -81,6 +84,14 @@ public class GdxMapApp extends GdxMap {
|
|||||||
return cfg;
|
return cfg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void initGLAdapter(GLVersion version) {
|
||||||
|
if (version.getMajorVersion() >= 3)
|
||||||
|
GLAdapter.init(new LwjglGL30());
|
||||||
|
else
|
||||||
|
GLAdapter.init(new LwjglGL20());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createLayers() {
|
public void createLayers() {
|
||||||
TileSource tileSource = new OSciMap4TileSource();
|
TileSource tileSource = new OSciMap4TileSource();
|
||||||
|
|||||||
@@ -1,3 +1,19 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2016 devemux86
|
||||||
|
*
|
||||||
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify it under the
|
||||||
|
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||||
|
* Foundation, either version 3 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License along with
|
||||||
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright 2011 See AUTHORS file.
|
* Copyright 2011 See AUTHORS file.
|
||||||
* <p/>
|
* <p/>
|
||||||
@@ -38,6 +54,8 @@ import java.nio.ShortBuffer;
|
|||||||
/**
|
/**
|
||||||
* An implementation of the {@link GL20} interface based on LWJGL. Note that LWJGL shaders and OpenGL ES shaders will not be 100%
|
* An implementation of the {@link GL20} interface based on LWJGL. Note that LWJGL shaders and OpenGL ES shaders will not be 100%
|
||||||
* compatible. Some glGetXXX methods are not implemented.
|
* compatible. Some glGetXXX methods are not implemented.
|
||||||
|
* <p>
|
||||||
|
* See https://github.com/libgdx/libgdx/blob/master/backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglGL20.java
|
||||||
*
|
*
|
||||||
* @author mzechner
|
* @author mzechner
|
||||||
*/
|
*/
|
||||||
@@ -68,54 +86,67 @@ public class LwjglGL20 implements GL {
|
|||||||
return intBuffer;
|
return intBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void activeTexture(int texture) {
|
public void activeTexture(int texture) {
|
||||||
GL13.glActiveTexture(texture);
|
GL13.glActiveTexture(texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void attachShader(int program, int shader) {
|
public void attachShader(int program, int shader) {
|
||||||
GL20.glAttachShader(program, shader);
|
GL20.glAttachShader(program, shader);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void bindAttribLocation(int program, int index, String name) {
|
public void bindAttribLocation(int program, int index, String name) {
|
||||||
GL20.glBindAttribLocation(program, index, name);
|
GL20.glBindAttribLocation(program, index, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void bindBuffer(int target, int buffer) {
|
public void bindBuffer(int target, int buffer) {
|
||||||
GL15.glBindBuffer(target, buffer);
|
GL15.glBindBuffer(target, buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void bindFramebuffer(int target, int framebuffer) {
|
public void bindFramebuffer(int target, int framebuffer) {
|
||||||
EXTFramebufferObject.glBindFramebufferEXT(target, framebuffer);
|
EXTFramebufferObject.glBindFramebufferEXT(target, framebuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void bindRenderbuffer(int target, int renderbuffer) {
|
public void bindRenderbuffer(int target, int renderbuffer) {
|
||||||
EXTFramebufferObject.glBindRenderbufferEXT(target, renderbuffer);
|
EXTFramebufferObject.glBindRenderbufferEXT(target, renderbuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void bindTexture(int target, int texture) {
|
public void bindTexture(int target, int texture) {
|
||||||
GL11.glBindTexture(target, texture);
|
GL11.glBindTexture(target, texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void blendColor(float red, float green, float blue, float alpha) {
|
public void blendColor(float red, float green, float blue, float alpha) {
|
||||||
GL14.glBlendColor(red, green, blue, alpha);
|
GL14.glBlendColor(red, green, blue, alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void blendEquation(int mode) {
|
public void blendEquation(int mode) {
|
||||||
GL14.glBlendEquation(mode);
|
GL14.glBlendEquation(mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void blendEquationSeparate(int modeRGB, int modeAlpha) {
|
public void blendEquationSeparate(int modeRGB, int modeAlpha) {
|
||||||
GL20.glBlendEquationSeparate(modeRGB, modeAlpha);
|
GL20.glBlendEquationSeparate(modeRGB, modeAlpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void blendFunc(int sfactor, int dfactor) {
|
public void blendFunc(int sfactor, int dfactor) {
|
||||||
GL11.glBlendFunc(sfactor, dfactor);
|
GL11.glBlendFunc(sfactor, dfactor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) {
|
public void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) {
|
||||||
GL14.glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
|
GL14.glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void bufferData(int target, int size, Buffer data, int usage) {
|
public void bufferData(int target, int size, Buffer data, int usage) {
|
||||||
if (data == null)
|
if (data == null)
|
||||||
GL15.glBufferData(target, size, usage);
|
GL15.glBufferData(target, size, usage);
|
||||||
@@ -131,6 +162,7 @@ public class LwjglGL20 implements GL {
|
|||||||
GL15.glBufferData(target, (ShortBuffer) data, usage);
|
GL15.glBufferData(target, (ShortBuffer) data, usage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void bufferSubData(int target, int offset, int size, Buffer data) {
|
public void bufferSubData(int target, int offset, int size, Buffer data) {
|
||||||
if (data == null)
|
if (data == null)
|
||||||
throw new GdxRuntimeException("Using null for the data not possible, blame LWJGL");
|
throw new GdxRuntimeException("Using null for the data not possible, blame LWJGL");
|
||||||
@@ -146,34 +178,42 @@ public class LwjglGL20 implements GL {
|
|||||||
GL15.glBufferSubData(target, offset, (ShortBuffer) data);
|
GL15.glBufferSubData(target, offset, (ShortBuffer) data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int checkFramebufferStatus(int target) {
|
public int checkFramebufferStatus(int target) {
|
||||||
return EXTFramebufferObject.glCheckFramebufferStatusEXT(target);
|
return EXTFramebufferObject.glCheckFramebufferStatusEXT(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void clear(int mask) {
|
public void clear(int mask) {
|
||||||
GL11.glClear(mask);
|
GL11.glClear(mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void clearColor(float red, float green, float blue, float alpha) {
|
public void clearColor(float red, float green, float blue, float alpha) {
|
||||||
GL11.glClearColor(red, green, blue, alpha);
|
GL11.glClearColor(red, green, blue, alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void clearDepthf(float depth) {
|
public void clearDepthf(float depth) {
|
||||||
GL11.glClearDepth(depth);
|
GL11.glClearDepth(depth);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void clearStencil(int s) {
|
public void clearStencil(int s) {
|
||||||
GL11.glClearStencil(s);
|
GL11.glClearStencil(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void colorMask(boolean red, boolean green, boolean blue, boolean alpha) {
|
public void colorMask(boolean red, boolean green, boolean blue, boolean alpha) {
|
||||||
GL11.glColorMask(red, green, blue, alpha);
|
GL11.glColorMask(red, green, blue, alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void compileShader(int shader) {
|
public void compileShader(int shader) {
|
||||||
GL20.glCompileShader(shader);
|
GL20.glCompileShader(shader);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void compressedTexImage2D(int target, int level, int internalformat, int width, int height, int border,
|
public void compressedTexImage2D(int target, int level, int internalformat, int width, int height, int border,
|
||||||
int imageSize, Buffer data) {
|
int imageSize, Buffer data) {
|
||||||
if (data instanceof ByteBuffer) {
|
if (data instanceof ByteBuffer) {
|
||||||
@@ -183,99 +223,123 @@ public class LwjglGL20 implements GL {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void compressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format,
|
public void compressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format,
|
||||||
int imageSize, Buffer data) {
|
int imageSize, Buffer data) {
|
||||||
throw new GdxRuntimeException("not implemented");
|
throw new GdxRuntimeException("not implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void copyTexImage2D(int target, int level, int internalformat, int x, int y, int width, int height, int border) {
|
public void copyTexImage2D(int target, int level, int internalformat, int x, int y, int width, int height, int border) {
|
||||||
GL11.glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
|
GL11.glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void copyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, int height) {
|
public void copyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, int height) {
|
||||||
GL11.glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
|
GL11.glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int createProgram() {
|
public int createProgram() {
|
||||||
return GL20.glCreateProgram();
|
return GL20.glCreateProgram();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int createShader(int type) {
|
public int createShader(int type) {
|
||||||
return GL20.glCreateShader(type);
|
return GL20.glCreateShader(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void cullFace(int mode) {
|
public void cullFace(int mode) {
|
||||||
GL11.glCullFace(mode);
|
GL11.glCullFace(mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void deleteBuffers(int n, IntBuffer buffers) {
|
public void deleteBuffers(int n, IntBuffer buffers) {
|
||||||
GL15.glDeleteBuffers(buffers);
|
GL15.glDeleteBuffers(buffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void deleteBuffer(int buffer) {
|
public void deleteBuffer(int buffer) {
|
||||||
GL15.glDeleteBuffers(buffer);
|
GL15.glDeleteBuffers(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void deleteFramebuffers(int n, IntBuffer framebuffers) {
|
public void deleteFramebuffers(int n, IntBuffer framebuffers) {
|
||||||
EXTFramebufferObject.glDeleteFramebuffersEXT(framebuffers);
|
EXTFramebufferObject.glDeleteFramebuffersEXT(framebuffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void deleteFramebuffer(int framebuffer) {
|
public void deleteFramebuffer(int framebuffer) {
|
||||||
EXTFramebufferObject.glDeleteFramebuffersEXT(framebuffer);
|
EXTFramebufferObject.glDeleteFramebuffersEXT(framebuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void deleteProgram(int program) {
|
public void deleteProgram(int program) {
|
||||||
GL20.glDeleteProgram(program);
|
GL20.glDeleteProgram(program);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void deleteRenderbuffers(int n, IntBuffer renderbuffers) {
|
public void deleteRenderbuffers(int n, IntBuffer renderbuffers) {
|
||||||
EXTFramebufferObject.glDeleteRenderbuffersEXT(renderbuffers);
|
EXTFramebufferObject.glDeleteRenderbuffersEXT(renderbuffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void deleteRenderbuffer(int renderbuffer) {
|
public void deleteRenderbuffer(int renderbuffer) {
|
||||||
EXTFramebufferObject.glDeleteRenderbuffersEXT(renderbuffer);
|
EXTFramebufferObject.glDeleteRenderbuffersEXT(renderbuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void deleteShader(int shader) {
|
public void deleteShader(int shader) {
|
||||||
GL20.glDeleteShader(shader);
|
GL20.glDeleteShader(shader);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void deleteTextures(int n, IntBuffer textures) {
|
public void deleteTextures(int n, IntBuffer textures) {
|
||||||
GL11.glDeleteTextures(textures);
|
GL11.glDeleteTextures(textures);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void deleteTexture(int texture) {
|
public void deleteTexture(int texture) {
|
||||||
GL11.glDeleteTextures(texture);
|
GL11.glDeleteTextures(texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void depthFunc(int func) {
|
public void depthFunc(int func) {
|
||||||
GL11.glDepthFunc(func);
|
GL11.glDepthFunc(func);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void depthMask(boolean flag) {
|
public void depthMask(boolean flag) {
|
||||||
GL11.glDepthMask(flag);
|
GL11.glDepthMask(flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void depthRangef(float zNear, float zFar) {
|
public void depthRangef(float zNear, float zFar) {
|
||||||
GL11.glDepthRange(zNear, zFar);
|
GL11.glDepthRange(zNear, zFar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void detachShader(int program, int shader) {
|
public void detachShader(int program, int shader) {
|
||||||
GL20.glDetachShader(program, shader);
|
GL20.glDetachShader(program, shader);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void disable(int cap) {
|
public void disable(int cap) {
|
||||||
GL11.glDisable(cap);
|
GL11.glDisable(cap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void disableVertexAttribArray(int index) {
|
public void disableVertexAttribArray(int index) {
|
||||||
GL20.glDisableVertexAttribArray(index);
|
GL20.glDisableVertexAttribArray(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void drawArrays(int mode, int first, int count) {
|
public void drawArrays(int mode, int first, int count) {
|
||||||
GL11.glDrawArrays(mode, first, count);
|
GL11.glDrawArrays(mode, first, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void drawElements(int mode, int count, int type, Buffer indices) {
|
public void drawElements(int mode, int count, int type, Buffer indices) {
|
||||||
if (indices instanceof ShortBuffer && type == com.badlogic.gdx.graphics.GL20.GL_UNSIGNED_SHORT)
|
if (indices instanceof ShortBuffer && type == com.badlogic.gdx.graphics.GL20.GL_UNSIGNED_SHORT)
|
||||||
GL11.glDrawElements(mode, (ShortBuffer) indices);
|
GL11.glDrawElements(mode, (ShortBuffer) indices);
|
||||||
@@ -288,70 +352,87 @@ public class LwjglGL20 implements GL {
|
|||||||
+ " with this method. Use ShortBuffer or ByteBuffer instead. Blame LWJGL");
|
+ " with this method. Use ShortBuffer or ByteBuffer instead. Blame LWJGL");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void enable(int cap) {
|
public void enable(int cap) {
|
||||||
GL11.glEnable(cap);
|
GL11.glEnable(cap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void enableVertexAttribArray(int index) {
|
public void enableVertexAttribArray(int index) {
|
||||||
GL20.glEnableVertexAttribArray(index);
|
GL20.glEnableVertexAttribArray(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void finish() {
|
public void finish() {
|
||||||
GL11.glFinish();
|
GL11.glFinish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void flush() {
|
public void flush() {
|
||||||
GL11.glFlush();
|
GL11.glFlush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void framebufferRenderbuffer(int target, int attachment, int renderbuffertarget, int renderbuffer) {
|
public void framebufferRenderbuffer(int target, int attachment, int renderbuffertarget, int renderbuffer) {
|
||||||
EXTFramebufferObject.glFramebufferRenderbufferEXT(target, attachment, renderbuffertarget, renderbuffer);
|
EXTFramebufferObject.glFramebufferRenderbufferEXT(target, attachment, renderbuffertarget, renderbuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void framebufferTexture2D(int target, int attachment, int textarget, int texture, int level) {
|
public void framebufferTexture2D(int target, int attachment, int textarget, int texture, int level) {
|
||||||
EXTFramebufferObject.glFramebufferTexture2DEXT(target, attachment, textarget, texture, level);
|
EXTFramebufferObject.glFramebufferTexture2DEXT(target, attachment, textarget, texture, level);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void frontFace(int mode) {
|
public void frontFace(int mode) {
|
||||||
GL11.glFrontFace(mode);
|
GL11.glFrontFace(mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void genBuffers(int n, IntBuffer buffers) {
|
public void genBuffers(int n, IntBuffer buffers) {
|
||||||
GL15.glGenBuffers(buffers);
|
GL15.glGenBuffers(buffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int genBuffer() {
|
public int genBuffer() {
|
||||||
return GL15.glGenBuffers();
|
return GL15.glGenBuffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void genFramebuffers(int n, IntBuffer framebuffers) {
|
public void genFramebuffers(int n, IntBuffer framebuffers) {
|
||||||
EXTFramebufferObject.glGenFramebuffersEXT(framebuffers);
|
EXTFramebufferObject.glGenFramebuffersEXT(framebuffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int genFramebuffer() {
|
public int genFramebuffer() {
|
||||||
return EXTFramebufferObject.glGenFramebuffersEXT();
|
return EXTFramebufferObject.glGenFramebuffersEXT();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void genRenderbuffers(int n, IntBuffer renderbuffers) {
|
public void genRenderbuffers(int n, IntBuffer renderbuffers) {
|
||||||
EXTFramebufferObject.glGenRenderbuffersEXT(renderbuffers);
|
EXTFramebufferObject.glGenRenderbuffersEXT(renderbuffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int genRenderbuffer() {
|
public int genRenderbuffer() {
|
||||||
return EXTFramebufferObject.glGenRenderbuffersEXT();
|
return EXTFramebufferObject.glGenRenderbuffersEXT();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void genTextures(int n, IntBuffer textures) {
|
public void genTextures(int n, IntBuffer textures) {
|
||||||
GL11.glGenTextures(textures);
|
GL11.glGenTextures(textures);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int genTexture() {
|
public int genTexture() {
|
||||||
return GL11.glGenTextures();
|
return GL11.glGenTextures();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void generateMipmap(int target) {
|
public void generateMipmap(int target) {
|
||||||
EXTFramebufferObject.glGenerateMipmapEXT(target);
|
EXTFramebufferObject.glGenerateMipmapEXT(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getActiveAttrib(int program, int index, IntBuffer size, Buffer type) {
|
public String getActiveAttrib(int program, int index, IntBuffer size, Buffer type) {
|
||||||
// FIXME this is less than ideal of course...
|
// FIXME this is less than ideal of course...
|
||||||
IntBuffer typeTmp = BufferUtils.createIntBuffer(2);
|
IntBuffer typeTmp = BufferUtils.createIntBuffer(2);
|
||||||
@@ -361,6 +442,7 @@ public class LwjglGL20 implements GL {
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getActiveUniform(int program, int index, IntBuffer size, Buffer type) {
|
public String getActiveUniform(int program, int index, IntBuffer size, Buffer type) {
|
||||||
// FIXME this is less than ideal of course...
|
// FIXME this is less than ideal of course...
|
||||||
IntBuffer typeTmp = BufferUtils.createIntBuffer(2);
|
IntBuffer typeTmp = BufferUtils.createIntBuffer(2);
|
||||||
@@ -370,38 +452,47 @@ public class LwjglGL20 implements GL {
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getAttachedShaders(int program, int maxcount, Buffer count, IntBuffer shaders) {
|
public void getAttachedShaders(int program, int maxcount, Buffer count, IntBuffer shaders) {
|
||||||
GL20.glGetAttachedShaders(program, (IntBuffer) count, shaders);
|
GL20.glGetAttachedShaders(program, (IntBuffer) count, shaders);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getAttribLocation(int program, String name) {
|
public int getAttribLocation(int program, String name) {
|
||||||
return GL20.glGetAttribLocation(program, name);
|
return GL20.glGetAttribLocation(program, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getBooleanv(int pname, Buffer params) {
|
public void getBooleanv(int pname, Buffer params) {
|
||||||
GL11.glGetBoolean(pname, (ByteBuffer) params);
|
GL11.glGetBoolean(pname, (ByteBuffer) params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getBufferParameteriv(int target, int pname, IntBuffer params) {
|
public void getBufferParameteriv(int target, int pname, IntBuffer params) {
|
||||||
GL15.glGetBufferParameter(target, pname, params);
|
GL15.glGetBufferParameter(target, pname, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getError() {
|
public int getError() {
|
||||||
return GL11.glGetError();
|
return GL11.glGetError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getFloatv(int pname, FloatBuffer params) {
|
public void getFloatv(int pname, FloatBuffer params) {
|
||||||
GL11.glGetFloat(pname, params);
|
GL11.glGetFloat(pname, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getFramebufferAttachmentParameteriv(int target, int attachment, int pname, IntBuffer params) {
|
public void getFramebufferAttachmentParameteriv(int target, int attachment, int pname, IntBuffer params) {
|
||||||
EXTFramebufferObject.glGetFramebufferAttachmentParameterEXT(target, attachment, pname, params);
|
EXTFramebufferObject.glGetFramebufferAttachmentParameterEXT(target, attachment, pname, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getIntegerv(int pname, IntBuffer params) {
|
public void getIntegerv(int pname, IntBuffer params) {
|
||||||
GL11.glGetInteger(pname, params);
|
GL11.glGetInteger(pname, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getProgramInfoLog(int program) {
|
public String getProgramInfoLog(int program) {
|
||||||
ByteBuffer buffer = ByteBuffer.allocateDirect(1024 * 10);
|
ByteBuffer buffer = ByteBuffer.allocateDirect(1024 * 10);
|
||||||
buffer.order(ByteOrder.nativeOrder());
|
buffer.order(ByteOrder.nativeOrder());
|
||||||
@@ -416,14 +507,17 @@ public class LwjglGL20 implements GL {
|
|||||||
return new String(bytes);
|
return new String(bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getProgramiv(int program, int pname, IntBuffer params) {
|
public void getProgramiv(int program, int pname, IntBuffer params) {
|
||||||
GL20.glGetProgram(program, pname, params);
|
GL20.glGetProgram(program, pname, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getRenderbufferParameteriv(int target, int pname, IntBuffer params) {
|
public void getRenderbufferParameteriv(int target, int pname, IntBuffer params) {
|
||||||
EXTFramebufferObject.glGetRenderbufferParameterEXT(target, pname, params);
|
EXTFramebufferObject.glGetRenderbufferParameterEXT(target, pname, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getShaderInfoLog(int shader) {
|
public String getShaderInfoLog(int shader) {
|
||||||
ByteBuffer buffer = ByteBuffer.allocateDirect(1024 * 10);
|
ByteBuffer buffer = ByteBuffer.allocateDirect(1024 * 10);
|
||||||
buffer.order(ByteOrder.nativeOrder());
|
buffer.order(ByteOrder.nativeOrder());
|
||||||
@@ -438,98 +532,122 @@ public class LwjglGL20 implements GL {
|
|||||||
return new String(bytes);
|
return new String(bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getShaderPrecisionFormat(int shadertype, int precisiontype, IntBuffer range, IntBuffer precision) {
|
public void getShaderPrecisionFormat(int shadertype, int precisiontype, IntBuffer range, IntBuffer precision) {
|
||||||
throw new UnsupportedOperationException("unsupported, won't implement");
|
throw new UnsupportedOperationException("unsupported, won't implement");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getShaderiv(int shader, int pname, IntBuffer params) {
|
public void getShaderiv(int shader, int pname, IntBuffer params) {
|
||||||
GL20.glGetShader(shader, pname, params);
|
GL20.glGetShader(shader, pname, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getString(int name) {
|
public String getString(int name) {
|
||||||
return GL11.glGetString(name);
|
return GL11.glGetString(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getTexParameterfv(int target, int pname, FloatBuffer params) {
|
public void getTexParameterfv(int target, int pname, FloatBuffer params) {
|
||||||
GL11.glGetTexParameter(target, pname, params);
|
GL11.glGetTexParameter(target, pname, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getTexParameteriv(int target, int pname, IntBuffer params) {
|
public void getTexParameteriv(int target, int pname, IntBuffer params) {
|
||||||
GL11.glGetTexParameter(target, pname, params);
|
GL11.glGetTexParameter(target, pname, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getUniformLocation(int program, String name) {
|
public int getUniformLocation(int program, String name) {
|
||||||
return GL20.glGetUniformLocation(program, name);
|
return GL20.glGetUniformLocation(program, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getUniformfv(int program, int location, FloatBuffer params) {
|
public void getUniformfv(int program, int location, FloatBuffer params) {
|
||||||
GL20.glGetUniform(program, location, params);
|
GL20.glGetUniform(program, location, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getUniformiv(int program, int location, IntBuffer params) {
|
public void getUniformiv(int program, int location, IntBuffer params) {
|
||||||
GL20.glGetUniform(program, location, params);
|
GL20.glGetUniform(program, location, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getVertexAttribPointerv(int index, int pname, Buffer pointer) {
|
public void getVertexAttribPointerv(int index, int pname, Buffer pointer) {
|
||||||
throw new UnsupportedOperationException("unsupported, won't implement");
|
throw new UnsupportedOperationException("unsupported, won't implement");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getVertexAttribfv(int index, int pname, FloatBuffer params) {
|
public void getVertexAttribfv(int index, int pname, FloatBuffer params) {
|
||||||
GL20.glGetVertexAttrib(index, pname, params);
|
GL20.glGetVertexAttrib(index, pname, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getVertexAttribiv(int index, int pname, IntBuffer params) {
|
public void getVertexAttribiv(int index, int pname, IntBuffer params) {
|
||||||
GL20.glGetVertexAttrib(index, pname, params);
|
GL20.glGetVertexAttrib(index, pname, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void hint(int target, int mode) {
|
public void hint(int target, int mode) {
|
||||||
GL11.glHint(target, mode);
|
GL11.glHint(target, mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isBuffer(int buffer) {
|
public boolean isBuffer(int buffer) {
|
||||||
return GL15.glIsBuffer(buffer);
|
return GL15.glIsBuffer(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isEnabled(int cap) {
|
public boolean isEnabled(int cap) {
|
||||||
return GL11.glIsEnabled(cap);
|
return GL11.glIsEnabled(cap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isFramebuffer(int framebuffer) {
|
public boolean isFramebuffer(int framebuffer) {
|
||||||
return EXTFramebufferObject.glIsFramebufferEXT(framebuffer);
|
return EXTFramebufferObject.glIsFramebufferEXT(framebuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isProgram(int program) {
|
public boolean isProgram(int program) {
|
||||||
return GL20.glIsProgram(program);
|
return GL20.glIsProgram(program);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isRenderbuffer(int renderbuffer) {
|
public boolean isRenderbuffer(int renderbuffer) {
|
||||||
return EXTFramebufferObject.glIsRenderbufferEXT(renderbuffer);
|
return EXTFramebufferObject.glIsRenderbufferEXT(renderbuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isShader(int shader) {
|
public boolean isShader(int shader) {
|
||||||
return GL20.glIsShader(shader);
|
return GL20.glIsShader(shader);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isTexture(int texture) {
|
public boolean isTexture(int texture) {
|
||||||
return GL11.glIsTexture(texture);
|
return GL11.glIsTexture(texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void lineWidth(float width) {
|
public void lineWidth(float width) {
|
||||||
GL11.glLineWidth(width);
|
GL11.glLineWidth(width);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void linkProgram(int program) {
|
public void linkProgram(int program) {
|
||||||
GL20.glLinkProgram(program);
|
GL20.glLinkProgram(program);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void pixelStorei(int pname, int param) {
|
public void pixelStorei(int pname, int param) {
|
||||||
GL11.glPixelStorei(pname, param);
|
GL11.glPixelStorei(pname, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void polygonOffset(float factor, float units) {
|
public void polygonOffset(float factor, float units) {
|
||||||
GL11.glPolygonOffset(factor, units);
|
GL11.glPolygonOffset(factor, units);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void readPixels(int x, int y, int width, int height, int format, int type, Buffer pixels) {
|
public void readPixels(int x, int y, int width, int height, int format, int type, Buffer pixels) {
|
||||||
if (pixels instanceof ByteBuffer)
|
if (pixels instanceof ByteBuffer)
|
||||||
GL11.glReadPixels(x, y, width, height, format, type, (ByteBuffer) pixels);
|
GL11.glReadPixels(x, y, width, height, format, type, (ByteBuffer) pixels);
|
||||||
@@ -544,54 +662,67 @@ public class LwjglGL20 implements GL {
|
|||||||
+ " with this method. Use ByteBuffer, ShortBuffer, IntBuffer or FloatBuffer instead. Blame LWJGL");
|
+ " with this method. Use ByteBuffer, ShortBuffer, IntBuffer or FloatBuffer instead. Blame LWJGL");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void releaseShaderCompiler() {
|
public void releaseShaderCompiler() {
|
||||||
// nothing to do here
|
// nothing to do here
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void renderbufferStorage(int target, int internalformat, int width, int height) {
|
public void renderbufferStorage(int target, int internalformat, int width, int height) {
|
||||||
EXTFramebufferObject.glRenderbufferStorageEXT(target, internalformat, width, height);
|
EXTFramebufferObject.glRenderbufferStorageEXT(target, internalformat, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void sampleCoverage(float value, boolean invert) {
|
public void sampleCoverage(float value, boolean invert) {
|
||||||
GL13.glSampleCoverage(value, invert);
|
GL13.glSampleCoverage(value, invert);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void scissor(int x, int y, int width, int height) {
|
public void scissor(int x, int y, int width, int height) {
|
||||||
GL11.glScissor(x, y, width, height);
|
GL11.glScissor(x, y, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void shaderBinary(int n, IntBuffer shaders, int binaryformat, Buffer binary, int length) {
|
public void shaderBinary(int n, IntBuffer shaders, int binaryformat, Buffer binary, int length) {
|
||||||
throw new UnsupportedOperationException("unsupported, won't implement");
|
throw new UnsupportedOperationException("unsupported, won't implement");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void shaderSource(int shader, String string) {
|
public void shaderSource(int shader, String string) {
|
||||||
GL20.glShaderSource(shader, string);
|
GL20.glShaderSource(shader, string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void stencilFunc(int func, int ref, int mask) {
|
public void stencilFunc(int func, int ref, int mask) {
|
||||||
GL11.glStencilFunc(func, ref, mask);
|
GL11.glStencilFunc(func, ref, mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void stencilFuncSeparate(int face, int func, int ref, int mask) {
|
public void stencilFuncSeparate(int face, int func, int ref, int mask) {
|
||||||
GL20.glStencilFuncSeparate(face, func, ref, mask);
|
GL20.glStencilFuncSeparate(face, func, ref, mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void stencilMask(int mask) {
|
public void stencilMask(int mask) {
|
||||||
GL11.glStencilMask(mask);
|
GL11.glStencilMask(mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void stencilMaskSeparate(int face, int mask) {
|
public void stencilMaskSeparate(int face, int mask) {
|
||||||
GL20.glStencilMaskSeparate(face, mask);
|
GL20.glStencilMaskSeparate(face, mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void stencilOp(int fail, int zfail, int zpass) {
|
public void stencilOp(int fail, int zfail, int zpass) {
|
||||||
GL11.glStencilOp(fail, zfail, zpass);
|
GL11.glStencilOp(fail, zfail, zpass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void stencilOpSeparate(int face, int fail, int zfail, int zpass) {
|
public void stencilOpSeparate(int face, int fail, int zfail, int zpass) {
|
||||||
GL20.glStencilOpSeparate(face, fail, zfail, zpass);
|
GL20.glStencilOpSeparate(face, fail, zfail, zpass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void texImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type,
|
public void texImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type,
|
||||||
Buffer pixels) {
|
Buffer pixels) {
|
||||||
if (pixels == null)
|
if (pixels == null)
|
||||||
@@ -611,22 +742,27 @@ public class LwjglGL20 implements GL {
|
|||||||
+ " with this method. Use ByteBuffer, ShortBuffer, IntBuffer, FloatBuffer or DoubleBuffer instead. Blame LWJGL");
|
+ " with this method. Use ByteBuffer, ShortBuffer, IntBuffer, FloatBuffer or DoubleBuffer instead. Blame LWJGL");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void texParameterf(int target, int pname, float param) {
|
public void texParameterf(int target, int pname, float param) {
|
||||||
GL11.glTexParameterf(target, pname, param);
|
GL11.glTexParameterf(target, pname, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void texParameterfv(int target, int pname, FloatBuffer params) {
|
public void texParameterfv(int target, int pname, FloatBuffer params) {
|
||||||
GL11.glTexParameter(target, pname, params);
|
GL11.glTexParameter(target, pname, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void texParameteri(int target, int pname, int param) {
|
public void texParameteri(int target, int pname, int param) {
|
||||||
GL11.glTexParameteri(target, pname, param);
|
GL11.glTexParameteri(target, pname, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void texParameteriv(int target, int pname, IntBuffer params) {
|
public void texParameteriv(int target, int pname, IntBuffer params) {
|
||||||
GL11.glTexParameter(target, pname, params);
|
GL11.glTexParameter(target, pname, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void texSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type,
|
public void texSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type,
|
||||||
Buffer pixels) {
|
Buffer pixels) {
|
||||||
if (pixels instanceof ByteBuffer)
|
if (pixels instanceof ByteBuffer)
|
||||||
@@ -644,166 +780,207 @@ public class LwjglGL20 implements GL {
|
|||||||
+ " with this method. Use ByteBuffer, ShortBuffer, IntBuffer, FloatBuffer or DoubleBuffer instead. Blame LWJGL");
|
+ " with this method. Use ByteBuffer, ShortBuffer, IntBuffer, FloatBuffer or DoubleBuffer instead. Blame LWJGL");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform1f(int location, float x) {
|
public void uniform1f(int location, float x) {
|
||||||
GL20.glUniform1f(location, x);
|
GL20.glUniform1f(location, x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform1fv(int location, int count, FloatBuffer v) {
|
public void uniform1fv(int location, int count, FloatBuffer v) {
|
||||||
GL20.glUniform1(location, v);
|
GL20.glUniform1(location, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform1fv(int location, int count, float[] v, int offset) {
|
public void uniform1fv(int location, int count, float[] v, int offset) {
|
||||||
GL20.glUniform1(location, toFloatBuffer(v, offset, count));
|
GL20.glUniform1(location, toFloatBuffer(v, offset, count));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform1i(int location, int x) {
|
public void uniform1i(int location, int x) {
|
||||||
GL20.glUniform1i(location, x);
|
GL20.glUniform1i(location, x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform1iv(int location, int count, IntBuffer v) {
|
public void uniform1iv(int location, int count, IntBuffer v) {
|
||||||
GL20.glUniform1(location, v);
|
GL20.glUniform1(location, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform1iv(int location, int count, int[] v, int offset) {
|
public void uniform1iv(int location, int count, int[] v, int offset) {
|
||||||
GL20.glUniform1(location, toIntBuffer(v, offset, count));
|
GL20.glUniform1(location, toIntBuffer(v, offset, count));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform2f(int location, float x, float y) {
|
public void uniform2f(int location, float x, float y) {
|
||||||
GL20.glUniform2f(location, x, y);
|
GL20.glUniform2f(location, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform2fv(int location, int count, FloatBuffer v) {
|
public void uniform2fv(int location, int count, FloatBuffer v) {
|
||||||
GL20.glUniform2(location, v);
|
GL20.glUniform2(location, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform2fv(int location, int count, float[] v, int offset) {
|
public void uniform2fv(int location, int count, float[] v, int offset) {
|
||||||
GL20.glUniform2(location, toFloatBuffer(v, offset, count << 1));
|
GL20.glUniform2(location, toFloatBuffer(v, offset, count << 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform2i(int location, int x, int y) {
|
public void uniform2i(int location, int x, int y) {
|
||||||
GL20.glUniform2i(location, x, y);
|
GL20.glUniform2i(location, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform2iv(int location, int count, IntBuffer v) {
|
public void uniform2iv(int location, int count, IntBuffer v) {
|
||||||
GL20.glUniform2(location, v);
|
GL20.glUniform2(location, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform2iv(int location, int count, int[] v, int offset) {
|
public void uniform2iv(int location, int count, int[] v, int offset) {
|
||||||
GL20.glUniform2(location, toIntBuffer(v, offset, count << 1));
|
GL20.glUniform2(location, toIntBuffer(v, offset, count << 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform3f(int location, float x, float y, float z) {
|
public void uniform3f(int location, float x, float y, float z) {
|
||||||
GL20.glUniform3f(location, x, y, z);
|
GL20.glUniform3f(location, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform3fv(int location, int count, FloatBuffer v) {
|
public void uniform3fv(int location, int count, FloatBuffer v) {
|
||||||
GL20.glUniform3(location, v);
|
GL20.glUniform3(location, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform3fv(int location, int count, float[] v, int offset) {
|
public void uniform3fv(int location, int count, float[] v, int offset) {
|
||||||
GL20.glUniform3(location, toFloatBuffer(v, offset, count * 3));
|
GL20.glUniform3(location, toFloatBuffer(v, offset, count * 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform3i(int location, int x, int y, int z) {
|
public void uniform3i(int location, int x, int y, int z) {
|
||||||
GL20.glUniform3i(location, x, y, z);
|
GL20.glUniform3i(location, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform3iv(int location, int count, IntBuffer v) {
|
public void uniform3iv(int location, int count, IntBuffer v) {
|
||||||
GL20.glUniform3(location, v);
|
GL20.glUniform3(location, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform3iv(int location, int count, int[] v, int offset) {
|
public void uniform3iv(int location, int count, int[] v, int offset) {
|
||||||
GL20.glUniform3(location, toIntBuffer(v, offset, count * 3));
|
GL20.glUniform3(location, toIntBuffer(v, offset, count * 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform4f(int location, float x, float y, float z, float w) {
|
public void uniform4f(int location, float x, float y, float z, float w) {
|
||||||
GL20.glUniform4f(location, x, y, z, w);
|
GL20.glUniform4f(location, x, y, z, w);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform4fv(int location, int count, FloatBuffer v) {
|
public void uniform4fv(int location, int count, FloatBuffer v) {
|
||||||
GL20.glUniform4(location, v);
|
GL20.glUniform4(location, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform4fv(int location, int count, float[] v, int offset) {
|
public void uniform4fv(int location, int count, float[] v, int offset) {
|
||||||
GL20.glUniform4(location, toFloatBuffer(v, offset, count << 2));
|
GL20.glUniform4(location, toFloatBuffer(v, offset, count << 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform4i(int location, int x, int y, int z, int w) {
|
public void uniform4i(int location, int x, int y, int z, int w) {
|
||||||
GL20.glUniform4i(location, x, y, z, w);
|
GL20.glUniform4i(location, x, y, z, w);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform4iv(int location, int count, IntBuffer v) {
|
public void uniform4iv(int location, int count, IntBuffer v) {
|
||||||
GL20.glUniform4(location, v);
|
GL20.glUniform4(location, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform4iv(int location, int count, int[] v, int offset) {
|
public void uniform4iv(int location, int count, int[] v, int offset) {
|
||||||
GL20.glUniform4(location, toIntBuffer(v, offset, count << 2));
|
GL20.glUniform4(location, toIntBuffer(v, offset, count << 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniformMatrix2fv(int location, int count, boolean transpose, FloatBuffer value) {
|
public void uniformMatrix2fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
GL20.glUniformMatrix2(location, transpose, value);
|
GL20.glUniformMatrix2(location, transpose, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniformMatrix2fv(int location, int count, boolean transpose, float[] value, int offset) {
|
public void uniformMatrix2fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
GL20.glUniformMatrix2(location, transpose, toFloatBuffer(value, offset, count << 2));
|
GL20.glUniformMatrix2(location, transpose, toFloatBuffer(value, offset, count << 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniformMatrix3fv(int location, int count, boolean transpose, FloatBuffer value) {
|
public void uniformMatrix3fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
GL20.glUniformMatrix3(location, transpose, value);
|
GL20.glUniformMatrix3(location, transpose, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniformMatrix3fv(int location, int count, boolean transpose, float[] value, int offset) {
|
public void uniformMatrix3fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
GL20.glUniformMatrix3(location, transpose, toFloatBuffer(value, offset, count * 9));
|
GL20.glUniformMatrix3(location, transpose, toFloatBuffer(value, offset, count * 9));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniformMatrix4fv(int location, int count, boolean transpose, FloatBuffer value) {
|
public void uniformMatrix4fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
GL20.glUniformMatrix4(location, transpose, value);
|
GL20.glUniformMatrix4(location, transpose, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniformMatrix4fv(int location, int count, boolean transpose, float[] value, int offset) {
|
public void uniformMatrix4fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
GL20.glUniformMatrix4(location, transpose, toFloatBuffer(value, offset, count << 4));
|
GL20.glUniformMatrix4(location, transpose, toFloatBuffer(value, offset, count << 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void useProgram(int program) {
|
public void useProgram(int program) {
|
||||||
GL20.glUseProgram(program);
|
GL20.glUseProgram(program);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void validateProgram(int program) {
|
public void validateProgram(int program) {
|
||||||
GL20.glValidateProgram(program);
|
GL20.glValidateProgram(program);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void vertexAttrib1f(int indx, float x) {
|
public void vertexAttrib1f(int indx, float x) {
|
||||||
GL20.glVertexAttrib1f(indx, x);
|
GL20.glVertexAttrib1f(indx, x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void vertexAttrib1fv(int indx, FloatBuffer values) {
|
public void vertexAttrib1fv(int indx, FloatBuffer values) {
|
||||||
GL20.glVertexAttrib1f(indx, values.get());
|
GL20.glVertexAttrib1f(indx, values.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void vertexAttrib2f(int indx, float x, float y) {
|
public void vertexAttrib2f(int indx, float x, float y) {
|
||||||
GL20.glVertexAttrib2f(indx, x, y);
|
GL20.glVertexAttrib2f(indx, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void vertexAttrib2fv(int indx, FloatBuffer values) {
|
public void vertexAttrib2fv(int indx, FloatBuffer values) {
|
||||||
GL20.glVertexAttrib2f(indx, values.get(), values.get());
|
GL20.glVertexAttrib2f(indx, values.get(), values.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void vertexAttrib3f(int indx, float x, float y, float z) {
|
public void vertexAttrib3f(int indx, float x, float y, float z) {
|
||||||
GL20.glVertexAttrib3f(indx, x, y, z);
|
GL20.glVertexAttrib3f(indx, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void vertexAttrib3fv(int indx, FloatBuffer values) {
|
public void vertexAttrib3fv(int indx, FloatBuffer values) {
|
||||||
GL20.glVertexAttrib3f(indx, values.get(), values.get(), values.get());
|
GL20.glVertexAttrib3f(indx, values.get(), values.get(), values.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void vertexAttrib4f(int indx, float x, float y, float z, float w) {
|
public void vertexAttrib4f(int indx, float x, float y, float z, float w) {
|
||||||
GL20.glVertexAttrib4f(indx, x, y, z, w);
|
GL20.glVertexAttrib4f(indx, x, y, z, w);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void vertexAttrib4fv(int indx, FloatBuffer values) {
|
public void vertexAttrib4fv(int indx, FloatBuffer values) {
|
||||||
GL20.glVertexAttrib4f(indx, values.get(), values.get(), values.get(), values.get());
|
GL20.glVertexAttrib4f(indx, values.get(), values.get(), values.get(), values.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void vertexAttribPointer(int indx, int size, int type, boolean normalized, int stride, Buffer buffer) {
|
public void vertexAttribPointer(int indx, int size, int type, boolean normalized, int stride, Buffer buffer) {
|
||||||
if (buffer instanceof ByteBuffer) {
|
if (buffer instanceof ByteBuffer) {
|
||||||
if (type == BYTE)
|
if (type == BYTE)
|
||||||
@@ -834,18 +1011,18 @@ public class LwjglGL20 implements GL {
|
|||||||
+ " with this method. Use ByteBuffer instead. Blame LWJGL");
|
+ " with this method. Use ByteBuffer instead. Blame LWJGL");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void viewport(int x, int y, int width, int height) {
|
public void viewport(int x, int y, int width, int height) {
|
||||||
GL11.glViewport(x, y, width, height);
|
GL11.glViewport(x, y, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void drawElements(int mode, int count, int type, int indices) {
|
public void drawElements(int mode, int count, int type, int indices) {
|
||||||
GL11.glDrawElements(mode, count, type, indices);
|
GL11.glDrawElements(mode, count, type, indices);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void vertexAttribPointer(int indx, int size, int type, boolean normalized, int stride, int ptr) {
|
public void vertexAttribPointer(int indx, int size, int type, boolean normalized, int stride, int ptr) {
|
||||||
GL20.glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
|
GL20.glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getShaderSource(int shader, int bufsize, Buffer length, String source) {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
657
vtm-desktop/src/org/oscim/gdx/LwjglGL30.java
Normal file
657
vtm-desktop/src/org/oscim/gdx/LwjglGL30.java
Normal file
@@ -0,0 +1,657 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* Copyright 2011 See AUTHORS file.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
package org.oscim.gdx;
|
||||||
|
|
||||||
|
import com.badlogic.gdx.utils.GdxRuntimeException;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
import org.lwjgl.opengl.GL12;
|
||||||
|
import org.lwjgl.opengl.GL15;
|
||||||
|
import org.lwjgl.opengl.GL20;
|
||||||
|
import org.lwjgl.opengl.GL21;
|
||||||
|
import org.lwjgl.opengl.GL31;
|
||||||
|
import org.lwjgl.opengl.GL32;
|
||||||
|
import org.lwjgl.opengl.GL33;
|
||||||
|
import org.lwjgl.opengl.GL40;
|
||||||
|
import org.lwjgl.opengl.GL41;
|
||||||
|
import org.lwjgl.opengl.GL43;
|
||||||
|
import org.oscim.backend.GL30;
|
||||||
|
|
||||||
|
import java.nio.Buffer;
|
||||||
|
import java.nio.ByteBuffer;
|
||||||
|
import java.nio.DoubleBuffer;
|
||||||
|
import java.nio.FloatBuffer;
|
||||||
|
import java.nio.IntBuffer;
|
||||||
|
import java.nio.LongBuffer;
|
||||||
|
import java.nio.ShortBuffer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See https://github.com/libgdx/libgdx/blob/master/backends/gdx-backend-lwjgl3/src/com/badlogic/gdx/backends/lwjgl3/Lwjgl3GL30.java
|
||||||
|
*/
|
||||||
|
public class LwjglGL30 extends LwjglGL20 implements GL30 {
|
||||||
|
@Override
|
||||||
|
public void readBuffer(int mode) {
|
||||||
|
GL11.glReadBuffer(mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawRangeElements(int mode, int start, int end, int count, int type, Buffer indices) {
|
||||||
|
if (indices instanceof ByteBuffer)
|
||||||
|
GL12.glDrawRangeElements(mode, start, end, (ByteBuffer) indices);
|
||||||
|
else if (indices instanceof ShortBuffer)
|
||||||
|
GL12.glDrawRangeElements(mode, start, end, (ShortBuffer) indices);
|
||||||
|
else if (indices instanceof IntBuffer)
|
||||||
|
GL12.glDrawRangeElements(mode, start, end, (IntBuffer) indices);
|
||||||
|
else throw new GdxRuntimeException("indices must be byte, short or int buffer");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawRangeElements(int mode, int start, int end, int count, int type, int offset) {
|
||||||
|
GL12.glDrawRangeElements(mode, start, end, count, type, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void texImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int format,
|
||||||
|
int type, Buffer pixels) {
|
||||||
|
if (pixels == null)
|
||||||
|
GL12.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, (ByteBuffer) null);
|
||||||
|
else if (pixels instanceof ByteBuffer)
|
||||||
|
GL12.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, (ByteBuffer) pixels);
|
||||||
|
else if (pixels instanceof ShortBuffer)
|
||||||
|
GL12.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, (ShortBuffer) pixels);
|
||||||
|
else if (pixels instanceof IntBuffer)
|
||||||
|
GL12.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, (IntBuffer) pixels);
|
||||||
|
else if (pixels instanceof FloatBuffer)
|
||||||
|
GL12.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, (FloatBuffer) pixels);
|
||||||
|
else if (pixels instanceof DoubleBuffer)
|
||||||
|
GL12.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, (DoubleBuffer) pixels);
|
||||||
|
else
|
||||||
|
throw new GdxRuntimeException("Can't use " + pixels.getClass().getName()
|
||||||
|
+ " with this method. Use ByteBuffer, ShortBuffer, IntBuffer, FloatBuffer or DoubleBuffer instead. Blame LWJGL");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void texImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int format,
|
||||||
|
int type, int offset) {
|
||||||
|
GL12.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void texSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth,
|
||||||
|
int format, int type, Buffer pixels) {
|
||||||
|
if (pixels instanceof ByteBuffer)
|
||||||
|
GL12.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, (ByteBuffer) pixels);
|
||||||
|
else if (pixels instanceof ShortBuffer)
|
||||||
|
GL12.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, (ShortBuffer) pixels);
|
||||||
|
else if (pixels instanceof IntBuffer)
|
||||||
|
GL12.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, (IntBuffer) pixels);
|
||||||
|
else if (pixels instanceof FloatBuffer)
|
||||||
|
GL12.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, (FloatBuffer) pixels);
|
||||||
|
else if (pixels instanceof DoubleBuffer)
|
||||||
|
GL12.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, (DoubleBuffer) pixels);
|
||||||
|
else
|
||||||
|
throw new GdxRuntimeException("Can't use " + pixels.getClass().getName()
|
||||||
|
+ " with this method. Use ByteBuffer, ShortBuffer, IntBuffer, FloatBuffer or DoubleBuffer instead. Blame LWJGL");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void texSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth,
|
||||||
|
int format, int type, int offset) {
|
||||||
|
GL12.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void copyTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width,
|
||||||
|
int height) {
|
||||||
|
GL12.glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genQueries(int n, int[] ids, int offset) {
|
||||||
|
for (int i = offset; i < offset + n; i++) {
|
||||||
|
ids[i] = GL15.glGenQueries();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genQueries(int n, IntBuffer ids) {
|
||||||
|
for (int i = 0; i < n; i++) {
|
||||||
|
ids.put(GL15.glGenQueries());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteQueries(int n, int[] ids, int offset) {
|
||||||
|
for (int i = offset; i < offset + n; i++) {
|
||||||
|
GL15.glDeleteQueries(ids[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteQueries(int n, IntBuffer ids) {
|
||||||
|
for (int i = 0; i < n; i++) {
|
||||||
|
GL15.glDeleteQueries(ids.get());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isQuery(int id) {
|
||||||
|
return GL15.glIsQuery(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void beginQuery(int target, int id) {
|
||||||
|
GL15.glBeginQuery(target, id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void endQuery(int target) {
|
||||||
|
GL15.glEndQuery(target);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getQueryiv(int target, int pname, IntBuffer params) {
|
||||||
|
GL15.glGetQuery(target, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getQueryObjectuiv(int id, int pname, IntBuffer params) {
|
||||||
|
GL15.glGetQueryObjectu(id, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean unmapBuffer(int target) {
|
||||||
|
return GL15.glUnmapBuffer(target);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Buffer getBufferPointerv(int target, int pname) {
|
||||||
|
return GL15.glGetBufferPointer(target, pname);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawBuffers(int n, IntBuffer bufs) {
|
||||||
|
GL20.glDrawBuffers(bufs);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix2x3fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
|
GL21.glUniformMatrix2x3(location, transpose, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix3x2fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
|
GL21.glUniformMatrix3x2(location, transpose, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix2x4fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
|
GL21.glUniformMatrix2x4(location, transpose, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix4x2fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
|
GL21.glUniformMatrix4x2(location, transpose, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix3x4fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
|
GL21.glUniformMatrix3x4(location, transpose, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix4x3fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
|
GL21.glUniformMatrix4x3(location, transpose, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void blitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1,
|
||||||
|
int mask, int filter) {
|
||||||
|
org.lwjgl.opengl.GL30.glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindFramebuffer(int target, int framebuffer) {
|
||||||
|
org.lwjgl.opengl.GL30.glBindFramebuffer(target, framebuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindRenderbuffer(int target, int renderbuffer) {
|
||||||
|
org.lwjgl.opengl.GL30.glBindRenderbuffer(target, renderbuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int checkFramebufferStatus(int target) {
|
||||||
|
return org.lwjgl.opengl.GL30.glCheckFramebufferStatus(target);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteFramebuffers(int n, IntBuffer framebuffers) {
|
||||||
|
org.lwjgl.opengl.GL30.glDeleteFramebuffers(framebuffers);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteFramebuffer(int framebuffer) {
|
||||||
|
org.lwjgl.opengl.GL30.glDeleteFramebuffers(framebuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteRenderbuffers(int n, IntBuffer renderbuffers) {
|
||||||
|
org.lwjgl.opengl.GL30.glDeleteRenderbuffers(renderbuffers);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteRenderbuffer(int renderbuffer) {
|
||||||
|
org.lwjgl.opengl.GL30.glDeleteRenderbuffers(renderbuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void generateMipmap(int target) {
|
||||||
|
org.lwjgl.opengl.GL30.glGenerateMipmap(target);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genFramebuffers(int n, IntBuffer framebuffers) {
|
||||||
|
org.lwjgl.opengl.GL30.glGenFramebuffers(framebuffers);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genFramebuffer() {
|
||||||
|
return org.lwjgl.opengl.GL30.glGenFramebuffers();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genRenderbuffers(int n, IntBuffer renderbuffers) {
|
||||||
|
org.lwjgl.opengl.GL30.glGenRenderbuffers(renderbuffers);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genRenderbuffer() {
|
||||||
|
return org.lwjgl.opengl.GL30.glGenRenderbuffers();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getRenderbufferParameteriv(int target, int pname, IntBuffer params) {
|
||||||
|
org.lwjgl.opengl.GL30.glGetRenderbufferParameter(target, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isFramebuffer(int framebuffer) {
|
||||||
|
return org.lwjgl.opengl.GL30.glIsFramebuffer(framebuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isRenderbuffer(int renderbuffer) {
|
||||||
|
return org.lwjgl.opengl.GL30.glIsRenderbuffer(renderbuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderbufferStorage(int target, int internalformat, int width, int height) {
|
||||||
|
org.lwjgl.opengl.GL30.glRenderbufferStorage(target, internalformat, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderbufferStorageMultisample(int target, int samples, int internalformat, int width, int height) {
|
||||||
|
org.lwjgl.opengl.GL30.glRenderbufferStorageMultisample(target, samples, internalformat, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void framebufferTexture2D(int target, int attachment, int textarget, int texture, int level) {
|
||||||
|
org.lwjgl.opengl.GL30.glFramebufferTexture2D(target, attachment, textarget, texture, level);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void framebufferRenderbuffer(int target, int attachment, int renderbuffertarget, int renderbuffer) {
|
||||||
|
org.lwjgl.opengl.GL30.glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void framebufferTextureLayer(int target, int attachment, int texture, int level, int layer) {
|
||||||
|
org.lwjgl.opengl.GL30.glFramebufferTextureLayer(target, attachment, texture, level, layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void flushMappedBufferRange(int target, int offset, int length) {
|
||||||
|
org.lwjgl.opengl.GL30.glFlushMappedBufferRange(target, offset, length);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindVertexArray(int array) {
|
||||||
|
org.lwjgl.opengl.GL30.glBindVertexArray(array);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteVertexArrays(int n, int[] arrays, int offset) {
|
||||||
|
for (int i = offset; i < offset + n; i++) {
|
||||||
|
org.lwjgl.opengl.GL30.glDeleteVertexArrays(arrays[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteVertexArrays(int n, IntBuffer arrays) {
|
||||||
|
org.lwjgl.opengl.GL30.glDeleteVertexArrays(arrays);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genVertexArrays(int n, int[] arrays, int offset) {
|
||||||
|
for (int i = offset; i < offset + n; i++) {
|
||||||
|
arrays[i] = org.lwjgl.opengl.GL30.glGenVertexArrays();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genVertexArrays(int n, IntBuffer arrays) {
|
||||||
|
org.lwjgl.opengl.GL30.glGenVertexArrays(arrays);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isVertexArray(int array) {
|
||||||
|
return org.lwjgl.opengl.GL30.glIsVertexArray(array);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void beginTransformFeedback(int primitiveMode) {
|
||||||
|
org.lwjgl.opengl.GL30.glBeginTransformFeedback(primitiveMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void endTransformFeedback() {
|
||||||
|
org.lwjgl.opengl.GL30.glEndTransformFeedback();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindBufferRange(int target, int index, int buffer, int offset, int size) {
|
||||||
|
org.lwjgl.opengl.GL30.glBindBufferRange(target, index, buffer, offset, size);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindBufferBase(int target, int index, int buffer) {
|
||||||
|
org.lwjgl.opengl.GL30.glBindBufferBase(target, index, buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void transformFeedbackVaryings(int program, String[] varyings, int bufferMode) {
|
||||||
|
org.lwjgl.opengl.GL30.glTransformFeedbackVaryings(program, varyings, bufferMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void vertexAttribIPointer(int index, int size, int type, int stride, int offset) {
|
||||||
|
org.lwjgl.opengl.GL30.glVertexAttribIPointer(index, size, type, stride, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getVertexAttribIiv(int index, int pname, IntBuffer params) {
|
||||||
|
org.lwjgl.opengl.GL30.glGetVertexAttribI(index, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getVertexAttribIuiv(int index, int pname, IntBuffer params) {
|
||||||
|
org.lwjgl.opengl.GL30.glGetVertexAttribIu(index, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void vertexAttribI4i(int index, int x, int y, int z, int w) {
|
||||||
|
org.lwjgl.opengl.GL30.glVertexAttribI4i(index, x, y, z, w);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void vertexAttribI4ui(int index, int x, int y, int z, int w) {
|
||||||
|
org.lwjgl.opengl.GL30.glVertexAttribI4ui(index, x, y, z, w);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getUniformuiv(int program, int location, IntBuffer params) {
|
||||||
|
org.lwjgl.opengl.GL30.glGetUniformu(program, location, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getFragDataLocation(int program, String name) {
|
||||||
|
return org.lwjgl.opengl.GL30.glGetFragDataLocation(program, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform1uiv(int location, int count, IntBuffer value) {
|
||||||
|
org.lwjgl.opengl.GL30.glUniform1u(location, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform3uiv(int location, int count, IntBuffer value) {
|
||||||
|
org.lwjgl.opengl.GL30.glUniform3u(location, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform4uiv(int location, int count, IntBuffer value) {
|
||||||
|
org.lwjgl.opengl.GL30.glUniform4u(location, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearBufferiv(int buffer, int drawbuffer, IntBuffer value) {
|
||||||
|
org.lwjgl.opengl.GL30.glClearBuffer(buffer, drawbuffer, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearBufferuiv(int buffer, int drawbuffer, IntBuffer value) {
|
||||||
|
org.lwjgl.opengl.GL30.glClearBufferu(buffer, drawbuffer, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearBufferfv(int buffer, int drawbuffer, FloatBuffer value) {
|
||||||
|
org.lwjgl.opengl.GL30.glClearBuffer(buffer, drawbuffer, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearBufferfi(int buffer, int drawbuffer, float depth, int stencil) {
|
||||||
|
org.lwjgl.opengl.GL30.glClearBufferfi(buffer, drawbuffer, depth, stencil);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getStringi(int name, int index) {
|
||||||
|
return org.lwjgl.opengl.GL30.glGetStringi(name, index);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void copyBufferSubData(int readTarget, int writeTarget, int readOffset, int writeOffset, int size) {
|
||||||
|
GL31.glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getUniformIndices(int program, String[] uniformNames, IntBuffer uniformIndices) {
|
||||||
|
GL31.glGetUniformIndices(program, uniformNames, uniformIndices);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getActiveUniformsiv(int program, int uniformCount, IntBuffer uniformIndices, int pname, IntBuffer params) {
|
||||||
|
GL31.glGetActiveUniforms(program, uniformIndices, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getUniformBlockIndex(int program, String uniformBlockName) {
|
||||||
|
return GL31.glGetUniformBlockIndex(program, uniformBlockName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getActiveUniformBlockiv(int program, int uniformBlockIndex, int pname, IntBuffer params) {
|
||||||
|
params.put(GL31.glGetActiveUniformBlocki(program, uniformBlockIndex, pname));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getActiveUniformBlockName(int program, int uniformBlockIndex, Buffer length, Buffer uniformBlockName) {
|
||||||
|
GL31.glGetActiveUniformBlockName(program, uniformBlockIndex, (IntBuffer) length, (ByteBuffer) uniformBlockName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getActiveUniformBlockName(int program, int uniformBlockIndex) {
|
||||||
|
return GL31.glGetActiveUniformBlockName(program, uniformBlockIndex, 1024);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformBlockBinding(int program, int uniformBlockIndex, int uniformBlockBinding) {
|
||||||
|
GL31.glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawArraysInstanced(int mode, int first, int count, int instanceCount) {
|
||||||
|
GL31.glDrawArraysInstanced(mode, first, count, instanceCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawElementsInstanced(int mode, int count, int type, int indicesOffset, int instanceCount) {
|
||||||
|
GL31.glDrawElementsInstanced(mode, count, type, indicesOffset, instanceCount);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getInteger64v(int pname, LongBuffer params) {
|
||||||
|
GL32.glGetInteger64(pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getBufferParameteri64v(int target, int pname, LongBuffer params) {
|
||||||
|
params.put(GL32.glGetBufferParameteri64(target, pname));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genSamplers(int count, int[] samplers, int offset) {
|
||||||
|
for (int i = offset; i < offset + count; i++) {
|
||||||
|
samplers[i] = GL33.glGenSamplers();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genSamplers(int count, IntBuffer samplers) {
|
||||||
|
GL33.glGenSamplers(samplers);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteSamplers(int count, int[] samplers, int offset) {
|
||||||
|
for (int i = offset; i < offset + count; i++) {
|
||||||
|
GL33.glDeleteSamplers(samplers[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteSamplers(int count, IntBuffer samplers) {
|
||||||
|
GL33.glDeleteSamplers(samplers);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isSampler(int sampler) {
|
||||||
|
return GL33.glIsSampler(sampler);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindSampler(int unit, int sampler) {
|
||||||
|
GL33.glBindSampler(unit, sampler);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void samplerParameteri(int sampler, int pname, int param) {
|
||||||
|
GL33.glSamplerParameteri(sampler, pname, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void samplerParameteriv(int sampler, int pname, IntBuffer param) {
|
||||||
|
GL33.glSamplerParameter(sampler, pname, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void samplerParameterf(int sampler, int pname, float param) {
|
||||||
|
GL33.glSamplerParameterf(sampler, pname, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void samplerParameterfv(int sampler, int pname, FloatBuffer param) {
|
||||||
|
GL33.glSamplerParameter(sampler, pname, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getSamplerParameteriv(int sampler, int pname, IntBuffer params) {
|
||||||
|
GL33.glGetSamplerParameterI(sampler, pname, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getSamplerParameterfv(int sampler, int pname, FloatBuffer params) {
|
||||||
|
GL33.glGetSamplerParameter(sampler, pname, params);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void vertexAttribDivisor(int index, int divisor) {
|
||||||
|
GL33.glVertexAttribDivisor(index, divisor);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindTransformFeedback(int target, int id) {
|
||||||
|
GL40.glBindTransformFeedback(target, id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteTransformFeedbacks(int n, int[] ids, int offset) {
|
||||||
|
for (int i = offset; i < offset + n; i++) {
|
||||||
|
GL40.glDeleteTransformFeedbacks(ids[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteTransformFeedbacks(int n, IntBuffer ids) {
|
||||||
|
GL40.glDeleteTransformFeedbacks(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genTransformFeedbacks(int n, int[] ids, int offset) {
|
||||||
|
for (int i = offset; i < offset + n; i++) {
|
||||||
|
ids[i] = GL40.glGenTransformFeedbacks();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void genTransformFeedbacks(int n, IntBuffer ids) {
|
||||||
|
GL40.glGenTransformFeedbacks(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isTransformFeedback(int id) {
|
||||||
|
return GL40.glIsTransformFeedback(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void pauseTransformFeedback() {
|
||||||
|
GL40.glPauseTransformFeedback();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void resumeTransformFeedback() {
|
||||||
|
GL40.glResumeTransformFeedback();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void programParameteri(int program, int pname, int value) {
|
||||||
|
GL41.glProgramParameteri(program, pname, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void invalidateFramebuffer(int target, int numAttachments, IntBuffer attachments) {
|
||||||
|
GL43.glInvalidateFramebuffer(target, attachments);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void invalidateSubFramebuffer(int target, int numAttachments, IntBuffer attachments, int x, int y, int width,
|
||||||
|
int height) {
|
||||||
|
GL43.glInvalidateSubFramebuffer(target, attachments, x, y, width, height);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,7 +10,6 @@ dependencies {
|
|||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main.java.srcDirs = ['src']
|
main.java.srcDirs = ['src']
|
||||||
main.resources.srcDirs = ['src']
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (project.hasProperty("SONATYPE_USERNAME")) {
|
if (project.hasProperty("SONATYPE_USERNAME")) {
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ public class OsmWay extends OsmElement {
|
|||||||
return "w" + id;
|
return "w" + id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Geometry toJts() {
|
public Geometry toJts() {
|
||||||
double[] coords = new double[nodes.size() * 2];
|
double[] coords = new double[nodes.size() * 2];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|||||||
@@ -54,18 +54,18 @@ public class GeoJsonTileDecoder implements ITileDecoder {
|
|||||||
private final LinkedHashMap<String, Object> mTagMap;
|
private final LinkedHashMap<String, Object> mTagMap;
|
||||||
private final JsonFactory mJsonFactory;
|
private final JsonFactory mJsonFactory;
|
||||||
|
|
||||||
private final static char[] FIELD_FEATURES = "features".toCharArray();
|
private static final char[] FIELD_FEATURES = "features".toCharArray();
|
||||||
private final static char[] FIELD_GEOMETRY = "geometry".toCharArray();
|
private static final char[] FIELD_GEOMETRY = "geometry".toCharArray();
|
||||||
private final static char[] FIELD_PROPERTIES = "properties".toCharArray();
|
private static final char[] FIELD_PROPERTIES = "properties".toCharArray();
|
||||||
private final static char[] FIELD_COORDINATES = "coordinates".toCharArray();
|
private static final char[] FIELD_COORDINATES = "coordinates".toCharArray();
|
||||||
private final static char[] FIELD_TYPE = "type".toCharArray();
|
private static final char[] FIELD_TYPE = "type".toCharArray();
|
||||||
|
|
||||||
private final static char[] LINETRING = "LineString".toCharArray();
|
private static final char[] LINETRING = "LineString".toCharArray();
|
||||||
private final static char[] POLYGON = "Polygon".toCharArray();
|
private static final char[] POLYGON = "Polygon".toCharArray();
|
||||||
private final static char[] POINT = "Point".toCharArray();
|
private static final char[] POINT = "Point".toCharArray();
|
||||||
private final static char[] MULTI_LINESTRING = "MultiLineString".toCharArray();
|
private static final char[] MULTI_LINESTRING = "MultiLineString".toCharArray();
|
||||||
private final static char[] MULTI_POLYGON = "MultiPolygon".toCharArray();
|
private static final char[] MULTI_POLYGON = "MultiPolygon".toCharArray();
|
||||||
private final static char[] MULTI_POINT = "MultiPoint".toCharArray();
|
private static final char[] MULTI_POINT = "MultiPoint".toCharArray();
|
||||||
|
|
||||||
private ITileDataSink mTileDataSink;
|
private ITileDataSink mTileDataSink;
|
||||||
|
|
||||||
@@ -259,7 +259,7 @@ public class GeoJsonTileDecoder implements ITileDecoder {
|
|||||||
|
|
||||||
ring++;
|
ring++;
|
||||||
parseCoordSequence(jp);
|
parseCoordSequence(jp);
|
||||||
removeLastPoint();
|
mMapElement.removeLastPoint();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -268,11 +268,6 @@ public class GeoJsonTileDecoder implements ITileDecoder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void removeLastPoint() {
|
|
||||||
mMapElement.pointNextPos -= 2;
|
|
||||||
mMapElement.index[mMapElement.indexCurrentPos] -= 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void parseLineString(JsonParser jp)
|
private void parseLineString(JsonParser jp)
|
||||||
throws JsonParseException, IOException {
|
throws JsonParseException, IOException {
|
||||||
mMapElement.startLine();
|
mMapElement.startLine();
|
||||||
@@ -329,7 +324,7 @@ public class GeoJsonTileDecoder implements ITileDecoder {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private final static boolean match(JsonParser jp, char[] fieldName)
|
private static final boolean match(JsonParser jp, char[] fieldName)
|
||||||
throws JsonParseException, IOException {
|
throws JsonParseException, IOException {
|
||||||
|
|
||||||
int length = jp.getTextLength();
|
int length = jp.getTextLength();
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ public class OsmLanduseJsonTileSource extends GeoJsonTileSource {
|
|||||||
mappings.put("park or protected land", new Tag("leisure", "park"));
|
mappings.put("park or protected land", new Tag("leisure", "park"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private final static Tag mTagArea = new Tag("area", "yes");
|
private static final Tag mTagArea = new Tag("area", "yes");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decodeTags(MapElement mapElement, Map<String, Object> properties) {
|
public void decodeTags(MapElement mapElement, Map<String, Object> properties) {
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public class TileDecoder extends PbfDecoder {
|
|||||||
private final String mLocale = "de";
|
private final String mLocale = "de";
|
||||||
private ITileDataSink mMapDataCallback;
|
private ITileDataSink mMapDataCallback;
|
||||||
|
|
||||||
private final static float REF_TILE_SIZE = 4096.0f;
|
private static final float REF_TILE_SIZE = 4096.0f;
|
||||||
private float mScale;
|
private float mScale;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -373,9 +373,9 @@ public class TileDecoder extends PbfDecoder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private final static int CLOSE_PATH = 0x07;
|
private static final int CLOSE_PATH = 0x07;
|
||||||
private final static int MOVE_TO = 0x01;
|
private static final int MOVE_TO = 0x01;
|
||||||
//private final static int LINE_TO = 0x02;
|
//private static final int LINE_TO = 0x02;
|
||||||
|
|
||||||
private int lastX, lastY;
|
private int lastX, lastY;
|
||||||
|
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ package org.oscim.tiling.source.oscimap;
|
|||||||
import org.oscim.core.Tag;
|
import org.oscim.core.Tag;
|
||||||
|
|
||||||
public class Tags {
|
public class Tags {
|
||||||
public final static int MAX = 654;
|
public static final int MAX = 654;
|
||||||
public final static int LIMIT = 1024;
|
public static final int LIMIT = 1024;
|
||||||
|
|
||||||
private static final String s_limited = "limited".intern();
|
private static final String s_limited = "limited".intern();
|
||||||
private static final String s_chain = "chain".intern();
|
private static final String s_chain = "chain".intern();
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ import java.util.Map;
|
|||||||
public class TileDecoder extends PbfDecoder {
|
public class TileDecoder extends PbfDecoder {
|
||||||
static final Logger log = LoggerFactory.getLogger(TileDecoder.class);
|
static final Logger log = LoggerFactory.getLogger(TileDecoder.class);
|
||||||
|
|
||||||
private final static float REF_TILE_SIZE = 4096.0f;
|
private static final float REF_TILE_SIZE = 4096.0f;
|
||||||
|
|
||||||
private static final int TAG_TILE_TAGS = 1;
|
private static final int TAG_TILE_TAGS = 1;
|
||||||
private static final int TAG_TILE_WAYS = 2;
|
private static final int TAG_TILE_WAYS = 2;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user