Jump to content
  • Advertisement
Sign in to follow this  
errorist

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

This topic is 4995 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
Guest Anonymous Poster
life sux

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!