【みんな】XNA 質問・相談スレッド1【初心者】at TECH
【みんな】XNA 質問・相談スレッド1【初心者】 - 暇つぶし2ch383:デフォルトの名無しさん
09/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;
}


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch