readme 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. **AnKi 3D Engine**
  2. Copyright (C) 2009, 2010 Panagiotis Christopoulos-Charitos
  3. http://www.ancient-ritual.com
  4. [email protected]
  5. .. contents:: Table of Contents
  6. ========
  7. Building
  8. ========
  9. AnKi build system is very Linux specific (GNU make only) at the moment. It
  10. also requires a few extra development libraries. You can also find a custom
  11. build system that generates GNU makefiles.
  12. Required libraries
  13. ------------------
  14. AnKi requires a few up to date versions of some libraries. The libraries are:
  15. - Bullet Physics
  16. - SDL ver 1.3
  17. - GLEW
  18. So before generating makefiles or building AnKi you have to download from their
  19. repositories and build the above libraries. Instructions follow. You can
  20. alternately use the script download-and-build-externals.sh
  21. Bullet Physics Library
  22. ~~~~~~~~~~~~~~~~~~~~~~
  23. From now on the AnKi requires the Bullet physics library. You need CMake and
  24. SVN installed.
  25. #) $ Go to the root AnKi path (where src, shaders and blenderscripts are)
  26. #) $ cd ..
  27. #) $ svn checkout http://bullet.googlecode.com/svn/trunk/ bullet_svn
  28. #) $ cd bullet_svn
  29. #) $ cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release
  30. #) $ make
  31. SDL ver 1.3
  32. ~~~~~~~~~~~
  33. We need SDL ver 1.3 for creating OpenGL 3.x context. You need to have the
  34. Mercurial and autoconf installed.
  35. #) $ Go to the root AnKi path (where src, shaders and blenderscripts are)
  36. #) $ cd ..
  37. #) $ hg clone http://hg.libsdl.org/SDL SDL-hg
  38. #) $ cd SDL-hg
  39. #) $ ./autogen.sh
  40. #) $ ./configure
  41. #) $ make
  42. GLEW
  43. ~~~~
  44. The latest GLEW provides us with OpenGL 3 and 4 extensions. Needs SVN and a
  45. Unix environment (for step 5).
  46. #) $ Go to the root AnKi path (where src, shaders and blenderscripts are)
  47. #) $ cd ..
  48. #) $ svn co https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew glew
  49. #) $ cd glew
  50. #) $ make extensions
  51. #) $ make
  52. Generating makefiles and building AnKi
  53. --------------------------------------
  54. There are 4 build targets in this folder. There is also a build system that
  55. generates GNU makefiles (it requires Python 3 installed). If you want to
  56. generate the makefile for the debug target (for example) do the following:
  57. #) $ cd <path to anki>/build/debug
  58. #) $ ../genmakefile.py
  59. #) $ make
  60. And the build process will begin.
  61. The gen.cfg.py files contain the build options of every target. Their format
  62. is pretty straightforward and minimal.
  63. **WARNING**: Sometimes I forget to update all the targets. The debug is always
  64. updated though.
  65. =========================================
  66. Generating source documentation (doxygen)
  67. =========================================
  68. The AnKi source code uses doxygen style comments inside the source. To generate
  69. the html documentation from a terminal do:
  70. #) $ cd docs
  71. #) $ doxygen doxyfile
  72. Then open doxygen.html to see it.
  73. ======
  74. Assets
  75. ======
  76. Currently there are no assets (models, textures, materials etc) so even if you
  77. build it, the application will fail to run.
  78. ============
  79. Coding style
  80. ============
  81. Some things to remember while coding AnKi.
  82. Classes
  83. -------
  84. class
  85. {
  86. friends
  87. pre-nested (if necessary)
  88. nested
  89. properties
  90. public
  91. protected
  92. private
  93. }
  94. Material shader program naming
  95. ------------------------------
  96. dnspgke:
  97. - diffuse mapping
  98. - normal mapping
  99. - specular mapping
  100. - parallax mapping
  101. - grass like
  102. - hardware skinning
  103. - environment mapping
  104. Naming shortcuts
  105. ----------------
  106. This list contains some of the naming shortcuts we use in AnKi:
  107. - Array : arr
  108. - Animation : anim
  109. - Application : app
  110. - Buffer : buff
  111. - Camera : cam
  112. - Color : col
  113. - Controller : ctrl
  114. - Feature : feat
  115. - Fragment : frag
  116. - Framebuffer Attachable Image : fai
  117. - Geometry : geom
  118. - Location : loc
  119. - Material : mtl
  120. - Matrix : mat
  121. - Number : num
  122. - Physics : phy
  123. - Property : prop
  124. - Quadrilateral : quad
  125. - Quaternion : quat
  126. - Resource : rsrc
  127. - Rotation : rot
  128. - Shader : shdr
  129. - Shader Program : shaderProg or sProg
  130. - Skeletal Animation : sAnim
  131. - Skeleton : skel
  132. - Text : txt
  133. - Texture : tex
  134. - Transformation : trf
  135. - Translation : tsl
  136. - Triangle : tri
  137. - Utility : util
  138. - Variable : var
  139. - Vector : vec
  140. - Vertex : vert
  141. Controllers
  142. -----------
  143. The controllers are part of the scene node objects. They control the node's
  144. behaviour.
  145. They have an input (script, animation, etc) and they control a scene node. The
  146. naming convention of the controllers is:
  147. <what the controller controls><the input of the contoller>Ctrl
  148. For Example:
  149. MeshSkelNodeCtrl A Mesh is controlled by a SkelNode
  150. Submitting patches
  151. ------------------
  152. If you want to update/patch a file (for example Main.cpp) do:
  153. - Make the changes on that file
  154. - Save the differences in a file using "svn diff Main.cpp > /tmp/diff"
  155. - E-mail the "diff" file with subject "[PATCH] Main.cpp updates"
  156. =========
  157. ToDo list
  158. =========
  159. - Continue working on the new coding style in shaders
  160. - Changes in the blending objects problem. The BS will become one stage and the
  161. PPS will be divided in two steps. The first will apply the SSAO and the EdgeAA
  162. in the IS_FAI and the second will do the rest
  163. - The second Physics demo: Create a box that is geting moved by the user. It has
  164. to interact with the other boxes
  165. - Set the gravity of a certain body to a lower value and see how it behaves
  166. - In the Ragdoll bullet demo try to change the distances of the bodies
  167. - Ask in the bullet forum:
  168. - How to make floating particles like smoke. But first try with one body and
  169. manualy setting the gravity
  170. - What the btCollisionObject::setActivationState takes as parameter?