• R/O
  • SSH
  • HTTPS

dxruby: 提交


Commit MetaInfo

修订版546 (tree)
时间2017-02-20 22:27:20
作者mirichi

Log Message

set_viewportのデフォルト設定追加、Vector#rotate_x/yの不具合修正

更改概述

差异

--- branches/1.5dev/dxruby.c (revision 545)
+++ branches/1.5dev/dxruby.c (revision 546)
@@ -5687,6 +5687,7 @@
56875687 ---------------------------------------------------------------------*/
56885688 VALUE CustomRenderTarget_update( VALUE self )
56895689 {
5690+ D3DVIEWPORT9 vp;
56905691 struct DXRubyRenderTarget *rt = DXRUBY_GET_STRUCT( RenderTarget, self );
56915692 DXRUBY_CHECK_DISPOSE( rt, surface );
56925693 RenderTarget_clear( self );
@@ -5693,6 +5694,15 @@
56935694 g_pD3DDevice->lpVtbl->Clear( g_pD3DDevice, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_STENCIL | D3DCLEAR_ZBUFFER,
56945695 D3DCOLOR_ARGB( rt->a, rt->r, rt->g, rt->b ), 1.0f, 0 );
56955696
5697+ /* ビューポートデフォルト設定 */
5698+ vp.X = 0;
5699+ vp.Y = 0;
5700+ vp.Width = rt->width;
5701+ vp.Height = rt->height;
5702+ vp.MinZ = 0.0;
5703+ vp.MaxZ = 1.0;
5704+ g_pD3DDevice->lpVtbl->SetViewport( g_pD3DDevice, &vp );
5705+
56965706 rb_funcall( self, SYM2ID( symbol_custom_render ), 1, mLowLevelInterface );
56975707
56985708 rt->PictureCount = 0;
@@ -6319,7 +6329,7 @@
63196329 /* VertexBufferクラス定義 */
63206330 cVertexBuffer = rb_define_class_under( mDXRuby, "VertexBuffer", rb_cObject );
63216331
6322- /* RenderTargetクラスにメソッド登録*/
6332+ /* VertexBufferクラスにメソッド登録*/
63236333 rb_define_private_method( cVertexBuffer, "initialize", VertexBuffer_initialize, 1 );
63246334 rb_define_method( cVertexBuffer, "dispose" , VertexBuffer_dispose , 0 );
63256335 rb_define_method( cVertexBuffer, "disposed?" , VertexBuffer_check_disposed, 0 );
--- branches/1.5dev/matrix.c (revision 545)
+++ branches/1.5dev/matrix.c (revision 546)
@@ -1069,8 +1069,8 @@
10691069
10701070 angle = pi / 180.0f * NUM2FLOAT( vangle );
10711071 result->v1 = vec->v1;
1072- result->v2 = -sin( angle ) * vec->v2 + cos( angle ) * vec->v3;
1073- result->v3 = cos( angle ) * vec->v2 + sin( angle ) * vec->v3;
1072+ result->v2 = cos( angle ) * vec->v2 - sin( angle ) * vec->v3;
1073+ result->v3 = sin( angle ) * vec->v2 + cos( angle ) * vec->v3;
10741074 result->v4 = vec->v4;
10751075
10761076 return vresult;
@@ -1089,9 +1089,9 @@
10891089 result->x = vec->x;
10901090
10911091 angle = pi / 180.0f * NUM2FLOAT( vangle );
1092- result->v1 = sin( angle ) * vec->v1 + cos( angle ) * vec->v3;
1092+ result->v1 = cos( -angle ) * vec->v1 - sin( -angle ) * vec->v3;
10931093 result->v2 = vec->v2;
1094- result->v3 = cos( angle ) * vec->v1 - sin( angle ) * vec->v3;
1094+ result->v3 = sin( -angle ) * vec->v1 + cos( -angle ) * vec->v3;
10951095 result->v4 = vec->v4;
10961096
10971097 return vresult;
--- branches/1.5dev/version.h (revision 545)
+++ branches/1.5dev/version.h (revision 546)
@@ -1,10 +1,10 @@
11 /*
22 ###################################
33 #
4-# DXRuby 1.5.21dev
4+# DXRuby 1.5.22dev
55 #
66 ###################################
77 */
8-#define DXRUBY_VERSION "1.5.21dev"
8+#define DXRUBY_VERSION "1.5.22dev"
99
1010 #define DXRUBY15
Show on old repository browser