• R/O
  • SSH
  • HTTPS

dxruby: Commit


Commit MetaInfo

Revisión205 (tree)
Tiempo2010-07-03 17:28:04
Autormirichi

Log Message

描画数が0の場合にも描画するよう修正。
RenderTargetのクリア色不具合を修正。

Cambiar Resumen

Diferencia incremental

--- branches/1.1dev/dxruby.c (revision 204)
+++ branches/1.1dev/dxruby.c (revision 205)
@@ -2505,24 +2505,24 @@
25052505 // return obj;
25062506 // }
25072507
2508- /* 描画対象が1つも無ければ描画処理そのものを行わない */
2509- if( rt->SpriteCount == 0 && rt->MeshCount == 0 )
2510- {
2511- if( vrt == Qnil )
2512- {
2513- /* シーンの表示 */
2514- if( g_WindowInfo.windowed == Qnil || g_WindowInfo.windowed == Qfalse )
2515- {
2516- g_DrawTime = 0;
2517- g_OldTime += g_OneSecondCount / g_WindowInfo.RefreshRate;
2518- }
2519- else
2520- {
2521- g_pD3DDevice->lpVtbl->Present( g_pD3DDevice, NULL, NULL, NULL, NULL );
2522- }
2523- }
2524- return obj;
2525- }
2508+// /* 描画対象が1つも無ければ描画処理そのものを行わない */
2509+// if( rt->SpriteCount == 0 && rt->MeshCount == 0 )
2510+// {
2511+// if( vrt == Qnil )
2512+// {
2513+// /* シーンの表示 */
2514+// if( g_WindowInfo.windowed == Qnil || g_WindowInfo.windowed == Qfalse )
2515+// {
2516+// g_DrawTime = 0;
2517+// g_OldTime += g_OneSecondCount / g_WindowInfo.RefreshRate;
2518+// }
2519+// else
2520+// {
2521+// g_pD3DDevice->lpVtbl->Present( g_pD3DDevice, NULL, NULL, NULL, NULL );
2522+// }
2523+// }
2524+// return obj;
2525+// }
25262526
25272527 /* シーンのクリア */
25282528 if( vrt == Qnil )
@@ -2545,8 +2545,8 @@
25452545 D3DVIEWPORT9 vp;
25462546 vp.X = x_2d = 0;
25472547 vp.Y = y_2d = 0;
2548- vp.Width = width_2d = DXRUBY_GET_STRUCT( RenderTarget, vrt )->texture->width;
2549- vp.Height = height_2d = DXRUBY_GET_STRUCT( RenderTarget, vrt )->texture->height;
2548+ vp.Width = width_2d = rt->texture->width;
2549+ vp.Height = height_2d = rt->texture->height;
25502550 vp.MinZ = 0.0f;
25512551 vp.MaxZ = 1.0f;
25522552 g_pD3DDevice->lpVtbl->SetRenderTarget( g_pD3DDevice, 0, rt->surface );
@@ -4077,6 +4077,7 @@
40774077 rt->useproj = 0;
40784078 rt->fog_enable = 0;
40794079
4080+ rt->a = 0;
40804081 rt->r = 0;
40814082 rt->g = 0;
40824083 rt->b = 0;
@@ -4157,8 +4158,6 @@
41574158 g_pD3DDevice->lpVtbl->SetDepthStencilSurface( g_pD3DDevice, rt->zbuffer );
41584159 g_pD3DDevice->lpVtbl->Clear( g_pD3DDevice, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER,
41594160 D3DCOLOR_ARGB( 0,0,0,0 ), 1.0f, 0 );
4160-// g_pD3DDevice->lpVtbl->SetRenderTarget( g_pD3DDevice, 0, g_WindowInfo.pD3DSurfScreen );
4161-// g_pD3DDevice->lpVtbl->SetDepthStencilSurface( g_pD3DDevice, g_WindowInfo.pD3DSurfZ );
41624161
41634162 return self;
41644163 }
Show on old repository browser