TODO.txt 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. ----------------------- CAMELOT 2D / GUI -----------------------------------------------------------
  2. Editor localization should be different from in-game one.
  3. - Because what happens when user decides to set "File" localized string to something else? It will also modify the editor string.
  4. - HString probably needs to accept an optional parameter of which StringTable to use
  5. Optimization notes:
  6. - submitToCoreThread calls are EXTREMELY slow. In 10-50ms range.
  7. A lot of stuff is still using GSyncedMainCA but it should be using gMainCA - Find and replace
  8. I still re-create GUIWidget mesh every frame instead of just updating it.
  9. I call waitUntilLoaded too many times. Sometimes 5-6 times in a single function. Each of those calls will be extremely slow.
  10. GUIWidget::updateMeshes leaks. If I leave the game running I can see memory continously going up
  11. - BansheeApplication should probably derive from Camlelot application. Right now user needs to know the difference between
  12. 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
  13. IMMEDIATE:
  14. - Update debug camera so it uses callbacks
  15. - I have disabled linear filtering because it doesn't look good on scale9grid textures. (Add another material so it works with stretched textures?)
  16. - Enable alpha test so I don't render completely transparent pixels.
  17. - What happens when I don't set a texture for a state of a GUI element. Use a dummy white texture probably?
  18. - Make sure GUI system uses a dummy texture if one isn't available
  19. - SpriteTexture keeps a static reference to DUmmyTexture which I need to release before shutdown
  20. - Hover colors of the scroll bar are wrong
  21. TextBox needed elements:
  22. - Get DebugCamera to ignore input if GUI has already processed it
  23. - LATER
  24. - TAB between input elements
  25. - Remove updateText calls from updateRenderElementsInternal and instead call it whenever offsets change
  26. - I might consider not rendering caret from within input sprite to avoid redrawing it while, and draw it directly from GUIManager
  27. -----------
  28. Maybe determine mesh front faces based on normals?
  29. Immediate TODO:
  30. - A way to update mesh buffers without recreating vertex/index buffers (Setting data currently does exactly that)
  31. ----------------------------------------------------------------------------------------------
  32. Other:
  33. - Move Debug to CamelotCore and add SetFillMode
  34. -----------------------BACKLOG TODO---------------------------------------------------------------
  35. ----------------------------------------------------------------------------------------------
  36. Medium priority:
  37. - RTTI:
  38. When defining RTTIType like so:
  39. RTTIType<D3D9HLSLProgram, HighLevelGpuProgram, D3D9HLSLProgramRTTI>
  40. 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.
  41. - Make sure that I am able to blit contents from render textures on all render systems
  42. - Command buffer:
  43. - Make CommandQueue not use mutexes and use atomics instead??
  44. - 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.
  45. - GUIManager draw call merging:
  46. 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.
  47. - Update Mesh DX11 buffers so they get initialized with data immediately upon construction as an optimization and see if OpenGL has something similar
  48. ----------------------------------------------------------------------------------------------
  49. Low priority TODO
  50. - Remove template from RTTIType and move it to IReflectable? This way i can hopefully move GetRTTITypeStatic and GetRTTIType to IReflectable so I don't
  51. need to manually implement those for every method.
  52. - Viewport needs to be updated when I call RenderTarget::setFullscreen/finishSwitchingFullscreen/updateWindowRect/windowMovedOrResized. Currently it's not
  53. - CPU reading or writing to a render texture in OpenGL is not supported. (CmGLHardwarePixelBuffer::upload/download).
  54. - When saving a resource, make sure resource is properly loaded before saving
  55. - Add doc to Resources::save that says it will block until render thread updates the resource
  56. - Add documentation that tells the user that reading a resource non-async will block the thread and execute all queued render commands first
  57. - Remove Response handlers from Resources
  58. - System is not yet ready for multiple rendering contexts
  59. - When serializing/deserializing derived classes, deserialization is done from most derived to base, while it should probably be done the other way around.
  60. - Because GLSL introspection API is built around basic types I don't support structs or arrays of objects:
  61. - I can't determine the size of struct or object arrays, as GL compiler will optimize out unused elements
  62. - Can't determine size of individual struct either, for the same reason (some struct members might get optimized out)
  63. - Arrays of objects aren't supported in HLSL or GLSL because of limited GLSL introspection
  64. - I might need to add an exception thrown if user tries to use them
  65. - Structs aren't supported in GLSL for introspection reasons
  66. - Having shared_ptrs used in RenderSystem and CommandQueue can cause potential performance problems. Dozends of thousands of shared
  67. pointers may be getting queued in command queue per frame, in a slightly more complex scene, which will most certainly cause performance problems
  68. 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
  69. by the sim. thread.
  70. - A way to bind buffers to a Pass, while specifying buffer range
  71. - Material RTTI should also serialize shared buffers (they need to be made into a resource)
  72. - BE CAREFUL on how this will be implemented. Likely it will have much of the same interface as a material and/or GpuParams
  73. - queueGpuCommand is handled weird. shared_ptr isn't used for setting (this) parameter, and could be optimized out by the compiler
  74. - test if everything is okay in release mode
  75. - Resources::unload will deadlock if the resource isn't being loaded!
  76. - Maybe re-think how I handle ResourceHandle.isCreated?
  77. - Check D3D9/D3D11/GL resource usages. DX11 reports many unreleased objects. I'm guessing DX9 will as well. Not sure how to check OpenGL.
  78. - 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
  79. - When writing to mesh vertex buffer in Mesh::writeSubresource that requires a color flip I need to create a temporary copy of the
  80. entire buffer. It would be better to handle this differently. Same thing happens in MeshHeap
  81. - OpenGL also supports texture views using glTextureView but so far I only use them in DX11
  82. - I don't have a way to set Texture filtering or wrap modes, default ones are always set on initialization
  83. ----------------------------------------------------------------------------------------------
  84. Optional:
  85. - Need better handling for shader techniques. Some Materials are able to run on all renderers yet I can only specify one. This is problematic
  86. for Materials for things like text and sprites, which should run on all renderers, even if user adds a new one
  87. - Add precompiled headers to all projects
  88. - Serializable callbacks can't be null otherwise compiler complains
  89. - FBX importer can be greatly sped up by implementing a better allocator
  90. - Extend texture copy so it accepts different subregions & subresources (currently only entire resource can be copied)
  91. - Need a way to convert MSAA render texture into a normal render texture
  92. - Vertex buffer start offset is not supported when calling Draw methods
  93. - 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.
  94. - I should use point filtering for scale9grid, but that doesn't work in general case for stretched textures as they would look bad
  95. - Win32DropTarget: I need to be able to set drop DROPEFFECT when various IDropTarget methods are called. Otherwise the drag cursor always remains the same, whether the drag will be accepted or not.
  96. - Eventually make all math classes templates that work on both doubles and floats. (Very low priority)