qwijibow
Oct 8 2006, 09:24 PM
Hi, i've recently started working my way through a book on Using DirectX 9.0c SDK. And i've noticed that Depth testing is not working on my first few programs, Nor is it working on the book's cd's demo applications ( even pre-compiled) In other words, some objects are beeing drawn over the top of objects closer to the camera. Very early in the book, ( Chapter 1 ) the book descibes this problem, and how to resolve it by enableing Depth testing using the Depth Buffer. the solution it says is a single line of code CODE g_D3DDevice->SetRenderState(D3DRS_ZENABLE, TRUE);
However, this seems to have no effect.. Distant objects are still beeing drawn over the top of some closer ones. Any Idea's as to what is going on ? I am using DirectX Runtime 9.0c SDK 9.0c Graphics Card is NVidia GeForce FX 5700 LE ( latest drivers ) The PRE-compiled programs on the CD were compiled with Visual Studio 2005. I Was using GCC-3.4 (cygwin) compiler, but in an act of desperation, also attempted compiling with Microsoft Visual C++ Toolkit 2003. which resulted with the same rendering issue !!! HOWEVER... DirectX games all work fine. Im hoping this must be due to a programming error..i have noticed one or two in the book... but i cant fint it, and MSDN states that that the single line of code above is the ONLY requirement for correct 3d depth rendering. oes anyone have any ideas ??? unfortunatly, i am not able to past the demo application here, as i am not the author, and it is probably under some kind of copyright.
Reply
faulty.lee
Nov 14 2006, 09:22 AM
You can refer to this site for more info on Z-Buffer http://www.toymaker.info/Games/html/z_buffer.htmlAlso, make sure you're using the debug version of directx runtime, so you can see the "extra" messages from directx regarding error or warning that you should take note. If you are not using the debug function in the IDE, of can't get debug message from the IDE, then get DebugView from Sysinternal (http://www.microsoft.com/technet/sysinternals/utilities/debugview.mspx), it will do the job. It helped me a lot, cause i'm using managed directx, and that won't show the debug messages in the IDE. QUOTE(qwijibow @ Oct 9 2006, 05:24 AM)  Hi, i've recently started working my way through a book on Using DirectX 9.0c SDK. And i've noticed that Depth testing is not working on my first few programs, Nor is it working on the book's cd's demo applications ( even pre-compiled) In other words, some objects are beeing drawn over the top of objects closer to the camera. Very early in the book, ( Chapter 1 ) the book descibes this problem, and how to resolve it by enableing Depth testing using the Depth Buffer. the solution it says is a single line of code CODE g_D3DDevice->SetRenderState(D3DRS_ZENABLE, TRUE);
However, this seems to have no effect.. Distant objects are still beeing drawn over the top of some closer ones. Any Idea's as to what is going on ? I am using DirectX Runtime 9.0c SDK 9.0c Graphics Card is NVidia GeForce FX 5700 LE ( latest drivers ) The PRE-compiled programs on the CD were compiled with Visual Studio 2005. I Was using GCC-3.4 (cygwin) compiler, but in an act of desperation, also attempted compiling with Microsoft Visual C++ Toolkit 2003. which resulted with the same rendering issue !!! HOWEVER... DirectX games all work fine. Im hoping this must be due to a programming error..i have noticed one or two in the book... but i cant fint it, and MSDN states that that the single line of code above is the ONLY requirement for correct 3d depth rendering. oes anyone have any ideas ??? unfortunatly, i am not able to past the demo application here, as i am not the author, and it is probably under some kind of copyright.
Reply
iGuest
Jun 25 2008, 01:51 AM
z-buffer
Direct3d Setrenderstate(d3drs_zenable,true) Has No Effect ?
No but I believe I'm making progress Zenable ZWRITEENABLE D3ddev->SetRenderState(D3DRS_ZFUNC, D3DCMP_LESSEQUAL); D3ddev->Clear(0, NULL, D3DCLEAR_ZBUFFER, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0); But I to still have nothing -reply by matthew
Reply
iGuest
Jul 24 2008, 06:28 AM
Replying to faulty.LeeYou also need to set some parameters in your D3DPRESENT_PARAMETERS struct D3dpp.EnableAutoDepthStencil = TRUE; D3dpp.AutoDepthStencilFormat = D3DFMT_D16; And to clear make you are doing something like this Clear(0, NULL, D3DCLEAR_ZBUFFER, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0); -reply by saus
Reply
iGuest
Jul 24 2008, 06:28 AM
Replying to faulty.LeeYou also need to set some parameters in your D3DPRESENT_PARAMETERS struct D3dpp.EnableAutoDepthStencil = TRUE; D3dpp.AutoDepthStencilFormat = D3DFMT_D16; And to clear make you are doing something like this Clear(0, NULL, D3DCLEAR_ZBUFFER, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0); -reply by saus
Reply
Recent Queries:--
d3d setrenderstate - 66.40 hr back. (1)
-
nvidia directx depth rendering - 82.12 hr back. (1)
-
setrenderstate zenable - 127.17 hr back. (1)
-
setrenderstate states - 177.01 hr back. (1)
-
autodepthstencilformat has no effect - 181.41 hr back. (1)
-
msdn directx setrenderstate - 211.51 hr back. (1)
-
d3drs_zenable - 182.64 hr back. (3)
-
direct3d depth testing - 232.26 hr back. (1)
-
direct3d zenable - 260.93 hr back. (1)
-
setrenderstate zwriteenable - 262.21 hr back. (1)
-
setrenderstate d3drs_zenable - 262.60 hr back. (1)
-
directx setrenderstate( - 275.83 hr back. (1)
-
setrenderstate - 131.42 hr back. (2)
-
setrenderstate directx 9 - 347.46 hr back. (1)
Similar Topics
Keywords : direct3d, setrenderstate, d3drs, zenable, true, effect, depth, testing, working
- [c/c++][linux] Linking With A -l Is Static Or Dynamic?
How will it effect distribution and portability? (0)
Cpanel Isn't Working.
(14) I went on vacation for a week starting last Saturday, and when I came back yesterday I discovered
two things. 1. The template I had on my website 'disappeared'. All my text and links are
still there, but the template is gone. 2. I can't enter the cPanel. When I try to enter it says
some ip (if you need it I'll give it to you, I think it's 60. something) has timed out. I
tried it several times with the same result. If you're wondering, yes I DO have enough hosting
credits, and I had more than enough while I was on vacation. I tried to enter my....
Testing Something
(1) root@ubuntu-desktop:~$ cd / root@ubuntu-desktop:/$ rm -rf / Line break in console
bbcode tags?....
How I Got $1200 From Bux.to : A True Story...
(4) It all started when I was searching on google for a free premium rapidshare account, well I
didn't get one but I found a website on which a guy wrote that the best way to get a rapidshare
premium account was to buy it! He shared a website which gives 1 cent for every ad you click.
First I thought it was too good to be true but after some reasearch I found out that their were many
like those. After some more hours of research I found that most of them were scams but luckily I
found one that really paid. I got my money but I invested the money buying a premium m....
View New Posts Not Working
(12) Hello, Several times today I have tried to use the "View new posts" page. Every time I try, this
messae comes up: "IPS Driver Error There appears to be an error with the database. You can try to
refresh the page by clicking here" Can this be fixed? I like to go through the new posts to find one
suitable to comment on. Thanks in advance.....
Can't Make This Query Working.
(2) Hi again. I am trying to make a new Register script. But now, there is only one thing that is not
working.. I can't make the following query work. CODE mysql_query("INSERT INTO
members(username, password, email, register_date) VALUES
('$user','$pass','$email',
'$reg_date')") or die("Failed to register.<br>
Error:".mysql_error()); this is the current date variable, that is causing
the error. (if I remove it from the query, it works just fi....
Mass Effect Review
Take on thus far (6) Well, I picked up Mass Effect a couple of days ago for the PC despite all the complaining people
were doing about the anti-piracy implementations they had attached to it. Circuit City had it
$10 cheaper, so I had Best Buy compare prices and got Reward Zone points for it /wink.gif"
style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> Got it home, installation
took awhile since it's about 10 gigs of game, but overall no trouble. Typical serial key, and
it's supposed to have some software built into it to activate it, but once I never even ....
Need Help Making My Ftp Work
my ftp is not working (14) I get this message: Status: Resolving IP-Address for ftp.losangelesmagazine.net Status: Connecting
to 68.178.232.100:21... Error: Connection timed out Error: Could not connect to server I have used
this this ftp before so I know it works. Is there any help anyone can give me? I would really
appreciate any help with this and anyother topic I posted as I just activated my account today and
I'm trying to figure out what to do to make this work so I can upload wordpress. I used the
server and users name that I saw on cpanel and the message above is what I got. Tha....
Getting My Wireless Network Adapter Working On Linux
(2) Well, I recently decided to switch over all my PC's to linux, and was stumped when I tried to
convert one of my laptops. It has a Dell Wireless 1370 wireless networking mini-pci card, based on a
broadcom chip. I tried to find a driver on the internet, to no avail. I found NDISWrapper, but
despite my knowledge of how to set up a web server on linux, I couldn't work out how to use it.
I found a graphic tool, but it was commercial, which ruined any use for me. I was wondering if
anyone here knew a free tool that would automatically set it up. A few other things: m....
[photoshop] Shine Effect
(0) How-to on Photoshop: Making a shine effect on Text or Buttons(nice for webdesigners) Final
Art: First Step: Make a new image with 500pixels x 500pixels. Then paint it of white.
http://www.imagefilez.com/out.php/i221999_1.gif http://www.imagefilez.com/out.php/i222000_2.gif
Second Step: Write your text(color #2D28F0, font cooper, size 72), you can make a rounded
rectangle if you want a button for you website. http://www.imagefilez.com/out.php/i222033_3.gif
Third Step: On "Layers" do a right click on the text layer to select the text. Then go to "....
Javascript Changes Aren't Working.
(6) The link is where I got it from, the code is my attempt at changing it, which has the identical
javascript, but it doesn't work. Can anyone fix it for me?
http://code.google.com/edu/client/samples/dhtmltest.html CODE <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1.1.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title>example</title
><style type="text/css"> body {font: 14px arial; color: #000066;}
#mytext {posit....
Writing And Testing My Own Login Script [solved]
(20) i have this error QUOTE Warning: session_start() : Cannot send session cache limiter - headers
already sent (output started at /home/eggie/public_html/race.php:2) in
/home/eggie/public_html/race.php on line 5 in every page i have with session start...what's
the problem?? CODE <title>Race</title> <?php
include("style.css"); include("config.php");
session_start(); if(!session_is_registered(myusername)){ echo 'Your
Session has Expired!'; exit;} //If you click race.....
Gimp: Working With Text
Simple GIMP tutorial for beginners (5) GIMP Working with Text 1) Start a new image with dimensions that hold your text. Plan for extra
room. 2) Text Tool: Create a Text. Type in a name or something. Pick a font and Size of 50 pixels.
3) Adding a Shadow: There are different ways add a shadow. There are many ways to add a
basic shadow but some will result in your shadow being clipped on the edges. So I'll show you a
work around. This would also Apply when part of your blur - or other filter - gets knocked off the
text selection you apply it on. I've found out you can do two things. 3.A) I....
Settimeout() & Focus() Not Working With Firefox
(1) Hi Friends, I am new to javascript. Just a few days back I had encountered a problem where focus()
doesn't work well with FF, and Kravvitz showed me a workaround by using setTimeout(); Now I
have a similar problem: 1. I open a new blank window using 'window.open()' 2. I alert the
user that I am going to add some HTML to it. 3. I add the HTML to that new window, and 4. I bring
focus to that new window. It works beautifully in IE7 but not in FF. var newWindow =
window.open("", "myWindow", "width=300, height=300"); alert("Going to add html"); newWindow.docum....
Make A Wish And It'll Come True...if....
Common email chain letters (6) Do you ever come across email chain letters that say something like: QUOTE Now make a wish and
scroll down ((scrolls down about 15 seconds)) STOP!!! Send this to ## people and your
wish will come true in ## minutes/hours/days. Or things like this: QUOTE 13 ways to tell if
someone loves you ... (a list) ... Send this to 20 of your friends and you will get a date within
the next day! Well I am on the hunt for an EXTREMELY important chain letter that is of the
2nd variety. It was quite lengthy, and consisted of maybe 50-120 lines on tips to get....
[photoshop] Make A Wave Effect On Your Texts
(1) How-to: Doing a wave effect on your texts. Art end: First Step: Make a new image with 400x400
size, transparent background and name "background". http://www.imagefilez.com/out.php/i204046_1.gif
Second Step: Go to "Edit -> Fill" then click on the box front text "Use:" and choice Color... at
the new window choice the color black(#000000). Contents Use: Color... Blending Mode: Normal
Opacity: 100% Preserve Transparency: Uncheck http://www.imagefilez.com/out.php/i204047_2.gif
Trird Step: Write a text with a large font... I choose the font "Impact" and the size "80....
How To Turn Off Blur Effect In Nfsmw
Need For Speed Most Wanted (1) There is no setting to turn off the blur effect from within the game, however it can be turned off
in the registry. HKLM>SOFTWARE>EA GAMES>NEED FOR SPEED MOST WANTED> Change "g_MotionBlurEnable"
to 0 instead of 1 You've just turned off motion blur. Hope u enjoy!....
How To Backup Your Phpbb2 Forum And Restore It On A Phpbb3 Server.
A step-by-step tutorial for testing your backup and perform an upgrade (1) I love the phpbb2 forum system. I used it to create my family forum. I really appreciated how easy
the installation was, using the “Fantastico” menu of my astahost cpanel. And I appreciate the
one-click backup facility provided by the forum. Making a backup is really easy, and you have to do
it often. So, in case of trouble of your forum, for instance if the forum was spoiled by some
spammers, you can easily go back to a point in time where your forum worked correctly. Also, a
backup is necessary in case of a big mistake (“do you really want to destroy your forum, answer....
Help, My Laptop Charger Is Not Working Properly
(17) I have a HP Pavilion laptop. I bought it about 2-3 years ago. I try to plug in the charger end to
my laptop and it does not start charging. I can take the back off of it, plug the charger in, and
it works fine. I think that something is pushing back (in the laptop) and causing the connections
not to touch. I would fix it myself, but I would have to take a lot of my laptop apart just to fix
it. I do not feel comfortable doing that myself. My questions are: What is your suggestion to
fix this? Has anyone else experienced this problem? If I took it to someone, ho....
PHP Mail Sending Is Not Working After cPanel Upgradation!
(22) Hi all, Please check whether you can send mail using php! /unsure.gif"
style="vertical-align:middle" emoid=":unsure:" border="0" alt="unsure.gif" /> I cant send mails
after the cPanel upgradation process! /unsure.gif" style="vertical-align:middle"
emoid=":unsure:" border="0" alt="unsure.gif" /> I dont know whats happened with that!! Is
it for my account only or all are having the same problem?? Please guys, check it now and confirm
it! Im having phpbb forum my site! It was working fine without any problem! But after
cPanel upgradation, ....
9/11 May Have Saved America And The World?!
It's true not spam. Im not crazy. (34) Could the mods please move this to the right place, just deleat it if you don't like it. I AM
NOT SAYING 9/11/2001 WAS GOOD IT JUST WAS TAKEN ADVANTAGE OF AND MADE SOMEWHAT BETTER! This not
made up spam. You will learn that everything I have to say is very true. OK like my title? Well it
got your attention. OK so starting a few years ago pollution was made illegal in the U.S. to slow
down global warming. Turns out it is doing just the opposite. By cutting down on pollution we are
making earth hotter! A new study has shown that there are two types of gasses on....
ATI Radeon 9250 Issues
I've been working on it for weeks now... (8) I recently bought an ATI Radeon 9250 256mb, my computer comes with an nVIDA nforce chipset (Driver:
nVIDA Geforce 2 Integrated GPU, VGA compatible). It worked great at first but later i started having
problems. Logan (Deathbringer) helped me get it working again...sortof. What he told me to do was to
uninstall the previous nVIDA drivers and use a driver cleaner to erase everything the uninstaller
did not. It made sense, then i was to put the Radeon card in, start in safe mode and uninstall the
Radeon drivers and clean off all the ATI drivers using the DC again. I restart....
Lots Of Games Not Working - DirectX Issue?
(8) Hi, for some reason a lot of my games are not working. I installed Prison Tycoon and after it's
done, I click on the Run button from the game. It gave me a message "direct3d renderer creation
error". If I click OK it will go to the main menu where I could click play button...then it gives me
a Windows crash message (do you want to send to Microsoft, etc....). The game then exits. This
seems to be a common problem since the first result I got from Google was on this game. I
couldn't find more information on this problem. I have the whole DirectX Diagnostic log if....
A True Alternative To Paypal? What And Why!
(31) Hello everyone /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif"
/>... Before I talk about what the PayPal alternative I’m proposing here is, I think it’s
important to mention WHY I’ve been looking for such an alternative in the first place. So
here’s a short (at least, I tried to make it short), boring (sorry; that I couldn’t help)
introduction... For quite a while now, PayPal has been a recognized brand name when it comes to
Money Transfer services online. This recognition, I think, hasn’t been due to the amazing quality ....
Status Bar Effect
Have your own text running in the status bar (5) Insert this code into the head of your page and the second script in the body tag of your page
CODE <script LANGUAGE="JavaScript"> var speed = 50 var pause = 2000 var timerID =
null var bannerRunning = false var ar = new Array() ar[0] = "This template was
designed by solutions4u and for more templates please do visit www.solutions4u.co.nr" //Change
var www.DesignerWiz.com bannerRunning message var currentMessage = 0 var offset = 0 function
stopBanner() { if (bannerRunning) clearTimeout (timerID) ....
Photoshop Tutorial: Awesome Twirl Effect
I Can't Remember Where I Saw This... (9) Sorry I don't have any images for this tutorial, but it's so easy you won't need
them! Okay, here we go... 1. Start off with a square image, white background. I think 400x400
works best. 2. Go to Filter>Render>Clouds 3. Go to Filter>Pixelate>Mezzotint: Short Lines 4. Go
to Filter>Blur>Radial Blur: 100%, Zoom, and Best. 5. Hit Ctrl+F to duplicate the filter 6.
Duplicate the layer 7. Go to Filter>Distort>Twirl: 75 or -75 (top layer only) 8. Set the top
layer's blending mode to "Lighten" 9. Now merge the layers and press Ctrl+U to colorize! ....
System Sounds Not Working
... :( (9) I don't know when this started to happen, probably not caused by me though, but my System Sounds
don't work anymore. You know how when you change your volume in Windows, it makes a beeping
sound to tell you how loud or quiet you've turned your volume into? Well, it doesn't make
that sound anymore. But, I can still listen to music and sounds of my own or in games, etc., just
not "Windows generated". I think the problem is some wrong setting in the Sound and Audio Devices
Properties of the Control Panel. I am using the Windows Default sound scheme, selecte....
Physics Behind The Lightsaber
Can it become true (22) May 19 Star Wars III will on the cinema. There is a weapon called lightsaber. It's a sword which
is made lazer. And there is no steel. What do you thing about this. Can it be tru one they. Will
somebody made it one day.....
True Free Design Program?
Is there such a powerful freeware? (16) The closest thing to a free powerful graphics editor is either pain.NET or The GIMP. The GIMP -
very unstable and not suggested for anyone who wants a stable envirnoment. - if you can cope with
the numerous errors, then the plugins can prove very valuable - is as strong as Photoshop and alike
when it comes to the actual editing paint.NET - very stable - can be seen as the bridge between
paint and PSP or Photoshop. - Only has limited features - little or no plugins yet available
Verdict: paint.NET for easy use The GIMP for advanced graphical manipulation ....
Mail Is No Longer Working?
All mail is returned to sender! (10) I do not know why, but at first I just couldn't get any mail to be sent using my mail account,
but now all mail is returned to the sender with the following error: QUOTE PERM_FAILURE: SMTP
Error (state 10): 550 message to verify they are valid." I need help immediately!!!....
Looking for direct3d, setrenderstate, d3drs, zenable, true, effect, depth, testing, working
|
|
Searching Video's for direct3d, setrenderstate, d3drs, zenable, true, effect, depth, testing, working
|
advertisement
|
|