Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Replacing Windows

Author
Message
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 1st Jun 2007 10:34
Couldn't be arsed to spend 20minutes on writing a post so long DavidR would've got bored and walked off. If he understands C++ as well as he believes he does, then the code snippet of the interface explains everything in a very short post.

David R
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 1st Jun 2007 17:52 Edited at: 1st Jun 2007 17:53
Quote: "DECLARE_INTERFACE_(IDirect3D9, IUnknown)"


Unfortunately for you, that first line proves my point - IUnknown is the COM base object. I don't what the purpose of you posting that was- are you trying to prove my point for me, or are you just showing where the COM interface is or something?

Quote: "it's true that DirectX is registered with COM, doesn't mean that is the only way to access and use it.
"


So how exactly do you access DX then? Do you not release() any of your objects when you're done?


09-f9-11-02-9d-74-e3-5b-d8-41-56-c5-63-56-88-c0
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 1st Jun 2007 18:20
Maybe you should look up what the IUnknown interface actually is, and what it's used for. It has nothing to do with DirectX specifically.

as for releasing objects.. guess what

Direct3D->Release() does excactly what, delete Direct3D does.
Only difference is that Release, is a prototype interface that will release all objects that are also attached to the Direct3D pointer. The interface however is NOT flawless, and personally I extend the assigned IUnknown interface with the built-in __gc that is now present in C++. This removes everything that is loaded via the interface, not just that which is still attached at time of release.

heartbone
22
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 1st Jun 2007 18:46
Thank god for BASIC or I'd never finish anything.

I'm unique, just like everybody else.
David R
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 1st Jun 2007 20:20
Quote: "Maybe you should look up what the IUnknown interface actually is, and what it's used for. It has nothing to do with DirectX specifically.

as for releasing objects.. guess what

Direct3D->Release() does excactly what, delete Direct3D does."


a) I never said IUnknown was specifically to do with DX - but I think you need to look up what IUnkown is - it's the ruddy COM base object:
http://msdn2.microsoft.com/en-us/library/ms680509.aspx

As for Release(), no, it definitely is not exactly the same as delete; it's a reference counting scheme, partnered with AddRef(); doing delete directly kind of defeats the object of it being there - although I agree that when the ref count drops to zero, it does effectively do the same as delete, but that wasn't my point; my point was that this is part of the COM system, so unless you're using some crazy mechanism without references and Release() statements, you're using DX via COM... and last time I looked, that is the only (correct) method of accessing it.

I didn't explicitly mean that there is no other way of accessing DX, but unless you're using the crazy method mentioned above, you will of used COM to access DX: and Release() is evidence of that.

QED


09-f9-11-02-9d-74-e3-5b-d8-41-56-c5-63-56-88-c0
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 1st Jun 2007 21:01 Edited at: 1st Jun 2007 21:07
Quote: "a) I never said IUnknown was specifically to do with DX - but I think you need to look up what IUnkown is - it's the ruddy COM base object:
http://msdn2.microsoft.com/en-us/library/ms680509.aspx"


So then, if you admit that it isn't specific to DirectX; explain to me how this one interface makes DirectX a COM API?
Fact is it doesn't.

IUnknown is nothing to do with DirectX itself, it's a helper interface. Saying that because DirectX uses IUnknown, and suddenly becomes a COM API.. is like saying because I added porsche brakes to my car, then it's a porsche.

Quote: "I didn't explicitly mean that there is no other way of accessing DX, but unless you're using the crazy method mentioned above, you will of used COM to access DX: and Release() is evidence of that."


Do a quick search on msdn (given you appear to have alot of time here) for __gc in the C++ language library. If you still think my method is crazy then that's up to you. Personally I like my applications running and exiting cleanly, even in native code.

Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 2nd Jun 2007 08:23
Raven--- you're not understanding what he's saying. He's agreeing that IUnknown isn't a part of DX, but it *is* related to COM. Therefore you're proving that you are using a COM API, i.e. DirectX, with the code that you posted. Get it?

Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 2nd Jun 2007 13:11
Jeku, his argument before desperately trying to prove that I use COM in some form or another was that DirectX is a COM API. Not that it has there are a couple of aspects that utilise it.

What's more this is a straw grab, because he assumes that I use the IUnknown interface, which is just an extension to the base interface being defined. As mentioned above, while I don't disable IUnknown; I use the garbage collector instead.

I could go in to some aspects where he could've proven that I used COM to some degree with DirectX, but his original statement that I would've had to use COM programming DirectX because the entire API is a COM API is just crap.

Login to post a reply

Server time is: 2024-11-18 17:54:47
Your offset time is: 2024-11-18 17:54:47