Răsfoiți Sursa

Moved documentation to gdocs

Marko Pintera 11 ani în urmă
părinte
comite
e4f8ac230b
18 a modificat fișierele cu 128 adăugiri și 842 ștergeri
  1. 1 15
      BansheeEngine.sln
  2. 0 79
      CSharpWrap.txt
  3. 0 12
      DrawHelper.txt
  4. 0 24
      EditorWindowDock.txt
  5. 0 8
      GameGUI.txt
  6. 0 28
      GameObjectSerialization.txt
  7. 0 45
      Inspector.txt
  8. 0 199
      Notes.txt
  9. 0 10
      Opts.txt
  10. 0 38
      Polish.txt
  11. 0 14
      ProjectLibrary.txt
  12. 0 18
      ResourceBundles.txt
  13. 0 160
      SceneView.txt
  14. 0 35
      SpriteTexture.txt
  15. 127 93
      TODO.txt
  16. 0 29
      TODODoc.txt
  17. 0 12
      TreeView.txt
  18. 0 23
      UndoRedo.txt

+ 1 - 15
BansheeEngine.sln

@@ -5,23 +5,8 @@ VisualStudioVersion = 12.0.30723.0
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Notes", "_Notes", "{1D081E5A-615A-4C06-B2DF-0D8D9390DE02}"
 	ProjectSection(SolutionItems) = preProject
-		CSharpWrap.txt = CSharpWrap.txt
-		DrawHelper.txt = DrawHelper.txt
-		EditorWindowDock.txt = EditorWindowDock.txt
-		GameGUI.txt = GameGUI.txt
-		GameObjectSerialization.txt = GameObjectSerialization.txt
-		Inspector.txt = Inspector.txt
 		Notes.txt = Notes.txt
-		Opts.txt = Opts.txt
-		Polish.txt = Polish.txt
-		ProjectLibrary.txt = ProjectLibrary.txt
-		ResourceBundles.txt = ResourceBundles.txt
 		SceneView.txt = SceneView.txt
-		SpriteTexture.txt = SpriteTexture.txt
-		TODO.txt = TODO.txt
-		TODODoc.txt = TODODoc.txt
-		TreeView.txt = TreeView.txt
-		UndoRedo.txt = UndoRedo.txt
 	EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BansheeEngine", "BansheeEngine\BansheeEngine.vcxproj", "{07B0C186-5173-46F2-BE26-7E4148BD0CCA}"
