46

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

  • Upload
    tymon

  • View
    110

  • Download
    2

Embed Size (px)

DESCRIPTION

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

Citation preview

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

{Windows Mobile 6 Application Windows Mobile 6 Application TrackTrackWindows Mobile 6 Windows Mobile 6 에서의 에서의 DirectX DirectX 그래픽 및 게임 개발그래픽 및 게임 개발고재관고재관 [email protected]@korea.comMicrosoft Mobile Devices MVPMicrosoft Mobile Devices MVPhttp://www.PDAlab.orghttp://www.PDAlab.org

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

시작하기 전에시작하기 전에• 주로 다루는 기술

• 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/ …

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

주요내용주요내용 //• 모바일 컨텐츠• Microsoft Visual Studio 2005 &

Microsoft Windows Mobile 6 SDK• Direct Show & Filter• Direct Draw• 데모 및 프로그램 코드 실행• 질문

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

MVPMVP // • Microsoft MVP Award Program

___________________• 우수한 기술력을 바탕으로 기술공유를 위해 노력한 자• 분기별 선발 , 선발 후 1 년간 자격유지 , 1 년 후 다시 심사

• 혜택• MS 직원을 제외한 최고의 접근 보안등급• 운영체제 소스접근 (2003, XP, Vista, Windows CE…)• MSDN Premium Subscription• Microsoft 본사 Global Summit 초대• Microsoft Product Group & 기술팀과 교류• MVP Program Leader 를 통한 다양한 지원등 …

• MVP Leader : 오세영부장 [email protected]

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

모바일 라이프모바일 라이프 //

문서 습관적 기능

업무용 프로그램

보안

커뮤니케이션

미디어

오락

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

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

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

디바이스 형태디바이스 형태 //

휴대폰 연결형휴대폰 연결형.NET CF 2.0, SQL Compact Edition .NET CF 2.0, SQL Compact Edition 기본 기본 탑재탑재DirectShow & DirectDrawDirectShow & DirectDrawPortable codePortable code

• 터치스크린터치스크린• 큰 해상도큰 해상도 QVGA(240x320)QVGA(240x320) VGA(480x640)VGA(480x640) Square(320x320Square(320x320))• 화면회전화면회전 • 고성능 프로세서고성능 프로세서

ProfessionalProfessional• 키입력키입력• 일반 해상도일반 해상도 QCIF(176x220)QCIF(176x220) QVGA(240x320)QVGA(240x320) … …• 화면회전화면회전•비교적 낮은 프로세서비교적 낮은 프로세서

StandardStandard

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

모바일 켄텐츠 개발모바일 켄텐츠 개발 //

응용프로그램에 적용응용프로그램에 적용DirectDraw, DirectDraw, GetSystemMetricGetSystemMetricss

SNAPISNAPI상태 및 통지 상태 및 통지 APIAPI

키키 매핑적용매핑적용GXOpenInput()GXOpenInput()GXGetDefaultKeyGXGetDefaultKeys()s()

기능기능 솔루션솔루션

확장된 화면확장된 화면

전화연결전화연결

밧데리밧데리

일관된 키처리일관된 키처리

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

게임 콘텐츠 형태게임 콘텐츠 형태 //일반형일반형

실행실행 //중지중지 //재실행 기능재실행 기능일반적으로 일반적으로 Immersive Immersive 환경환경대다수의 모바일 게임 컨텐츠형태대다수의 모바일 게임 컨텐츠형태

연결형연결형멀티플레이어 게임멀티플레이어 게임턴제턴제 (turn-based) (turn-based) 와 실시간 기반와 실시간 기반사용료 수입증가 요구사용료 수입증가 요구블루투스 기능기반의 디자인블루투스 기능기반의 디자인

역동형역동형고급 그래픽과 사운드고급 그래픽과 사운드Immersive Immersive 환경과 게임플레이환경과 게임플레이하드웨어기능 향상 요구하드웨어기능 향상 요구

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

데스크탑과 다른점데스크탑과 다른점 //• 데스크탑과 다른 디자인 및 컨텐츠 형태• 중요 고려사항들

• 작은 화면과 해상도• 서로 다른 입력 방식

• 터치스크린 , QWERTY 키보드 , 3 단 탭 , D 패드• 게임타이틀의 단순함

• 100 시간 까지 작동되는 게임 부재• ‘ 일반형’게임이 주종• 버스안 , 기다리는 시간에 사용

• 모바일로 통합체험 • 휴대폰 통신 기능 or 위치에 기반한 서비스

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

개발도구개발도구 //• 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 기반 에물레이터 포함

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

Windows Mobile 6 SDKWindows Mobile 6 SDK //• 폰 에물레이터

• 전화수신• 부재중전화• 문자메시지 (SMS)

• 새롭고 빨라진 에물레이터 기능• 전원상태 변경기능• 밧데리상태 변경기능• 새로운 해상도 지원 (320x320 포함 )

• FakeGPS 에물레이터• http://www.microsoft.com/

windowsmobile/

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

Smart Device ProjectSmart Device Project //

DEMO

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

DirectDrawDirectDraw DirectSoundDirectSound

DirectInputDirectInput Direct3DDirect3DImediateImediate

DirectShowDirectShow DirectPlayDirectPlay

DirectDirectAnimationAnimation

Direct3DDirect3DRetained ModeRetained Mode

Foundation LayerFoundation Layer

Media LayerMedia Layer

• WindG/WaveMix 실패• Game SDK• 구성

• DirectInput• DirectDraw• Direct3D• DirectPlay• DirectSound• Direct3DSound• DirectMusic• DirectShow• DirectAnimation• DirectSetup

DirectXDirectX ////

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

DirectX in Windows DirectX in Windows MobileMobile //• 다년간의 데스크탑의 응용기술• 모바일 디바이스 지원 시기

• Windows Mobile 5.0 ~• Windows CE .NET 4.x ~

• 데스크탑의 일관된 DirectX 기술 모델• 모바일 디바이스를 위해 기술적으로 재 디자인

DirectXDirectX

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

DirectX in Windows DirectX in Windows MobileMobile //• DirectShow (DShow)

• 미디어플레이 / 캡쳐 기능

• DirectDraw (DDraw)• 2 차원 그래픽 API• SW & HW 플렛폼 지원을 위한 디자인• 기존의 Windows Mobile 2D 기술 과 병합

• Direct3D Mobile (D3DM)• 모바일 컨텐츠 개발자를 위해 3 차원 그래픽 API 디자인• 플렛폼 기능 향상과 Software 작업방법지원

• 기반기술은 데스크탑의 기술과 API 적용

DirectXDirectX

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

사용이유사용이유 //• 개발자 확대

• 데스크탑 개발자가 빠르고 쉽게 적응

• 넓은 정보기반• 데스크탑 개발기술과 단일화• 다년간 DirectX 의 축적정보와 경험• 다른 플렛폼간의 유연한 동작

• 컨텐츠 이용도• DirectX 기반으로 구축되어온 컨텐츠들• 모바일 디바이스에는 적당한 기술

DirectXDirectX

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

플렛폼 일관성플렛폼 일관성 //• 모든 디바이스에 일관된 지원• Windows Mobile 은 DirectX 그래픽

반드시 지원• Windows Mobile 5.0 이상의 모든 디바이스• DirectShow, DirectDraw , Direct3DM 반드시

포함• 개발자에게 Target 플렛폼의 호환성 보장• 드라이버 지원 기능 노출

• 동일한 최적의 API 사용

DirectXDirectX

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

구조구조 ////• COM 인터페이스

• DllRegisterServer : 레지스트리에 등록• DllUnregisterServer : 레지스트리에 해제• DllGetClassObject : 호출시 연결• DllCanUnloadNow : 호출해제 및 연결해제• IUnknown Template Base • HKEY_CLASSES_ROOT\CLSID\{CLSID}

• QueryInterface• 형태를 알 수 없는 COM 으로 부터 객체를 추출• UUID 형태로 사용 ( 레지스트리에 등록됨 )

DirectXDirectX

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

DirectShowDirectShow //• 멀티미디어 API 인 DirectX 의 일부• 주요기능

• 고품질의 비디오 /오디오 재생과 녹음이 가능• 다양한 형식의 미디어 지원• 재생 , 캡쳐 , 변환 기능 지원

• 구조• COM 기반의 Control• WDM(Windows Driver Model) 기반 캡쳐기능

지원• Code Name Quartz Active Movie

1.0 DirectShow 2.0 …

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

응용 프로그램응용 프로그램 //• 플레이어

• MP3 플레이어• 동영상 플레이어

• 유틸리티 • Video Editing Application• AVI to ASF ConvertDVD Players• Video Editing Application• AVI to ASF Converts

• 카메라• 디지털 사진 촬영• 디지털 동영상 촬영

DirectShowDirectShow

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

기본 인터페이스 기본 인터페이스 //• COM 인터페이스• IGraphBuilder : 필터그래프 (Filter

Graphs) 생성• IMediaControl : 미디어 플레이제어 ( 재생 ,

중지… )• IMediaEventEx : 이벤트 통지• IVideoWindow : 비디오윈도우• IBasicAudio : 오디오 볼륨 및 밸런스 제어• IBasicVideo : 비디오 출력정보제공 및 제어• IMediaSeeking : 미디어 위치 이동

