OpenGL 렌더기에 Android Frame Pacing 통합
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
이 가이드에서는 Android Frame Pacing을 도구 모음에 통합하는 방법, 라이브러리에서 제공하는 함수를 사용하는 방법 및 프레임 속도가 개선되었는지 확인하는 방법을 설명합니다. Android Frame Pacing은 AGDK 라이브러리에서 정적 라이브러리 또는 공유 라이브러리로 사용할 수 있습니다.
시작하기
games-samples
저장소를 클론합니다.
- AGDKTunnel README의 기본 요건 섹션의 안내를 따릅니다.
Android 스튜디오에서 AGDKTunnel 샘플을 실행합니다. 이 프로젝트 예에서는 렌더링에 OpenGL ES를 사용하는 게임으로 Android Frame Pacing을 통합합니다.
- Android 스튜디오를 엽니다.
- 프로젝트 > 열기를 클릭하고
/games-samples/agdk/agdktunnel
디렉터리를 선택합니다.
- Android 스튜디오가 프로젝트를 동기화할 때까지 기다립니다.
- 기기를 연결하거나 가상 기기를 생성하여 샘플을 실행합니다. 자세한 내용은 앱 빌드 및 실행을 참고하세요.
- 대상 기기를 선택하고 Run
을 클릭합니다.
샘플 APK가 대상 기기에 빌드되고 설치됩니다. 오류가 발생하면 다음을 확인하세요.
- 지원되는 버전의 Android SDK가 있어야 합니다. 자세한 내용은 앱 모듈
build.gradle
파일의 compileSdkVersion
필드를 참고하세요. SDK Manager의 SDK Platforms 탭에서 SDK 버전을 업데이트할 수 있습니다.
- 지원되는 버전의 Android NDK가 있어야 합니다. 자세한 내용은 앱 모듈
build.gradle
파일의 ndkVersion
필드를 참고하세요. SDK Manager의 SDK Tools 탭에서 특정 버전의 NDK를 설치할 수 있습니다.
- 프로젝트의
local.properties
파일에 ndk.dir
에 관한 항목이 없습니다. 이 위치는 Android 스튜디오에서 지정하며 위의 NDK 버전을 사용합니다. 이 항목이 있다면 줄 전체를 지웁니다.
- 빌드 설정 변경 후 프로젝트를 정리하고(Build > Clean Project) 연결된 C++ 프로젝트를 새로고칩니다(Build > Refresh Linked C++ Projects).
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-08-26(UTC)
[null,null,["최종 업데이트: 2025-08-26(UTC)"],[],[],null,["This tutorial describes how to integrate Android Frame Pacing into your\ntoolchain, how to use the functions that the library provides, and how to verify\nthat your frame pacing has improved. Android Frame Pacing is available as a\nstatic or shared library in the AGDK Libraries.\n\nGet started\n\n1. Clone the [`games-samples` repository](https://github.com/android/games-samples.git).\n2. Follow the instructions in the [prerequisites section of the AGDKTunnel README](https://github.com/android/games-samples/tree/main/agdk/agdktunnel#prerequisites).\n3. Run the [AGDKTunnel sample](https://github.com/android/games-samples/tree/main/agdk/agdktunnel) in Android Studio. This example\n project integrates Android Frame Pacing into a game that uses OpenGL ES for\n rendering.\n\n 1. Open Android Studio.\n 2. Click **Projects \\\u003e Open** and select the `/games-samples/agdk/agdktunnel` directory.\n 3. Wait for Android Studio to sync the project.\n 4. Connect a device or create a virtual device to run the sample (for more information, see [Build and run your app](/studio/run)).\n 5. Select the target device and click **Run** .\n 6. The sample APK should build and install on the target device. If you\n encounter errors, check the following:\n\n - You have a [supported version](/games/sdk#requirements) of the Android SDK; see the `compileSdkVersion` field in the app module `build.gradle` file for more information. You can [update the SDK version](/studio/intro/update#sdk-manager) from the **SDK Platforms** tab in the SDK Manager.\n - You have a [supported version](/games/sdk#requirements) of the Android NDK; see the `ndkVersion` field in the app module `build.gradle` file for more information. You can [install a specific version of the NDK](/studio/projects/install-ndk#specific-version) from the **SDK Tools** tab in the SDK Manager.\n - The `local.properties` file in the project does *not* have an entry for `ndk.dir`. This location is specified by Android Studio and uses the NDK version from above. If you have this entry, clear the entire line.\n - After any build setting change, clean the project (**Build \\\u003e Clean\n Project** ) and refresh the linked C++ projects (**Build \\\u003e Refresh\n Linked C++ Projects**)."]]