To pay tribute to the classics, why writes 3D graphics programs [Open Source]

Source: Internet
Author: User

I personally think that there are two sets of classic tutorials to learn 3D graphics program development. d3d <d3d game development programming basics> is the reddragon book. openGL nehe tutorial. I would like to pay tribute to the classics by turning over their open-source programs.

What I do is to integrate all the demos into a project. all demos use the same rendering device. in this way, you can freely switch the demo in a process. the biggest trouble in writing this set of things is that every demo changes the rendering device status and needs to be restored when it exits. this seems very easy, but it is very troublesome to query when there is a problem, because there are too many demos in the tutorial. the most common problem is that the rendering effect is incorrect. This is the most common problem in graphics programs. For such problems, I have no good solutions. The following suggestions can be provided: it is much more wrong and you will experience it later. note that the resources applied in the demo must be released upon exit. the nehe OpenGL tutorial does not seem to pay much attention to this. In many cases, only applications are applied and not released. however, if the d3d debug mode is enabled in d3d, an error is reported if unreleased resources exist when you exit the program.

Both sets of programs have a flying project module, which is a few graphical demos I have written. my design is to put every kind of demo in a project. For example, if a developer wants to write another set of typical OpenGL or redbooks, he can create a new project, write all its demos to the project. note that the configuration file has a new demo configuration.

Development Environment: vs2008.

Code:
Http://pan.baidu.com/s/1pJkD4Bh
There are three projects, why_dx9 and why_gl contain the code of the Red Dragon tutorial and nehe tutorial respectively.

 

Software Description:

On the main UI, you can click to select the demo to run
You can also select demo for the upper and lower keys of the keyboard. Pageup and Pagedown are used to flip pages, and the Enter key is used to start the selected demo.

The F11 key is used for full screen switching,
ESC is used to exit the current demo and exit full screen
Each demo displays the prompt text on the interface. The H key can hide the text.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.