Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / General Programming / DirectX 9.0c, top or flop? Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
Moe

April 07, 2005, 02:53 PM

I recently installed directx 9.0c on my notebook witch has an ATI 9000 gfx card. Unlike in prior versions of directx I can no longer use hardware vertex processing witch sucks since in all samples it detects that it should be supported. However the device doesnít render anything at all. The apps donít crash or throw an error. I can select the REF mode and then change the gfx settings to software vertex processing and go back to using HAL. Has anyone an idea what could be causing this behaviour and how to get rid of it?

Also, I always thought using globals is a sign of bad programming practice. Is there a specific reason why the new framework uses them all over the place?

Any input is appreciated, thx.

 
Gerald Knizia (cgk)

April 08, 2005, 01:02 AM

Nothing about the vertex shaders (didn't have such problems). But:

Also, I always thought using globals is a sign of bad programming practice. Is there a specific reason why the new framework uses them all over the place?

Using a lot of globals all over the place is a bad idea if you write serious software (i.e. software with a large code base) or if you could save significant amounts of memory by not doing this (not everything needs to be allocated all the time etc.).
The D3D samples are nothing of this. They have exactly one goal: Showing you how to implement a specific effect/use a specific API feature. Changing the code to a different(better) coding practice would definitally not help with this and might possible harm it by intoducing more noise.

 
glWizardry

April 08, 2005, 01:39 AM

It's not *always* a sign of bad programming. Neither are gotos. What is bad is using them when you do not know when to and when not to.

Global variables introduce side effects. They can potentiality cause serious problems. They should be avoided most of the time. Sometimes, however, tbey can make things much faster. A good design will limit the amount of damage a global handle can do to the rest of your system. A better design will completely eliminate them but still provide the same access speed to the data :-)

Gotos are something from the old days of computing, when machines were extremely slow and limited. There are times now and then when a goto really makes things easier. The original paper (I think by Dijksta?) which put it into the minds of people that Gotos were bad never said not to use them, but to avoid using them as much as possible. But everyone since has come to believe they are inherently evil and must never be used. Dunno why...

Now, that framework is really a giant piece of crap though. It looks like a uni project of some noob uni coder.

 
Alex Herz

April 08, 2005, 07:15 AM

I agree with what has been said. Still I think the d3d samples are pretty crap. They show the simple stuff and avoid all the real live problems you are bound to come across when using d3d in some proper software. Addressing these areas in more detail and providing one sample with a framework that is extendible and useable would go a long way...

I think :)

Alex

 
Steven Hansen

April 08, 2005, 12:46 PM

Better documentation would remove any need for the samples/framework. Realistically, the framework will rarely be exactly what is needed. I'd rather see abstracts on designs (like hdr lighting, metaballs, etc), and great documentation on APIs.

The samples are a nice way to watch things in action, but I never get anything out of the code. Don't give me framework, give me uber docs. 'Nuf said.

 
Moe

April 08, 2005, 02:55 PM

Thx for your inputs.

Apparently I am not the only one who thinks the samples were made by some interns. Well why spend the money on a pro coder if you donít have too... :) Uber docs would be cool, though.

I never had so many problems to solve like I have since I installed DX 9.0c. I am still confused why I could use hardware vertex processing earlier but it doesnít work anymore in DX 9.0c. I checked once more. In the old framework I can select hardware vertex processing and I get more speed than in software vertex processing. I could also create an own framework and use hwvp. So I am quite sure it should work. I have no clue at all why this happens and why I canít use it in DX 9.0c (itís a problem witch occurs only on my notebook and reinstalling everything did not solve the problem either). No errors no warnings nothingÖ Has anyone an idea on this?

 
bignobody

April 08, 2005, 03:02 PM

Perhaps DX9.0c isn't playing friendly with your video card's drivers (or vice versa)?

(just a guess, I'm sticking with DX8.1 for my current project)

 
This thread contains 7 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.