浏览代码

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

Jeffery Myers 1 年之前
父节点
当前提交
ad3a1243eb
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      examples/editor.cpp

+ 5 - 0
examples/editor.cpp

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