TODO.txt 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. ----------------------- CAMELOT 2D / GUI -----------------------------------------------------------
  2. LONGTERM TODO:
  3. 1. Finish localization
  4. 2. Finish docking manager
  5. 3. Window drag'n'drop detect
  6. 4. Basic profiler
  7. - When building a profiler have main Profiler class which just does measurements, then ProfilerOverlay for data display on-screen, ProfilerEditor for Unity-like Profiler, etc.
  8. - For now just create a profiler with basic measuring stats (FPS, core & sim thread time, plus times for most important systems), and ProfilerOverlay to display them
  9. PROFILER:
  10. TODO: Profiler is right now including windows.h. I need to work around that but don't feel like bothering with it atm
  11. - Easy way would be to move CPUProfiler outside of Utility and into Core (PROBABLY THE WAY TO DO IT - No point in wasting time on this)
  12. - Complex way would be to edit Timer and remove all the excess crap from it and just leave basic begin/end queries
  13. - When rendering GUI in front of scene view it seems to be rendering before the actual scene
  14. - This probably because the render texture alpha is less than 1, which makes it blend with the surface below it
  15. - In OpenGL rendering GUI to texture doesn't seem to work!?
  16. - Main window renders before the GUI render texture!
  17. TODO: Viewport can be modified from the sim thread, but is used on the core thread without any syncronization mechanisms. Maybe add a method that returns VIEWPORT_DATA, and have that used on the core thread.
  18. I still re-create GUIWidget mesh every frame instead of just updating it.
  19. MAJOR ISSUE: writeSubresource/readSubresoure doesn't require a shared ptr to GpuResourceData which means it could get destroyed while still in command queue. Right now it only works because I block right after I call those methods, which ensures nothing is destroyed.
  20. - When fixed, make sure I remove blocking calls after writeSubresource where they're not needed (GUIManager for example)
  21. I call waitUntilLoaded too many times. Sometimes 5-6 times in a single function. Each of those calls will be extremely slow.
  22. GUIWidget::updateMeshes leaks. If I leave the game running I can see memory continously going up
  23. - BansheeApplication should probably derive from Camlelot application. Right now user needs to know the difference between
  24. gApplication and gBansheeApp, which is non-intuitive (e.g. retrieving a window can be done on gApplication, but running main loop can happen on both
  25. Windows drag and drop detect
  26. - http://www.codeguru.com/cpp/misc/misc/draganddrop/article.php/c349/Drag-And-Drop-between-Window-Controls.htm
  27. - http://www.catch22.net/tuts/drop-target
  28. - http://msdn.microsoft.com/en-us/library/windows/desktop/bb776902(v=vs.85).aspx
  29. IMMEDIATE:
  30. - OpenGL rendering slows to extremely with time (seems to be related to rendering, possibly GUI, possibly in general Pass/Material/Shader/PassParams)
  31. - Update debug camera so it uses callbacks
  32. - I have disabled linear filtering because it doesn't look good on scale9grid textures. (Add another material so it works with stretched textures?)
  33. - Enable alpha test so I don't render completely transparent pixels.
  34. - What happens when I don't set a texture for a state of a GUI element. Use a dummy white texture probably?
  35. - Make sure GUI system uses a dummy texture if one isn't available
  36. - SpriteTexture keeps a static reference to DUmmyTexture which I need to release before shutdown
  37. - Hover colors of the scroll bar are wrong
  38. TextBox needed elements:
  39. - Get DebugCamera to ignore input if GUI has already processed it
  40. - LATER
  41. - TAB between input elements
  42. - Remove updateText calls from updateRenderElementsInternal and instead call it whenever offsets change
  43. - I might consider not rendering caret from within input sprite to avoid redrawing it while, and draw it directly from GUIManager
  44. GUIDragManager
  45. - GUI system sends startdrag/enddrag/drag events to all elements
  46. - startDrag(void* userPtr) changes cursor
  47. - releasing the cursor sends enddrag event and then the control can retrieve the user ptr
  48. - SINCE currently non-active elements ignore drag events, add GUIElement::acceptsMouseDrop property
  49. - Such elements will receive mouse drag and mouse up events if other element is active, and they can filter if they want to accept it
  50. -----------
  51. - My test model is rendering back faces. I need to flip them.
  52. - Although more than likely I am loading the model incorrectly since it works in Unity?
  53. - I probably want to determine front faces based on normals
  54. Immediate TODO:
  55. - A way to update mesh buffers without recreating vertex/index buffers (Setting data currently does exactly that)
  56. ----------------------------------------------------------------------------------------------
  57. Other:
  58. - Move Debug to CamelotCore and add SetFillMode
  59. -----------------------BACKLOG TODO---------------------------------------------------------------
  60. ----------------------------------------------------------------------------------------------
  61. High priority:
  62. - GetRenderOperation doesn't consider sub-meshes
  63. ----------------------------------------------------------------------------------------------
  64. Medium priority:
  65. - Mesh loading:
  66. - Example Freefall mesh has one index per vertex, and there are 17k+ vertices. I think I need a post-process step that optimizes them.
  67. - Imported FBX meshes are too big
  68. - Ogre performed special DDS loading. I removed that. I'm not sure if I'll need to re-add it?
  69. - My log is not thread safe yet it is being called from multiple threads.
  70. - RTTI:
  71. When defining RTTIType like so:
  72. RTTIType<D3D9HLSLProgram, HighLevelGpuProgram, D3D9HLSLProgramRTTI>
  73. I need to make sure that HighLevelGpuProgram class has valid RTTI type as well. Otherwise the inheritance hierarchy will not be correct. Right now this isn't checked anywhere.
  74. - Make sure that I am able to blit contents from render textures on all render systems
  75. - Command buffer:
  76. - Make CommandQueue not use mutexes and use atomics instead??
  77. - Figure out how to handle accessing texture from a non-render thread?
  78. - When importing a resource, and registering it with Resources I don't think it properly gets added to the loaded resources array? For some reason shaders get created twice.
  79. - Doing setPixels_async in the texture doesn't make sure that the user doesn't actually modify the provided PixelData after that call.
  80. - In general I need to rethink how to handle modifying resources with multithreading
  81. - Closing down a window (any window) will shut down main rendering loop
  82. - GUIManager draw call merging:
  83. I merge two GUI elements if they don't overlap each other, however I don't consider if there is some world geometry between them. Another reason to move batching out of GUIManager.
  84. ----------------------------------------------------------------------------------------------
  85. Low priority TODO
  86. - Mesh loading:
  87. - Sub-meshes aren't being transformed by world matrices of their nodes
  88. - Remove template from RTTIType and move it to IReflectable? This way i can hopefully move GetRTTITypeStatic and GetRTTIType to IReflectable so I don't
  89. need to manually implement those for every method.
  90. - Viewport needs to be updated when I call RenderTarget::setFullscreen/finishSwitchingFullscreen/updateWindowRect/windowMovedOrResized. Currently it's not
  91. - D3D9Texture::createTextureResources is commented out at the moment. It gets called on device reset, and at that point I should reload texture resources.
  92. - I should probably keep all resources by DX managed. OpenGL apparently keeps a mirror of all its resources anyway.
  93. - Device reset and resource re-loading in general
  94. - Fix up WorkQueue as it doesn't lock when initializing, to make sure threads are actually started before returning
  95. - CPU reading or writing to a render texture in OpenGL is not supported. (CmGLHardwarePixelBuffer::upload/download).
  96. - When saving a resource, make sure resource is properly loaded before saving
  97. - Add doc to Resources::save that says it will block until render thread updates the resource
  98. - Add documentation that tells the user that reading a resource non-async will block the thread and execute all queued render commands first
  99. - Remove Response handlers from Resources
  100. - Cg doesn't work. Either remove it or get it to work
  101. - System is not yet ready for multiple rendering contexts
  102. - When serializing/deserializing derived classes, deserialization is done from most derived to base, while it should probably be done the other way around.
  103. - Because GLSL introspection API is built around basic types I don't support structs or arrays of objects:
  104. - I can't determine the size of struct or object arrays, as GL compiler will optimize out unused elements
  105. - Can't determine size of individual struct either, for the same reason (some struct members might get optimized out)
  106. - Arrays of objects aren't supported in HLSL or GLSL because of limited GLSL introspection
  107. - I might need to add an exception thrown if user tries to use them
  108. - Structs aren't supported in GLSL for introspection reasons
  109. - Go through pixel formats and removed unused ones: L8, L16, A4L4, and many others
  110. - Having shared_ptrs used in RenderSystem and CommandQueue can cause potential performance problems. Dozends of thousands of shared
  111. pointers may be getting queued in command queue per frame, in a slightly more complex scene, which will most certainly cause performance problems
  112. due to thread safety and atomics used by shared_ptr. However I still need some guarantee that objects queued in RenderSystem won't be destroyed
  113. by the sim. thread.
  114. - A way to bind buffers to a Pass, while specifying buffer range
  115. - Better creation of PrimaryWindow
  116. - RENDERWINDOWDESC accepts a "externalWindow" flag and an "externalHandle" so when creating the primary window with RenderSystem::initialize we don't always need to create a new window
  117. - Actually new OpenGL seems to support creating context without a window with the help of wglCreateContextAttribsARB and wglMakeCurrent:
  118. - OpenGL render window no longer looks for a monitor index
  119. - Material RTTI should also serialize shared buffers (they need to be made into a resource)
  120. - BE CAREFUL on how this will be implemented. Likely it will have much of the same interface as a material and/or GpuParams
  121. - Mesh::setMeshData is currently always synced
  122. - queueGpuCommand is handled weird. shared_ptr isn't used for setting (this) parameter, and could be optimized out by the compiler
  123. - test if everything is okay in release mode
  124. - Resources::unload will deadlock if the resource isn't being loaded!
  125. - Maybe re-think how I handle ResourceHandle.isCreated?
  126. - Check D3D9/D3D11/GL resource usages. DX11 reports many unreleased objects. I'm guessing DX9 will as well. Not sure how to check OpenGL.
  127. - Shared GPU buffers
  128. - wouldn't work atm due to the way I update the buffers (and the way I mark them dirty)
  129. - Material::setParamBlock is commented out
  130. - onMovedOrResized is still used by Viewport while that same callback is offered by RenderWindowManager. There is no need to have them in both places.
  131. - Texture "ScaleToFit" will cause the texture to repeat instead of clipping the image. e.g. a 50x20 texture placed on an 50x100 area will repeat 5x
  132. ----------------------------------------------------------------------------------------------
  133. Optional:
  134. - Need better handling for shader techniques. Some Materials are able to run on all renderers yet I can only specify one. This is problematic
  135. for Materials for things like text and sprites, which should run on all renderers, even if user adds a new one
  136. - Add precompiled headers to all projects
  137. - Serializable callbacks can't be null otherwise compiler complains
  138. - FBX importer can be greatly sped up by implementing a better allocator
  139. - Extend texture copy so it accepts different subregions & subresources (currently only entire resource can be copied)
  140. - Need a way to convert MSAA render texture into a normal render texture
  141. - Vertex buffer start offset is not supported when calling Draw methods
  142. - When rendering Scale9Grid GUI elements the stretched center will cause linear interpolation to kick in and blend the edges with the border parts of the texture.
  143. - I should use point filtering for scale9grid, but that doesn't work in general case for stretched textures as they would look bad