Sign in to follow this  
errorist

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

Recommended Posts

errorist    122
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]

Share this post


Link to post
Share on other sites
errorist    122
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... :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this