DirectShowDirectShow

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

확장확장 인터페이스인터페이스 ////•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

DirectShowDirectShow

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

실행과정실행과정 //• Filter Graphs

• DirectShow 에서 Aceess 가능한 형태로 기본적인 가공작업 수행

• 동작• 미디어 파일 읽기 • 미디어 파일로 부터 비디오와 오디오 신호 분리• 비디오 , 오디오 신호 분석 및 복원• 하드웨어로 비디오 , 오디오 신호 출력

• 필터 (Filter)• DirectShow 의 모든 기능은 Filter 기능을 연결해 작동

DirectShowDirectShow

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

실행과정실행과정 //

Transform FilterTransform Filter(( 변환필터변환필터 ))

Render FilterRender Filter(( 랜더필터랜더필터 ))

Source FilterSource Filter(( 소스필터소스필터 ))

추출추출 분배분배 비디오비디오

오디오오디오

FileFileURLURLH/WH/W

해석해석

해석해석

OUTOUT ININ

ININ

ININ VideoVideo

AudioAudio

ININ OUTOUTININ

OUTOUTININ

Ex)Ex)FileFileCamcordCamcord

erer카메라모듈카메라모듈StreaminStreamin

gg……

Ex)Ex)영상조절영상조절영상영상 //음향효과음향효과……

