응애맘마조

221123 강의 본문

공부/2D강의

221123 강의

TH.Wert 2022. 11. 24. 01:09

DirectX 2D에 들어가기 앞서 오늘은 설정만 하다가 주로 끝났습니다. 실무에서는 이미 만들어져 있거나 쓰이지 않지만 공부하는 입장에서는 반드시 필요하기에 중요하고 필요한 부분만 적어두겠습니다.

먼저 오늘은 Imgui에 대해서 배웠습니다.
ImGui에 대해 간단하게 설명하자면 그래픽 값을 바꿔주는 인터페이스라고 볼 수 있습니다.

전에 만들었던 플래피 버드(Flappy Bird)를 가지고 어떤 값을 바꿀지는 아마 내일 듣게 될 것 같습니다.

코드 수정 부분은 stdafx.h에서 Framework.h로 바꾼 부분의 include 부분이 많은 부분이 추가되었습니다.

#pragma once

#include <Windows.h>
#include <iostream>
#include <time.h>
#include <stdlib.h>
#include <string>
#include <vector>
#include <unordered_map>
#include <assert.h>

using namespace std;

// DirectX
#include <d3dcompiler.h>
#include <d3d11.h>
#include <D3DX10math.h>
#include <D3DX11async.h>

#pragma comment(lib, "dxgi.lib")
#pragma comment(lib, "d3d11.lib")
#pragma comment(lib, "d3dx11.lib")
#pragma comment(lib, "d3dx10.lib")
#pragma comment(lib, "d3dcompiler.lib")

/* -------------------------------------------- */
// ImGui
#include "ImGui/imgui.h"
#include "ImGui/imgui_internal.h"
#include "ImGui/imgui_impl_dx11.h"
#include "ImGui/imgui_impl_win32.h"
#pragma comment (lib, "ImGui/ImGui.lib")

/* -------------------------------------------- */
// Framework
#include "Systems/Window.h"

#include "Utilities/SingletonBase.h"

#include "Systems/Keyboard.h"
#include "Systems/Mouse.h"
#include "Systems/Timer.h"
/* -------------------------------------------- */
// typedef
typedef D3DXVECTOR3 Vector3;
typedef D3DXVECTOR2 Vector2;
typedef D3DXMATRIX Matrix;
typedef D3DXCOLOR Color;
typedef UINT uint;
/* -------------------------------------------- */
// define
#define CHECK(p) assert(SUCCEEDED(p))
#define SAFE_DELETE(p) { if(p) {delete(p); (p) = nullptr;} }
#define SAFE_DELETE_ARRAY(p) { if(p) {delete[](p); (p) = nullptr;} }
#define SAFE_RELEASE(p) { if(p) {(p)->Release(); (p) = nullptr;} }

#define WinMaxWidth 1280
#define WinMaxHeight 720
/* -------------------------------------------- */
// Variable
extern HWND handle;

include 순서는 DirectX - ImGui - Framework - typedef - define - Variable 순서입니다.
따로 순서를 말해주신 만큼 이유가 있을 것이라고 생각합니다.

아마 내일쯤 구현을 시킬 수 있을 것 같습니다. 오늘은 짧지만 내일은 완성이 되거나 직전까지 갈 수 있을 것 같습니다.

읽어주셔서 감사합니다.

'공부 > 2D강의' 카테고리의 다른 글

221128 강의  (0) 2022.11.29
221125 강의  (0) 2022.11.26
221124 강의  (0) 2022.11.25
221122 강의  (0) 2022.11.23
221114 ~ 221121 강의  (0) 2022.11.23
Comments