C++ .net version8 with /clr:pure and directx9c

Started by
4 comments, last by GameDev.net 19 years, 6 months ago
Hi all... Why Z Sorting doesnt work when u draw objects with DrawIndexedPrimitive(...) using vertex data from a single vertex buffer and several index buffers? (index buffer per texture group)... here is a screenshot... that sofa is behind the board...but still visible...several other things are also like this... thanx in advance... :) [Edited by - errorist on October 16, 2004 1:53:27 PM]
Advertisement
anyone?... :(
more pix about this problem... :(




Do you have depth buffering enabled?
Double check your presentation parameters, and the ZEnable renderstate.

yes they are...i hope you guys didnt ignore me coz of this... :(

yes...auto depth stencil is enabled and its format is set to D16
		// Initializes present parameters	public: static void InitializePresentParameters()		{			_presentParameters = gcnew array< PresentParameters^ >( 1 );			_presentParameters[ 0 ]                            = gcnew PresentParameters();			_presentParameters[ 0 ]->AutoDepthStencilFormat    = DepthFormat::D16;			_presentParameters[ 0 ]->BackBufferCount           = 1;			_presentParameters[ 0 ]->BackBufferFormat          = Format::X8R8G8B8;			_presentParameters[ 0 ]->BackBufferHeight          = 480;			_presentParameters[ 0 ]->BackBufferWidth           = 640;			_presentParameters[ 0 ]->DeviceWindow              = _renderTarget;			_presentParameters[ 0 ]->DeviceWindowHandle        = _renderTarget->Handle;			_presentParameters[ 0 ]->EnableAutoDepthStencil    = true;			_presentParameters[ 0 ]->ForceNoMultiThreadedFlag  = false;			_presentParameters[ 0 ]->FullScreenRefreshRateInHz = 0;			_presentParameters[ 0 ]->MultiSample               = MultiSampleType::None;			_presentParameters[ 0 ]->MultiSampleQuality        = 0;			_presentParameters[ 0 ]->PresentationInterval      = PresentInterval::Immediate;			_presentParameters[ 0 ]->PresentFlag               = PresentFlag::None;			_presentParameters[ 0 ]->SwapEffect                = SwapEffect::Discard;			_presentParameters[ 0 ]->Windowed                  = true;		}


also the zbuffer...enabling it doesnt fix the problem...disabling it gives extra FPS of course...
		// Restores device dependent objects	public: static void RestoreDeviceObjects( Object^ sender, EventArgs^ e )		{			_textureStates->TextureState[ 0 ]->ColorArgument1 = TextureArgument::TextureColor;			_textureStates->TextureState[ 0 ]->ColorArgument2 = TextureArgument::Diffuse;			_textureStates->TextureState[ 0 ]->ColorOperation = TextureOperation::Modulate;			_samplerStates->SamplerState[ 0 ]->MagFilter = TextureFilter::Anisotropic;			_samplerStates->SamplerState[ 0 ]->MinFilter = TextureFilter::Anisotropic;			_samplerStates->SamplerState[ 0 ]->MipFilter = TextureFilter::Anisotropic;			_renderStates->Ambient           = Color::White;			_renderStates->Clipping          = false;			_renderStates->CullMode          = Cull::CounterClockwise;			_renderStates->DitherEnable      = true;			_renderStates->FillMode          = FillMode::Solid;			_renderStates->Lighting          = false;			_renderStates->ScissorTestEnable = false;			_renderStates->ShadeMode         = ShadeMode::Gouraud;			_renderStates->ZBufferEnable     = true;			_renderStates->ZBufferFunction   = Compare::LessEqual;			OctTree::Load( "dream_lab.x", _device );		}


thanx for replaying... :D

hope u replay again soon... :)
life sux

This topic is closed to new replies.

Advertisement