Bläddra i källkod

Merge branch 'master' of cane:bkaradzic/bgfx

Branimir Karadžić 11 år sedan
förälder
incheckning
a7756b8d7a
3 ändrade filer med 8 tillägg och 8 borttagningar
  1. 2 2
      3rdparty/ocornut-imgui/imgui.cpp
  2. 2 2
      examples/24-nbody/nbody.cpp
  3. 4 4
      src/renderer_d3d11.cpp

+ 2 - 2
3rdparty/ocornut-imgui/imgui.cpp

@@ -1851,7 +1851,7 @@ static void LogText(const ImVec2& ref_pos, const char* text, const char* text_en
     if (g.LogStartDepth > window->DC.TreeDepth)  // Re-adjust padding if we have popped out of our starting depth
     if (g.LogStartDepth > window->DC.TreeDepth)  // Re-adjust padding if we have popped out of our starting depth
         g.LogStartDepth = window->DC.TreeDepth;
         g.LogStartDepth = window->DC.TreeDepth;
     const int tree_depth = (window->DC.TreeDepth - g.LogStartDepth);
     const int tree_depth = (window->DC.TreeDepth - g.LogStartDepth);
-    while (true)
+    for (;;)
     {
     {
         // Split the string. Each new line (after a '\n') is followed by spacing corresponding to the current depth of our log entry.
         // Split the string. Each new line (after a '\n') is followed by spacing corresponding to the current depth of our log entry.
         const char* line_end = text_remaining;
         const char* line_end = text_remaining;
@@ -7724,7 +7724,7 @@ struct ExampleAppConsole
                 {
                 {
                     // Multiple matches. Complete as much as we can, so inputing "C" will complete to "CL" and display "CLEAR" and "CLASSIFY"
                     // Multiple matches. Complete as much as we can, so inputing "C" will complete to "CL" and display "CLEAR" and "CLASSIFY"
                     int match_len = (int)(word_end - word_start);
                     int match_len = (int)(word_end - word_start);
-                    while (true)
+                    for (;;)
                     {
                     {
                         int c = 0;
                         int c = 0;
                         bool all_candidates_matches = true;
                         bool all_candidates_matches = true;

+ 2 - 2
examples/24-nbody/nbody.cpp

@@ -246,8 +246,8 @@ int _main_(int /*_argc*/, char** /*_argv*/)
 		bgfx::setUniform(u_params, &u_paramsData, 3);
 		bgfx::setUniform(u_params, &u_paramsData, 3);
 		bgfx::dispatch(0, updateInstancesProgram, u_paramsData.dispatchSize, 1, 1);
 		bgfx::dispatch(0, updateInstancesProgram, u_paramsData.dispatchSize, 1, 1);
 
 
-		bx::swap(currPositionBuffer0, currPositionBuffer1);
-		bx::swap(prevPositionBuffer0, prevPositionBuffer1);
+		bx::xchg(currPositionBuffer0, currPositionBuffer1);
+		bx::xchg(prevPositionBuffer0, prevPositionBuffer1);
 
 
 		float view[16];
 		float view[16];
 
 

+ 4 - 4
src/renderer_d3d11.cpp

@@ -1852,10 +1852,10 @@ namespace bgfx
 					texture.D3D11.pSRView            = m_ovrRT.m_srv;
 					texture.D3D11.pSRView            = m_ovrRT.m_srv;
 					m_ovr.postReset(texture.Texture);
 					m_ovr.postReset(texture.Texture);
 
 
-					bx::swap(m_ovrRtv, m_backBufferColor);
+					bx::xchg(m_ovrRtv, m_backBufferColor);
 
 
 					BX_CHECK(NULL == m_backBufferDepthStencil, "");
 					BX_CHECK(NULL == m_backBufferDepthStencil, "");
-					bx::swap(m_ovrDsv, m_backBufferDepthStencil);
+					bx::xchg(m_ovrDsv, m_backBufferDepthStencil);
 				}
 				}
 			}
 			}
 #endif // BGFX_CONFIG_USE_OVR
 #endif // BGFX_CONFIG_USE_OVR
@@ -1867,8 +1867,8 @@ namespace bgfx
 			m_ovr.preReset();
 			m_ovr.preReset();
 			if (NULL != m_ovrRtv)
 			if (NULL != m_ovrRtv)
 			{
 			{
-				bx::swap(m_ovrRtv, m_backBufferColor);
-				bx::swap(m_ovrDsv, m_backBufferDepthStencil);
+				bx::xchg(m_ovrRtv, m_backBufferColor);
+				bx::xchg(m_ovrDsv, m_backBufferDepthStencil);
 				BX_CHECK(NULL == m_backBufferDepthStencil, "");
 				BX_CHECK(NULL == m_backBufferDepthStencil, "");
 
 
 				DX_RELEASE(m_ovrRtv, 0);
 				DX_RELEASE(m_ovrRtv, 0);