Home » Community » Forums » » Direct X-tasy
  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 
 Direct X-tasy
Post Reply 
Thanks! It was a good introduction.

 User Rating: 1015    Report this Post to a Moderator | Link

Good Article.. I just couldn't get the dang thing to work... Using MS Visual Studio 6.0's C++ Editor.. I am getting these two messages.

--------------------Configuration: 32TutorialGUI - Win32 Debug--------------------
Compiling...
test.cpp
C:\C++ Experiments\32TutorialGUI\test.cpp(239) : error C2664: 'EndPaint' : cannot convert parameter 1 from 'struct HDC__ *' to 'struct HWND__ *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\C++ Experiments\32TutorialGUI\test.cpp(282) : error C2440: '=' : cannot convert from 'void *' to 'struct HBRUSH__ *'
Conversion from 'void*' to pointer to non-'void' requires an explicit cast
Error executing cl.exe.

test.obj - 2 error(s), 0 warning(s)


Anyone Help me out? I'd really like to try this out.

 User Rating: 1015    Report this Post to a Moderator | Link

Dear André LaMothe,

Your article on DirectX (v5) was most excellent. Before I read it I was near-oblivious to DirectX (only that it asked me to download it when I played some games). I'm glad your article was my introduction to it and I can proudly say I'm downloading DirectX 9.0 SDK as we speak.

Best Regards,
-Jarett Langton


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

Will any of us remember how to do anything ourselves? Only time will tell...

Interesting point there!

 User Rating: 1015    Report this Post to a Moderator | Link

Good article ! However, this line did make me smile ;)

Quote:

"However, in my opinion Direct3D will not last. We all know that John Carmack has denounced it, no one is really using it"

-End quote

We are about to enter the world of DirectX 10 with unified hardware shaders, and ALL new games are written for Direct3D :P

 User Rating: 1015    Report this Post to a Moderator | Link

>>Once we are all dependent on DirectX, what would stop MS from at some point charging us to get the next release of DirectX? Or worse yet, what if MS finds a way to make us pay a royalty to them to release a game on the PC platform just like Nintendo or Sony does?

DirectX 10 is already charging a fee to use it. Not in the conventional sense, but if you want to use all the new features you have to upgrade to Vista. If users want to play your game with all the new features they also have to upgrade to Vista.



 User Rating: 1015    Report this Post to a Moderator | Link

Quote:
Original post by Anonymous Poster
"However, in my opinion Direct3D will not last. We all know that John Carmack has denounced it, no one is really using it"

-End quote

We are about to enter the world of DirectX 10 with unified hardware shaders, and ALL new games are written for Direct3D :P

He was right, though. Direct3D as it was in those days is now long dead. Since DX8, and even somewhat since DX7, the interface has been totally overhauled. For the better, I'd say.

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

NOTE:
I joined this forum at exactly 10:06 AM HK time, 08-10-2006 and read it from Anonymous poster.... I feel like replying so here it goes....




Quote:
Original post by Anonymous Poster
Good Article.. I just couldn't get the dang thing to work... Using MS Visual Studio 6.0's C++ Editor.. I am getting these two messages.

--------------------Configuration: 32TutorialGUI - Win32 Debug--------------------
Compiling...
test.cpp
C:\C++ Experiments\32TutorialGUI\test.cpp(239) : error C2664: 'EndPaint' : cannot convert parameter 1 from 'struct HDC__ *' to 'struct HWND__ *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\C++ Experiments\32TutorialGUI\test.cpp(282) : error C2440: '=' : cannot convert from 'void *' to 'struct HBRUSH__ *'
Conversion from 'void*' to pointer to non-'void' requires an explicit cast
Error executing cl.exe.

test.obj - 2 error(s), 0 warning(s)


Anyone Help me out? I'd really like to try this out.



Under the WindowProc (HWND hwnd) function.... edit WM_PAINT so that it will look like this function...

case WM_PAINT:
{
// this message occurs when your window needs repainting
hdc = BeginPaint(hwnd,&ps);
EndPaint(hwnd,&ps);

I downloaded the source code and it has a typographic error.... in function
"EndPaint(hdc,&pc)" so i edit the code to "EndPaint(hwnd,&ps)"

[qoute]
C:\C++ Experiments\32TutorialGUI\test.cpp(282) : error C2440: '=' : cannot convert from 'void *' to 'struct HBRUSH__ *'
Conversion from 'void*' to pointer to non-'void' requires an explicit cast
Error executing cl.exe. [/qoute]

In order to eliminate this error... edit the original code in WinMain
"winclass.hbrBackground = GetStockObject(BLACK_BRUSH);"

so that it will look something like this..add "(HBRUSH)" before the GetStockObject.... I used to put "static_cast" before the "(HBRUSH)" but it creates an error....

"winclass.hbrBackground = (HBRUSH) GetStockObject(BLACK_BRUSH);"



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

Thanks for the great article.... it gets me started... and by the way... I like the way your article interact with the reader.... we've got the same style....



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

That basically is the same way that it is used today yet, but still more involved. Vista will also include Direct X 9.0 L version, so I have read. I hope that does not mean "Lousy".

Good article, but more fun to read the books also, and Tricks of the Game Programming Gurus or Tricks of the 3D Game Programming Gurus.

The samples included with my just Direct X 9.0 version (not a, not b, not c) include some hefty words within them, but still there is a lot to learn still.

I think the article is fine still for showing a different way of gaining speed in a Windows Program.


 User Rating: 1015   |  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: