52 lines
2.7 KiB
Plaintext
52 lines
2.7 KiB
Plaintext
page.title=Graphics
|
|
@jd:body
|
|
|
|
<div id="qv-wrapper">
|
|
<div id="qv">
|
|
<h2>Topics</h2>
|
|
<ol>
|
|
<li><a href="{@docRoot}guide/topics/graphics/2d-graphics.html">Canvas and Drawables</a></li>
|
|
<li><a href="{@docRoot}guide/topics/graphics/hardware-accel.html">Hardware Acceleration</a></li>
|
|
<li><a href="{@docRoot}guide/topics/graphics/opengl.html">OpenGL</a></li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
|
|
<p>When writing an application, it's important to consider exactly what your graphical demands will be.
|
|
Varying graphical tasks are best accomplished with varying techniques. For example, graphics and animations
|
|
for a rather static application should be implemented much differently than graphics and animations
|
|
for an interactive game. Here, we'll discuss a few of the options you have for drawing graphics
|
|
on Android and which tasks they're best suited for.
|
|
</p>
|
|
|
|
<dl>
|
|
<dt><strong><a href="{@docRoot}guide/topics/graphics/2d-graphics.html">Canvas and
|
|
Drawables</a></strong></dt>
|
|
<dd>Android provides a set of {@link android.view.View} widgets that provide general functionality
|
|
for a wide array of user interfaces. You can also extend these widgets to modify the way they
|
|
look or behave. In addition, you can do your own custom 2D rendering using the various drawing
|
|
methods contained in the {@link android.graphics.Canvas} class or create {@link
|
|
android.graphics.drawable.Drawable} objects for things such as textured buttons or frame-by-frame
|
|
animations.</dd>
|
|
|
|
<dt><strong><a href="{@docRoot}guide/topics/graphics/hardware-accel.html">Hardware
|
|
Acceleration</a></strong></dt>
|
|
<dd>Beginning in Android 3.0, you can hardware accelerate the majority of
|
|
the drawing done by the Canvas APIs to further increase their performance.</dd>
|
|
|
|
<dt><strong><a href="{@docRoot}guide/topics/graphics/opengl.html">OpenGL</a></strong></dt>
|
|
<dd>Android supports OpenGL ES 1.0 and 2.0, with Android framework APIs as well as natively
|
|
with the Native Development Kit (NDK). Using the framework APIs is desireable when you want to add a
|
|
few graphical enhancements to your application that are not supported with the Canvas APIs, or if
|
|
you desire platform independence and don't demand high performance. There is a performance hit in
|
|
using the framework APIs compared to the NDK, so for many graphic intensive applications such as
|
|
games, using the NDK is beneficial (It is important to note though that you can still get adequate
|
|
performance using the framework APIs. For example, the Google Body app is developed entirely
|
|
using the framework APIs). OpenGL with the NDK is also useful if you have a lot of native
|
|
code that you want to port over to Android. For more information about using the NDK, read the
|
|
docs in the <code>docs/</code> directory of the <a href="{@docRoot}sdk/ndk/index.html">NDK
|
|
download.</a></dd>
|
|
</dl>
|
|
|
|
|