Browse Source

Merge branch 'main' of github.com:raylib-extras/rlImGui

Jeffery Myers 1 year ago
parent
commit
ad3a1243eb
1 changed files with 5 additions and 0 deletions
  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();
 	}
 	}