android


Do I have to worry about non-power-of-two textures on API 16+?


I'm creating a mobile game for Android and iOS.
As I read on Android's website:
OpenGL ES 1.0 and 1.1 - This API specification is supported by
Android 1.0 and higher.
OpenGL ES 2.0 - This API specification is supported by Android 2.2
(API level 8) and higher.
OpenGL ES 3.0 - This API specification is supported by Android 4.3
(API level 18) and higher.
OpenGL ES 3.1 - This API specification is supported by Android 5.0
(API level 21) and higher.
I build my app to target only devices API16+, BUT, does it mean that I can use non-pot textures?
Is this possible that someone with this API level will have OpenGL 1.0 on his device which will crash trying to load my textures? Is this device independant?
Firstly, you didn't mention whether you are targeting OpenGLES 1 or 2. From the information you've posted, all the devices you target support OpenGLES 2, but it's up to you which version you actually chose to use.
Assuming your code uses OpenGLES 2, then all devices should work with non-POT textures. However, you should be aware that texture wrapping (GL_REPEAT) and mipmapping are only supported on non-POT textures via extensions. Also, a lot of devices will allocate memory as if your texture was POT anyway.
Because of these reasons, it's almost always a good idea to author POT textures for 3D assets. For 2D assets it's a good idea to think about using texture atlasses to combine multiple non-POT textures into a larger POT atlas.

Related Links

Running code on the service event queue
Change margins inside a custom view
go to next activity without crash
Viewpager dynamic height for all fragment (Like google calendar)
Automatically resize images depending on display size
How to override doubletap of PhotoView
Concurrent connections with a single AndroidHttpClient instance
Compress Bitmap to ASTC runtime on Android
How to reference Item in ListView when there are more than 1 items?
How to add a new Android API/SDK to IntelliJ project?
text colors for one TextView using two Linkify's and weblinks clickable
Sliding Menu without moving header
Unable create layout with image and text for listvieitem
Send SMS to multiple contacts
Unable to return group list in xmpp with asmack version asmack-android-8-4.0.6.jar
Android actionbar search in a tabview

Categories

HOME
oracle12c
porting
c++11
rsa
serialization
fftw
obfuscation
title
openstreetmap
emoji
tput
altera
linear-algebra
scsi
dynamic-sql
identity-management
sencha-touch
blade
ember-cli
angular-routing
google-cloud-print
surveymonkey
pic32
genexus-sd
iis-express
tizen-tv
corenlp-server
livelink
sql-server-2000
glib
laravel-eloquent
installshield-le
nested-lists
modalviewcontroller
latitude-longitude
sim-toolkit
reactivekit
diacritics
numberpicker
doc
tcc
importerror
flask-login
strftime
httrack
manova
corruption
reindex
pair-programming
wpas
spring-data-couchbase
java-6
py2neo
gameplay-kit
objectscript
donations
stax
autosar
latin
drawstring
i386
expectations
php-socket
spreadjs
bizagi
boost-serialization
lz77
toast
contentcontrol
user-management
linklabel
dllimport
rate-limiting
xvim
rubaxa-sortable
zscript
liquid-layout
mraid
bufferedinputstream
user-permissions
fits
broadband
phpldapadmin
mruby
android-vibration
spy++
drupal-nodes
video-codecs
alice
sqlclr
pdfviewer
listitem
google-maps-mobile
denied
android-holo-everywhere
timthumb
qglwidget
metaweblog
globals
isapi-extension
django-piston
feasibility
complex-event-processing

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App