본문 바로가기

HazelGameEngine

230520 자체 엔진 개발 : Stats StartNewBatch- BeginScene 함수 내부에 다시 DrawCall 관련 reset 코드가 들어있는데문제는 인자로 카메라를 받아야 한다는 것이었다. 하지만 TextureShade 나 Matrix 를 Bind 를 다시 할 필요는 없으므로필요한 부분만 StartNewBatch 라는 별도의 함수로 만든다, https://github.com/ohbumjun/GameEngineTutorial/commit/2b5ab7bfe09a17f20df0282d5603753891d36922 feat(Engine) Add Stats related code to Renderer2D class · ohbumjun/GameEngineTutorial@2b5ab7bohbumjun committed Jun 8, 2023gith.. 더보기
230516 자체 엔진 개발 : Batch Rendering (Texture) https://github.com/ohbumjun/GameEngineTutorial/commit/b7eb5cc28c61701e257141b5725f3d0121696372 feat(Engine) Batch Rendering Applied to Texture also · ohbumjun/GameEngineTutorial@b7eb5ccohbumjun committed Jun 7, 2023github.com각 GPU 마다, 최대 한번에 Bind 할 수 있는 Texture Slot 및 Texture 개수가 정해져 있다.보통 Desktop 은 32개의 Slot 이 존재한다.즉, 0 ~ 31 번째 index 까지 Slot 에 Texture 를 Bind 할 수 있다. glBindTextureUnit(slot, m_Re.. 더보기
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.. 더보기
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.. 더보기
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 과정이제 glsl 이라는 파일에 내가 사용할 Shader Code 를 작성-> 하드웨어에 존재하는 glsl 파일로부터 Shader Code Load-> Shader Code 를 Vertex, Fragment Shader 코드를 분리해서, 각각을 OpenGL 에 매핑시키기 쉐이더 코드#type vertex#.. 더보기
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 Texture 클래스 구성Texture - Texture2D - OpenGLTexture2D - VulkanTexture2D - Texture3D - OpenGLTexture3D ..... 더보기
230430 자체 엔진 개발 : Camera system 참고 : http://egloos.zum.com/mataeoh/v/7295230 OpenGL vs DirectX이문서도 꼭 읽어보자! MatricesTips.pdf 1. 좌표계 OpenGL : 오른손 좌표계 DirectX : 왼손 좌표계 2. 행렬 ( Matrix ) https://msdn.microsoft.com/en-us/library/windows/desktop/bb509634(v=vs.85).aspx row major인지 coulmn majoregloos.zum.com World , View Matrix 행렬 계산 void OrthographicCamera::RecalculateViewMatrix(){ glm::mat4 transform = glm::translate(glm::mat4(1.f.. 더보기