@@ -183,6 +168,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Guides", "Guides", "{425968
 		Dependencies.txt = Dependencies.txt
 		Mono-3.2.3-IntegrationGuide.txt = Mono-3.2.3-IntegrationGuide.txt
 		Mono-3.4.0-IntegrationGuide.txt = Mono-3.4.0-IntegrationGuide.txt
+		NVTTCompilationGuide.txt = NVTTCompilationGuide.txt
 	EndProjectSection
 EndProject
 Global

+ 0 - 79
CSharpWrap.txt

@@ -1,79 +0,0 @@
-Classes that need C# wrappers:
-Resources:
- - Mesh
- - Texture
- - Font
- - Material
-  - GpuProgram
-  - Technique
-  - Shader
-  - DepthStencil/Blend/Rasterizer/Sampler state
-
-Core objects:
- - SceneObject
- - Component
-  - plus specific components Camera, Renderable, maybe others
-  - (later ofc ability to derive custom C# components)
-
-GUI:
- - EditorWindow
- - GUIWidget
- - GUILabel/GUIButton/GUIToggle/GUIInputBox/GUITexture...
- - GUILayoutX/GUILayoutY/GUILayoutOptions
- - GUISkin/GUIElementStyle
-
-Systems:
- - Resources
- - Importer
- - Application (startUp/shutDown)
- - Cursor
- - Debug
- - Input
- - Time
-
- -----------------
-
- Implementation steps:
-  - Implement flexible TreeView GUI component
-  - Finish up Window Docking
-  - EditorApplication
-   - a way to return currently open project
-  - Rethink how Resource .metas are handled
-  - Implement Resource window
-    - C# Importer (Internal class)
-     - Imports resources and stores it within Library of the current Project folder
-    - C# Resources, Save, Create
-    - (Drag and drop import)
-    - (File edit tracking)
-
-----------------------------
-
- - GUISkin
-   - List of properties with all common styles, like .button, .label
-   - Get/SetStyle methods for custom styles
-   - GUISkin.main <- default skin
- - GUI (Non EditorGUI version)
-
- - Implement C# Font
- - Implement C# SpriteTexture
-
-When loading resources I need to be able to load both project resources and engine ones. 
- - BuiltinResources can be used for accessing default resources like GUI skin textures and similar
- - They're all loaded from a special folder that is set in EditorApplication
-
- BsApplication::getPrimaryViewport is not implemented
-
- Ensure I can easily ensure that engine and run separate from editor for when game publishing will be implemented.
-
- -----------------
-
- Notes:
-  - I will need RequireComponent[] attribute. This attribute should automatically add the specified class to the wanted
-    GameObject. This is useful if you suddenly decide your class is now dependant on another, but you would otherwise have to manually
-	go through all instances of that GameObject in scene and add the required component.
-	  - HOWEVER, a more generic way of doing this (maybe using prefabs) would be useful. Because what happens when a class suddenly becomes
-	    dependant on a resource, or a specific instance of a class? In that case we cannot use RequireComponent.
-  - Use FrameUpdate[QueueIdx], OnCreate[QueueIdx], OnDestroy[QueueIdx] attributes to signify to the scripting system when to execute
-    certain methods. QueueIdx allows you to specify the order in which these methods will be called. In Unity you have Awake and Start methods
-	for initialization, but here you may just specify OnCreate[0] and OnCreate[1].
-	  - I will likely need C++ equivalents of these queues because C++ components will also require such ordering. 

+ 0 - 12
DrawHelper.txt

@@ -1,12 +0,0 @@
---------------------------
-
- Only one material per viewport needs to exist, no need for separate material for each element
-
--------------------------
-
-AA line stuff doesn't work in 3d unless I specify a plane :/
- - A better way might be to draw two lines in an X (for lines)
- - And for polygons use the normal formed by their triangle
- - See how Recast draws 3d lines and polys
-
-Make sure AABox can be rendered transparently and make sure it gets sorted properly

+ 0 - 24
EditorWindowDock.txt

@@ -1,24 +0,0 @@
-TODO:
- - Closing all docked widgets causes an exception
- - Test out minimum dock container size and maybe increase it a bit
-
-I should consider adding multiple C# EditorWindow types (via an enum)
- - Normal dockable EditorWindow, a tool window (unockable, no tabs), a modal window or maybe others
-   - Dockable EditorWindow would internally be EditorWidgetBase as it is now and I would create different types for other windows
-   - (Other windows should not need layout)
-
-
-Polish TOOD:
- - Change cursor icon when window is dragged
- - Prevent docking if available size is less than 20 pixels, otherwise there might be some weirdness
-
-------------------------
-
-LATER:
- get rid of CmApplication gMainCA and similar methods. Users may access CoreThread singleton directly now
- get rid of CoreAccessor::submitToCoreThread and instead leave that functionally only available to CoreThread
-
-------------------------
-
-Other things to remember:
- - Possibly add a way to have hidden widgets in the EditorWidgetContainer (like side-bars that pop on mouse over in Visual Studio)

+ 0 - 8
GameGUI.txt

@@ -1,8 +0,0 @@
-  - Move Scale9Grid stuff from ImageSprite to SpriteTexture
-
-  Moved all GUI rendering outside of GUIManager and into SpriteManager
-   - Make it generic for 2D game purposes
-
-  See SpriteTexture.txt for needed sprite texture updated.
-
-  Check Unity 2D tools for editor functionality: https://www.youtube.com/watch?v=EOX6itCuKOc&feature=youtu.be

+ 0 - 28
GameObjectSerialization.txt

@@ -1,28 +0,0 @@
-TODO
- - Ability to break external references as a pre-processing step
- - I need to properly unload all assemblies (and possibly shutdown mono runtime?) before I shut down various modules used in ScriptBansheeEngine.
-
-C# Serialization
- - Ensure that everything still works when a serialized type is removed
- - Ensure that such components retain their field data so when they are no longer unknown their data may be restored
-
- ---------------------------------------
-
-LOW PRIORITY
-- Get rid of ScriptObject::createInstance and replace it with parameter in constructor
-- A way to serialize any object into a Resource (and deserialize it from Resource)
-
- ------------------------------------------------------
- General C# component management
-
- Native components like Camera
-  - ScriptCamera derives from Camera
-    - Then whenever I check for managed Components I need to check if object type of ScriptComponent or
-	  any of the built-in types. 
-	   - Checking each type might be a bit slow, but normally we will be looking for an exact type
-	     so hopefully this will only matter when enumerating all components which shouldn't be during performance
-		 critical moments.
-
-TODO - When reloading scripts how to handle restoring references?
-TODO - When I destroy a Component, how will I refresh the inspector to let it know that something has changed
-  - Can happen from C# and C++

+ 0 - 45
Inspector.txt

@@ -1,45 +0,0 @@
-Test custom resources:
- - Can I load them? (Will likely need ProjectLIbrary::load)
- - Can I reference them in Component and will the reference be held after after cloning?
-
-TODO:
- - Add SceneObject fields (Name, Position, Rotation, Scale and optional switches between world/local)
- - Properly hook up UndoRedo, for both in-field and object-wide changes
-   - How do I track Ctrl+Z and Ctrl+Y keys? And in general how do I distinguish when I send
-     input to the game and when to the editor.
- - GUIColor needs to be hooked up to a window that actually changes its value.
-
-
-
-
-
-Polish (SECOND PASS - LATER):
-
- - Add a dictionary inspector.
-    - Check Unity Full Inspector addon for inspiration on how it should look: http://forum.unity3d.com/threads/full-inspector-inspector-and-serialization-for-structs-dicts-generics-interfaces.224270/
- - Add icons to array clone/delete/up/down buttons
- - Add support for multi-rank array inspector
- - Add tabbing between fields
- - Clicking on an object/resource in inspector should ping it in their window
-
-----------------------------------------------
-
-A way to close a window & destroy a GUI panel!
- - Will likely need to refactor ScriptEditorWindow as currently it performs initialization
-   in constructor and destroy in destructor, but open/close will be called within its lifetime
- - Also a way to get notified if the window gets closed from C++
- - Once closed the referenced GUIPanels should no longer work (set "destroyed" flag?)
- - What about calling Destroy on a GUIPanel?
-   - It should notify owning EditorWindow
- - IMPORTANT: Right now it seems there is Internal_Destroy method on managed GUIPanel but it isn't hooked up to the script
-
-Ensure that setting depth for GUIArea works properly. It's not properly implemented yet.
-
- ----------------------
-
- Non-inspector:
-  - Deleting first entry in input field moves the cursor incorrectly
-  - ProfilerOverlay elements are constantly dirty? even though I'm not calling update
-
-Undocking a window wont remove the tabbed title bar
-While dragging an undocked window, dropping it over the main window (not over dock overlays) will not restore it

+ 0 - 199
Notes.txt

@@ -1,199 +0,0 @@
-Reminders:
-  - When I'll be doing SRGB write make sure GUI textures are handled properly. Right now they are read in gamma space, and displayed
-    as normal, but if I switch to SRGB write then gamma would be applied twice to those textures.
-  - Async callbacks. I'd like to be able to assign a callback to an async method, that will execute on the calling thread once the async operation is complete.
-     - For example when setting PixelData for a cursor I need to get PixelData from a texture, which is an async operation, in which case I need to block the calling thread
-	   until I get the result. But I'd rather apply the result once render thread is finished.
-  - GUI currently doesn't batch elements belonging to different GUIWidgets because each of them has its own transform. Implement some form of instancing for DX11 and GL
-    so this isn't required. GUIManager already has the ability to properly group meshes, all that is needed is a shader.
-  - When specifying GUIElement layout using (for example) GUILayoutOptions::expandableX then it would be useful if I didn't have to provide the Y height, and instead make it use 
-    the default value for that GUIElement type. For most elements I will only be changing width, and height will remain default (labels, buttons, toggles, drop down lists, etc.) 
-	so this would be helpful in a way I wouldn't need to look up actual element height in EngineGUI.
-  - GUI currently ignores tooltips in GUIContent. 
-  - A way to initialize BansheeEngine without RenderSystem or any kind of UI. So that it may be used for server building as well.
-  - Calls to "initialize()" should be protected. For example GUIWidget and all its derived classes require the user to separately call initialize() after construction.
-    However a much better option would be to wrap construction and initialization in a create() method and make initialize protected.
-	  - GUIWidget needs to be added using addComponent which makes "create()" method not practical. However I have trouble seeing the need for initialize(),
-	    it could be replaced with a variable parameter version of addComponent.
-  - Profiling: Create an easy to browse list of all loaded Resources (similar to Hierarchy in Unity, just for loaded resources)
-    - Possibly also for all core objects
-  - GUI ignores image in GUIContent for most elements
-  - Each view (i.e. camera) of the scene should be put into its own thread
-  - How do I handle multiple mesh formats? Some files need animation, other don't. Some would mabye like to use QTangent, others the proper tangent frame.
-    - Asset postprocessor? Imports a regular mesh using normal importers and then postprocesses it into a specialized format?
-  - Load texture mips separately so we can unload HQ textures from far away objects (like UE3)
-  - Add Unified shader so I can easily switch between HLSL and GLSL shaders (they need same parameters usually, just different code)
-    - UE4 has GLSL/HLSL shader cross compiler, so something similar
-  - Remove HardwarePixelBuffer (DX11 doesn't use it, and DX9 and OpenGL textures can be rewritten so they have its methods internally)
-  - Make sure my Log system uses XML + HTML
-  - There is an issue that custom-UIs won't have their mesh shared. For example most game UIs will be advanced and will 
-   likely use on GUIWidget per element. However currently I only perform batching within a single widget which 
-   doesn't help in the mentioned case.
-  - Input: Allow combinations like A+B+X on joystick to be a virtual key
-  - Add a field that tracks % of resource deserialization in BinarySerializer
-  - Add GL Texture buffers (They're equivalent to DX11 buffers) - http://www.opengl.org/wiki/Buffer_Texture
-  - I should consider creating two special Mesh types:
-     StreamMesh - constantly updated by CPU and read by GPU
-     ReadMesh - written by GPU and easily read by CPU
-	  - OpenGL especially has no good way of reading or streaming data. It has special STREAM and COPY buffer types which I never use.
-  - (EXTREMELY LOW PRIORITY) Scripting: It might be good to make Mono classes more generic and move them to BansheeEngine. 
-      e.g. MonoClass -> ScriptClass, where ScriptClass is just an abstract interface. Then I don't expose any Mono stuff to actually script libraries like 
-	  SBansheeEngine. User could then fairly easily port the system to another scripting language just by implementing another ScriptSystem. 
-    - This would probably come with an overhead of at least one extra function call for each script call, which is currently unacceptable 
-	  considering that most people will definitely won't be writing new script systems.
-  - Perhaps add code generation functionality to the engine through Mono? I know Mono has support for it though its Embed interface
-  - Add instancing to engine: All I really need to add are per-instance attributes in VertexData (and MeshData). And then RenderSystem::renderInstance method that also accepts an instance count.
-  - Debug console
-    - Add ability to add colors tags like <color=#123>. Possibly also reference custom styles using those same tags.
-	- When showing a debug message, also provide a (clickable?) reference to Component it was triggered on (if applicable)
-	  - It really helps when you get an error on a Component that hundreds of SceneObjects use
-	- When displaying an error with a callstack, make each line of the callstack clickable where it opens the external editor
-  - std::function allocates memory but I have no got way of using custom allocators as I'd have to wrap std::bind and that seems non-trivial
-  - Add a TaskScheduler profiler that neatly shows time slices of each task and on which thread they are run on
-  - Add support for BC6H and BC7 file format compression
-  - D-Pad on non-XInput devices will not be handled properly by the Input system because OIS reports it separately from other buttons (Simple to fix)
-  - Possible improvement: I can only update entire Mesh at once with writeSubresource
-  - Possible improvement: I keep bounds for the entire mesh and not per-submesh
-  - Possible improvement: I don't serialize Mesh bounds and they are recalculated whenever a mesh is loaded
-  - Add better mip map and compression options to the texture importer. Right now I'm ignoring a lot of the options even though I support them.
-  - Add separable pass sorting to RenderQueue
-  - DDS file import
-  - Make hierarchical documentation. Organize stuff based on type. Once I actually generate the documentation add Doxygen grouping tags (or whatever they're called)
-  - Make a Getting Started guide, along with the example project. Or just finish up the manual.
-  - I'm not too happy with HStrings using so many events. They use one internally which I think I can replace completely quite easily. And one externally for notifying GUI components, replacing
-    which would require more thought.
-  - GUIElementBase::_getElementAreas is currently only implemented for layouts. It will work of child elements of layouts and layouts themselves but will not 
-    work for child elements of custom element types. This method is used for calculating size and position of an element in its parent.
-  - I shouldn't use WeakRef with GameObjects. They need be deserialized in the order of their hierarchy and weak ref can break that.
-  - Make sure to add fixedUpdate() to run your game logic in. This should have an adjustable update rate. See: http://gameprogrammingpatterns.com/game-loop.html
-  - Will also need GameObject::destroy and GameObject::destroyImmediate. So I can remove GameObjects that might still be referenced that same frame (destroy() would just queue for destruction)
-  - When unloading unused resources I should do it recursively so it unloads any new ones that might have been released during the first unload. 
-    (e.g. unloading a sprite texture will probably release its atlas texture as well)
-  - Make importer multithreaded. I can add a flag to SpecificImporter that tells me if a certain importer supports multiple threads or not, but even if it doesn't I can run 
-    different importers on different threads this way. And once I hook up progress dialog box, perhaps make it have multiple progress bars in a single window (per thread).
-  - Add FolderManager, extensible C# script that can be attached to a folder (can be in a folder .meta) file. Handles processing of assets in that folder. Can get notified 
-    whenever anything in the folder changes. But is that necessary if I can have asset post- and pre- processor that can filter by folder programatically?
-  - Add option to optimize mesh for post-transform cache (triangles sharing vertices are sequential) on import (also pre-transform as well, order vertices by their first reference in IB, and so on)
-  - It would be nice to have automated creation of glue code between C# and C++ instead of writing all of these Script classes
-  - Think about removing C# GUIPanel. If I replace current EditorWidget's GUIArea with GUIWidget then panels aren't needed as those widgets can just
-    use areas directly. This means that the EditorWidgetContainer will also have a GUIWidget but it will be separate.
-	 - When doing this also consider refactoring how GUIArea anchoring works (currently it's limited and have ugly interface)
-  - Get rid of exceptions. I don't use any of their properties that I can't reproduce with a Debug::log and a manual stack trace. Also disable them in compiler to improve compile time.
-  - Improve compile time: Disable inlining in debug builds (Ob1 option), use precompiled headers
-
-Potential optimizations:
- - bulkPixelConversion is EXTREMELY poorly unoptimized. Each pixel it calls a separate method that does redudant operations every pixel.
- - UI shader resolution params for gui should be in a separate constant buffer
-
-Things that I need to automate:
- - Automatic C++ RTTI generation by parsing the C++ class source
- - Shader definitions - They should be specified in text field and parsed like shader code
- - Shader cross compiling - Write shaders in one language and have them automatically compiled in others
- - C++ <-> C# glue code. A lot of it relies on enums not changing IDs, structs not changing layouts and methods
-   not changing parameters between C++ and C# code. It makes it easy to modify one and forget the other.
-   Instead make a smarter system that parses a common file and outputs both C++ and C# glue code.
-
-----------------------------------------------------------------------------------------------
-More detailed thought out system descriptions:
-
- <<<<Memory allocation critical areas>>>>
- - Binding gpu params. It gets copied in DeferredRenderContext
- - GameObjectHandle often allocates its internal data
- - ResourceHandle often allocates its internal data
- - AsyncOp allocates  AsyncOpData internally
- - Deserialization, a lot of temporary allocations going on - But how much impact on performance will allocations have considering this is probably limited by disk read?
- - Creating SceneObjects and Components - I might want to pool them, as I suspect user might alloc many per frame
- - Log logMsg
-
-<<Multithreaded GUI rendering>>
- - Event handling and normal "update" will still be done on the main thread
- - At the beginning of each frame a GUI mesh update is queued on the GUI thread
- - Since we're queuing the update at the beggining of the frame we will be using last frames transform and gui element states.
-   - When queing we need to make sure to store GUIWidget transform, and specific element states (e.g. "text" in GUILabel)
- - At the end of simulation frame wait until GUI update is complete. After both simulation and GUI updates are complete, proceed with submitting it to render system.
-
-<<Figure out how to store texture references in a font>>
- - Currently I store a copy of the textures but how do I automatically update the font if they change?
- - Flesh out the dependencies system?
- - I can import texture as normal, and keep it as an actual TextureHandle, only keep it hidden
-   if it was created automatically (by FontImporter) for example?
-    - But then who deletes the texture?
-	- Set up an "internalResource" system where resources hold references to each other and also release them?
-	 - In inspector they can be expanded as children of the main resource, but cannot be directly modified?
-	 - Deleting the main resource deletes the children too
-
-<<<<Reducing render state changes>>>>
- - Transparent objects get sorted back to front, always
- - Opaque objects I can choose between front to back, no sort or back to front
- - Then sort based on material-pass combo, rendering all passes of the same material at once, then moving to next pass, then to next material, etc.
-   - For transucent objects I need to render entire material at once, and not group by pass
-   - Ignore individual state and textures changes, just sort based on material
- - Use key-based approach as described here: http://realtimecollisiondetection.net/blog/?p=86
-
-Questions/Notes:
- 1. Could I make use of multiple texture slots so I don't have to re-assign textures for every material when rendering translucent objects pass by pass?
-   - When sorting back to front (or front to back) it's highly unlikely that there will be many objects sharing the same material next to the same depth level anyway. 
-     So probably ignore this problem for now, and just change the states.
-
- 2. Should sorting be done on main or render thread?
-   - Main thread. It's highly unlikely main thread will be using as much CPU as render thread will, so free up render thread as much as possible.
-
- 3. Should oct-tree queries be done on main or render thread?
-   - Main thread as I would need to save and copy the state of the entire scene, in order to pass it to the render thread. Otherwise we risk race conditions.
-
- 4. Since render state and shader changes are much more expensive than shader constant/buffer/mesh (and even texture) changes, it might be a good idea to sort based on these,
-    instead of exact material? A lot of materials might share shaders and render states but not textures.
-
- 5. This guy: http://home.comcast.net/~tom_forsyth/blog.wiki.html#%5B%5BRenderstate%20change%20costs%5D%5D (who's a driver programmer) sorts all opaque objects based on shader/state
-    into buckets, and then orders elements in these bucks in front to back order. This gives him best of two worlds, early z rejection and low state changes.
-
-<<<<DirectDraw>>>>
- - Used for quickly drawing something, usually for debug and editor purposes.
- - It consists of methods like: DrawLine, DrawPolygon, DrawCube, DrawSphere, etc.
- - It may also contain other fancier methods like DrawWireframeMesh, DrawWorldGrid etc.
- - Commands get queued from various Component::update methods and get executed at the end of frame. After they're executed they are cleared and need to be re-queued next frame.
- - Internally DirectDraw manages dynamic meshes so it can merge multiple DrawLine class into one and such. This can help performance, but generally performance of this class should not be a major concern.
- - Example uses for it: 
-    - Drawing GUI element bounds when debugging GUI
-    - Drawing a wireframe selection effect when a mesh is selected in the scene
-
-<<<<RenderSystem needed modifications>>>>
-  - Texture resource views (Specifying just a subresource of a texture as a shader parameter)
-  - UAV for textures
-  - Stream out (write vertex buffers) (DX11 and GL)
-  - Texture buffers 
-   - Just add a special texture type? OpenGL doesn't support getting offset from within a texture buffer anyway
-  - Tesselation (hull/domain) shader
-  - Detachable and readable depthstencil buffer (Window buffers not required as they behave a bit differently in OpenGL)
-  - OpenGL provides image load/store which seems to be GL UAV equivalent (http://www.opengl.org/wiki/Image_Load_Store)
-  - Resolving MSAA textures (i.e. copying them to non-MSAA so they can be displayed on-screen). DX has ResolveSubresource, and OpenGL might have something similar.
-  - Single and dual channel textures (especially render textures, which are very important for effects like SSAO)
-  - Compute pipeline
-  - Instancing (DrawInstanced) (DX11 and GL)
-  - OpenGL append/consume buffers
-  - Indirect drawing via indirect argument buffers
-  - Texture arrays
-  - Rendertargets that aren't just 2D (Volumetric (3D) render targets in particular)
-  - Shader support for doubles
-  - Dynamic shader linkage (Interfaces and similar)
-  - Multisampled texture resources
-  - Multiple adapters (multi gpu)
-  - Passing initial data when creating a resource (DX11, but possibly GL too)
-  - Sample mask when setting blend state (DX11, check if equivalent exists in GL)
-  - RGBA blend factor when setting blend state(DX11, check if equivalent exists in GL)
-  - HLSL9/HLSL11/GLSL/Cg shaders need preprocessor defines & includes
-  - DirectX11 supports concurrent drawing and resource creation so all my resource updates should be direct calls to DX methods (I'll need a deferred context?)
-  - One camera -> one task (thread) approach for multithreading
-   - Also make sure to run off a thread pool (WorkQueue class already exists that provides needed interface)
-  - The way I handle rendering currently is to discard simulation results if gpu thread isn't finished.
-     - This reduces input lag but at worst case scenario the effect of multithreading might be completely eliminated as
-	   GPU ends up waiting for GPU, just because it was few milliseconds late. Maybe better to wait for GPU?
-
-
-<<<Localization notes for MUCH LATER>>>
- - It would be nice if HString identifier hash was being generated at compile time
- - I still need an easy way to edit the string table (Editor, importer or similar)
- - I might need font localization for non-standard character sets (e.g. russian, greek, asian, etc.)
-   - I probably don't want to use one huge set of textures containing both latin and asian characters but want to keep them separate
-   - Also asian sets might be too large for textures, in which case generating them at runtime might be necessary (or parsing string table and
-     generating textures from only used characters)

+ 0 - 10
Opts.txt

@@ -1,10 +0,0 @@
-Make sure to also update TextSprite and ImageSprite and anything else in UpdateMesh, then don't forget to find the issue that causes elements to get marked as dirty every single frame
-
- There are many allocations in CPUProfiler (especially report generation), and they aren't counted anywhere since they use
- a special allocator. - Add this as a Low priority task
-
---------------------
-
-When optimizing UpdateLayout make sure to mark elements that are fully culled as Culled
- - But in order to determine that I first need to update the sprite to find out the elements bounds which defeats the point
- - TODO - FIgure this out

+ 0 - 38
Polish.txt

@@ -1,38 +0,0 @@
---------------------
-
-Delay this until release:
-
-Input issues:
- - I cannot have input of 1 one frame and input of 0 another. This happens when frames are too short. I might need to add very short smoothing times?
- - I cannot have input set to 1 during the entire frame if the frame is very long and user just moved the mouse a bit.
-   - This might be even more of an issue with joystick axes as I currently have no mechanism of knowing what % of the frame are they being moved.
- - Maybe: Ability to define input sampling rate. Input sampling then runs on its own thread at 120/240/etc/Hz. Every frame the collected values are averaged.
-   - This could be a part of OIS. Mouse sampling should already be doing something similar.
-   - I can't think of ANY other way gamepad axes can work with long frame times, other than this approach
-   - Check DirectInput::Poll
-   - And DirectInput::GetDeviceState to get immediate mouse data
-     - Check if this state is an absolute value, difference from last call or what.
-   - Potentially also GetRawInputData as I might be able to use that instead of windows messages
- - Probably remove UE4 smoothing as I'm not even sure what it does
-
-Problem with current OIS mouse approach is that if I call capture() too often, no new sampling data is available 
-but the mouse might still be moving and it just reports 0. Which is wrong if the mouse is moving.
- - These is no way around this if querying the state too quickly. I can either keep the current system and remember
-   last 5-10ms of input and average that, or I can use the above solution with polling which should have the similar effect.
-
------------------
-
-Not so critical
-  - I have a feeling DX9 might start crashing once I resize to sub-fullscreen res and go back to FS - test it
-  - Add VSync toggle to RenderWindow if it doesn't already exist.
-  - Test creating a fullscreen window on window creation.
-  - Refactor GUIElement & GUIElementBase
-     - Sprite rendering methods should probably be marked as internal (possibly others too)
-       - A lot could be made private
-     - Has two methods for retrieveing ElementType
-     - getVisibleBounds doesn't make sense
-  - There's still a crash regarding an uninitialized mCachedPtr on a C# class when shutting down. Attempt to find consistent repro steps.
-  - Perform optimizations as needed to get reasonable performance
-  - Consider removing SceneManager from Core? I have two scene manager base classes.
-  - GpuParamBlockBuffer and GpuParams::cloneForCore are very clumsy in how they deal in keeping two separate param blocks. Rethink this a bit.
-  - Test texture compression and mip generation with DX9 and OpenGL

+ 0 - 14
ProjectLibrary.txt

@@ -1,14 +0,0 @@
-
- - Resource import queue (ability to display progress bar for resources that are importing)
-  - Plus modal windows?
-
--------------------
-
-LOW PRIORITY
-
-What happens when importer fails importing a file?
- - This can be one of the lasts steps, but I will likely need to go through all importers manually and set them up so they return proper error codes
-    and clean up properly on error.
-	- In fact they should use exceptions but those should be translated to error codes when returned to Importer
-	  - OR just write directly to debug log?
-	   - Probably log and error code, since I will need to inform the outside world that import failed somehow

+ 0 - 18
ResourceBundles.txt

@@ -1,18 +0,0 @@
-Resource packing
- - Add support for zlib compression/decompression
-    - There should be a generic comp/decomp class, and it can get assigned to ResourceManager
-    - When loading a file ResourceManager will check if it is compressed and uncompress if needed
-    - When saving user can specify if the file should be compressed
-    - Audio, image or video compression can be handled per file basis and their comp/decomp is done in their special managers and shouldn't be handled by resource manager
-       - But this means they will decompress on core thread? Not if I do it in "initialize()" method.
- - Add support for ResourceBundle-s. They contain multiple resources and are natively supported by ResourceManager
-   - They have RTTI and can easily be serialized/deserialized
-   - ResourceManager must be able to load/unload individual files from the ResourcePack
- - Resource bundle manager - Editor window
-   - Allows you to create resource bundles by dragging in resources
-     - Each dragged in resource also includes all of its dependencies
-       - Including a level will include all resources needed for that level (Think Unity Build manager but more customizable)
-     - Normally you only need one resource pack but if you want a streaming game where stuff gets downloaded from the web (for example) you can split it
-       into smaller packs.
-  - Displays detailed information for all included resources, including file sizes and dependencies
-  - Allows you to select compression settings per bundle

+ 0 - 160
SceneView.txt

@@ -1,160 +0,0 @@
-2. Extend C++ Texture so it keeps a CPU cached copy if we want it (PixelData per face, per mip)
-  - Texture::readCPUData(face, mip). Return null if not supported by texture.
-3. Figure out how to port AsyncOp to C#
-4. Write a C# interface for Texture, Texture2D, Texture3D, TextureCube
-  - Port PixelFormat to C#: Only a subset of actual formats? Only IDs not meta-data.
-  - Texture: width, height, format, numMipmaps, usage, sRGB, sampleCount
-  - Texture2D: GetPixels(int mip), SetPixels(int mip), AsyncOp GetGPUPixels(int mip)
-  - Texture3D: depth, GetPixels(int mip), SetPixels(int mip), AsyncOp GetGPUPixels(int mip)
-  - TextureCube: GetPixels(CubeFace face, int mip), SetPixels(CubeFace face, int mip), AsyncOp GetGPUPixels(CubeFace face, int mip)
-
--------------
-
-Optionally port PixelUtility to compressing, converting, generating mipmaps, applying gamma to PixelData
- - Also getMaxMimaps and other methods for retrieving pixel format information
-
-
-
-
-
-
-
-WEEKEND END
------------------------
-
- GIZMO TODO:
-  - Make a C# wrapper for Renderable
-
-Refactor GizmoManager and HandleManager so they accept a CameraHandler
- - I need to ensure scene CameraHandler has proper position/rotation before being passed to handle and gizmo manager
- - Delete SceneViewLocator, I don't think it's used anywhere
-
-Tomorrow:
- - Figure out how to deal with Textures, especially reading them
- - Move handle/gizmo manager to CameraHandler
- - Finish up Cursor
-
-Port SceneCameraController to C#
- - Will need a C# Cursor
-Port RenderTexture to C# and likely extend Texture2D so it accepts renderable flags. While at it add TextureCube and Texture3D as well.
- - Actually Texture2D doesn't seem to be implemented at all. Will also need to add PixelData wrapper.
- - Will I need to add support for readable textures? e.g. what happens when you try to read a texture from C#?
-   - Almost certainly. It's very useful to be able to read textures.
-   - I can't sync the threads when reading, it would be too slow. Have an AsyncOp similar to c++ code? 
-   - Also DX11 already creates a temporary staging buffer when reading from a texture, so keeping yet another CPU
-     copy seems like a waste.
-Ensure that EditorWindow resize callback works properly.
- - Perhaps add OnResizeEnd callback that can be used for updating the render texture
-Create a C# wrapper around ProjectSettings
-Make a Script version of SceneEditorWindow
- - This would replace SceneEditorWidget so it would initialize scene grid and call
-    update on handle manager and scene grid, as well as apply ProjectSettings to them.
- 
-Move handle is buggy as hell - It moves in wrong direction sometimes, sometimes it skips, other times collision seems to be wrong
-Need a way to drag and drop items from Scene tree view to Scene view
-When dragging a handle make sure it works when cursor leaves the scene view
-Also make sure that handle manager receives mouse up event if its done outside of scene view
-
-AFTER I have scene widget in C#:
- - Finish up C# Handles class so it returns proper values
- - Ensure fixed handle size and handle snapping works
- - Implement free move handle and remaining handles
- - Test custom handles from C#
-
-IMPLEMENT SELECTION RENDERING
-
-IMPROVE SceneGrid LOOK
- - LIKELY USE PIXEL SceneGrid WITH AA
- - OR (better) instead of drawing rows and columns of lines, just draw a plane with procedural texture
-
-LATER:
- - Need a way to render text for gizmos and handles, and in scene in general
- - Add drag to select
- - Need a better system to catch broken shaders. DX11 just draws nothing with depth, DX9 draws all white.
- - The bounds I retrieve from GUIUtility are relative to the entire window, not just the current widget.
- - Set up Application::getPrimaryViewport so it returns a valid viewport otherwise C# Camera won't work properly
-
----------------------------------------------------------------------
-Render textures in C#:
- - In C# have Texture2D, TextureCube, TextureVolume. They should have a common Texture base.
-   - Each of those can be created with a Renderable flag
- - Render textures mirror what we have in C++
-   - RenderTexture and MultiRenderTexture (since we have these separate representation we don't need RenderBuffer that Unity has)
-   - You can provide an existing texture from types listed above, or create a new render target and
-      create a basic 2D texture (multiple constructors)
- - Both RT types should have their color buffer (s) and depth buffer accessible as a texture to be used for rendering, or for reading
-
-----------------------------------------------------------------------
-Handles
-
-SliderLine - position, direction, length
-  - When initially activated it records position nearest so the line as the starting point
-  - Further mouse dragging also finds nearest position to the line
-  - Difference between those two results in a float value (how much to move along direction from position to reach new position)
-  - Slider line has a capsule + sphere collider size of which can be set manually
-
-SliderPlane - position, normal, size
-  - Similar to line slider only the direction is determined dynamically as well as distance
-  - Outputs a Vector2 (direction * distance moved)
-  - A OOB is used as a collider
-
-SliderDisc - position, normal, radius
-  - When initially activated it records position nearest so the disc as the starting point
-  - Further movement calculates the dynamic direction from the starting point to the current point on the plane the disc lies on
-  - Distance along that direction is returned as amount of movement (similar to line slider)
-  - Outputs a single float
-  - A torus is used as a collider
-
-Free move/rotate/scale handles need to exist as well
- - Scale is easy, just perform uniform scale. Use SliderPlane oriented towards camera
- - Move also use SliderPlane oriented towards camera
- - Rotation use SliderDisc oriented towards camera
-
-----------------------------------------------------
-STAGE 1
-
-CONCRETE TODO:
-HandleSliderPlane/HandleSliderDisc
- - update() implementation
-
-----------------------------------------------------
-STAGE 2
-Implement RotateHandle & ScaleHandle in C#
- - Nearest point to disc/arc code
-Add free move, free rotate, free scale functionality
-Handles that remain the same size regardless of distance from camera
- - For both drawing and collision
-
- More complex types for drawing like DrawArrow in HandleDrawManager
-
-----------------------------------------------------------------------
-SelectionRenderer
-
-Retrieve a list of selected objects from SelectionManager
-Find ones with Renderable components
-Retrieve Meshes, and world transforms from them
-Draw that same mesh with either a wireframe or a grayed out shader with a slight depth bias
-
----------------------------------------------------------------------
-Multi-resources
-
- Importer::import
-  - Each SpecificImporter is responsible for importing all needed resources and registering them with Resources manager
-  - However only the main resource is returned from that method
-  - Rest of the resources are referenced by the UUID in ResourceMeta and can be retrieved there if needed
-
- Resources::save
-  - Add to documentation that it will only save that exact resource and not any dependencies, you must call save() for them manually
-
- Resources::load
-  - Will automatically load all dependencies, optionally add a boolean that allows you to load only the main asset
-
-ProjectLibrary
- - Needs to be extended so it shows sub-resources in tree view
- - Need to extend my mapping so one asset maps to multiple assets in library (need to remember how I do that currently, is it just by name or meta-file identifier?)
-
----------------------
-
-With this approach I can:
- - Reference and load the sub-resources directly
- - Technically I can also delete sub-resources

+ 0 - 35
SpriteTexture.txt

@@ -1,35 +0,0 @@
-Completely worked out how to deal with texture animation and sprite textures:
-
-TextureMovie - derives from Texture
- - isAnimated() - returns true
- - getFrames - decodes all frames and returns them as individual textures. Make a note that this is an extremely slow process. For normals textures it just returns self.
-    - I will need this when providing a texture to SpriteGenerator among other things, so it may extract frames an generate an atlas (although I don't expect this will be 
-	  needed for actual movies, I want to keep the functionality the same for all textures)
- - getBindableTexture() - texture used by RenderSystem. Normal textures just return self, while animated textures return the current frame
- - DOES NOT support sprites (i.e. multiple textures from a single atlas, only multiple separate textures)
- - TextureMovieTheora decodes textures on the fly
- - TextureMovieRaw is created from a bunch of normal textures (using some utility method)
- - play/stop/rewind/setSpeed/move(+/- frameCount)
-
-SpriteTexture
- - Inherits from Resource
- - Replace all references to it using shared_ptr with handles
- - How do I create it?
-   - From native code allow a constructor that accepts a single texture (no atlas)
-   - And another constructor that accepts an uv an atlas
- - Can contain sprite animation
-   - Some constructors accept a list of uvs, list of pages (referencing an atlas), a list of atlases and FPS
-    - (Need multiple atlases as some animations might be lengthty)
-   - Will have play/stop/rewind/getTime()/etc. methods
- - It is up to the renderer to use animation data.
-   - GUIManager will be modified so use animation data if it exists
- - For use in Scene I may add a special SpriteRenderer that uses certain logic and a certain material which supports sprite animation
-
-SpriteGenerator
-  - generateAtlas: Accepts a list of textures and outputs a list of SpriteTextures and a texture atlas
-  - generateSpriteAnimation: Accepts a list of textures, and generates a single SpriteTexture with a set of UVs and FPS
-  - All of them must be manually saved using Resources::create if they are to persist
-
-
-TODO - How to handle animating uvs?
- - Things using animated textures will need to manually set the uvs every frame?

+ 127 - 93
TODO.txt

@@ -1,93 +1,127 @@
------------------------ CAMELOT 2D / GUI -----------------------------------------------------------
-
-Editor localization should be different from in-game one.
- - Because what happens when user decides to set "File" localized string to something else? It will also modify the editor string.
- - HString probably needs to accept an optional parameter of which StringTable to use
-
-Optimization notes:
- - submitToCoreThread calls are EXTREMELY slow. In 10-50ms range.
-
-A lot of stuff is still using GSyncedMainCA but it should be using gMainCA - Find and replace
-
-I call waitUntilLoaded too many times. Sometimes 5-6 times in a single function. Each of those calls will be extremely slow.
-
-GUIWidget::updateMeshes leaks. If I leave the game running I can see memory continously going up
-
- - I have disabled linear filtering because it doesn't look good on scale9grid textures. (Add another material so it works with stretched textures?)
- - What happens when I don't set a texture for a state of a GUI element. Use a dummy white texture probably?
-    - Make sure GUI system uses a dummy texture if one isn't available
-	- SpriteTexture keeps a static reference to DUmmyTexture which I need to release before shutdown
-
-- Hover colors of the scroll bar are wrong
-
- - LATER
-  - TAB between input elements
-  - Remove updateText calls from updateRenderElementsInternal and instead call it whenever offsets change
-  - I might consider not rendering caret from within input sprite to avoid redrawing it while, and draw it directly from GUIManager
-
-Maybe determine mesh front faces based on normals?
-
-----------------------------------------------------------------------------------------------
-Other:
- - Move Debug to CamelotCore and add SetFillMode
-
------------------------BACKLOG TODO---------------------------------------------------------------
-
-----------------------------------------------------------------------------------------------
-Medium priority:
- - RTTI:
-     When defining RTTIType like so: 
-      RTTIType<D3D9HLSLProgram, HighLevelGpuProgram, D3D9HLSLProgramRTTI>
-     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.
- - Make sure that I am able to blit contents from render textures on all render systems
- - Command buffer:
-   - Make CommandQueue not use mutexes and use atomics instead??
-   - 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.
- - GUIManager draw call merging:
-    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.
- - Update Mesh DX11 buffers so they get initialized with data immediately upon construction as an optimization and see if OpenGL has something similar
-
-----------------------------------------------------------------------------------------------
-Low priority TODO
- - Remove template from RTTIType and move it to IReflectable? This way i can hopefully move GetRTTITypeStatic and GetRTTIType to IReflectable so I don't
-   need to manually implement those for every method.
- - When saving a resource, make sure resource is properly loaded before saving
-   - Add doc to Resources::save that says it will block until render thread updates the resource
-   - Add documentation that tells the user that reading a resource non-async will block the thread and execute all queued render commands first
-   - Remove Response handlers from Resources
-- System is not yet ready for multiple rendering contexts
-- When serializing/deserializing derived classes, deserialization is done from most derived to base, while it should probably be done the other way around.
-- Because GLSL introspection API is built around basic types I don't support structs or arrays of objects: 
-  - I can't determine the size of struct or object arrays, as GL compiler will optimize out unused elements
-  - Can't determine size of individual struct either, for the same reason (some struct members might get optimized out)
-  - Arrays of objects aren't supported in HLSL or GLSL because of limited GLSL introspection
-    - I might need to add an exception thrown if user tries to use them
-  - Structs aren't supported in GLSL for introspection reasons
- - Having shared_ptrs used in RenderSystem and CommandQueue can cause potential performance problems. Dozends of thousands of shared
-    pointers may be getting queued in command queue per frame, in a slightly more complex scene, which will most certainly cause performance problems
-    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
-	by the sim. thread.
-  - A way to bind buffers to a Pass, while specifying buffer range
-  - Material RTTI should also serialize shared buffers (they need to be made into a resource)
-    - BE CAREFUL on how this will be implemented. Likely it will have much of the same interface as a material and/or GpuParams
-  - queueGpuCommand is handled weird. shared_ptr isn't used for setting (this) parameter, and could be optimized out by the compiler
-    - test if everything is okay in release mode
-  - Resources::unload will deadlock if the resource isn't being loaded!
-    - Maybe re-think how I handle ResourceHandle.isCreated?
-  - Check D3D9/D3D11/GL resource usages. DX11 reports many unreleased objects. I'm guessing DX9 will as well. Not sure how to check OpenGL.
- - 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
- - When writing to mesh vertex buffer in Mesh::writeSubresource that requires a color flip I need to create a temporary copy of the 
-    entire buffer. It would be better to handle this differently. Same thing happens in MeshHeap
- - OpenGL also supports texture views using glTextureView but so far I only use them in DX11
- - I don't have a way to set Texture filtering or wrap modes, default ones are always set on initialization
-----------------------------------------------------------------------------------------------
-Optional:
- - Add precompiled headers to all projects
- - Serializable callbacks can't be null otherwise compiler complains
- - FBX importer can be greatly sped up by implementing a better allocator
- - Extend texture copy so it accepts different subregions & subresources (currently only entire resource can be copied)
- - Vertex buffer start offset is not supported when calling Draw methods
- - 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.
-  - I should use point filtering for scale9grid, but that doesn't work in general case for stretched textures as they would look bad
- - 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. 
- - Eventually make all math classes templates that work on both doubles and floats. (Very low priority)
+3. Figure out how to port AsyncOp to C#
+4. Write a C# interface for Texture, Texture2D, Texture3D, TextureCube
+  - Texture: width, height, format, numMipmaps, usage, sRGB, sampleCount
+  - Texture2D: GetPixels(int mip), SetPixels(int mip), AsyncOp GetGPUPixels(int mip)
+  - Texture3D: depth, GetPixels(int mip), SetPixels(int mip), AsyncOp GetGPUPixels(int mip)
+  - TextureCube: GetPixels(CubeFace face, int mip), SetPixels(CubeFace face, int mip), AsyncOp GetGPUPixels(CubeFace face, int mip)
+
+-------------
+
+Optionally port PixelUtility to compressing, converting, generating mipmaps, applying gamma to PixelData
+ - Also getMaxMimaps and other methods for retrieving pixel format information
+
+ C# AsyncOp
+ - Internally holds actual AsyncOp
+ - Direct accessor to isComplete
+ - Accessor to returnValue
+   - returns null or empty value if not complete
+   - C++ wrapper accepts a callback that knows how to convert returnType into a C# type
+    - it should also increase ref count so the object isn't destroyed (if it's such object)
+
+
+
+
+
+
+WEEKEND END
+-----------------------
+
+Refactor GizmoManager and HandleManager so they accept a CameraHandler
+ - I need to ensure scene CameraHandler has proper position/rotation before being passed to handle and gizmo manager
+ - Delete SceneViewLocator, I don't think it's used anywhere
+
+Port SceneCameraController to C#
+ - Will need a C# Cursor
+Port RenderTexture to C# and likely extend Texture2D so it accepts renderable flags. While at it add TextureCube and Texture3D as well.
+ - Actually Texture2D doesn't seem to be implemented at all. Will also need to add PixelData wrapper.
+ - Will I need to add support for readable textures? e.g. what happens when you try to read a texture from C#?
+   - Almost certainly. It's very useful to be able to read textures.
+   - I can't sync the threads when reading, it would be too slow. Have an AsyncOp similar to c++ code? 
+   - Also DX11 already creates a temporary staging buffer when reading from a texture, so keeping yet another CPU
+     copy seems like a waste.
+Ensure that EditorWindow resize callback works properly.
+ - Perhaps add OnResizeEnd callback that can be used for updating the render texture
+Create a C# wrapper around ProjectSettings
+Make a Script version of SceneEditorWindow
+ - This would replace SceneEditorWidget so it would initialize scene grid and call
+    update on handle manager and scene grid, as well as apply ProjectSettings to them.
+ 
+Move handle is buggy as hell - It moves in wrong direction sometimes, sometimes it skips, other times collision seems to be wrong
+Need a way to drag and drop items from Scene tree view to Scene view
+When dragging a handle make sure it works when cursor leaves the scene view
+Also make sure that handle manager receives mouse up event if its done outside of scene view
+
+AFTER I have scene widget in C#:
+ - Finish up C# Handles class so it returns proper values
+ - Ensure fixed handle size and handle snapping works
+ - Implement free move handle and remaining handles
+ - Test custom handles from C#
+
+IMPLEMENT SELECTION RENDERING
+
+IMPROVE SceneGrid LOOK
+ - LIKELY USE PIXEL SceneGrid WITH AA
+ - OR (better) instead of drawing rows and columns of lines, just draw a plane with procedural texture
+
+---------------------------------------------------------------------
+Render textures in C#:
+ - In C# have Texture2D, TextureCube, TextureVolume. They should have a common Texture base.
+   - Each of those can be created with a Renderable flag
+ - Render textures mirror what we have in C++
+   - RenderTexture and MultiRenderTexture (since we have these separate representation we don't need RenderBuffer that Unity has)
+   - You can provide an existing texture from types listed above, or create a new render target and
+      create a basic 2D texture (multiple constructors)
+ - Both RT types should have their color buffer (s) and depth buffer accessible as a texture to be used for rendering, or for reading
+
+----------------------------------------------------------------------
+Handles
+
+SliderLine - position, direction, length
+  - When initially activated it records position nearest so the line as the starting point
+  - Further mouse dragging also finds nearest position to the line
+  - Difference between those two results in a float value (how much to move along direction from position to reach new position)
+  - Slider line has a capsule + sphere collider size of which can be set manually
+
+SliderPlane - position, normal, size
+  - Similar to line slider only the direction is determined dynamically as well as distance
+  - Outputs a Vector2 (direction * distance moved)
+  - A OOB is used as a collider
+
+SliderDisc - position, normal, radius
+  - When initially activated it records position nearest so the disc as the starting point
+  - Further movement calculates the dynamic direction from the starting point to the current point on the plane the disc lies on
+  - Distance along that direction is returned as amount of movement (similar to line slider)
+  - Outputs a single float
+  - A torus is used as a collider
+
+Free move/rotate/scale handles need to exist as well
+ - Scale is easy, just perform uniform scale. Use SliderPlane oriented towards camera
+ - Move also use SliderPlane oriented towards camera
+ - Rotation use SliderDisc oriented towards camera
+
+----------------------------------------------------
+STAGE 1
+
+CONCRETE TODO:
+HandleSliderPlane/HandleSliderDisc
+ - update() implementation
+
+----------------------------------------------------
+STAGE 2
+Implement RotateHandle & ScaleHandle in C#
+ - Nearest point to disc/arc code
+Add free move, free rotate, free scale functionality
+Handles that remain the same size regardless of distance from camera
+ - For both drawing and collision
+
+ More complex types for drawing like DrawArrow in HandleDrawManager
+
+----------------------------------------------------------------------
+SelectionRenderer
+
+Retrieve a list of selected objects from SelectionManager
+Find ones with Renderable components
+Retrieve Meshes, and world transforms from them
+Draw that same mesh with either a wireframe or a grayed out shader with a slight depth bias
+
+---------------------------------------------------------------------

+ 0 - 29
TODODoc.txt

@@ -1,29 +0,0 @@
- - Render system threading:
-  - GLSL limitations
-     - layout(row_major) is not supported and will likely result in incorrect matrices
-	 - Because GLSL introspection API is built around basic types I don't support structs or arrays of objects: 
-      - I can't determine the size of struct or object arrays, as GL compiler will optimize out unused elements
- - Can't determine size of individual struct either, for the same reason (some struct members might get optimized out)
-  - Texture limitations: Only 1D, 2D, 3D and Cube textures (and their samplers) are supported. Support for multisampled textures
-     is included where necessary to implement render targets. Support for texture arrays and is not included.
- - Multiple inheritance is not supported on any class that is serialized with the help of RTTI. If you use it you can expect
-   weird issues because of casting issues throughout the RTTI and serializer code.
- - If you're creating a hierarchy of classes with RTTI support, ALL classes in the hierarchy must have RTTI implementations. You cannot just leave
-   some out, even if they contain no data. This would create incomplete RTTI class hierarchy which can cause various issues.
- - If you are manually constructing a class and it has an "initialize()" method, then you need to call it before using the class. Most object creation is wrapped
-   in methods which do this automatically though. ("create()" methods)
- - Unlike most other objects you don't have to worry about cleaning up GUI elements. You can destroy them manually if you want to get rid of a 
-   specific element, but normally destruction will be handled by the owning GUIWidget.
- - Notation rules:
-    - Method prefixed with _ (i.e. _getDevice()) are internal methods used by the engine systems and normal user should not need to call them unless 
-	  he really knows what is he doing. Those methods might also be marked with "Internal method" notation in their documentation (without the _ prefix).
-	  Only methods that are part of the public interface have this syntax, as private methods are not visible to the user anyway, so there's no need for special notation.
-	    - When communicating between systems I will use "prefix _" notation interchangeably with friend class approach. Sometimes I prefer to extend the public interface and 
-		add a _ prefixed method, and in other cases I prefer not to modify the public interface and make a class a friend and use a private method.
-	  A lot of the classes are only meant for internal usage. In that case the entire class is marked with "Internal class", but none of its methods are prefixed or specially documented. 
-	  In such class it is assumed all methods are internal and generally aren't meant for normal day to day use.
-  - If using Visual Studio make sure you enable throwing of C++ exceptions. They are automatically disabled for me in VS2012 and VS2013 which results in nasty
-    issues as the exception gets reported as "First chance exception" and the code attempts to be run again. Banshee does not perform cleanup upon exception throw as exceptions
-	are used for fatal errors. This means you will end up with memory corruption or some other issue, while you could have gotten a clean exception explaining the problem.
-
-

+ 0 - 12
TreeView.txt

@@ -1,12 +0,0 @@
-TODO:
- - Callback on tree item select
- - Context menu with rename/copy/paste/duplicate
- - Delete with Undo/Redo support
- - Support for icons next to tree elements
- - Clicking on an already selectecd element starts rename 
-   - Will likely need some kind of check to ignore double-clicks?
-
- Other:
- - "Ping" effect
- - Copy/Paste/Duplicate
-   - This is more of a problem with actual copying of SceneObjects (It's not implemented). I should be able to serialize, and then de-serialize with a new parent as a form of copy.

+ 0 - 23
UndoRedo.txt

@@ -1,23 +0,0 @@
-Undo/Redo can be problematic when moving objects via transform gizmos
- - Although I can just trigger it on mouse up
-   - CmdMoveSO, CmdRotateSO, CmdScaleSO
-
-It will also be problematic when editing text fields
- - Technically I can register each character as its own undo operation
-Then when I leave the text field I register the entire change?
-
-How will I detect changes in the inspector?
- - Just use overriden GUIElements that detect focus lost and changes
-
-Multiple stacks
- - Used for pushing finer or more grained commands
- - e.g. when starting an edit on an InputBox I do UndoRedo.newStack which returns an unique index I provide when adding commands to UndoRedo. 
-   Then I register each invidual keystroke as a separate command. Once the InputBox loses focus though I do UndoRedo.removeStack.
-
-How do I register undo/redo on generic properties?
- - Just use RTTI names for updating/reading those properties
- - How will I deal with arrays?
-   - Just save/restore the entire array, it should be no different than single fields
- - What about C# stuff?
-  - For each Serializable class, on re-compile I go and create instances of "ScriptRTTIType"
-   - In constructor that class iterates over all serializable fields in the C# class and fills the mFields array same as custom RTTI classes do