소스 검색

add comment that we are centering the image on 0,0 for the image editor

Jeff Myers 1 년 전
부모
커밋
557147b495
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      examples/editor.cpp

+ 5 - 0
examples/editor.cpp

@@ -197,8 +197,13 @@ public:
 	{
 	{
 		BeginTextureMode(ViewTexture);
 		BeginTextureMode(ViewTexture);
 		ClearBackground(BLUE);
 		ClearBackground(BLUE);
+
+		// camera with our view offset with a world origin of 0,0
 		BeginMode2D(Camera);
 		BeginMode2D(Camera);
+
+		// center the image at 0,0
 		DrawTexture(ImageTexture, ImageTexture.width / -2, ImageTexture.height / -2, WHITE);
 		DrawTexture(ImageTexture, ImageTexture.width / -2, ImageTexture.height / -2, WHITE);
+
 		EndMode2D();
 		EndMode2D();
 		EndTextureMode();
 		EndTextureMode();
 	}
 	}