Ex)Ex)화면출력화면출력동영상저장동영상저장정지화상저장정지화상저장……

DirectShowDirectShow

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

구조구조 //

DirectShowDirectShow

TransformTransformFilterFilter

ApplicationApplication

Filter Graph ManagerFilter Graph ManagerLegacyLegacy

VCM/ACMVCM/ACMCodecCodec

MPEG2MPEG2DecoderDecoder Sound CardSound Card Video CardVideo Card

DirectSoundDirectSound DirectDrawDirectDraw

Legacy VFWLegacy VFWCapture DeviceCapture Device

WDMWDMCapture DeviceCapture Device

Kernal Kernal StreamingStreaming

File SystemFile System

RenderRenderFilterFilter

File SystemFile System

SourceSourceFilterFilter

CommandCommandEventEvent

DirectShowDirectShow

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

• Base Class• %WINCEROOT%\PUBLIC\DIRECTX\SDK\SAMPLES\

DSHOW\BASECLASSES• BaseClass.lib 로 생성

• 프로젝트 생성• COM 프로젝트로 생성• COM 공용함수 (DllRegisterServer,

DllUnregisterServer)• COM 인터페이스 정보 • CLSID• Base Class 기반의 User Class 생성• 사용가 필요한 처리 작업 추가

Filter Filter 제작제작 ////DirectShowDirectShow

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

Base ClassBase Class ////• CAggDirectDraw• CAggDrawSurface• CAMEvent• CAMMsgEvent• CAMSchedule• CAMThread• CAutoLock• CBaseAllocator• CBaseBasicVideo• CBaseControlVideo• CBaseDispatch• CBaseFilter• CBaseInputPin• CBaseList• CBaseMediaFilter• CBaseObject• CBaseOutputPin• CBasePin

• CBaseReferenceClock• CBaseRenderer• CBaseStreamControl• CBaseVideoRenderer• CBaseWindow• CBasicAudio• CCritSec• CDisp• CDispBasic• CEnumMediaTypes• CEnumPins• CFactoryTemplate• CGenericList• CGuidNameList• CLoadDirectDraw• CMediaControl• CMediaEvent• CMediaPosition

• CMemAllocator• CMsg• CMsgThread• COARefTime• COutputQueue• CPosPassThru• CPullPin• CQueue• CRefTime• CRendererInputPin• CRendererPosPassThr

u• CSource• CSourcePosition• CSourceSeeking• CSourceStream• CSystemClock• CTransformFilter• CTransformInputPin• CTransformOutputPin• CTransInPlaceFilter• CTransInPlaceInputPi

n• CTransInPlaceOutput

Pin• CUnknown• CVideoTransformFilte

r• FOURCCMap

• CMediaSample• CMediaType

DirectShowDirectShow

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

Base FilterBase Filter ////DirectShowDirectShow

• Source Filter• CSource Class

• Transform Filter• CTransformFilter Class

