133 lines
4.2 KiB
Markdown
133 lines
4.2 KiB
Markdown
# Vav2 Platforms Integration
|
|
|
|
이 디렉토리는 VavCore 라이브러리를 다양한 플랫폼에서 사용할 수 있도록 통합하고 배포하는 역할을 합니다.
|
|
|
|
## 📁 디렉토리 구조
|
|
|
|
```
|
|
platforms/
|
|
├── android/ # Android 플랫폼 통합
|
|
│ ├── vavcore/ # VavCore Android 라이브러리 빌드
|
|
│ │ ├── CMakeLists.txt # Android 전용 CMake 설정
|
|
│ │ ├── build.sh # Android 빌드 스크립트
|
|
│ │ └── libs/ # 빌드된 라이브러리 출력
|
|
│ │ ├── arm64-v8a/
|
|
│ │ ├── armeabi-v7a/
|
|
│ │ └── include/
|
|
│ └── godot-plugin/ # Godot 4 Android 플러그인
|
|
│ ├── android/
|
|
│ │ ├── build.gradle
|
|
│ │ ├── src/main/
|
|
│ │ └── jni/
|
|
│ └── gdscript/
|
|
├── windows/ # Windows 플랫폼 통합
|
|
│ ├── vavcore/ # VavCore Windows 라이브러리 빌드
|
|
│ └── godot-plugin/ # Godot 4 Windows 플러그인
|
|
├── ios/ # iOS 플랫폼 통합 (미래)
|
|
└── linux/ # Linux 플랫폼 통합 (미래)
|
|
```
|
|
|
|
## 🎯 설계 철학
|
|
|
|
### **관심사의 분리**
|
|
- **VavCore/**: 순수 라이브러리 (플랫폼 중립적)
|
|
- **platforms/**: 플랫폼별 통합 및 배포
|
|
- **Vav2Player/**: Windows GUI 애플리케이션
|
|
|
|
### **의존성 방향**
|
|
```
|
|
platforms/android/godot-plugin/
|
|
↓ (depends on)
|
|
platforms/android/vavcore/
|
|
↓ (depends on)
|
|
VavCore/
|
|
```
|
|
|
|
### **재사용성**
|
|
- VavCore는 다른 프로젝트에서도 독립적으로 사용 가능
|
|
- 각 플랫폼 통합은 서로 독립적
|
|
- 플러그인들은 표준화된 라이브러리 인터페이스 사용
|
|
|
|
## 🚀 사용 방법
|
|
|
|
### **Android 플랫폼**
|
|
|
|
#### 1. VavCore 라이브러리 빌드
|
|
```bash
|
|
cd platforms/android/vavcore
|
|
./build.sh
|
|
```
|
|
|
|
#### 2. Godot Android 플러그인 사용
|
|
```bash
|
|
cd platforms/android/godot-plugin
|
|
# Godot 플러그인 빌드 (JNI 포함)
|
|
```
|
|
|
|
### **Windows 플랫폼**
|
|
|
|
#### 1. VavCore 라이브러리 빌드
|
|
```bash
|
|
cd platforms/windows/vavcore
|
|
./build.bat
|
|
```
|
|
|
|
#### 2. Godot Windows 플러그인 사용
|
|
```bash
|
|
cd platforms/windows/godot-plugin
|
|
# Godot 플러그인 빌드
|
|
```
|
|
|
|
## 🔧 개발 워크플로우
|
|
|
|
### **새로운 플랫폼 추가**
|
|
1. `platforms/{platform}/` 디렉토리 생성
|
|
2. `platforms/{platform}/vavcore/` 라이브러리 빌드 설정
|
|
3. `platforms/{platform}/godot-plugin/` 플러그인 구현
|
|
4. 플랫폼별 문서 작성
|
|
|
|
### **라이브러리 업데이트**
|
|
1. VavCore/ 에서 라이브러리 개발
|
|
2. 각 플랫폼에서 라이브러리 재빌드
|
|
3. 플러그인에서 새로운 기능 활용
|
|
|
|
### **플러그인 개발**
|
|
1. platforms/{platform}/vavcore/ 에서 라이브러리 빌드
|
|
2. 빌드된 라이브러리를 플러그인에서 참조
|
|
3. 플랫폼별 네이티브 인터페이스 구현
|
|
|
|
## 📱 지원 플랫폼 현황
|
|
|
|
### ✅ **Android** (구현 완료)
|
|
- **VavCore**: MediaCodec 하드웨어 가속, dav1d fallback
|
|
- **Godot Plugin**: JNI 인터페이스 (구현 예정)
|
|
|
|
### ✅ **Windows** (구현 완료)
|
|
- **VavCore**: NVDEC, VPL, AMF, Media Foundation
|
|
- **Godot Plugin**: C++ 직접 연동 (구현 예정)
|
|
|
|
### 🔄 **iOS** (계획 중)
|
|
- **VavCore**: VideoToolbox 하드웨어 가속
|
|
- **Godot Plugin**: iOS 네이티브 플러그인
|
|
|
|
### 🔄 **Linux** (계획 중)
|
|
- **VavCore**: VAAPI, VDPAU 하드웨어 가속
|
|
- **Godot Plugin**: 리눅스 네이티브 플러그인
|
|
|
|
## 🎮 Godot 통합 전략
|
|
|
|
각 플랫폼의 Godot 플러그인은:
|
|
1. **네이티브 라이브러리**: platforms/{platform}/vavcore/ 빌드 결과 사용
|
|
2. **통합 인터페이스**: 플랫폼별 최적화된 Surface 타입 활용
|
|
3. **GDScript API**: 공통된 API로 크로스 플랫폼 호환성 보장
|
|
|
|
### **Surface 타입 최적화**
|
|
- **Android**: Vulkan Image > OpenGL ES Texture > ANativeWindow
|
|
- **Windows**: D3D11 Texture > D3D12 Resource > OpenGL Texture
|
|
- **iOS**: Metal Texture > CoreVideo PixelBuffer
|
|
- **Linux**: OpenGL Texture > Vulkan Image
|
|
|
|
---
|
|
|
|
🎯 **플랫폼별 통합과 배포를 체계적으로 관리하는 구조**
|
|
🔧 **VavCore의 강력함을 모든 플랫폼에서 활용!** |