1 / 46

Windows M ob ile 6 Application Track Windows Mobile 6 에서의 DirectX 그래픽 및 게임 개발

{. Windows M ob ile 6 Application Track Windows Mobile 6 에서의 DirectX 그래픽 및 게임 개발. 고재관 myaustin@korea.com Microsoft Mobile Devices MVP http://www.PDAlab.org. 시작하기 전에. 주로 다루는 기술 DirectShow Interface for Player DirectShow Interface for Camera DirectShow Filter (Render Filter)

tymon
Download Presentation

Windows M ob ile 6 Application Track Windows Mobile 6 에서의 DirectX 그래픽 및 게임 개발

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. { Windows Mobile 6 Application TrackWindows Mobile 6 에서의 DirectX 그래픽 및 게임 개발 고재관 myaustin@korea.com Microsoft Mobile Devices MVP http://www.PDAlab.org

  2. 시작하기 전에 • 주로 다루는 기술 • DirectShow Interface for Player • DirectShow Interface for Camera • DirectShow Filter (Render Filter) • DirectDraw Interface • 선물증정 • Quiz/ Q&A/ 느닷없이… • 블루투스 헤드셋/ MS티셔츠/ MS가방/ USB 2.0 허브/ Windows Mobile Resource DVD & 기념품/ USB 메모리/ 교육만화타이틀 Set/ …

  3. 주요내용// • 모바일 컨텐츠 • Microsoft Visual Studio 2005 & Microsoft Windows Mobile 6 SDK • Direct Show & Filter • Direct Draw • 데모 및 프로그램 코드 실행 • 질문

  4. MVP// • Microsoft MVP Award Program ___________________ • 우수한 기술력을 바탕으로 기술공유를 위해 노력한 자 • 분기별 선발, 선발 후 1년간 자격유지, 1년 후 다시 심사 • 혜택 • MS직원을 제외한 최고의 접근 보안등급 • 운영체제소스접근 (2003, XP, Vista, WindowsCE…) • MSDN PremiumSubscription • Microsoft 본사 Global Summit 초대 • MicrosoftProductGroup & 기술팀과교류 • MVP ProgramLeader를 통한 다양한 지원등 … • MVP Leader : 오세영부장 seyoungo@microsoft.com

  5. 모바일 라이프// 업무 생활 문서 습관적 기능 개방된 응용프로그램 플렛폼 커뮤니케이션 업무용 프로그램 미디어 보안 오락

  6. 모바일 응용프로그램 시장//

  7. 디바이스 형태// Professional Standard • 터치스크린 • 큰 해상도 • QVGA(240x320) • VGA(480x640) • Square(320x320) • 화면회전 • 고성능 프로세서 • 키입력 • 일반 해상도 • QCIF(176x220) • QVGA(240x320) • … • 화면회전 • 비교적 낮은 프로세서 휴대폰 연결형 .NET CF 2.0, SQL Compact Edition 기본 탑재 DirectShow & DirectDraw Portable code

  8. 모바일 켄텐츠 개발// 솔루션 기능 응용프로그램에 적용 DirectDraw, GetSystemMetrics 확장된 화면 SNAPI 상태 및 통지 API 전화연결 밧데리 키매핑적용 GXOpenInput() GXGetDefaultKeys() 일관된 키처리

  9. 게임 콘텐츠 형태// • 일반형 • 실행/중지/재실행 기능 • 일반적으로 Immersive 환경 • 대다수의 모바일 게임 컨텐츠형태 • 연결형 • 멀티플레이어 게임 • 턴제(turn-based) 와 실시간 기반 • 사용료 수입증가 요구 • 블루투스 기능기반의 디자인 • 역동형 • 고급 그래픽과 사운드 • Immersive 환경과 게임플레이 • 하드웨어기능 향상 요구

  10. 데스크탑과 다른점// • 데스크탑과 다른 디자인 및 컨텐츠 형태 • 중요 고려사항들 • 작은 화면과 해상도 • 서로 다른 입력 방식 • 터치스크린, QWERTY키보드, 3단 탭, D패드 • 게임타이틀의 단순함 • 100시간 까지 작동되는 게임 부재 • ‘일반형’게임이 주종 • 버스안, 기다리는 시간에 사용 • 모바일로 통합체험 • 휴대폰 통신 기능 or 위치에 기반한 서비스

  11. 개발도구// • Visual Studio 2005 • Windows Mobile 개발환경 및 컴파일러 (ARM) • 모든 Windows Mobile 플렛폼 SDK 다운로드 가능 • Native & Managed 개발기능 포함 (.NET CF v2.0) • Windows Mobile 6 SDK 릴리즈 • 통합 연결 • ActiveSync를 통해 연결 가능 (DMA) • 디바이스 에물레이터 (Device Emulator :DE) • VS2005에 ARM 기반 에물레이터 포함

  12. Windows Mobile 6 SDK// • 폰 에물레이터 • 전화수신 • 부재중전화 • 문자메시지(SMS) • 새롭고 빨라진 에물레이터 기능 • 전원상태 변경기능 • 밧데리상태 변경기능 • 새로운 해상도 지원 (320x320포함) • FakeGPS 에물레이터 • http://www.microsoft.com/windowsmobile/

  13. Smart Device Project// DEMO

  14. DirectX// Media Layer • WindG/WaveMix 실패 • Game SDK • 구성 • DirectInput • DirectDraw • Direct3D • DirectPlay • DirectSound • Direct3DSound • DirectMusic • DirectShow • DirectAnimation • DirectSetup DirectShow DirectPlay Direct Animation Direct3D Retained Mode Foundation Layer DirectDraw DirectSound DirectInput Direct3D Imediate

  15. DirectX DirectX in Windows Mobile// • 다년간의 데스크탑의 응용기술 • 모바일 디바이스 지원 시기 • Windows Mobile 5.0 ~ • Windows CE .NET 4.x ~ • 데스크탑의 일관된 DirectX기술 모델 • 모바일 디바이스를 위해 기술적으로 재 디자인

  16. DirectX DirectX in Windows Mobile// • DirectShow (DShow) • 미디어플레이 / 캡쳐 기능 • DirectDraw (DDraw) • 2차원 그래픽 API • SW & HW 플렛폼 지원을 위한 디자인 • 기존의 Windows Mobile 2D기술 과 병합 • Direct3D Mobile (D3DM) • 모바일 컨텐츠 개발자를 위해 3차원 그래픽 API 디자인 • 플렛폼 기능 향상과 Software 작업방법지원 • 기반기술은 데스크탑의 기술과 API 적용

  17. DirectX 사용이유// • 개발자 확대 • 데스크탑 개발자가 빠르고 쉽게 적응 • 넓은 정보기반 • 데스크탑 개발기술과 단일화 • 다년간 DirectX의 축적정보와 경험 • 다른 플렛폼간의 유연한 동작 • 컨텐츠 이용도 • DirectX기반으로 구축되어온 컨텐츠들 • 모바일 디바이스에는 적당한 기술

  18. DirectX 플렛폼 일관성// • 모든 디바이스에 일관된 지원 • Windows Mobile은 DirectX 그래픽 반드시 지원 • Windows Mobile 5.0 이상의 모든 디바이스 • DirectShow, DirectDraw , Direct3DM 반드시 포함 • 개발자에게 Target 플렛폼의 호환성 보장 • 드라이버 지원 기능 노출 • 동일한최적의 API사용

  19. DirectX 구조// • COM 인터페이스 • DllRegisterServer : 레지스트리에 등록 • DllUnregisterServer : 레지스트리에 해제 • DllGetClassObject : 호출시 연결 • DllCanUnloadNow : 호출해제 및 연결해제 • IUnknown Template Base • HKEY_CLASSES_ROOT\CLSID\{CLSID} • QueryInterface • 형태를 알 수 없는 COM으로 부터 객체를 추출 • UUID형태로 사용 (레지스트리에 등록됨)

  20. DirectShow// • 멀티미디어 API인 DirectX 의 일부 • 주요기능 • 고품질의 비디오/오디오 재생과 녹음이 가능 • 다양한 형식의 미디어 지원 • 재생, 캡쳐, 변환 기능 지원 • 구조 • COM 기반의 Control • WDM(Windows Driver Model) 기반 캡쳐기능 지원 • Code Name Quartz  Active Movie 1.0  DirectShow 2.0  …

  21. DirectShow 응용 프로그램// • 플레이어 • MP3 플레이어 • 동영상 플레이어 • 유틸리티 • Video Editing Application • AVI to ASF ConvertDVD Players • Video Editing Application • AVI to ASF Converts • 카메라 • 디지털 사진 촬영 • 디지털 동영상 촬영

  22. DirectShow 기본 인터페이스 // • COM 인터페이스 • IGraphBuilder : 필터그래프(Filter Graphs) 생성 • IMediaControl : 미디어 플레이제어(재생,중지…) • IMediaEventEx : 이벤트 통지 • IVideoWindow : 비디오윈도우 • IBasicAudio : 오디오 볼륨 및 밸런스 제어 • IBasicVideo : 비디오 출력정보제공 및 제어 • IMediaSeeking : 미디어 위치 이동

  23. DirectShow 확장인터페이스// • IAMDevMemoryAllocator • IAMDevMemoryControl • IAMMediaContent • IAMMediaContentEx • IAMovieSetup • IAMPlayList • IAMPlayListItem • IAMStreamControl • IAMStreamSelect • IAsyncReader • IBaseFilter • IDirectDrawVideo • IDistributorNotify • IDMOWrapperFilter • IEnumFilters • IEnumMediaTypes • IEnumPins • IEnumRegFilters • IFileSourceFilter • IFilterGraph • IFilterGraph2 • IFilterMapper • IFilterMapper2 • IGraphVersion • IMediaEvent • IMediaEventSink • IMediaFilter • IMediaPosition • IMediaSample • IMediaSample2 • IMediaStream • IMemAllocator • IMemInputPin • IMultiMediaStream • INonDelegatingUnknown • IOverlay • IOverlayNotify • IPin • IQualityControl • IQualProp • IReferenceClock • ISeekingPassThru • IStreamSample • IVPBaseConfig • IVPBaseNotify • IVPConfig • IVPNotify

  24. DirectShow 실행과정// • Filter Graphs • DirectShow 에서 Aceess 가능한 형태로 기본적인 가공작업 수행 • 동작 • 미디어 파일 읽기 • 미디어 파일로 부터 비디오와 오디오 신호 분리 • 비디오,오디오 신호 분석 및 복원 • 하드웨어로 비디오,오디오 신호 출력 • 필터(Filter) • DirectShow의 모든 기능은 Filter기능을 연결해 작동

  25. DirectShow 실행과정// Source Filter (소스필터) Transform Filter (변환필터) Render Filter (랜더필터) 해석 추출 분배 비디오 File URL H/W Video IN OUT IN IN OUT IN Audio 해석 오디오 IN OUT IN • Ex) • File • Camcorder • 카메라모듈 • Streaming • … • Ex) • 영상조절 • 영상/음향효과 • … • Ex) • 화면출력 • 동영상저장 • 정지화상저장 • …

  26. DirectShow 구조// Application Command Event DirectShow Filter Graph Manager Legacy VCM/ACM Codec Source Filter Transform Filter Render Filter File System File System DirectSound DirectDraw Kernal Streaming Legacy VFW Capture Device MPEG2 Decoder Sound Card Video Card WDM Capture Device

  27. DirectShow Filter 제작// • Base Class • %WINCEROOT%\PUBLIC\DIRECTX\SDK\SAMPLES\DSHOW\BASECLASSES • BaseClass.lib로 생성 • 프로젝트 생성 • COM프로젝트로 생성 • COM 공용함수 (DllRegisterServer, DllUnregisterServer) • COM 인터페이스 정보 • CLSID • Base Class 기반의 User Class 생성 • 사용가 필요한 처리 작업 추가

  28. CMemAllocator • CMsg • CMsgThread • COARefTime • COutputQueue • CPosPassThru • CPullPin • CQueue • CRefTime • CRendererInputPin • CRendererPosPassThru • CSource • CSourcePosition • CSourceSeeking • CSourceStream • CSystemClock • CTransformFilter • CTransformInputPin • CTransformOutputPin • CTransInPlaceFilter • CTransInPlaceInputPin • CTransInPlaceOutputPin • CUnknown • CVideoTransformFilter • FOURCCMap DirectShow Base Class// • CBaseReferenceClock • CBaseRenderer • CBaseStreamControl • CBaseVideoRenderer • CBaseWindow • CBasicAudio • CCritSec • CDisp • CDispBasic • CEnumMediaTypes • CEnumPins • CFactoryTemplate • CGenericList • CGuidNameList • CLoadDirectDraw • CMediaControl • CMediaEvent • CMediaPosition • CAggDirectDraw • CAggDrawSurface • CAMEvent • CAMMsgEvent • CAMSchedule • CAMThread • CAutoLock • CBaseAllocator • CBaseBasicVideo • CBaseControlVideo • CBaseDispatch • CBaseFilter • CBaseInputPin • CBaseList • CBaseMediaFilter • CBaseObject • CBaseOutputPin • CBasePin • CMediaSample • CMediaType

  29. DirectShow Base Filter// • Source Filter • CSource Class • Transform Filter • CTransformFilter Class • Render Filter • CBaseRenderer Class

  30. DirectShow Interface 구성 Class// • IBasicAudio • CBasicAudio • IBasicVideo • CBaseBasicVideo , CBaseControlVideo • IMediaSeeking • CPosPassThru, CSourceSeeking • IMediaControl • CMediaControl • IMediaEvent • CMediaEvent • IVideoWindow • CBaseControlWindow, CBaseVideoWindow. & …

  31. DirectShow 중점사항// • Add Filter • 호출되는 필터의 교섭과정 확인 필요 • 교섭메소드주의 • CheckInputType • CheckMediaType • Pin특성 파악 • Transform Filter Pin간 연결 확인, Render Filter Pin 사용 • QueryInterface • QueryInterface를 통해 필요한 Template 호출 • IBaseFilter 기반 • IBaseFilter를 통해 User Filter 접근

  32. DirectShow & Filter// DEMO

  33. DirectDraw CE 그래픽 아키텍쳐// GAPI GDI DirectDraw Direct 3D Mobile D3DM Device Driver Interface Layer (DDI) DirectDraw GDI Display Adapter Hardware

  34. DirectDraw GAPI // • Microsoft GAPI(Game API) • Windows Mobile 5.0 전 버전의 게임개발지원 API • 가속기 없이 , 프레임 버퍼에 직접 접근 • 다른 해상도의 디바이스에 유연하게 대처불가 • GAPI 는 요구하는 기능에 비해 저효율 • DirectDraw로 이동 • 하드웨어 가속기 사용가능 (GAPI와 비슷하지도 않음) • 다른 해상도의 디바이스 지원 • 2D처리의 기능 우선

  35. DirectDraw DirectDraw Mobile// • 2D API 로 디자인 • SW와 HW 디스플레이 시스템 기능 향상 • Software 그래픽처리(GDI) 통합 • 2D그래픽 아키텍쳐 통합 • 기반기술의 추가 • 기능의 일관성 • 중요 응용기능 • 2D & 고성능 게임 • 미디어 플레이어 (예: 동영상플레이어)

  36. DirectDraw DirectDraw 아키텍쳐// WindowsMobile 응용프로그램 DirectDraw Graphics Device Interface (GDI) Hardware Emulation Layer (HEL) Device Driver Interface (DDI) HardwareAbstraction Layer (HAL) Display Adapter Hardware

  37. DirectDraw Flipping & Blitting // Primary Surface Off Screen 1 배경1 이미지 Off Screen 2 Flipping 배경2 이미지 Off Screen 3 Back Buffer 캐릭터1 이미지 Off Screen 4 캐릭터2이미지 Blitting or Off Screen All 단일화면 처리

  38. DirectDraw DirectDraw 초기화// #include <ddraw.h> #define TIMER_ID 1 #define TIMER_RATE 500 IDirectDraw * g_pDD = NULL; IDirectDrawSurface * g_pDDSPrimary = NULL; IDirectDrawSurface * g_pDDSBack = NULL; DDSURFACEDESC ddsd; // DirectDraw 오브젝트생성 DirectDrawCreate(NULL, &g_pDD, NULL); // 실행 모드 지정 pDD->SetCooperativeLevel( hWnd, DDSCL_FULLSCREEN);

  39. DirectDraw DirectDraw 초기화// <이어서> // Primary surface 와 Backbuffer 1개 설정 ddsd.dwSize = sizeof(ddsd); ddsd.dwFlags = DDSD_CAPS | DDSD_BACKBUFFERCOUNT; ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_FLIP; ddsd.dwBackBufferCount = 1; g_pDD->CreateSurface(&ddsd, &g_pDDSPrimary, NULL); // Backbuffer 지정 g_pDDSPrimary->EnumAttachedSurfaces( &g_pDDSBack, EnumFunction); // Timer 설정 (Filp test) SetTimer(hWnd, TIMER_ID, TIMER_RATE, NULL);

  40. DirectDraw DirectDraw 사용// // Back buffer Clear DDBLTFX ddbltfx; memset(&ddbltfx, 0, sizeof(ddbltfx)); ddbltfx.dwSize = sizeof(ddbltfx); ddbltfx.dwFillColor = RGB(0,255,255); // Color g_pDDSBack->Blt( NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAITNOTBUSY, &ddbltfx); // Back buffer DC핸들 얻기 HDC hdc; g_pDDSBack->GetDC(&hdc) ; ... // Timer 동작등에 맞추어 수정 ...

  41. DirectDraw // DEMO

  42. 장치를위한 새로운 기능 지금 시작 하십시요! // • Visual Studio “Orcas” Beta 1 설치 및 구성 • .NET Compact Framework v3.5 Beta 1 • .NET Compact Framework v2 SP2 • Visual Studio 2005 SP2 다운로드 및 사용 http://www.microsoft.com/downloads/details.aspx?FamilyID=aea55f2f-07b5-4a8c-8a44-b4e1b196d5c0&displaylang=en • 세션PPT 및 예제 • www.PDAlab.org 자료실 (지금 다운로드 가능) • Microsoft 공식 웹사이트

  43. 참고// • 무료교육 • WindowsCE 프로그래밍 기초 • 20시간 http://www.educ.or.kr/edu/guide/guide_02_view.php?item_id=5 • Windows CE Application Programming Study • 참가문의 : 고재관 • Thanks to : 경품지원 • Axxen UNM 황성규대표 • Microsoft MVP Program Leader 오세영부장

  44. Quiz & Questions… -참여자경품증정

More Related