• Render Filter• CBaseRenderer Class

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

Interface Interface 구성 구성 ClassClass ////DirectShowDirectShow

• IBasicAudio• CBasicAudio

• IBasicVideo• CBaseBasicVideo , CBaseControlVideo

• IMediaSeeking• CPosPassThru, CSourceSeeking

• IMediaControl• CMediaControl

• IMediaEvent• CMediaEvent

• IVideoWindow• CBaseControlWindow, CBaseVideoWindow.

& …

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

중점사항중점사항 //// • Add Filter

• 호출되는 필터의 교섭과정 확인 필요• 교섭메소드주의

• CheckInputType• CheckMediaType

• Pin특성 파악• Transform Filter Pin 간 연결 확인 , Render Filter

Pin 사용• QueryInterface

• QueryInterface 를 통해 필요한 Template 호출• IBaseFilter 기반

• IBaseFilter 를 통해 User Filter 접근

DirectShowDirectShow

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

DirectShow & FilterDirectShow & Filter //

DEMO

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

CE CE 그래픽 아키텍쳐그래픽 아키텍쳐 //

DirectDrawDirectDrawGDIGDI

Direct 3D Direct 3D MobileMobile

Device Driver Interface Layer (DDI)Device Driver Interface Layer (DDI)

GDIGDI DirectDraDirectDraww D3DMD3DM

Display Adapter HardwareDisplay Adapter Hardware

GAPIGAPI

DirectDrawDirectDraw

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

GAPI GAPI //• Microsoft GAPI(Game API)

• Windows Mobile 5.0 전 버전의 게임개발지원 API

• 가속기 없이 , 프레임 버퍼에 직접 접근• 다른 해상도의 디바이스에 유연하게 대처불가

• GAPI 는 요구하는 기능에 비해 저효율

• DirectDraw 로 이동• 하드웨어 가속기 사용가능 (GAPI 와 비슷하지도 않음 )• 다른 해상도의 디바이스 지원• 2D 처리의 기능 우선

DirectDrawDirectDraw

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

DirectDraw MobileDirectDraw Mobile //• 2D API 로 디자인• SW 와 HW 디스플레이 시스템 기능 향상• Software 그래픽처리 (GDI) 통합

• 2D 그래픽 아키텍쳐 통합• 기반기술의 추가• 기능의 일관성

• 중요 응용기능• 2D & 고성능 게임• 미디어 플레이어 ( 예 : 동영상플레이어 )

DirectDrawDirectDraw

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

DirectDraw DirectDraw 아키텍쳐아키텍쳐 //DirectDrawDirectDraw

DirectDrawDirectDraw

Device Driver Device Driver InterfaceInterface

(DDI)(DDI)

Display Adapter HardwareDisplay Adapter Hardware

Graphics Device Graphics Device InterfaceInterface

(GDI)(GDI)

HardwareHardware Abstraction Abstraction LayerLayer(HAL)(HAL)

Hardware Emulation Hardware Emulation Layer (HEL)Layer (HEL)

WindowsWindows Mobile Mobile 응용프로그램응용프로그램

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

Flipping & Blitting Flipping & Blitting //DirectDrawDirectDraw

Back BufferBack Buffer

Off Screen 1Off Screen 1

Primary Primary SurfaceSurface

Off Screen 2Off Screen 2

Off Screen 3Off Screen 3

Off Screen 4Off Screen 4

배경 1 이미지

배경 2 이미지

캐릭터 1 이미지

캐릭터 2 이미지

Off Screen Off Screen AllAll 단일 화면 처리

Flipping

Blittingor

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

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);

DirectDrawDirectDraw

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

DirectDraw DirectDraw 초기화초기화 //< 이어서 >

// Primary surface 와 Back buffer 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);

// Back buffer 지정g_pDDSPrimary->EnumAttachedSurfaces( &g_pDDSBack,

EnumFunction);// Timer 설정 (Filp test)SetTimer(hWnd, TIMER_ID, TIMER_RATE, NULL);

DirectDrawDirectDraw

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

DirectDraw DirectDraw 사용사용 //// Back buffer ClearDDBLTFX 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 동작등에 맞추어 수정...

DirectDrawDirectDraw

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

DirectDraw DirectDraw //

DEMO

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

지금 시작 하십시요지금 시작 하십시요 ! ! //장치를장치를 위한 새로운 기능위한 새로운 기능

• 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 공식 웹사이트

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

참고참고 //• 무료교육

• Windows CE 프로그래밍 기초• 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 오세영부장

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

Quiz & Questions…

-참여자 경품증정

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