분류 전체보기
-
Tutorial 3: Initializing DirectX 11 연습문제Directx 11 with rastertek 2022. 9. 2. 16:48
To Do Exercises 1. Re-compile the code and run the program to ensure DirectX works, if not look at the steps from the first tutorial. Press the escape key to quit after the window displays. 2. Change the global in graphicsclass.h to full screen and re-compile/run. 3. Change the clear color in GraphicsClass::Render to yellow. 4. Write the video card name out to a text file. 1. 프로그램 다시 컴파일하고 실행해보기..
-
Tutorial 2: Creating a Framework and Window 연습문제Directx 11 with rastertek 2022. 9. 2. 16:27
참고로 Tutorial 1의 연습문제는 msdn을 살펴보는 것이기 때문에 Tutorial 2부터 시작. 원본 사이트 https://www.rastertek.com/tutindex.html Tutorial Index DirectX 11 Terrain Tutorials - Series 2 www.rastertek.com 번역 블로그 https://ppparkje.tistory.com/category/%EA%B0%95%EC%A2%8C%EB%B2%88%EC%97%AD/DirectX%2011 '강좌번역/DirectX 11' 카테고리의 글 목록 삽질로그 + 공부 ppparkje.tistory.com To Do Exercises 1. Change the FULL_SCREEN parameter to true in th..
-
3D 게임 1강. Direct3D 기본 환경 만들기Directx 9 with 나우캠퍼스 2022. 8. 25. 16:26
우선 Visual Studio에서 Win API 환경의 프레임워크를 생성해준다. 1. Win32 API 기본 코드 생성 1) 엑셀레이더 코드 제거 - 불필요한 변수인 hAccelTable변수를 제거하고 관련된 코드도 제거한다. HACCEL hAccelTable; - WinMain에 있는 GetMessage 루프문에서도 hAccelTable관련 내용을 지운다. 변경 전) while (GetMessage(&msg, nullptr, 0, 0)) { if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } } 변경 후) while (GetMessage(&msg, nullptr, ..
-
Directx 9 설정Directx 9 with 나우캠퍼스 2022. 8. 22. 15:41
1. Directx 9 설치하기 https://darkcatgame.tistory.com/6 Visual studio2017 DirectX9 SDK 세팅 세팅 환경 윈도우10 레드스톤5 Visual Studio 2017 DirectX9 SDK(June 2010) DirectX9 SDK(June 2010) 다운로드 : https://www.microsoft.com/en-us/download/details.aspx?id=6812 D.. darkcatgame.tistory.com 참고로, 현재 글 작성일. 2022-08-22 기준 Visual Studio 2022에 적용해도 문제없음. 참고로 플랫폼은 Win32으로 설정해야함. (x86 = Win32) 이거 때문에 작성자 개고생함. 2. MSDN 이용하기 함수..
-
Win32 API 11강. 유용한 함수(3) 충돌 함수Win32 API with 나우캠퍼스 2022. 8. 20. 16:39
3. 충돌 함수 PtInRect() ▩ 역할 - 지정한 위치가 사각형 안에 포함 되었는지를 판별 ▩ 함수 원형 BOOL PtInRect( [in] const RECT *lprc, [in] POINT pt ); *lprc : Rect 구조체 주소 pt : PT형 구조체(마우스를 다루는 구조체이다.) 포함 : 0 이외의 값 리턴 미포함 : 0 리턴 사용예시. WinProc case WM_LBUTTONDOWN: pt.x = LOWORD(lParam); pt.y = HIWORD(lParam); InvalidateRect(hWnd, NULL, TRUE); break; case WM_PAINT: { static POINT pt; RECT rect = { 30, 30, 130, 130 }; static char st..
-
Win32 API 11강. 유용한 함수(2) 그래픽 관련 함수Win32 API with 나우캠퍼스 2022. 8. 20. 14:30
2. 그래픽 관련 함수 CreateCompatibleBitmap() ▩ 역할 - 임의의 크기인 비트맵 생성 ▩ 함수 원형 HBITMAP CreateCompatibleBitmap( [in] HDC hdc, [in] int cx, [in] int cy ); hdc : 사용할 DC cx : 가로길이 cy : 세로길이 ▩ 클라이언트 영역이 200, 200 비트맵 크기 200, 200 메모리 DC는 흰색(PatBlt()) 메모리 DC에 사각형 출력 SetROP2() ▩ 역할 - 현재 출력 화면 + 펜 + 브러쉬, 더 자세한 내용은 MSDN문서 참조 https://docs.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-setrop2 SetROP2 function ..
-
Win32 API 11강. 유용한 함수(1) 윈도우 관련 함수Win32 API with 나우캠퍼스 2022. 8. 19. 23:36
목차 1. 윈도우 관련 함수 2. 그래픽 관련 함수 3. 충돌 체크 함수 1. 윈도우 관련 함수 AdjustWindowRect() ▩ 클라이언트 크기를 기준으로 전체 윈도우 크기 재계산 ▩ 함수의 원형 BOOL WINAPI AdjustWindowRect( [in, out] LPRECT lpRect, // RECT구조체의 주소 [in] DWORD dwStyle, // MSDN문서 참조 [in] BOOL bMenu // 메뉴표시 여부 ); ▩ 주의 사항 - 클라이언트(300, 300)일 때는 (0, 0, 299, 299)로 설정 GetClientRect() ▩ 역할 - 클라이언트 크기 조사 ▩ 함수의 원형 BOOL GetClientRect( [in] HWND hWnd, [out] LPRECT lpRect )..
-
Win32 API 10강. 컨트롤3 리스트 컨트롤Win32 API with 나우캠퍼스 2022. 8. 19. 15:36
목차 1. 리스트 컨트롤 2. 컬럼 다루기 2. 정리 1. List Control 개요 ▩ 리스트 박스 vs 리스트 컨트롤 ▩ 다양한 뷰 스타일 제공 ▩ 기능 up, 코드 up ▩ 다양한 매크로 함수 제공 msdn 문서 참조 뷰 스타일 속성 => View(보기)에서 설정 가능 이 중에서 Report 스타일이 많이 쓰임. Report List 컨트롤 구조 ▩ 구조 모든 요소의 시작 인덱스는 0이다. 포함 헤더 ▩ Commctrl.h ▩ Windowsx.h 컬럼 생성과 문자열 등록 ▩ 매크로 함수 int ListView_InsertColumn( HWND hwnd, int iCol, const LPLVCOLUMN pcol) hwnd : 윈도우 핸들( GetDlgItem() 사용 ) iCol : 컬럼 인덱스 p..