본문 바로가기

전체 글

230512 자체 엔진 개발 : DrawRotated Quad https://github.com/ohbumjun/GameEngineTutorial/commit/df6a2040d19c31bca017df9971f0ee6b272cb56e feat(Enginne) Draw Rotated Quad · ohbumjun/GameEngineTutorial@df6a204Show file tree Showing 5 changed files with 86 additions and 7 deletions.github.com 사각형을 그릴 때 rotation 도 적용하고자 한다.이를 위해서는 각 사각형의 transform 관련 uniform variable 을 계산할 때rotation 도 반영해서 계산해주면 된다. void Renderer2D::DrawRotatedQuad(const glm.. 더보기
230510 자체 엔진 개발 : Visual Profiling https://github.com/ohbumjun/GameEngineTutorial/commit/b3c16ce7fa083209accd7c4a5815859c38b931bd  이와 같이 각각의 함수가 얼만큼의 시간을 소요하는지 Visual 적으로 Profiling 하는 System 을 마련해보고자 한다. class InstrumentationTimer { public: InstrumentationTimer(const char* name) : m_Name(name), m_Stopped(false) { // 시간 간격을 주기 위해 2번 호출 m_StartTimepoint = std::chrono::high_res.. 더보기
230508 자체 엔진 개발 : Renderer2D https://github.com/ohbumjun/GameEngineTutorial/commit/e1bf01809231e1ae4abfb9bdbf54a4169085421d feat(Engine) Create basic layout for Renderer2D Class · ohbumjun/GameEngineTutorial@e1bf018Show file tree Showing 10 changed files with 141 additions and 47 deletions.github.com void SandBox2D::OnUpdate(Hazel::Timestep ts){ HZ_PROFILE_FUNCTION(); // Update { m_CameraController.OnUpdate(ts); } // Rend.. 더보기
230506 자체 엔진 개발 : Resize https://github.com/ohbumjun/GameEngineTutorial/commit/a7c58287c4edf59969c538739bd67dcc80039f5c Window 창을 Resize 한다는 것은 무슨 의미일까 ? 우리가 렌더하는 픽셀이 Resize 에 맞게, 위치가 조정되어야 한다.즉, Resize 하면 각 픽셀이 렌더링 되는 위치도 조정되어야 한다는 것이다.자. 다시 말하면, 우리가 렌더링할 픽셀들이 모여있는 메모리 버퍼가 있다.그리고 그 메모리 버퍼의 사이즈는, 우리가 렌더링하는 창의 크기에 맞게 조정되어야 한다.(관련 함수) 즉, GraphicAPI 에게 Rendering Area 가 변경되었다는 것을 알려줘야 한다는 것이다.OpenGL 의 경우 glViewPort 함수를 통해 가.. 더보기
230504 Hazel GameEngine : CameraController , Zoom 적용하기 https://github.com/ohbumjun/GameEngineTutorial/commit/13536d609a2d0fceed2662615df37291def2e330 해당 클래스의 역할은, Camera 를 조절할 수 있는 다양성 및 변동성을 Client 단에 넘기기 위함이다. 실제 Camera Class 가 가져야할 Core 정보들은 Projection, View Matrix 등의 요소들이다. 그런데 경우에 따라 Camera 의 Pos, Rot 을 조절해서 각 게임의 특성에 맞게 Customizing 할 필요가 있을 수 있다. 따라서 이를 위해 Camera 를 감싼, 일종의 Wrapper 로서 Camera Controller Class 가 존재한다고 생각하면 된다. Zoom 적용하기 bool Orth.. 더보기
230503 자체 엔진 개발 : Shader Asset File System https://github.com/ohbumjun/GameEngineTutorial/tree/0422ce9729ceefe6010ed09b90444ea2884fff44 GitHub - ohbumjun/GameEngineTutorialContribute to ohbumjun/GameEngineTutorial development by creating an account on GitHub.github.com  https://www.youtube.com/watch?v=vunANt-I3pk&list=PLkaVDtEaS2nYqfACk9Cx4JgP6nW0kY5o-&index=2  과정이제 glsl 이라는 파일에 내가 사용할 Shader Code 를 작성-> 하드웨어에 존재하는 glsl 파일로부터 Shader Code.. 더보기
230502 Hazel GameEngine : Texture Blending https://github.com/ohbumjun/GameEngineTutorial/commit/0099fe921d491702a2ecff3e2915ab33200c9cc2 블랜딩 이란 ? 반투명 혹은 투명 물체를 Rendering 할 때 어떻게 처리할 것인가에 대한 것이다. 즉, 이미 프레임 버퍼에 렌더링된 색상 + 현재 렌더링 하는 색상. OpenGLRendererAPI::Init void OpenGLRendererAPI::Init() { // Blending 허용 glEnable(GL_BLEND); // Blending Function 정의 ex) glBlendFunc(src, dest) // - src : src RGBA 계산 방법 (기본 : GL_ONE == 현재 그리는 색상 그대로 가져감) // .. 더보기
230501 자체 엔진 개발 : Texture System https://github.com/ohbumjun/GameEngineTutorial/commit/78b8a6bc619757867e8fd1b1c0997972fe40eccb feat(Engine) Create Texture, Texture Sub Classes · ohbumjun/GameEngineTutorial@78b8a6bShow file tree Showing 11 changed files with 8,415 additions and 91 deletions.github.com https://www.youtube.com/watch?v=gtuvxBaefHs&list=PLkaVDtEaS2nYqfACk9Cx4JgP6nW0kY5o-&index=4  Texture 클래스 구성Texture - Texture2D .. 더보기