- 383 名前:デフォルトの名無しさん mailto:sage [2009/04/04(土) 23:14:27 ]
- ありがとうございます。うまく表示されたか確認したいんですが、
いつからか途中から頂点カラーフォーマットでやってる時からなんですが面が真っ黒になってるんです まだライトまでやってないんですが、ベーシックエフェクトでデフォルトライトにングの設定は変更してないんですが真っ黒なんです。 どういう原因が考えられますか? BasicEffect effect; void init(){ mVtDec = new VertexDeclaration(game.GraphicsDevice, VertexPositionTexture.VertexElements); effect = new BasicEffect(game.GraphicsDevice, null); effect.VertexColorEnabled = true; effect.EnableDefaultLighting(); effect.Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(35.0f), game.aspectRatio, 1.0f, 50000.0f); } void Drawground(){ game.GraphicsDevice.VertexDeclaration = mVtDec; CullMode oldCullMode = game.GraphicsDevice.RenderState.CullMode; game.GraphicsDevice.RenderState.CullMode = CullMode.CullClockwiseFace; effect.View = Matrix.CreateLookAt(game.camera.camPos, game.mt.mPos, Vector3.Up); effect.Begin(); foreach(EffectPass pass in effect.CurrentTechnique.Passes) { pass.Begin(); int buf = ( vtCountY - 1 ) * vtCountX * 2; for( int i = 0; i < buf; i += vtCountX*2 ) { game.GraphicsDevice.DrawUserPrimitives<VertexPositionTexture>( PrimitiveType.TriangleStrip, vpGround, i, primitivesCount ); } pass.End(); } effect.End(); game.GraphicsDevice.RenderState.CullMode = oldCullMode; }
|

|