Read a 3D engine approach memo

To engine system with a problem common to read, do not be carried away by the realization of ideas specific engine, how to think about these issues to achieve this engine or bypass (without taking into account the low-end machines) is bound to face.

First of all, most must be important, debugging debug mode in the main scene up a program, and then flow away along the code several times, wandering in the code, generating a first impression, pay attention to basic facilities like tools (such as a string of memory management), about 3 hours .
then with each question as follows (in alphabetical order) process to go, go logic, clarify business approach engine.

1.SetStreamSource, call SetIndices, DrawIndexedPrimitive is where (which function which cpp which class), the whole project has several DrawIndexedPrimitve, DrawPrimitveUp, DrawXXX, unified management, or do piecemeal distributed in various cpp each class?

2. how is the texture resource management? handle, ID, pointer? press time, according to how to count? how vertex model resource management, whether there optimization of buffer allocation (such as vertex buffer integration)? rendering of instance data management, and how to distinguish between the concept of resource? Pure 3D resources such as Shader / RenderTarget is how to manage?

3. scene management is how to build, how to distinguish between node contains examples of data and resource data? How are accessed lens modules? Where are the object of removing the invisible line of code? What it is compatible with various algorithms, using a specific algorithm is? regardless of the algorithm, scene management module is to provide a clear definition of the interface needs?

4. where skeletal animation is calculated by multiplying the matrix is specific to the vertex at which line of code which cpp's? Socket realize where? If you have advanced animation system, skeleton where, what function? transition matrix operation between the integration of the code on what line?

5. asynchronous data loading is what to do, in which cpp, the management of which module? cpp where to load the code to read each line resources?

6. The rendering pipeline is how to provide a depth map ShadowMap, how CubeMap, the reflective surface providing the RenderTarget scene? RasterState how to manage the fixed pipeline state? To

7. How the operation of the management system is made (usually technique + multipass), incorporated how pipeline, how to ensure that in theory can achieve a variety of effects? how abstract is compatible with fixed and programmable pipeline? If it is abstract management, how to abstract away the different data at different technique? is there a line in independent of late effects, or use the material expressed? whether the material can be scripted? material is to be grouped, the sort of code segments in which where the cpp?

8. the special effects such as particle systems is to use the last of which DrawXXX painted? particles the system is a dynamic formula (do not ignore the specific formula) or frame animation?

9. interface 2D Texture Draw how are supported? how text rendering is supported, in particular, how to support the Chinese, the font how resources are managed? whether to use Freetype, whether to support the East Asian text?

interfaces 10. the physical system is how to define the needs of the engine? or is chaos Bad to direct spend.

Guess you like

Origin www.cnblogs.com/YanFeiGao/p/11402177.html