소스 검색

ProfilerOverlay now renders on the proper viewport
Fixed a bug where render target had assigned invalid height

Marko Pintera 12 년 전
부모
커밋
deeea032ad
3개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 1
      CamelotClient/Source/BsMainEditorWindow.cpp
  2. 1 1
      CamelotCore/Source/CmRenderTexture.cpp
  3. 2 2
      TODO.txt

+ 1 - 1
CamelotClient/Source/BsMainEditorWindow.cpp

@@ -71,7 +71,7 @@ namespace BansheeEditor
 		AABox dbgBox(Vector3(-300, -200, 1000), Vector3(300, 300, 1500));
 		DrawHelper3D::instance().drawAABox(sceneCamera, dbgBox, Color::Green, 250.0f);
 
-		ProfilerOverlay::startUp(cm_new<ProfilerOverlay>(mCamera->getViewport(), renderWindow));
+		ProfilerOverlay::startUp(cm_new<ProfilerOverlay>(sceneCamera->getViewport(), renderWindow));
 		ProfilerOverlay::instance().show();
 	}
 

+ 1 - 1
CamelotCore/Source/CmRenderTexture.cpp

@@ -76,7 +76,7 @@ namespace CamelotFramework
 				desc.colorSurface.face, desc.colorSurface.numFaces, GVU_RENDERTARGET);
 
 			mWidth = texture->getWidth();
-			mHeight = texture->getWidth();
+			mHeight = texture->getHeight();
 			mColorDepth = CamelotFramework::PixelUtil::getNumElemBits(texture->getFormat());
 			mActive = true;
 			mHwGamma = texture->isHardwareGammaEnabled();

+ 2 - 2
TODO.txt

@@ -11,8 +11,8 @@ LONGTERM TODO:
 PROFILER:
  TODO: Profiler is right now including windows.h. I need to work around that but don't feel like bothering with it atm
   - Easy way would be to move CPUProfiler outside of Utility and into Core
-ProfilerOverlay::update isn't being called
- - Does editor need a main loop as well?
+Fix GUIWidget so it can render to a regular render target, not just render window
+Generating a report only generates it on the active thread. I need a way to generate profiler reports on the render thread as well. Maybe extend CoreThreadAccessor?
 
 I still re-create GUIWidget mesh every frame instead of just updating it.