본문 바로가기

게임엔진/크로스플랫폼 : HazelEngine

230820 Hazel GameEngine : SubTexture + Atlas 더보기
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.. 더보기
230518 자체 엔진 개발 : Batch Rendering (Rotated Texture) https://github.com/ohbumjun/GameEngineTutorial/commit/83d0c39c858c040523c6ce84aed6511c30ab96a7 이번에는 Texture 를 BatchRendering 방식으로 그리되, Texture 또한 Rotate 시켜주고 싶다.원리는 간단하다.cpu 측에서 transform 계산해서 그 정보를 GPU 측에 넘겨주면 된다. struct Renderer2DData{ // mesh local pos glm::vec4 QuadVertexPositions[4];};// Scene Initializes_Data.QuadVertexPositions[0] = { -0.5f, -0.5f, 0.f, 1.f };s_Data.QuadVertexPositi.. 더보기
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.. 더보기
230514 자체 엔진 개발 : Batch Rendering https://github.com/ohbumjun/GameEngineTutorial/commit/1a20054f6c80599bd41c8c12bfe3a11cbdcf1a8a feat(Engine) Draw Normal Quad With Batch Rendering · ohbumjun/GameEngineTutorial@1a20054ohbumjun committed Jun 4, 2023github.com  struct Renderer2DData { static const uint32_t MaxQuads = 10000; static const uint32_t MaxVertices = MaxQuads * 4; static const uint32_t MaxIndices = MaxQuads * 6; st.. 더보기
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.. 더보기