Home » Community » Forums » DirectX and XNA » D3DCLEAR_STENCIL problem
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic


 Last Thread Next Thread 
 D3DCLEAR_STENCIL problem
Post New Topic  Post Reply 
I recently bought a Radeon 9600 pro(just before christmas),
before that i was running an N-Vidia card.

My shadow code ran fine with the other card,but on the radeon(for some reason)cannot clear the stencil buffer.

At first,i couldn't figure out why it wasn't clearing,so i took off 'D3DCLEAR_STENCIL' and tried it with just this line of code:

lpD3DDevice->Clear(OL,NULL,D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER,oxoo404040,1.0f,OL);

which is fine,only now,no shadows are being drawn for my character.

Though with my original code(that worked on the other card)...

lpD3DDevice->Clear(OL,NULL,D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER|D3DCLEAR_STENCIL,oxoo404040,1.0f,OL);


i am still getting the contents of the last scene drawn to the display,(didn't clear).

Does this sound like a hardware/driver problem? because i have even tried loading an earlier part of my code,and with 'D3DCLEAR_STENCIL'it still will not clear the stencil buffer.

Thanks,
Paul.

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Do your code lines have "O":s and "o":s instead of zeroes on purpose? Compiler may think that you need octal numbers
Do you actually succesfully create a stencil buffer in the initialization?

This is too big of a deal to be a driver bug - of course it could be one, though. Try downloading the latest drivers to make sure.

-Nik

 User Rating: 1695   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: