3D with OpenGL

Android includes support for high performance 3D graphics via the OpenGL API specifically, the OpenGL ES API.

안드로이드는 OpenGL API, 보다 명확하게 OpenGL ES API를 통해 고성능의 3차원 그래픽에 대한 지원을 포함하고 있다.

OpenGL ES is a flavor of the OpenGL specification intended for embedded devices. Versions of OpenGL ES are loosely peered to versions of the primary OpenGL standard. Android currently supports OpenGL ES 1.0, which corresponds to OpenGL 1.3. So, if the application you have in mind is possible with OpenGL 1.3 on a desktop system, it should be possible on Android.

OpenGL ES는 임베디드 디바이스를 고려한 OpenGL 규격specification의 변형이다. OpenGL ES 버전은 기본적인 OpenGL 표준 버전에 정확하게 대응하지 않는다. 안드로이드는 현재 OpenGL 1.3에 대응되는 OpenGL ES 1.0을 지원한다. 그러므로 만약 여러분이 생각하고 있는 애플리케이션이 데스크탑 시스템 상의 OpenGL 1.3을 사용하는 것이 가능하다면, 그것이 안드로이드에서도 가능해야 한다.

The specific API provided by Android is similar to the J2ME JSR239 OpenGL ES API. However, it may not be identical, so watch out for deviations.

안드로이드에 의해 제공되는 특정 API는 J2ME JSR239 OpenGL ES API와 유사하다. 하지만 그것이 동일하지는 않을 지도 모른다. 그러므로 차이들에 주의하라.

Using the API

Here's how to use the API at an extremely high level:

여기에 매우 높은 수준에서 바라본 API 사용법이 있다.

  1. Write a custom View subclass.
  2. Obtain a handle to an OpenGLContext, which provides access to the OpenGL functionality.
  3. In your View's onDraw() method, get a handle to a GL object, and use its methods to perform GL operations.
  1. 커스텀 뷰 서브클래스를 작성하라.
  2. OpenGL 기능에 대한 접근을 제공하는 OpenGLContext에 대한 핸들handle을 얻어라.
  3. 여러분 뷰의 onDraw() 메쏘드에서, GL 오브젝트에 대한 핸들handle을 얻어라. 그리고 GL 오퍼레이션을 수행하기 위해 그 GL 오브젝트의 메쏘드를 사용하라.

For an example of this usage model (based on the classic GL ColorCube), showing how to use it with threads can be found in com.android.samples.graphics.GLSurfaceViewActivity.java.

(전통적인 GL ColorCube에 기반한) 이런 사용 모델에 대한 예제에 대해서는, Api Demos 샘플 코드 프로젝트에 있는 com.android.samples.graphics.GLSurfaceView.java를 참조하라. 쓰레드를 사용해서 이것을 사용하는 방법을 보여주는 다소 더 세련된 버전을 com.android.samples.graphics.GLSurfaceViewActivity.java에서 찾을 수 있다.

Writing a summary of how to actually write 3D applications using OpenGL is beyond the scope of this text and is left as an exercise for the reader.

OpenGL을 사용해서 실제로 3차원 애플리케이션을 작성하는 방법에 대한 개요를 작성하는 것은 이 텍스트의 범위를 넘어서는 것이다. 그래서 그것은 독자의 과제로 남겨 놓는다.

Links to Additional Information

Information about OpenGL ES can be found at http://www.khronos.org/opengles/.

OpenGL ES에 대한 정보는 http://www.khronos.org/opengles/ 에서 찾을 수 있다.

Information specifically about OpenGL ES 1.0 (including a detailed specification) can be found at http://www.khronos.org/opengles/1_X/.

(자세한 구격을 포함해서) OpenGL ES 1.0에 대한 정보는 http://www.khronos.org/opengles/1_X/ 에서 찾을 수 있다.

The documentation for the Android OpenGL ES implementations are also available.

안드로이드 OpenGL ES 구현에 대한 문서 또한 아래의 링크에서 입수할 수 있다.

Finally, note that though Android does include some basic support for OpenGL ES 1.1, the support is not complete, and should not be relied upon at this time.

마지막으로 안드로이드가 OpenGL ES 1.1에 대한 몇 가지 기본적 지원을 포함하고 있음에도 불구하고 그 지원은 완전하지 않으며, 이 시점에서는 신뢰해서는 안된다.

↑ Go to top

← Back to 2D and 3D Graphics