Archived

This topic is now archived and is closed to further replies.

BriTeg

DX samples - do you use Microsoft's "common" code?

Recommended Posts

BriTeg    168
Hi, I''ve done quite a bit of 2D development in DX 7 (using DirectDraw), and I''m wanting to dive into DX 8.1 and DX 9. I see in the SDKs, under the "samples/multimedia" subfolder (where all their sample programs are), a folder called "Common" that holds source code that all there examples use: classes that act as wrappers for setup, fonts, textures, etc. etc. etc. Has anyone found it easy to learn and incorporate this "common" code into their own apps, or did you get your knowledge/code elsewhere (from books/tutorials/scratch)? Thanks, Brian

Share this post


Link to post
Share on other sites
Mastaba    761
I have used it in a couple of apps meant for my own experimenting with shaders, when I wasn''t really interested in programming the framework. It''s fairly simple to understand, and appears reminiscent of MFC-Lite (if such a thing were to exist). I was already familiar with MFC and Win32, so understanding the common framework for the samples really didn''t take me longer than 30 something minutes or so. The MSVC++ DirectX 8 and 9 AppWizards also produce apps using this same framework. For stuff that you might make to show to potential employers, I would not use the framework too much, and mostly use my own framework built from scratch.

Share this post


Link to post
Share on other sites
circlesoft    1178
quote:
Original post by GroZZleR
I learned from and expanded a lot of those common things, like the camera and such.
Actually, I learned so much more from not using the common framework. Originally, I had been using it, but I never really understood DirectX fully, since a lot of the code had already been written for me. So, I started completely from scratch and wrote a basic engine from the ground-up. The engine itself was pretty bad, but I learned a lot from it.

My new project is a lot better, because I'm using that knowledged that I gained. If I would still be using the framework, I'd be nowhere near where I am now.


Dustin Franklin
Mircrosoft DirectX MVP

[edited by - circlesoft on March 27, 2004 12:08:24 AM]

Share this post


Link to post
Share on other sites
Endurion    5407
I''m using the core framework (d3dapp, from DX8SDK), but added several things i needed to it. It takes care of a whole lot things dynamically (no fixed pixel format or resolution). I did also replace some things (the arrays to hold the modes for example).

Share this post


Link to post
Share on other sites
GroZZleR    820
quote:
Original post by circlesoft
quote:
Original post by GroZZleR
I learned from and expanded a lot of those common things, like the camera and such.
Actually, I learned so much more from not using the common framework. Originally, I had been using it, but I never really understood DirectX fully, since a lot of the code had already been written for me. So, I started completely from scratch and wrote a basic engine from the ground-up. The engine itself was pretty bad, but I learned a lot from it.

My new project is a lot better, because I''m using that knowledged that I gained. If I would still be using the framework, I''d be nowhere near where I am now.


Dustin Franklin
Mircrosoft DirectX MVP

[edited by - circlesoft on March 27, 2004 12:08:24 AM]


Oh I fully agree. I don''t use the framework myself, but a lot of the common classes are very helpful, like the aforementioned camera.

Share this post


Link to post
Share on other sites
Sailorstick    142
The Arc Ball is very good.
I have also used the common code for creating SoundManager and Sound classes. I added some of my own to code to the MS code as well.
I say go for it! You can definitely learn a lot from reading the code too.

Share this post


Link to post
Share on other sites
dave    2187
Hi, i found that using the framework that the SDK samples use was confusing since so much was hidden from you. I also dont like the way that the SDK examples are always more complicated in more ways than necessary. E.G for the billboards sample they made it too complicated to learn by having terrain and movement.

I am programming my own framework. It will be faster because it will only do exactly what i tell it to do.

ACE

Share this post


Link to post
Share on other sites
jasonsa    384
We will be revamping the Direct3D sample framework in an upcoming SDK to make it much easier to understand, easier to use, and much more modular. If you're not on the beta, please check it out when its released and let us know if it’s any better.

Thanks,
Jason
DirectX SDK development lead
“This posting is provided "AS IS" with no warranties, and confers no rights.”

[edited by - jasonsa on March 28, 2004 7:12:16 PM]

Share this post


Link to post
Share on other sites