Pārlūkot izejas kodu

Added renderer manual (WIP)
Added BSLFX manual to native manuals
Various other documentation fixes

BearishSun 9 gadi atpakaļ
vecāks
revīzija
d17415eeed
32 mainītis faili ar 1213 papildinājumiem un 464 dzēšanām
  1. 398 0
      Documentation/Manuals/Native/bslfx.md
  2. 118 0
      Documentation/Manuals/Native/gameObjects.md
  3. 96 0
      Documentation/Manuals/Native/gettingStarted.md
  4. 1 1
      Documentation/Manuals/Native/gui.md
  5. 2 1
      Documentation/Manuals/Native/manuals.md
  6. 1 1
      Documentation/Manuals/Native/plugins.md
  7. 149 0
      Documentation/Manuals/Native/renderer.md
  8. 1 1
      Doxyfile
  9. 3 0
      Source/BansheeCore/Include/BsComponent.h
  10. 1 1
      Source/BansheeCore/Include/BsCorePrerequisites.h
  11. 4 4
      Source/BansheeCore/Include/BsCoreRenderer.h
  12. 2 2
      Source/BansheeCore/Source/BsCoreRenderer.cpp
  13. 11 11
      Source/BansheeCore/Source/BsProfilerCPU.cpp
  14. 1 1
      Source/BansheeEditor/Include/BsEditorPrerequisites.h
  15. 3 3
      Source/BansheeEditor/Source/BsDockManager.cpp
  16. 3 3
      Source/BansheeEditor/Source/BsGizmoManager.cpp
  17. 2 2
      Source/BansheeEditor/Source/BsHandleDrawManager.cpp
  18. 2 2
      Source/BansheeEditor/Source/BsSceneGrid.cpp
  19. 3 3
      Source/BansheeEditor/Source/BsSelectionRenderer.cpp
  20. 366 366
      Source/BansheeEditor/Source/Win32/BsVSCodeEditor.cpp
  21. 0 12
      Source/BansheeEngine/Include/BsCLight.h
  22. 1 1
      Source/BansheeEngine/Include/BsPrerequisites.h
  23. 1 1
      Source/BansheeEngine/Include/BsRenderableElement.h
  24. 6 6
      Source/BansheeEngine/Include/BsRenderer.h
  25. 4 4
      Source/BansheeEngine/Source/BsCamera.cpp
  26. 3 3
      Source/BansheeEngine/Source/BsGUIManager.cpp
  27. 7 7
      Source/BansheeEngine/Source/BsLight.cpp
  28. 7 7
      Source/BansheeEngine/Source/BsRenderable.cpp
  29. 1 1
      Source/BansheeUtility/Include/BsPrerequisitesUtil.h
  30. 0 4
      Source/MBansheeEditor/PrefabUtility.cs
  31. 8 8
      Source/RenderBeast/Include/BsRenderBeast.h
  32. 8 8
      Source/RenderBeast/Source/BsRenderBeast.cpp

+ 398 - 0
Documentation/Manuals/Native/bslfx.md

@@ -0,0 +1,398 @@
+Banshee Shading Language FX			{#bslfx}
+===============
+[TOC]
+
+BSLFX is a material definition language that allows you to specify non-programmable render states together with programmable ones. For example BSLFX will allow you to define a set of input parameters, rasterizer, depth-stencil and blend states along with actual vertex/fragment GPU program code.
+
+Actual GPU program code itself it written in any of the standard languages: HLSL or GLSL. A unified shading language is in the works so you will don't have to write separate code for DirectX and OpenGL renderers.
+
+Before continuing it is highly suggested you read the [material](@ref materials) manual, as it describes how to create shaders without the use of BSLFX which can provide a good background of where BSLFX is useful.
+
+BSLFX is a language with simple syntax that handles configuration but no actual logic. All syntax can be represented using this primitive:
+ - Type [Name] [= Value|Block] [: Modifier];
+
+Where:
+ - **Type** is one of the built-in language constructs. Most types are only allowed to be used in a certain context.
+ - **Name** is a user-defined name of the object. Certain **Types** require no names.
+ - **Value** is an integer, floating point value (including vectors and matrices), boolean, string (surrounded by quotes, “value”), or one of the built-in values. Which type of value is accepted depends on **Type**. 
+ - **Block** is a part of code that contains more primitives. As a special case blocks can also contain HLSL or GLSL code.
+
+A simple program that renders a mesh all in white looks like this:
+~~~~~~~~~~~~~~
+Parameters =
+{
+	mat4x4		gMatWorldViewProj;
+	mat4x4		gMatWorld;
+	mat4x4		gMatInvWorld;
+};
+
+Blocks =
+{
+	Block PerObject;
+};
+
+Technique =
+{
+	Language = "HLSL11";
+	
+	Pass =
+	{
+		Common = 
+		{
+			struct VStoFS
+			{
+				float4 position : SV_Position;
+			};
+			
+			cbuffer PerObject
+			{
+				float4x4 gMatWorldViewProj;
+				float4x4 gMatWorld;
+				float4x4 gMatInvWorld;
+			}					
+		};
+
+		Vertex =
+		{			
+			struct VertexInput
+			{
+				float3 position : POSITION;
+			};
+			
+			VStoFS main(VertexInput input)
+			{
+				VStoFS output;
+			
+				output.position = mul(gMatWorldViewProj, input.position);			
+				return output;
+			}
+		};
+		
+		Fragment =
+		{
+			float4 main(in VStoFS input) : SV_Target0
+			{
+				return float4(1.0f, 1.0f, 1.0f 1.0f); 
+			}	
+		};
+	};
+};
+~~~~~~~~~~~~~~
+	
+On the top-most level the program consists out of three blocks:
+ - Parameters - Contains a list of input parameters into the program (constants/uniforms).
+ - Blocks - Contains a list of blocks that group input parameters (constant buffers/uniform buffers).
+ - Technique - Contains one or multiple passes that contain the pipeline state for rendering. This is the meat of the program.
+
+# Parameters {#bslfx_a}
+All parameters specified in this block will be exposed to the @ref BansheeEngine::Shader "Shader" object. These parameters will be accessible from the @ref BansheeEngine::Material "Material" object. You are still allowed to define uniforms/constants within shader code, without defining them in the parameter list, but they will not be visible to high level code. This can be useful if you are working on a lower level, like directly with the renderer.
+
+Types supported in this block are:
+ - int - signed integer
+ - int2 - 2D vector of signed integers
+ - int3 - 3D vector of signed integers
+ - int4 - 4D vector of signed integers
+ - float - floating point value
+ - float2 - 2D vector of floating point values
+ - float3 - 3D vector of floating point values
+ - float4 - 4D vector of floating point values
+ - color - 4D vector of floating point values (the same as float4)
+ - mat2x2 - 2x2 matrix of floating point values
+ - mat2x3 - 2x3 matrix of floating point values
+ - mat2x4 - 2x4 matrix of floating point values
+ - mat3x2 - 3x2 matrix of floating point values
+ - mat3x3 - 3x3 matrix of floating point values
+ - mat3x4 - 3x4 matrix of floating point values
+ - mat4x2 - 4x2 matrix of floating point values
+ - mat4x3 - 4x3 matrix of floating point values
+ - mat4x4 - 4x4 matrix of floating point values
+ - Sampler1D - Sampler state for a 1D texture
+ - Sampler2D - Sampler state for a 2D texture
+ - Sampler3D - Sampler state for a 3D texture
+ - SamplerCUBE - Sampler state for a cube texture
+ - Sampler2DMS - Sampler state for a multi-sampled 2D texture
+ - Texture1D - 1D texture
+ - Texture2D - 2D texture
+ - Texture3D - 3D texture
+ - TextureCUBE - Cube texture
+ - Texture2DMS - Multi-sampled 2D texture
+ - ByteBuffer - Readable buffer of raw bytes
+ - StructBuffer - Readable buffer of structs
+ - ByteBufferRW - Read/Write buffer of raw bytes (UAV/load-store buffer)
+ - StructBufferRW  - Read/Write buffer of structs (UAV/load-store buffer)
+ - AppendBuffer - Buffer that is used for appending data in a stack-like fashion
+ - ConsumeBuffer - Buffer that is used for consuming data in a stack-like fashion
+ 
+Each parameter must have at least a type followed by a unique name. The name must match the name of the parameter in actual shader code:
+~~~~~~~~~~~~~~
+mat4x4 gMatWorldViewProj;
+~~~~~~~~~~~~~~
+
+You are also allowed to specify a default value for primitive types:
+~~~~~~~~~~~~~~
+float gMyFloat = 5.0f;
+~~~~~~~~~~~~~~
+	
+Or:
+~~~~~~~~~~~~~~
+mat2x2 gMyMat = { 1.0f, 0.0f, 0.0f, 1.0f };
+~~~~~~~~~~~~~~
+
+Textures can also have default values. Currently the accepted ones are "White", "Black" and "Normal". "Normal" will provide a normal texture with all normals pointing upwards, and "White" and "Black" will provide a white and black texture, respectively. For example:
+~~~~~~~~~~~~~~
+Texture2D gMyTexture = "White";
+~~~~~~~~~~~~~~
+
+Sampler states support more complex default values in the form of their own block. For example:
+~~~~~~~~~~~~~~
+Sampler2D gMySampler = { ... };
+~~~~~~~~~~~~~~
+
+Actual values in the sampler state will be explained later.
+
+Final element that parameters can have are modifiers. Modifiers are in the format of ": Modifier(Value)". Supported modifiers are:
+ - auto - Accepts a string that contains a semantic name. For example: `mat4x4 gMatWorldViewProj : auto("WVP");`. If the semantic "WVP" is recognized by the active renderer this value will be automatically assigned by the renderer. Automatic values cannot be manually set through the @ref BansheeEngine::Material "Material" interface. The default renderer doesn't support any parameter semantics, it instead works using block semantics (see below).
+ - alias - Accepts a string that contains an alternative name for the element. This can only be used for samplers, and is used for interfacing with render APIs that do not have separate objects for textures and samplers (e.g. OpenGL). You can use this to give your sampler the same name as the texture so such API will recognize it. For example:
+~~~~~~~~~~~~~~
+Texture2D gMyTexture;
+Sampler2D gMySampler : alias("gMyTexture"); // Ensures that render APIs that don't have separate sampler names use the same name as the texture
+~~~~~~~~~~~~~~
+
+# Blocks {#bslfx_b}
+Blocks are containers for parameters. In HLSL/GLSL they're usually called constant/uniform buffers. Actual layout of the blocks is therefore defined in their source language, and using the Block command we just make them available to the high level interface. The name of the block must be the same as the corresponding constant/uniform buffer.
+
+Parameters don't have to belong to a block but if they do you can share parameter blocks with multiple instances of @ref BansheeEngine::Material "Material", which is more efficient. Normally this is not something you need to worry about unless working low level with the renderer.
+
+Blocks all begin with the Block keyword, followed by a name. The name must match the name of the constant/uniform block in actual shader code:
+~~~~~~~~~~~~~~
+	Block MyBlock;
+~~~~~~~~~~~~~~
+
+# Technique {#bslfx_c}
+
+This is the meat of your shader. A technique contains code for your vertex/fragment/geometry/hull/domain/compute programs, as well as blend/rasterizer/depth-stencil states. A shader can contain multiple techniques but only a single technique is ever used at once. Different techniques can be specified for each shading language (e.g. HLSL, GLSL) and different renderer (in case you're using something other than the default).
+
+## Properties {#bslfx_c_a}
+
+Technique block should therefore always contain a "Language" property like so:
+~~~~~~~~~~~~~~
+	Language = "HLSL"
+~~~~~~~~~~~~~~
+
+Supported values are "HLSL" (DirectX 11 HLSL), "HLSL9" (DirectX 9 HLSL), and "GLSL".
+
+You can also specify a renderer using the "Renderer" property:
+~~~~~~~~~~~~~~
+	Renderer = "Default"
+~~~~~~~~~~~~~~
+
+Supported values are "Any", or "Default". More values could be available if you are using a custom renderer, but otherwise you don't need to set this property.
+
+Once the base properties are defined you can start defining code blocks and states.
+
+## Code blocks {#bslfx_c_b}
+Code blocks are elements in the technique that will contain HLSL/GLSL (or other supported language) code. There are six supported code blocks:
+ - Vertex
+ - Fragment
+ - Geometry
+ - Hull
+ - Domain
+ - Compute
+ 
+Each corresponding to the programmable GPU pipline stage of the same name. A code block looks like this:
+~~~~~~~~~~~~~~
+Vertex =
+{
+	...raw HLSL/GLSL code...
+};
+~~~~~~~~~~~~~~
+
+Within a code block BSL parsing rules do not work, anything inside them is treated as native GPU program code in the language specified. BSL expects that main entry methods for each programmable stage are named "main" (similar to the OpenGL requirement). You can use any name for non-entry methods.
+
+Aside from the mentioned code blocks you can also use a "Common" code block. All code in the "Common" code block will be available in all other code blocks.
+
+## States {#bslfx_c_c}
+Each technique can define properties for blend, depth-stencil and rasterizer states. Read the [render API](@ref renderAPI) manual for more information about render states. See a list below of all supported properties and their accepted values:
+
+**Rasterizer**
+ - Fill = [WIRE/SOLID];
+ - Cull = [CW/CCW/NOCULL];
+ - DepthBias = float;
+ - ScaledDepthBias = float;
+ - DepthClip = [true/false];
+ - Scissor = [true/false];
+ - Multisample = [true/false];
+ - AALine = [true/false];
+ 
+For example:
+~~~~~~~~~~~~~~
+...
+// Enable wireframe rendering with no culling
+Fill = WIRE;
+Cull = NOCULL;
+...
+~~~~~~~~~~~~~~
+ 
+**Depth-stencil**
+ - DepthRead = [true/false];
+ - DepthWrite = [true/false];
+ - CompareFunc = [FAIL/PASS/LT/GT/LTE/GTE/EQ/NEQ];
+ - Stencil = [true/false];
+ - StencilReadMask = int;
+ - StencilWriteMask = int;
+ - StencilOpFront = StencilOpBlock;
+ - StencilOpBack = StencilOpBlock;
+ - StencilRef = int;
+ 
+Where StencilOpBlock has properties:
+ - Fail = [KEEP/ZERO/REPLACE/INC/DEC/INCWRAP/DECWRAP/INV];
+ - ZFail = [KEEP/ZERO/REPLACE/INC/DEC/INCWRAP/DECWRAP/INV];
+ - Pass = [KEEP/ZERO/REPLACE/INC/DEC/INCWRAP/DECWRAP/INV];
+ - CompareFunc = [FAIL/PASS/LT/GT/LTE/GTE/EQ/NEQ];
+ 
+StencilOpBlock can also be defined in short form without having to specify property names. Parameters are ordered as listed here. For example:
+ - StencilOpFront = { KEEP, KEEP, REPLACE, PASS };
+
+For example:
+~~~~~~~~~~~~~~
+...
+// Disable depth writes and set up a stencil test for front faces
+DepthWrite = false;
+Stencil = true;
+StencilOpFront =
+	{
+		Fail = KEEP;
+		ZFail = KEEP;
+		Pass = INC; // Increment stencil on pass
+		CompareFunc = GT; // Only pass if greater than stencil reference value
+	};
+// OR
+// StencilOpFront = { KEEP, KEEP, INC; GT }; // Sort form
+StencilRef = 2; // Reference value to perform comparison against
+...
+~~~~~~~~~~~~~~ 
+ 
+**Blend state**
+ - AlphaToCoverage = [true/false];
+ - IndependantBlend = [true/false];
+ - Target = BlendTargetBlock;
+ 
+Where BlendTargetBlock has properties:
+ - Index = int;
+ - Blend = [true/false];
+ - Color = BlendDefinitionBlock;
+ - Alpha = BlendDefinitionBlock;
+ - WriteMask = [NOCOLOR/R/G/B/A/RG/RB/RA/GB/GA/BA/RGB/RGA/RBA/GBA/RGBA];
+ 
+Where BlendDefinitionBlock has properties:
+ - Source = [ONE/ZERO/DSTRGB/SRCRGB/DSTIRGB/SRCIRGB/DSTA/SRCA/DSTIA/SRCIA];
+ - Dest = [ONE/ZERO/DSTRGB/SRCRGB/DSTIRGB/SRCIRGB/DSTA/SRCA/DSTIA/SRCIA];
+ - Op = [ADD/SUB/RSUB/MIN/MAX];
+ 
+BlendDefinitionBlock can also be specified in short form similar as StencilOpBlock (parameters in order as listed here).
+ 
+For example:
+~~~~~~~~~~~~~~
+...
+// Set up blending so we can render transparent objects
+Target = 
+	{
+		Index = 0; // First render target, can be ignored in this case
+		Blend = true; // Enable blending
+		Color = // Blend operation for color values
+			{
+				Source = SRCA; // Multiply source with source alpha
+				Dest = SRCIA; // Multiply destination with inverse source alpha
+				Op = ADD; // Add the result together
+			};
+		// OR
+		// Color = { SRCA, SRCIA, ADD}; // Sort form
+	};
+...
+~~~~~~~~~~~~~~  
+ 
+Entries in brackets represent the supported keywords for the specified properties, while the other values represent data types.
+
+## Passes {#bslfx_c_d}
+Each technique can support one or multiple passes. By default you do not have to specify any passes in technique if your shader only requires a single pass. If multiple passes are required use the "Pass" block.
+
+A "Pass" block supports all the code-block and state properties the Technique supports. It also supports an additional "Index" property that accepts an integer and allows you to specify an order in which the passes are executed. It also allows the pass to be uniquely identified if merging passes (see later sections for information about merging). By default index is not needed and pass order of execution is assumed to be sequential.
+
+If you specify code blocks and/or states in both a Technique and a Pass block, then the values under the Technique block will be inherited by all Pass blocks of that technique.
+
+Pass example:
+~~~~~~~~~~~~~~
+// Technique with two passes
+Technique 
+{
+	Pass
+	{
+		Index = 0; // Optional, assumed zero since it's first in technique
+		
+		// Uses same states and code blocks we described for Technique
+	}
+	
+	Pass
+	{
+		Index = 1; // Optional, assumed one since it's second in technique
+		
+		// Uses same states and code blocks we described for Technique
+	}
+};
+~~~~~~~~~~~~~~
+
+# Advanced {#bslfx_d}
+
+## Block merging {#bslfx_d_a}
+If multiple Techniques using the same "Language" and "Renderer" are found in the file, they will internally be merged into a single larger technique. You may also use value of "Any" for both "Language" or "Renderer" properties to allow the technique to be merged with techniques that don't match it exactly.
+
+When merging passes within techniques, pass "Index" properties are compared and passes with the same index are merged. If no index is specified, passes are merged sequentially according to their order in the techniques.
+
+Code blocks are also merged, in the order they are defined.
+
+## Pre-processor {#bslfx_d_b}
+Use \#include "Path/To/File.bslinc" to share code by including other BSLFX files. Included files must end with a .bslinc extension but otherwise their syntax is the same as a normal BSLFX file. The provided path is a path to the shader relative to the project library if running in editor, or relative to the working directory otherwise. You can also use built-in $ENGINE$ and $EDITOR$ folders to access builtin shaders. e.g.
+~~~~~~~~~~~~~~
+#include "$ENGINE$/SpriteImage.bslinc"
+~~~~~~~~~~~~~~
+
+These values correspond to "Data/Engine/Includes" and "Data/Editor/Includes" folders, respectively. Be aware that $EDITOR$ folder will not be available in your standalone game.
+
+Use standard pre-processor commands \#define/\#undef/\#ifdef/\#ifndef/\#else/\#elif/\#endif to conditionally compile parts of the BSLFX file.
+
+Macros using \#defines are not supported in BSLFX code, but are within code-blocks. So while you are allowed to write:
+~~~~~~~~~~~~~~
+#define PI 3.14
+~~~~~~~~~~~~~~
+
+Any references to PI outside of code-blocks will not be replaced with 3.14 and will likely result in an error due to an unrecognized identifier.
+
+## Global shader properties {#bslfx_d_c}
+On the top-most level you may also specify additional parameters along with "Parameters", "Blocks" and "Technique":
+ - Separable = [true/false]; - Specifies if passes within the shader need to be executed sequentially, or could some other shader be executed in-between them. This is an optimization as it can allow the system to render geometry sharing the same passes all at once. False by default.
+ - Sort - [FRONTTOBACK/BACKTOFRONT/NOSORT]; - Specifies in what order are the objects using this shader sorted before rendering.
+ - Priority - int; - Specifies when will objects with this shader be rendered compared to other objects. Higher value means the objects will be rendered sooner. Priority has higher importance than sorting.
+ - Transparent - [true/false]; - Determines whether the shader renders transparent surfaces. Allows the renderer to better handle the shader.
+ 
+## Sampler state default values {#bslfx_d_d}
+Earlier we mentioned that sampler states can be provided a set of default values in a form of their own block, but didn't specify their properties. Sampler state properties are:
+ - AddressMode = AddressModeBlock;
+ - MinFilter = [NOFILTER/POINT/LINEAR/ANISO/POINTC/LINEARC/ANISOC];
+ - MaxFilter = [NOFILTER/POINT/LINEAR/ANISO/POINTC/LINEARC/ANISOC];
+ - MipFiler = [NOFILTER/POINT/LINEAR/ANISO/POINTC/LINEARC/ANISOC];
+ - MaxAniso = int;
+ - MipmapBias = float;
+ - MipMin = float;
+ - MipMax = float;
+ - BorderColor = { float, float, float, float };
+ - CompareFunc = [FAIL/PASS/LT/GT/LTE/GTE/EQ/NEQ];
+ 
+Where AddressModeBlock has the following properties:
+ - U = [WRAP/MIRROR/CLAMP/BORDER];
+ - V = [WRAP/MIRROR/CLAMP/BORDER];
+ - W = [WRAP/MIRROR/CLAMP/BORDER];
+ 
+It can also be specified in short form, where parameters are in order as above. For example:
+ - AddressMode = { WRAP, WRAP, WRAP };
+ 
+See @ref BansheeEngine::SamplerState "SamplerState" documentation about the meaning of these properties. 

+ 118 - 0
Documentation/Manuals/Native/gameObjects.md

@@ -0,0 +1,118 @@
+Game objects								{#gameObjects}
+===============
+[TOC]
+
+@ref BansheeEngine::GameObject "Game objects" represent the core of your game and where most of the gameplay code will be located. There are two types of game objects:
+ - @ref BansheeEngine::SceneObject "SceneObject" - Contains zero or multiple @ref BansheeEngine::Component "components". Has a position/rotation/scale in space, and can be parented to other scene objects.
+ - @ref BansheeEngine::Component "Components" - Provides a set of functionality used for customizing a @ref BansheeEngine::SceneObject "SceneObject". You can build your own components, and if fact this is where majority of your gameplay code will belong. A variety of built-in components are also provided.
+ 
+# Scene objects {#gameObjects_a}
+To create a @ref BansheeEngine::SceneObject "SceneObject" call @ref BansheeEngine::SceneObject::create "SceneObject::create" with a name of the object. The name doesn't have to be unique but is useful for identifying the object.
+
+~~~~~~~~~~~~~{.cpp}
+HSceneObject mySO = SceneObject::create("MySceneObject");
+~~~~~~~~~~~~~
+
+All @ref BansheeEngine::SceneObject "SceneObjects" are organized in a hierarchy. Initially when a new @ref BansheeEngine::SceneObject "SceneObject" is created it is parented to the scene root. However you can parent it to another scene object like so:
+
+~~~~~~~~~~~~~{.cpp}
+HSceneObject myParentSO = SceneObject::create("MyParentSceneObject");
+HSceneObject mySO = SceneObject::create("MySceneObject");
+mySO->setParent(myParentSO);
+~~~~~~~~~~~~~
+
+You can iterate over all children of a @ref BansheeEngine::SceneObject "SceneObject" by calling @ref BansheeEngine::SceneObject::getChild "SceneObjects::getChild"/@ref BansheeEngine::SceneObject::getNumChildren "SceneObjects::getNumChildren". You can also search for a specific child by name with @ref BansheeEngine::SceneObject::findChild "SceneObjects::findChild".
+
+@ref BansheeEngine::SceneObject "SceneObjects" can also be moved, rotated and scaled in the coordinate system. Use methods like @ref BansheeEngine::SceneObject::setPosition "SceneObject::setPosition", @ref BansheeEngine::SceneObject::setRotation "SceneObject::setRotation", @ref BansheeEngine::SceneObject::setScale "SceneObject::setScale" to set these values relative to the parent object. You can also use @ref BansheeEngine::SceneObject::setWorldPosition "SceneObject::setWorldPosition", @ref BansheeEngine::SceneObject::setWorldRotation "SceneObject::setWorldRotation", @ref BansheeEngine::SceneObject::setWorldScale "SceneObject::setWorldScale" to set them relative to the world space. A variety of helper methods like @ref BansheeEngine::SceneObject::lookAt "SceneObject::lookAt" also exists. For example:
+
+~~~~~~~~~~~~~{.cpp}
+HSceneObject mySO = SceneObject::create("MySceneObject");
+
+Vector3 position(0, 0, 50);
+Vector3 lookAt(0, 0, 0);
+
+// Object at (0, 0, 50) looking towards the origin
+mySO->setPosition(position);
+mySO->setLookAt(lookAt);
+~~~~~~~~~~~~~
+
+Once you are done with a scene object, call @ref BansheeEngine::SceneObject::destroy "SceneObject::destroy". This will remove the scene object and all of its children out of the scene.
+~~~~~~~~~~~~~{.cpp}
+HSceneObject mySO = SceneObject::create("MySceneObject");
+mySO->destroy()
+~~~~~~~~~~~~~
+
+Scene objects aren't very useful on their own however. Each scene object can have multiple @ref BansheeEngine::Component "Components" attached.
+
+# Components {#gameObjects_b}
+Components provide logic that customizes a scene object. To attach a @ref BansheeEngine::Component "Component" to a scene object use @ref BansheeEngine::SceneObject::addComponent<T, Args...> "SceneObject::addComponent<T>". For example if we wanted to add the built-in @ref BansheeEngine::CCamera "CCamera" component:
+~~~~~~~~~~~~~{.cpp}
+HSceneObject mySO = SceneObject::create("MySceneObject");
+HCamera camera = mySO->addComponent<CCamera>();
+~~~~~~~~~~~~~
+
+Once a component is registered with a scene object its code will be executed as long as the scene object is active and not destroyed. Use @ref BansheeEngine::SceneObject::setActive "SceneObject::setActive" to activate and deactivate a scene object. Deactive object will also deactivate all children and their components.
+
+To search for a component on a scene object use @ref BansheeEngine::SceneObject::getComponent<T> "SceneObject::getComponent<T>" like so:
+~~~~~~~~~~~~~{.cpp}
+HCamera camera = mySO->getComponent<CCamera>(); // Returns CCamera component if it exists on the scene object
+~~~~~~~~~~~~~
+
+If you wish to remove a component, call @ref BansheeEngine::Component::destroy "Component::destroy".
+~~~~~~~~~~~~~{.cpp}
+HCamera camera = mySO->getComponent<CCamera>();
+camera->destroy();
+~~~~~~~~~~~~~
+
+## Custom components {#gameObjects_b_a}
+Using existing components is useful, but main purpose of components is for the user to implement their own gameplay code. To create your own component simply implement the @ref BansheeEngine::Component "Component" interface.
+
+The @ref BansheeEngine::Component "Component" interface provides several methods which you can override with your own code:
+ - @ref BansheeEngine::Component::onInitialized "Component::onInitialized" - Called once when the component is first instantiated. You should use this instead of the constructor for initialization.
+ - @ref BansheeEngine::Component::update "Component::update" - Called every frame while the game is running and the component is enabled.
+ - @ref BansheeEngine::Component::onEnabled "Component::onEnabled" - Called whenever a component is enabled, or instantiated as enabled in which case it is called after @ref BansheeEngine::Component::onInitialized "Component::onInitialized".
+ - @ref BansheeEngine::Component::onDisabled "Component::onDisabled" - Called whenever a component is disabled. This includes destruction where it is called before @ref BansheeEngine::Component::onDestroyed "Component::onDestroyed". 
+ - @ref BansheeEngine::Component::onDestroyed "Component::onDestroyed" - Called before the component is destroyed. Destruction is usually delayed until the end of the current frame unless specified otherwise in a call to @ref BansheeEngine::Component::destroy "Component::destroy". 
+ - @ref BansheeEngine::Component::onTransformChanged "Component::onTransformChanged" - Called when the transform of the owning scene object changes. You must subscribe to this event by calling @ref BansheeEngine::Component::setNotifyFlags "Component::setNotifyFlags".
+ 
+Since components are a part of the scene you must also make sure to implement their @ref BansheeEngine::RTTITypeBase "RTTIType", so they can be saved and loaded. Read the [RTTI](@ref rtti) manual for more information. Their creation differs slightly to normal RTTI objects: when overloading @ref BansheeEngine::RTTITypeBase::newRTTIObject "RTTIType::newRTTIObject" make sure to use `GameObjectRTTI::createGameObject<T>` to create the component, instead of manually creating the shared pointer. This ensures that the component handle is properly created.
+
+# Game object handles {#gameObjects_c}
+We have seen game object handles a lot in this manual, but haven't talked about them. All game objects are referenced via a @ref BansheeEngine::GameObjectHandle<T> "GameObjectHandle<T>". They act similar to pointers where you can use the pointer member access "->" operator to access the underlying game object, while the normal member access "." operator can be used for operating directly on the handle data. 
+
+You can use @ref BansheeEngine::GameObjectHandle<T>::isDestroyed "GameObjectHandle<T>::isDestroyed" to check if a game object a handle is pointing to has been destroyed.
+
+To create your own game object handle it is suggested you create a `typedef` and prefix your component name with an "H", like so:
+~~~~~~~~~~~~~{.cpp}
+class MyComponent : public Component
+{
+ ...
+};
+
+typedef GameObjectHandle<MyComponent> HMyComponent;
+~~~~~~~~~~~~~
+
+# Prefabs {#gameObjects_d}
+@ref BansheeEngine::Prefab "Prefabs" allow you to store groups of scene objects (and their components) and then re-use them. A prefab can be an entire scene or just a small subset of scene objects.
+
+To create one call @ref BansheeEngine::Prefab::create "Prefab::create" with a @ref BansheeEngine::SceneObject "SceneObject" you want to create a prefab of. The object, all of its children and all of the components will be stored in the prefab. You can then save that prefab to disk like any other @ref BansheeEngine::Resource "Resource" (see the [resources](@ref resources) manual), and load it later.
+
+@ref BansheeEngine::Prefab "Prefabs" can be instantiated back into @ref BansheeEngine::SceneObject "SceneObjects" by calling @ref BansheeEngine::Prefab::instantiate "Prefab::instantiate".
+
+For example:
+~~~~~~~~~~~~~{.cpp}
+HSceneObject mySO = SceneObject::create("MySceneObject");
+... create a more complex hierarchy with components here ...
+HPrefab myPrefab = Prefab::create(mySO);
+... potentially save the prefab for later use ...
+// Or use it right away
+HSceneObject clonedSO = myPrefab->instantiate();
+~~~~~~~~~~~~~
+
+Prefabs are used for more than just cloning. Any scene objects that are instantiated from a @ref BansheeEngine::Prefab "Prefabs" (including the original scene object that the prefab was created from) become permanently linked to that scene object hierarchy. We call such scene objects "prefab instances". You can use @ref BansheeEngine::SceneObject::getPrefabParent "SceneObject::getPrefabParent" to find a @ref BansheeEngine::Prefab "Prefab" that a scene object might be an instance of.
+
+This can be useful if you have many prefab instances of a particular prefab (e.g. buildings or trees in a level). You can quickly apply changes to all scene objects linked to a particular prefab. Simply make your modifications on an existing prefab instance, or create a new scene object hierarchy. Then call @ref BansheeEngine::Prefab::update "Prefab::update" with the new data. This will replace contents of the prefab with the new hierarchy. After that you can use @ref BansheeEngine::PrefabUtility::updateFromPrefab "PrefabUtility::updateFromPrefab" on all prefab instances and they will replace their contents with the new contents of the prefab.
+
+You are also allowed to make changes to prefab instances. @ref BansheeEngine::PrefabUtility::updateFromPrefab "PrefabUtility::updateFromPrefab" will try its best to keep the changes made, while also updating the underlying hierarchy. Obviously this is not possible if the hierarchy fully changes, but in most cases there will only be minor changes.
+
+In case you made some changes to a prefab instance you can revert back to original prefab state by calling @ref BansheeEngine::PrefabUtility::revertToPrefab "PrefabUtility::revertToPrefab". If you wish to break a link of a scene object with a prefab, call @ref BansheeEngine::SceneObject::breakPrefabLink "PrefabUtility::breakPrefabLink".

+ 96 - 0
Documentation/Manuals/Native/gettingStarted.md

@@ -0,0 +1,96 @@
+Getting started								{#gettingStarted}
+===============
+[TOC]
+
+This manual offers a quick overview of commonly used Banshee functionality, in order to give you a better idea of how Banshee works. For a fully working example check out the `ExampleProject` project available with the source code.
+
+# Starting an application
+Banshee is started through the @ref BansheeEngine::Application "Application" interface. To start the engine you need to provide it with a description of the primary render window, and the wanted @ref BansheeEngine::RenderAPIPlugin "render API" plugin.
+
+After the application is started by calling @ref BansheeEngine::Application::startUp "Application::startUp", you can set up your custom code in the form of @ref BansheeEngine::Component "components" (see later). After that you can run the main loop with @ref BansheeEngine::Application::runMainLoop "Application::runMainLoop" which will execute your code and actually get everything in motion.
+
+Once the main loop terminates use @ref BansheeEngine::Application::shutDown "Application::shutDown" to clean everything up.
+
+~~~~~~~~~~~~~{.cpp}
+RENDER_WINDOW_DESC renderWindowDesc;
+renderWindowDesc.videoMode = VideoMode(1280, 720);
+renderWindowDesc.title = "My App";
+renderWindowDesc.fullscreen = false;
+
+Application::startUp(renderWindowDesc, RenderAPIPlugin::DX11);
+... set up game code ...
+Application::instance().runMainLoop();
+Application::shutDown();
+~~~~~~~~~~~~~
+
+Read the [render targets](@ref renderTargets) manual for more information about creating render windows, and the [game objects](@ref gameObjects) manual on how to create your own components.
+
+# Importing resources
+To import a resource from a third party format into an engine-readable format use the @ref BansheeEngine::Importer "Importer" module. A variety of formats like PNG, JPG, PSD, FBX, etc. are supported. Read the [importer](@ref customImporters) manual for more information about importers. 
+
+In the example below we'll import a @ref BansheeEngine::Mesh "Mesh" and a @ref BansheeEngine::Texture "Texture".
+~~~~~~~~~~~~~{.cpp}
+HMesh dragonModel = gImporter().import<Mesh>("Dragon.fbx");
+HTexture dragonTexture = gImporter().import<Texture>("Dragon.psd");
+~~~~~~~~~~~~~
+
+# Setting up a material
+Once we have a mesh and a texture we need some way to apply that texture to the mesh. For that reason we first import a @ref BansheeEngine::Shader "Shader" that describes how is an object rendered, which we then use to create a @ref BansheeEngine::Material "Material" which allows us to apply our previously loaded @ref BansheeEngine::Texture "Texture".
+
+Read the [material](@ref materials) manual for more information about shaders and materials.
+
+~~~~~~~~~~~~~{.cpp}
+HShader diffuse = gImporter().import<Shader>("Diffuse.bsl");
+HMaterial dragonMaterial = Material::create(diffuse);
+
+dragonMaterial->setTexture("albedo", dragonTexture);
+~~~~~~~~~~~~~
+
+# Adding an object for rendering
+To actually make our mesh render with our material, we need to add a @ref BansheeEngine::SceneObject "SceneObject" onto which we attach a @ref BansheeEngine::CRenderable "CRenderable" component. This component allows us to set up a mesh and a material, after which they will be automatically rendered to the active camera.
+
+To learn more about @ref BansheeEngine::SceneObject "scene objects" and @ref BansheeEngine::Component "components" read the [game object](@ref gameObjects) manual. You can use the same approach we followed here to add your own custom components, containing custom code.
+
+You can also read up on the [renderer](@ref renderer) manual to learn more about how the @ref BansheeEngine::CRenderable "CRenderable" components works.
+
+~~~~~~~~~~~~~{.cpp}
+HSceneObject dragonSO = SceneObject::create("Dragon");
+
+HRenderable renderable = dragonSO->addComponent<CRenderable>();
+renderable->setMesh(dragonModel);
+renderable->setMaterial(dragonMaterial);
+~~~~~~~~~~~~~
+
+# Adding a scene camera
+In order to actually see our object we need to set up a camera. First create a new @ref BansheeEngine::SceneObject "SceneObject" onto which you can then attach a @ref BansheeEngine::CCamera "CCamera" component. After that we position the @ref BansheeEngine::SceneObject "SceneObject" so it is looking at the object we set up in previous steps.
+
+~~~~~~~~~~~~~{.cpp}
+HSceneObject sceneCameraSO = SceneObject::create("SceneCamera");
+HCamera sceneCamera = sceneCameraSO->addComponent<CCamera>(window);
+
+sceneCameraSO->setPosition(Vector3(40.0f, 30.0f, 230.0f));
+sceneCameraSO->lookAt(Vector3(0, 0, 0));
+~~~~~~~~~~~~~
+
+# Adding a GUI element
+Finally you might want to add a GUI to your application. Similar to above, create a new @ref BansheeEngine::SceneObject "SceneObject" onto which we add a new @ref BansheeEngine::CCamera "CCamera" used only for rendering GUI. Since we don't want it to render normal scene objects, we let it's filter `layers` to 0. 
+
+We also add a @ref BansheeEngine::CGUIWidget "CGUIWidget" component onto the same @ref BansheeEngine::SceneObject "SceneObject", which is used as a container for all GUI elements. After that we add a couple of @ref BansheeEngine::GUIButton "GUIButtons" to the GUI.
+
+Read the [GUI](@ref customGUI) manual for more information about GUI.
+
+~~~~~~~~~~~~~{.cpp}
+HSceneObject guiSO = SceneObject::create("GUI");
+
+HCamera guiCamera = guiSO->addComponent<CCamera>(window);
+guiCamera->setLayers(0); // Force camera to ignore normal scene geometry
+
+HGUIWidget gui = guiSO->addComponent<CGUIWidget>(guiCamera);
+GUIPanel* guiPanel = gui->getPanel();
+
+GUILayout* guiLayout = guiPanel->addNewElement<GUILayoutY>();
+guiLayout->addNewElement<GUIButton>(HString(L"Click me!"));
+guiLayout->addNewElement<GUIButton>(HString(L"Click me too!"));
+~~~~~~~~~~~~~
+
+There is a lot more to Banshee, but hopefully this gave you a quick taste of how it works. Continue reading other manuals and the API reference for more information.

+ 1 - 1
Documentation/Manuals/Native/gui.md

@@ -4,7 +4,7 @@ Creating custom GUI elements						{#customGUI}
 
 
 Sometimes the built-in GUI elements are just not enough, for example when you need a very specific GUI element for your game (e.g. for displaying graphs, charts), want to use a special material or in general just need some more customization options. While in some cases you could construct such elements from the provided GUI elements, it is often more efficient to create a brand new customized type. New GUI elements can be created relatively easily and allow you to fully customize the look and interaction with your element.
 Sometimes the built-in GUI elements are just not enough, for example when you need a very specific GUI element for your game (e.g. for displaying graphs, charts), want to use a special material or in general just need some more customization options. While in some cases you could construct such elements from the provided GUI elements, it is often more efficient to create a brand new customized type. New GUI elements can be created relatively easily and allow you to fully customize the look and interaction with your element.
 
 
-Before staring you should familiarize yourself how Banshee's GUI works from the users perspective. Make sure to read [GUI manual](@ref TODOLINK) to understand the basics (although the manual is for scripting, the C++ versions of these methods are essentially equivalent and the same concepts apply).
+Before staring you should familiarize yourself how Banshee's GUI works from the users perspective. Make sure to read the scripting GUI manual to understand the basics (although the manual is for scripting, the C++ versions of these methods are essentially equivalent and the same concepts apply).
 
 
 All GUI elements derive from the base @ref BansheeEngine::GUIElementBase "GUIElementBase" type. The elements can be categorized into two major groups:
 All GUI elements derive from the base @ref BansheeEngine::GUIElementBase "GUIElementBase" type. The elements can be categorized into two major groups:
  - GUILayout: They derive from @ref BansheeEngine::GUILayout "GUILayout" and do not have any graphics, but instead they control the placement of all elements attached to them.
  - GUILayout: They derive from @ref BansheeEngine::GUILayout "GUILayout" and do not have any graphics, but instead they control the placement of all elements attached to them.

+ 2 - 1
Documentation/Manuals/Native/manuals.md

@@ -20,10 +20,11 @@ Name                                      | Description
 [GPU programs](@ref gpuPrograms)		  | Shows you how to create and use GPU programs.
 [GPU programs](@ref gpuPrograms)		  | Shows you how to create and use GPU programs.
 [Materials](@ref materials)				  | Shows you how to create and use materials and shaders.
 [Materials](@ref materials)				  | Shows you how to create and use materials and shaders.
 [Scripting](@ref scripting)               | Shows you how to interact with the scripting system, and how to expose C++ objects to the scripting API.
 [Scripting](@ref scripting)               | Shows you how to interact with the scripting system, and how to expose C++ objects to the scripting API.
+[Renderer](@ref renderer)    	  		  | Explains how the renderer works on the low level, and how to create a custom renderer so you may fully customize the look of your application.
+[BSLFX](@ref bslfx)    	  		  		  | Provides a reference for the Banshee Shading Language FX syntax.
 [Custom GUI elements](@ref customGUI)     | Shows you how to create custom GUI elements, manually render text or modify GUI system in a general way.
 [Custom GUI elements](@ref customGUI)     | Shows you how to create custom GUI elements, manually render text or modify GUI system in a general way.
 [Custom importers](@ref customImporters)  | Shows you how to create importers that handle conversion of third party resources into engine ready formats.
 [Custom importers](@ref customImporters)  | Shows you how to create importers that handle conversion of third party resources into engine ready formats.
 [Custom plugins](@ref customPlugins)      | Shows you how to create custom plugins that can be loaded by Banshee.
 [Custom plugins](@ref customPlugins)      | Shows you how to create custom plugins that can be loaded by Banshee.
-[Custom renderer](@ref renderer)    	  | Shows you how to create a custom renderer so you may fully customize the look of your application.
 [Quick reference](@ref quickref)          | Provides a few bits of commonly required information, that might be hard to remember otherwise.
 [Quick reference](@ref quickref)          | Provides a few bits of commonly required information, that might be hard to remember otherwise.
 [Porting](@ref porting)                   | Information about how to go on about porting Banshee to a different operating system.
 [Porting](@ref porting)                   | Information about how to go on about porting Banshee to a different operating system.
 [Code style](@ref style)                  | Information about code style used when writing Banshee.
 [Code style](@ref style)                  | Information about code style used when writing Banshee.

+ 1 - 1
Documentation/Manuals/Native/plugins.md

@@ -6,7 +6,7 @@ Many systems in Banshee are implemented through plugins, libraries that are sepa
 
 
 The default Banshee @ref BansheeEngine::CoreApplication "Application" supports plugins for the following systems:
 The default Banshee @ref BansheeEngine::CoreApplication "Application" supports plugins for the following systems:
  - Rendering API - Wrappers for render APIs like DirectX or OpenGL. See the manual about working with [low level render API] (@ref renderAPI) for more information.
  - Rendering API - Wrappers for render APIs like DirectX or OpenGL. See the manual about working with [low level render API] (@ref renderAPI) for more information.
- - Renderer - Renderer that determines how is the scene displayed (lighting, shadows, post-processing, etc.). See the manual about implementing [custom renderers](@ref customRenderers).
+ - Renderer - Renderer that determines how is the scene displayed (lighting, shadows, post-processing, etc.). See the manual about implementing [custom renderers](@ref renderer).
  - Input - Reports input events (mouse, keyboard, gamepad, etc.)
  - Input - Reports input events (mouse, keyboard, gamepad, etc.)
  - Physics - Runs the physics simulation (like NVIDIA PhysX)
  - Physics - Runs the physics simulation (like NVIDIA PhysX)
  - Importers - Importers that handle conversion of some third party resource format into an engine-ready format. See the manual about implementing [custom importers](@ref customImporters).
  - Importers - Importers that handle conversion of some third party resource format into an engine-ready format. See the manual about implementing [custom importers](@ref customImporters).

+ 149 - 0
Documentation/Manuals/Native/renderer.md

@@ -0,0 +1,149 @@
+Renderer								{#renderer}
+===============
+[TOC]
+
+Renderer is a system that processes all renderable objects in the scene, renders them, applies lighting and shadows, renders overlay like GUI and applies post processing effects. It is the system that determines how your game looks (together with custom materials you might specify). In Banshee the renderer is implemented as a plugin, so you may create your own and fully customize the look of your game. Banshee also comes with a default renderer called "RenderBeast".
+
+In this manual we'll explain how to use a renderer to render objects in the scene, as well as how to implement your own renderer.
+
+# Rendering scene objects {#renderer_a}
+To render objects in the scene create a @ref BansheeEngine::SceneObject "SceneObject" onto which you then attach relevant @ref BansheeEngine::Component "Components". These @ref BansheeEngine::Component "Components" then register themselves with the renderer, which takes care of everything else. See the [game object](@ref gameObjects) manual for more information about scene objects and components.
+
+There are three primary types of components used for rendering:
+ - @ref BansheeEngine::CCamera "CCamera" - A camera used for viewing the scene.
+ - @ref BansheeEngine::CRenderable "CRenderable" - An object to render.
+ - @ref BansheeEngine::CLight "CLight" - A light to illuminate the objects with.
+ 
+## Camera {#renderer_a_a}
+@ref BansheeEngine::CCamera "Camera" component determines which portion of the scene is being rendered, onto which surface, and how. Before you create a camera you must first create a @ref BansheeEngine::RenderTarget "RenderTarget" onto which the camera will output the rendered image. See the [render targets](@ref renderTargets) manual for information on how to create render targets.
+
+See the following example to create a camera:
+~~~~~~~~~~~~~{.cpp}
+SPtr<RenderTarget> rt = ...;
+
+HSceneObject cameraSO = SceneObject::create("Camera");
+HCamera camera = cameraSO->addComponent<CCamera>(rt);
+~~~~~~~~~~~~~
+
+The transform of the camera's parent scene object determines which portion of the scene does the camera see. You can position and rotate the camera using the standard @ref BansheeEngine::SceneObject "SceneObject" transform methods:
+~~~~~~~~~~~~~{.cpp}
+cameraSO->setPosition(Vector3(0, 0, 50)); // Move camera to (0, 0, 50)
+cameraSO->lookAt(Vector3(0, 0, 0)); // Look towards origin
+~~~~~~~~~~~~~
+
+You may also adjust various other properties of the camera, including @ref BansheeEngine::ProjectionType "projection type", field of view, aspect ratio and similar using methods like @ref BansheeEngine::CCamera::setProjectionType "CCamera::setProjectionType", @ref BansheeEngine::CCamera::setHorzFOV "CCamera::setHorzFOV" and @ref BansheeEngine::CCamera::setAspectRatio "CCamera::setAspectRatio". See the @ref BansheeEngine::CCamera "Camera" API documentation for a full list of methods.
+
+Each camera be assigned a priority via @ref BansheeEngine::CCamera::setPriority "CCamera::setPriority". The priority determines in which order are multiple cameras rendered. Higher priority means the camera will be rendered sooner. Be aware that render targets also have priority, and their priority takes precedance over camera's priority. Camera priority only matters if multiple cameras are rendering to the same render target.
+
+Camera can also be assigned a layer via @ref BansheeEngine::CCamera::setLayers "CCamera::setLayers". The layer is a bitmask that can be used for filtering which objects does the camera render. As we'll see later, each renderable object can also be assigned a layer. Any object whose layer ORed with the camera's layer bitmask is non-zero will be rendered to the camera.
+
+A variety of methods for converting between world, view, projection, clip and NDC spaces are also provided by the camera. For example see @ref BansheeEngine::CCamera::screenPointToRay "CCamera::screenPointToRay".
+
+You may also retrieve the camera's projection and view matrices by calling @ref BansheeEngine::CCamera::getProjectionMatrix "CCamera::getProjectionMatrix" and @ref BansheeEngine::CCamera::getViewMatrix "CCamera::getViewMatrix" respectively.
+
+## Renderable {#renderer_a_b}
+Once the camera in the scene is set up, you can start adding object you wish to render. All such objects are represented with the @ref BansheeEngine::CRenderable "CRenderable" component. This is a fairly simple components that expects only a @ref BansheeEngine::Mesh "Mesh" and one or multiple @ref BansheeEngine::Material "Material(s)". Read the [mesh](@ref meshes) and [material](@ref materials) manual for more information how to create them.
+
+See the following example to create a renderable object:
+~~~~~~~~~~~~~{.cpp}
+HMesh mesh = ...; // Create or import a mesh
+HMaterial material = ...; // Create or import a material
+
+HSceneObject renderableSO = SceneObject::create("Renderable");
+HRenderable renderable = renderableSO->addComponent<CRenderable>();
+renderable->setMesh(mesh);
+renderable->setMaterial(material);
+~~~~~~~~~~~~~
+
+You can also optionally set multiple materials in case your mesh has multiple sub-meshes. In such case each material will be used for rendering one sub-mesh.
+
+And as we have mentioned in the previous section, each renderable can also be assigned a layer by calling @ref BansheeEngine::CRenderable::setLayer "CRenderable::setLayer", which in combination with camera's layer can be used for filtering on which camera(s) should the object be visible.
+
+## Light {#renderer_a_c}
+Finally we can choose to add a light to the scene. A light will influence the lighting and shadows of renderable objects in its radius. Use the @ref BansheeEngine::CLight "CLight" component to set up a light. Light comes in three variants:
+ - Point light that illuminates everything in a certain radius.
+ - Spot light that illuminates everything within a certain angle and radius.
+ - Directional light that illuminates everything at an infinite distance from a particular direction.
+ 
+You can choose between light variants by calling @ref BansheeEngine::CLight::setType "CLight::setType". You can also set parameters like light color, intensity, range and others. See the @ref BansheeEngine::CLight "CLight" API documentation for a full list.
+
+An example creating a point light:
+~~~~~~~~~~~~~{.cpp}
+HSceneObject lightSO = SceneObject::create("Light");
+HLight light = lightSO->addComponent<CLight>();
+light->setType(LightType::Point);
+light->setRadius(100.0f);
+light->setIntensity(1000.0f);
+~~~~~~~~~~~~~
+
+# Creating your own renderer {#renderer_b}
+Renderer is the system that makes use of all the components we listed so far. Renderer isn't actually aware of scene objects and components, and instead operates on @ref BansheeEngine::Camera "Camera", @ref BansheeEngine::Renderable "Renderable" and @ref BansheeEngine::Light "Light" types directly. These are the internal objects that are managed by @ref BansheeEngine::CCamera "CCamera", @ref BansheeEngine::CRenderable "CRenderable" and @ref BansheeEngine::CLight "CLight", respectively. They provide the same interface as their component versions. They are also @ref BansheeEngine::CoreObject "core objects", meaning they have both a simulation and a core thread counterparts.
+
+To create your own renderer you must implement the @ref BansheeEngine::Renderer "Renderer" interface. The implementation should iterate over all renderable objects, cameras and lights and perform rendering according to your own rules. At the end of rendering, every render target in every active camera should be filled with an image of the rendered scene. During rendering you must consider mesh and material provided by the renderable objects, and apply lighting according to light objects. You should use the low level @ref BansheeEngine::RenderAPI "RenderAPI" to render individual objects.
+
+The renderer is mostly a core-thread system as then it has a more direct access to the @ref BansheeEngine::RenderAPI "RenderAPI", as well as various utility functionality we'll describe later. Read the [core thread](@ref coreThread) manual for more information about the core thread and core objects, and the [render API](@ref renderAPI) manual on how to use the low level rendering functionality.
+
+The @ref BansheeEngine::Renderer "Renderer" interface requires you to implement the following methods:
+ - @ref BansheeEngine::CoreRenderer::getName "Renderer::getName" - Returns a unique name of the renderer. This can be used by shader techniques to identify which renderer is active and when they should run, as described in the [material](@ref materials) manual.
+ - @ref BansheeEngine::CoreRenderer::renderAll "Renderer::renderAll" - This is a method called from the simulation thread that executes the rendering. It is called once per frame. In this method you should queue your actual rendering method for execution on the core thread.
+ - @ref BansheeEngine::CoreRenderer::notifyCameraAdded "Renderer::notifyCameraAdded" - Called on the core thread whenever a new @ref BansheeEngine::Camera "Camera" is created (i.e. when a @ref BansheeEngine::CCamera "CCamera" component is added to the scene). Also called when camera's properties change (camera is removed, then re-added).
+ - @ref BansheeEngine::CoreRenderer::notifyCameraRemoved "Renderer::notifyCameraRemoved" - Called on the core thread whenever a @ref BansheeEngine::Camera "Camera" is destroyed. Also called when camera's properties change (camera is removed, then re-added).
+ - @ref BansheeEngine::Renderer::notifyRenderableAdded "Renderer::notifyRenderableAdded" - Called on the core thread whenever a new @ref BansheeEngine::Renderable "Renderable" is created (e.g. when a @ref BansheeEngine::CRenderable "CRenderable" component is added to the scene).
+ - @ref BansheeEngine::Renderer::notifyRenderableUpdated "Renderer::notifyRenderableUpdated" - Called whenever @ref BansheeEngine::Renderable "Renderable" properties change, e.g. when a scene object a renderable is attached to moves.
+ - @ref BansheeEngine::Renderer::notifyRenderableRemoved "Renderer::notifyRenderableRemoved" - Called whenever a @ref BansheeEngine::Renderable "Renderable" is destroyed.
+ - @ref BansheeEngine::Renderer::notifyLightAdded "Renderer::notifyLightAdded" - Called whenever a new @ref BansheeEngine::Light "Light" is created (e.g. when a @ref BansheeEngine::CLight "CLight" component is added to the scene).
+ - @ref BansheeEngine::Renderer::notifyLightUpdated "Renderer::notifyLightUpdated" - Called whenever @ref BansheeEngine::Light "Light" properties change, e.g. when a scene object a light is attached to moves.
+ - @ref BansheeEngine::Renderer::notifyLightRemoved "Renderer::notifyLightRemoved" - Called whenever @ref BansheeEngine::Light "Light" is destroyed.
+ 
+Implementing these methods should give you all the information you need to render your scene. You will have the required render target and projection/view matrices from the @ref BansheeEngine::Camera "Camera", mesh/material/world transform from @ref BansheeEngine::Renderable "Renderable" objects, and lighting information from @ref BansheeEngine::Light "Light". Use the information provided in the [render API](@ref renderAPI) manual to learn how to render using those objects.
+
+Aside from rendering scene objects, the renderer should also take care of rendering everything else, like GUI, debug information and similar. This is handled in a general manner via callbacks. Every external system (like GUI) can register itself with the renderer by calling @ref BansheeEngine::CoreRenderer::registerRenderCallback "Renderer::registerRenderCallback". This method accepts a few parameters:
+ - Pointer to a @ref BansheeEngine::Camera "Camera" for which the callback is valid. The renderer should call the callback when rendering onto that camera.
+ - Index that indicated the priority. Callbacks with indices lower than zero should be executed before scene object rendering, and indices equal to or higher than zero should be executed after scene object rendering.
+ - Callback to execute. Other systems will usually call @ref BansheeEngine::RenderAPI "RenderAPI" methods in such callback to perform rendering manually.
+ - Overlay toggle. Overlay elements are rendered after all other objects (and non-overlay callbacks). They don't require a depth buffer, nor a multi-sampled render target for rendering (e.g. like GUI), which makes them cheaper to render.
+
+Once a callback is registered, the renderer can access it via the `mRenderCallbacks` protected field.
+ 
+While this is enough to create a custom renderer, a variety of useful utilities are provided to make rendering easier.
+
+## Utilities {#renderer_b_a}
+These systems aren't critical for renderer creation, but instead provide an easier way to perform commonly required functions.
+
+### Render queue {#renderer_b_a_a}
+@ref BansheeEngine::RenderQueue "RenderQueue" allows you to sort and group scene objects for rendering. For example transparent objects might need to be sorted back to front based on their distance from the camera. It is also often useful to group objects if they share the same material, to reduce state switching which can improve performance.
+
+Use @ref BansheeEngine::RenderQueue::add "RenderQueue::add" to add new objects to the queue. It expects a @ref BansheeEngine::RenderableElement "RenderableElement" which you can create from information provided by @ref BansheeEngine::Renderable "Renderable" when @ref BansheeEngine::Renderer::notifyRenderableAdded "Renderer::notifyRenderableAdded" is called. Normally you wish to have a single @ref BansheeEngine::RenderableElement "RenderableElement" for each sub-mesh present in the renderable object's mesh.
+
+Once all elements are in the queue, you can call @ref BansheeEngine::RenderQueue::setStateReduction "RenderQueue::setStateReduction" to select how to sort the objects:
+ - @ref BansheeEngine::StateReduction::None "StateReduction::None" - There will be no sorting, based either by distance or material.
+ - @ref BansheeEngine::StateReduction::Material "StateReduction::Material" - Elements will be sorted by material first, then by distance.
+ - @ref BansheeEngine::StateReduction::Distance "StateReduction::Distance" - Elements will be sorted by distance first, then by material.
+ 
+Once the state reduction mode is set call @ref BansheeEngine::RenderQueue::sort "RenderQueue::sort", and then @ref BansheeEngine::RenderQueue::getSortedElements "RenderQueue::getSortedElements" to retrieve a sorted list of render elements. The returned list contains a list of @ref BansheeEngine::RenderQueueElement "RenderQueueElement" which lets you know exactly which render element to render using which pass, and also tells you when a new pass needs to be applied (if multiple elements in a row use the same pass, it doesn't need to be re-applied).
+
+For example:
+~~~~~~~~~~~~~{.cpp}
+Vector<RenderableElement*> elements = ...;
+
+SPtr<RenderQueue> queue = bs_shared_ptr_new<RenderQueue>(StateReduction::Distance);
+for(auto& element : elements)
+{
+	float distance = ...; // Calculate distance from element to camera, for sorting
+	queue->add(element, distance);
+}
+
+queue->sort();
+const Vector<RenderQueueElement>& sortedElements = queue->getSortedElements();
+... render sorted elements ...
+~~~~~~~~~~~~~
+
+### Renderer material {#renderer_b_a_b}
+
+### Parameter blocks {#renderer_b_a_c}
+
+### Renderer semantics {#renderer_b_a_d}
+
+### RendererUtility {#renderer_b_a_e}
+
+### Renderer options {#renderer_b_a_f}

+ 1 - 1
Doxyfile

@@ -588,7 +588,7 @@ SORT_MEMBERS_CTORS_1ST = YES
 # appear in their defined order.
 # appear in their defined order.
 # The default value is: NO.
 # The default value is: NO.
 
 
-SORT_GROUP_NAMES       = YES
+SORT_GROUP_NAMES       = NO
 
 
 # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
 # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
 # fully-qualified names, including namespaces. If set to NO, the class list will
 # fully-qualified names, including namespaces. If set to NO, the class list will

+ 3 - 0
Source/BansheeCore/Include/BsComponent.h

@@ -86,6 +86,9 @@ namespace BansheeEngine
 		/** Called when the component's parent scene object has changed. */
 		/** Called when the component's parent scene object has changed. */
 		virtual void onTransformChanged(TransformChangedFlags flags) { }
 		virtual void onTransformChanged(TransformChangedFlags flags) { }
 
 
+		/** Sets new flags that determine when is onTransformChanged called. */
+		void setNotifyFlags(TransformChangedFlags flags) { mNotifyFlags = flags; }
+
 		/** Checks whether the component wants to received the specified transform changed message. */
 		/** Checks whether the component wants to received the specified transform changed message. */
 		bool supportsNotify(TransformChangedFlags flags) const { return (mNotifyFlags & flags) != 0; }
 		bool supportsNotify(TransformChangedFlags flags) const { return (mNotifyFlags & flags) != 0; }
 
 

+ 1 - 1
Source/BansheeCore/Include/BsCorePrerequisites.h

@@ -8,7 +8,7 @@
  *  @{
  *  @{
  */
  */
 
 
-/** @defgroup Core 2. Core
+/** @defgroup Core Core
  *	Second lowest layer that provides core engine functionality and abstract interfaces for various systems.
  *	Second lowest layer that provides core engine functionality and abstract interfaces for various systems.
  *  @{
  *  @{
  */
  */

+ 4 - 4
Source/BansheeCore/Include/BsCoreRenderer.h

@@ -72,14 +72,14 @@ namespace BansheeEngine
 		 *
 		 *
 		 * @note	Core thread.
 		 * @note	Core thread.
 		 */
 		 */
-		virtual void _notifyCameraAdded(const CameraCore* camera) { }
+		virtual void notifyCameraAdded(const CameraCore* camera) { }
 
 
 		/**
 		/**
 		 * Called whenever a camera is destroyed.
 		 * Called whenever a camera is destroyed.
 		 *
 		 *
 		 * @note	Core thread.
 		 * @note	Core thread.
 		 */
 		 */
-		virtual void _notifyCameraRemoved(const CameraCore* camera) { }
+		virtual void notifyCameraRemoved(const CameraCore* camera) { }
 
 
 		/**
 		/**
 		 * Creates a new empty renderer mesh data.
 		 * Creates a new empty renderer mesh data.
@@ -114,10 +114,10 @@ namespace BansheeEngine
 		 *
 		 *
 		 * @note	Core thread.
 		 * @note	Core thread.
 		 */
 		 */
-		void _registerRenderCallback(const CameraCore* camera, INT32 index, const std::function<void()>& callback, bool isOverlay = false);
+		void registerRenderCallback(const CameraCore* camera, INT32 index, const std::function<void()>& callback, bool isOverlay = false);
 
 
 		/** Removes a previously registered callback registered with _registerRenderCallback(). */
 		/** Removes a previously registered callback registered with _registerRenderCallback(). */
-		void _unregisterRenderCallback(const CameraCore* camera, INT32 index);
+		void unregisterRenderCallback(const CameraCore* camera, INT32 index);
 
 
 		/**	Sets options used for controlling the rendering. */
 		/**	Sets options used for controlling the rendering. */
 		virtual void setOptions(const SPtr<CoreRendererOptions>& options) { }
 		virtual void setOptions(const SPtr<CoreRendererOptions>& options) { }

+ 2 - 2
Source/BansheeCore/Source/BsCoreRenderer.cpp

@@ -28,13 +28,13 @@ namespace BansheeEngine
 			RendererMeshData(meshData));
 			RendererMeshData(meshData));
 	}
 	}
 
 
-	void CoreRenderer::_registerRenderCallback(const CameraCore* camera, INT32 index, 
+	void CoreRenderer::registerRenderCallback(const CameraCore* camera, INT32 index, 
 		const std::function<void()>& callback, bool isOverlay)
 		const std::function<void()>& callback, bool isOverlay)
 	{
 	{
 		mRenderCallbacks[camera][index] = { isOverlay, callback };
 		mRenderCallbacks[camera][index] = { isOverlay, callback };
 	}
 	}
 
 
-	void CoreRenderer::_unregisterRenderCallback(const CameraCore* camera, INT32 index)
+	void CoreRenderer::unregisterRenderCallback(const CameraCore* camera, INT32 index)
 	{
 	{
 		auto iterFind = mRenderCallbacks.find(camera);
 		auto iterFind = mRenderCallbacks.find(camera);
 		if (iterFind != mRenderCallbacks.end())
 		if (iterFind != mRenderCallbacks.end())

+ 11 - 11
Source/BansheeCore/Source/BsProfilerCPU.cpp

@@ -4,13 +4,13 @@
 #include "BsDebug.h"
 #include "BsDebug.h"
 #include "BsPlatform.h"
 #include "BsPlatform.h"
 
 
-#if BS_COMPILER == BS_COMPILER_GNUC || BS_COMPILER == BS_COMPILER_CLANG
-	#include "cpuid.h"
-#endif
-
-#if BS_COMPILER == BS_COMPILER_CLANG
-	#include "intrin.h"
-#endif
+//#if BS_COMPILER == BS_COMPILER_GNUC || BS_COMPILER == BS_COMPILER_CLANG
+//	#include "cpuid.h"
+//#endif
+//
+//#if BS_COMPILER == BS_COMPILER_CLANG
+//	#include "intrin.h"
+//#endif
 
 
 namespace BansheeEngine
 namespace BansheeEngine
 {
 {
@@ -76,10 +76,10 @@ namespace BansheeEngine
 		return x;
 		return x;
 #endif
 #endif
 #elif BS_COMPILER == BS_COMPILER_CLANG
 #elif BS_COMPILER == BS_COMPILER_CLANG
-		UINT32 a = 0;
-		UINT32 b[4];
-		__get_cpuid(a, &b[0], &b[1], &b[2], &b[3]);
-		return __rdtsc();
+		//UINT32 a = 0;
+		//UINT32 b[4];
+		//__get_cpuid(a, &b[0], &b[1], &b[2], &b[3]);
+		return 0; // __rdtsc();
 #elif BS_COMPILER == BS_COMPILER_MSVC
 #elif BS_COMPILER == BS_COMPILER_MSVC
 		int a[4];
 		int a[4];
 		int b = 0;
 		int b = 0;

+ 1 - 1
Source/BansheeEditor/Include/BsEditorPrerequisites.h

@@ -8,7 +8,7 @@
  *  @{
  *  @{
  */
  */
 
 
-/** @defgroup Editor 4. Editor
+/** @defgroup Editor Editor
  *	Functionality specific to the Banshee Editor.
  *	Functionality specific to the Banshee Editor.
  *  @{
  *  @{
  */
  */

+ 3 - 3
Source/BansheeEditor/Source/BsDockManager.cpp

@@ -1138,7 +1138,7 @@ namespace BansheeEngine
 		if (mCamera != nullptr)
 		if (mCamera != nullptr)
 		{
 		{
 			SPtr<CoreRenderer> activeRenderer = RendererManager::instance().getActive();
 			SPtr<CoreRenderer> activeRenderer = RendererManager::instance().getActive();
-			activeRenderer->_unregisterRenderCallback(mCamera.get(), 40);
+			activeRenderer->unregisterRenderCallback(mCamera.get(), 40);
 		}
 		}
 	}
 	}
 
 
@@ -1154,10 +1154,10 @@ namespace BansheeEngine
 		{
 		{
 			SPtr<CoreRenderer> activeRenderer = RendererManager::instance().getActive();
 			SPtr<CoreRenderer> activeRenderer = RendererManager::instance().getActive();
 			if (mCamera != nullptr)
 			if (mCamera != nullptr)
-				activeRenderer->_unregisterRenderCallback(mCamera.get(), 40);
+				activeRenderer->unregisterRenderCallback(mCamera.get(), 40);
 
 
 			if (camera != nullptr)
 			if (camera != nullptr)
-				activeRenderer->_registerRenderCallback(camera.get(), 40, std::bind(&DockOverlayRenderer::render, this), true);
+				activeRenderer->registerRenderCallback(camera.get(), 40, std::bind(&DockOverlayRenderer::render, this), true);
 		}
 		}
 
 
 		mCamera = camera;
 		mCamera = camera;

+ 3 - 3
Source/BansheeEditor/Source/BsGizmoManager.cpp

@@ -941,7 +941,7 @@ namespace BansheeEngine
 	{
 	{
 		SPtr<CoreRenderer> activeRenderer = RendererManager::instance().getActive();
 		SPtr<CoreRenderer> activeRenderer = RendererManager::instance().getActive();
 		if (mCamera != nullptr)
 		if (mCamera != nullptr)
-			activeRenderer->_unregisterRenderCallback(mCamera.get(), 20);
+			activeRenderer->unregisterRenderCallback(mCamera.get(), 20);
 	}
 	}
 
 
 	void GizmoManagerCore::initialize(const GizmoManager::CoreInitData& initData)
 	void GizmoManagerCore::initialize(const GizmoManager::CoreInitData& initData)
@@ -1039,10 +1039,10 @@ namespace BansheeEngine
 		{
 		{
 			SPtr<CoreRenderer> activeRenderer = RendererManager::instance().getActive();
 			SPtr<CoreRenderer> activeRenderer = RendererManager::instance().getActive();
 			if (mCamera != nullptr)
 			if (mCamera != nullptr)
-				activeRenderer->_unregisterRenderCallback(mCamera.get(), 0);
+				activeRenderer->unregisterRenderCallback(mCamera.get(), 0);
 
 
 			if (camera != nullptr)
 			if (camera != nullptr)
-				activeRenderer->_registerRenderCallback(camera.get(), 0, std::bind(&GizmoManagerCore::render, this));
+				activeRenderer->registerRenderCallback(camera.get(), 0, std::bind(&GizmoManagerCore::render, this));
 		}
 		}
 
 
 		mCamera = camera;
 		mCamera = camera;

+ 2 - 2
Source/BansheeEditor/Source/BsHandleDrawManager.cpp

@@ -287,7 +287,7 @@ namespace BansheeEngine
 			UINT32 idx = (UINT32)mQueuedData.size();
 			UINT32 idx = (UINT32)mQueuedData.size();
 			mQueuedData.push_back({ camera, meshes });
 			mQueuedData.push_back({ camera, meshes });
 
 
-			activeRenderer->_registerRenderCallback(camera.get(), 20, std::bind(&HandleDrawManagerCore::render, this, idx));
+			activeRenderer->registerRenderCallback(camera.get(), 20, std::bind(&HandleDrawManagerCore::render, this, idx));
 		}
 		}
 	}
 	}
 
 
@@ -295,7 +295,7 @@ namespace BansheeEngine
 	{
 	{
 		SPtr<CoreRenderer> activeRenderer = RendererManager::instance().getActive();
 		SPtr<CoreRenderer> activeRenderer = RendererManager::instance().getActive();
 		for (auto& entry : mQueuedData)
 		for (auto& entry : mQueuedData)
-			activeRenderer->_unregisterRenderCallback(entry.camera.get(), 20);
+			activeRenderer->unregisterRenderCallback(entry.camera.get(), 20);
 
 
 		mQueuedData.clear();
 		mQueuedData.clear();
 	}
 	}

+ 2 - 2
Source/BansheeEditor/Source/BsSceneGrid.cpp

@@ -190,7 +190,7 @@ namespace BansheeEngine
 	SceneGridCore::~SceneGridCore()
 	SceneGridCore::~SceneGridCore()
 	{
 	{
 		SPtr<CoreRenderer> activeRenderer = RendererManager::instance().getActive();
 		SPtr<CoreRenderer> activeRenderer = RendererManager::instance().getActive();
-		activeRenderer->_unregisterRenderCallback(mCamera.get(), 5);
+		activeRenderer->unregisterRenderCallback(mCamera.get(), 5);
 	}
 	}
 
 
 	void SceneGridCore::initialize(const SPtr<CameraCore>& camera, const SPtr<MaterialCore>& material)
 	void SceneGridCore::initialize(const SPtr<CameraCore>& camera, const SPtr<MaterialCore>& material)
@@ -208,7 +208,7 @@ namespace BansheeEngine
 		mGridMaterial->getParam("gridPlaneNormal", mGridPlaneNormalParam);
 		mGridMaterial->getParam("gridPlaneNormal", mGridPlaneNormalParam);
 
 
 		SPtr<CoreRenderer> activeRenderer = RendererManager::instance().getActive();
 		SPtr<CoreRenderer> activeRenderer = RendererManager::instance().getActive();
-		activeRenderer->_registerRenderCallback(camera.get(), 5, std::bind(&SceneGridCore::render, this));			
+		activeRenderer->registerRenderCallback(camera.get(), 5, std::bind(&SceneGridCore::render, this));			
 	}
 	}
 
 
 	void SceneGridCore::updateData(const SPtr<MeshCore>& mesh, float spacing, bool fadeGrid, const Vector3& gridPlaneNormal)
 	void SceneGridCore::updateData(const SPtr<MeshCore>& mesh, float spacing, bool fadeGrid, const Vector3& gridPlaneNormal)

+ 3 - 3
Source/BansheeEditor/Source/BsSelectionRenderer.cpp

@@ -89,7 +89,7 @@ namespace BansheeEngine
 	{
 	{
 		SPtr<CoreRenderer> activeRenderer = RendererManager::instance().getActive();
 		SPtr<CoreRenderer> activeRenderer = RendererManager::instance().getActive();
 		if (mCamera != nullptr)
 		if (mCamera != nullptr)
-			activeRenderer->_unregisterRenderCallback(mCamera.get(), 10);
+			activeRenderer->unregisterRenderCallback(mCamera.get(), 10);
 	}
 	}
 
 
 	void SelectionRendererCore::initialize(const SPtr<MaterialCore>& mat)
 	void SelectionRendererCore::initialize(const SPtr<MaterialCore>& mat)
@@ -111,10 +111,10 @@ namespace BansheeEngine
 		{
 		{
 			SPtr<CoreRenderer> activeRenderer = RendererManager::instance().getActive();
 			SPtr<CoreRenderer> activeRenderer = RendererManager::instance().getActive();
 			if (mCamera != nullptr)
 			if (mCamera != nullptr)
-				activeRenderer->_unregisterRenderCallback(mCamera.get(), 10);
+				activeRenderer->unregisterRenderCallback(mCamera.get(), 10);
 
 
 			if (camera != nullptr)
 			if (camera != nullptr)
-				activeRenderer->_registerRenderCallback(camera.get(), 10, std::bind(&SelectionRendererCore::render, this));
+				activeRenderer->registerRenderCallback(camera.get(), 10, std::bind(&SelectionRendererCore::render, this));
 		}
 		}
 
 
 		mCamera = camera;
 		mCamera = camera;

+ 366 - 366
Source/BansheeEditor/Source/Win32/BsVSCodeEditor.cpp

@@ -7,9 +7,9 @@
 #include "BsDataStream.h"
 #include "BsDataStream.h"
 
 
 // Import EnvDTE
 // Import EnvDTE
-#pragma warning(disable: 4278)
-#import "libid:80cc9f66-e7d8-4ddd-85b6-d9e6cd0e93e2" version("8.0") lcid("0") raw_interfaces_only named_guids
-#pragma warning(default: 4278)
+//#pragma warning(disable: 4278)
+//#import "libid:80cc9f66-e7d8-4ddd-85b6-d9e6cd0e93e2" version("8.0") lcid("0") raw_interfaces_only named_guids
+//#pragma warning(default: 4278)
 
 
 namespace BansheeEngine
 namespace BansheeEngine
 {
 {
@@ -46,366 +46,366 @@ namespace BansheeEngine
 	 * Handles retrying of calls that fail to access Visual Studio. This is due to the weird nature of VS when calling its
 	 * Handles retrying of calls that fail to access Visual Studio. This is due to the weird nature of VS when calling its
 	 * methods from external code. If this message filter isn't registered some calls will just fail silently.
 	 * methods from external code. If this message filter isn't registered some calls will just fail silently.
 	 */
 	 */
-	class VSMessageFilter : public IMessageFilter
-	{
-		DWORD __stdcall HandleInComingCall(DWORD dwCallType, HTASK htaskCaller, DWORD dwTickCount, LPINTERFACEINFO lpInterfaceInfo) override
-		{
-			return SERVERCALL_ISHANDLED;
-		}
-
-		DWORD __stdcall RetryRejectedCall(HTASK htaskCallee, DWORD dwTickCount, DWORD dwRejectType) override
-		{
-			if (dwRejectType == SERVERCALL_RETRYLATER)
-			{
-				// Retry immediatey
-				return 99;
-			}
-			// Cancel the call
-			return -1;
-		}
-
-		DWORD __stdcall MessagePending(HTASK htaskCallee, DWORD dwTickCount, DWORD dwPendingType) override
-		{
-			return PENDINGMSG_WAITDEFPROCESS;
-		}
-
-		/**	COM requirement. Returns instance of an interface of provided type. */
-		HRESULT __stdcall QueryInterface(REFIID iid, void** ppvObject) override
-		{
-			if(iid == IID_IDropTarget || iid == IID_IUnknown)
-			{
-				AddRef();
-				*ppvObject = this;
-				return S_OK;
-			}
-			else
-			{
-				*ppvObject = nullptr;
-				return E_NOINTERFACE;
-			}
-		}
-
-		/** COM requirement. Increments objects reference count. */
-		ULONG __stdcall AddRef() override
-		{
-			return InterlockedIncrement(&mRefCount);
-		} 
-
-		/**	COM requirement. Decreases the objects reference count and deletes the object if its zero. */
-		ULONG __stdcall Release() override
-		{
-			LONG count = InterlockedDecrement(&mRefCount);
-
-			if(count == 0)
-			{
-				bs_delete(this);
-				return 0;
-			}
-			else
-			{
-				return count;
-			}
-		} 
-
-	private:
-		LONG mRefCount;
-	};
+	//class VSMessageFilter : public IMessageFilter
+	//{
+	//	DWORD __stdcall HandleInComingCall(DWORD dwCallType, HTASK htaskCaller, DWORD dwTickCount, LPINTERFACEINFO lpInterfaceInfo) override
+	//	{
+	//		return SERVERCALL_ISHANDLED;
+	//	}
+
+	//	DWORD __stdcall RetryRejectedCall(HTASK htaskCallee, DWORD dwTickCount, DWORD dwRejectType) override
+	//	{
+	//		if (dwRejectType == SERVERCALL_RETRYLATER)
+	//		{
+	//			// Retry immediatey
+	//			return 99;
+	//		}
+	//		// Cancel the call
+	//		return -1;
+	//	}
+
+	//	DWORD __stdcall MessagePending(HTASK htaskCallee, DWORD dwTickCount, DWORD dwPendingType) override
+	//	{
+	//		return PENDINGMSG_WAITDEFPROCESS;
+	//	}
+
+	//	/**	COM requirement. Returns instance of an interface of provided type. */
+	//	HRESULT __stdcall QueryInterface(REFIID iid, void** ppvObject) override
+	//	{
+	//		if(iid == IID_IDropTarget || iid == IID_IUnknown)
+	//		{
+	//			AddRef();
+	//			*ppvObject = this;
+	//			return S_OK;
+	//		}
+	//		else
+	//		{
+	//			*ppvObject = nullptr;
+	//			return E_NOINTERFACE;
+	//		}
+	//	}
+
+	//	/** COM requirement. Increments objects reference count. */
+	//	ULONG __stdcall AddRef() override
+	//	{
+	//		return InterlockedIncrement(&mRefCount);
+	//	} 
+
+	//	/**	COM requirement. Decreases the objects reference count and deletes the object if its zero. */
+	//	ULONG __stdcall Release() override
+	//	{
+	//		LONG count = InterlockedDecrement(&mRefCount);
+
+	//		if(count == 0)
+	//		{
+	//			bs_delete(this);
+	//			return 0;
+	//		}
+	//		else
+	//		{
+	//			return count;
+	//		}
+	//	} 
+
+	//private:
+	//	LONG mRefCount;
+	//};
 
 
 	/** Contains various helper classes for interacting with a Visual Studio instance running on this machine. */
 	/** Contains various helper classes for interacting with a Visual Studio instance running on this machine. */
-	class VisualStudio
-	{
-	private:
-		static const String SLN_TEMPLATE; /**< Template text used for a solution file. */
-		static const String PROJ_ENTRY_TEMPLATE; /**< Template text used for a project entry in a solution file. */
-		static const String PROJ_PLATFORM_TEMPLATE; /**< Template text used for platform specific information for a project entry in a solution file. */
-
-		static const String PROJ_TEMPLATE; /**< Template XML used for a project file. */
-		static const String REFERENCE_ENTRY_TEMPLATE; /**< Template XML used for a reference to another assembly entry by name. */
-		static const String REFERENCE_PROJECT_ENTRY_TEMPLATE; /**< Template XML used for a reference to another project entry. */
-		static const String REFERENCE_PATH_ENTRY_TEMPLATE; /**< Template XML used for a reference to another assembly entry by name and path. */
-		static const String CODE_ENTRY_TEMPLATE; /**< Template XML used for a single code file entry in a project. */
-		static const String NON_CODE_ENTRY_TEMPLATE; /**< Template XML used for a single non-code file entry in a project. */
-
-	public:
-		/**
-		 * Scans the running processes to find a running Visual Studio instance with the specified version and open solution.
-		 *
-		 * @param[in]	clsID			Class ID of the specific Visual Studio version we are looking for.
-		 * @param[in]	solutionPath	Path to the solution the instance needs to have open.
-		 * @return						DTE object that may be used to interact with the Visual Studio instance, or null if
-		 *								not found.
-		 */
-		static CComPtr<EnvDTE::_DTE> findRunningInstance(const CLSID& clsID, const Path& solutionPath)
-		{
-			CComPtr<IRunningObjectTable> runningObjectTable = nullptr;
-			if (FAILED(GetRunningObjectTable(0, &runningObjectTable)))
-				return nullptr;
-
-			CComPtr<IEnumMoniker> enumMoniker = nullptr;
-			if (FAILED(runningObjectTable->EnumRunning(&enumMoniker)))
-				return nullptr;
-
-			CComPtr<IMoniker> dteMoniker = nullptr;
-			if (FAILED(CreateClassMoniker(clsID, &dteMoniker)))
-				return nullptr;
-
-			CComBSTR bstrSolution(solutionPath.toWString(Path::PathType::Windows).c_str());
-			CComPtr<IMoniker> moniker;
-			ULONG count = 0;
-			while (enumMoniker->Next(1, &moniker, &count) == S_OK)
-			{
-				if (moniker->IsEqual(dteMoniker))
-				{
-					CComPtr<IUnknown> curObject = nullptr;
-					HRESULT result = runningObjectTable->GetObject(moniker, &curObject);
-					moniker = nullptr;
-
-					if (result != S_OK)
-						continue;
-
-					CComPtr<EnvDTE::_DTE> dte;
-					curObject->QueryInterface(__uuidof(EnvDTE::_DTE), (void**)&dte);
-
-					if (dte == nullptr)
-						continue;
-
-					CComPtr<EnvDTE::_Solution> solution;
-					if (FAILED(dte->get_Solution(&solution)))
-						continue;
-
-					CComBSTR fullName;
-					if (FAILED(solution->get_FullName(&fullName)))
-						continue;
-
-					if (fullName == bstrSolution)
-						return dte;
-				}
-			}
-
-			return nullptr;
-		}
-
-		/**
-		 * Opens a new Visual Studio instance of the specified version with the provided solution.
-		 *
-		 * @param[in]	clsID			Class ID of the specific Visual Studio version to start.
-		 * @param[in]	solutionPath	Path to the solution the instance needs to open.
-		 */
-		static CComPtr<EnvDTE::_DTE> openInstance(const CLSID& clsid, const Path& solutionPath)
-		{
-			CComPtr<IUnknown> newInstance = nullptr;
-			if (FAILED(::CoCreateInstance(clsid, nullptr, CLSCTX_LOCAL_SERVER, EnvDTE::IID__DTE, (LPVOID*)&newInstance)))
-				return nullptr;
-
-			CComPtr<EnvDTE::_DTE> dte;
-			newInstance->QueryInterface(__uuidof(EnvDTE::_DTE), (void**)&dte);
-
-			if (dte == nullptr)
-				return nullptr;
-
-			dte->put_UserControl(TRUE);
-
-			CComPtr<EnvDTE::_Solution> solution;
-			if (FAILED(dte->get_Solution(&solution)))
-				return nullptr;
-
-			CComBSTR bstrSolution(solutionPath.toWString(Path::PathType::Windows).c_str());
-			if (FAILED(solution->Open(bstrSolution)))
-				return nullptr;
-
-			// Wait until VS opens
-			UINT32 elapsed = 0;
-			while (elapsed < 10000)
-			{
-				EnvDTE::Window* window = nullptr;
-				if (SUCCEEDED(dte->get_MainWindow(&window)))
-					return dte;
-
-				Sleep(100);
-				elapsed += 100;
-			}
-
-			return nullptr;
-		}
-
-		/**
-		 * Opens a file on a specific line in a running Visual Studio instance.
-		 *
-		 * @param[in]	dte			DTE object retrieved from findRunningInstance() or openInstance().
-		 * @param[in]	filePath	Path of the file to open. File should be a part of the VS solution.
-		 * @param[in]	line		Line on which to focus Visual Studio after the file is open.
-		 */
-		static bool openFile(CComPtr<EnvDTE::_DTE> dte, const Path& filePath, UINT32 line)
-		{
-			// Open file
-			CComPtr<EnvDTE::ItemOperations> itemOperations;
-			if (FAILED(dte->get_ItemOperations(&itemOperations)))
-				return false;
-
-			CComBSTR bstrFilePath(filePath.toWString(Path::PathType::Windows).c_str());
-			CComBSTR bstrKind(EnvDTE::vsViewKindPrimary);
-			CComPtr<EnvDTE::Window> window = nullptr;
-			if (FAILED(itemOperations->OpenFile(bstrFilePath, bstrKind, &window)))
-				return false;
-
-			// Scroll to line
-			CComPtr<EnvDTE::Document> activeDocument;
-			if (SUCCEEDED(dte->get_ActiveDocument(&activeDocument)))
-			{
-				CComPtr<IDispatch> selection;
-				if (SUCCEEDED(activeDocument->get_Selection(&selection)))
-				{
-					CComPtr<EnvDTE::TextSelection> textSelection;
-					if (SUCCEEDED(selection->QueryInterface(&textSelection)))
-					{
-						textSelection->GotoLine(line, TRUE);
-					}
-				}
-			}
-
-			// Bring the window in focus
-			window = nullptr;
-			if (SUCCEEDED(dte->get_MainWindow(&window)))
-			{
-				window->Activate();
-
-				HWND hWnd;
-				window->get_HWnd((LONG*)&hWnd);
-				SetForegroundWindow(hWnd);
-			}
-
-			return true;
-		}
-
-		/**	Generates a Visual Studio project GUID from the project name. */
-		static String getProjectGUID(const WString& projectName)
-		{
-			static const String guidTemplate = "{0}-{1}-{2}-{3}-{4}";
-			String hash = md5(projectName);
-
-			String output = StringUtil::format(guidTemplate, hash.substr(0, 8),
-				hash.substr(8, 4), hash.substr(12, 4), hash.substr(16, 4), hash.substr(20, 12));
-			StringUtil::toUpperCase(output);
-
-			return output;
-		}
-
-		/**
-		 * Builds the Visual Studio solution text (.sln) for the provided version, using the provided solution data.
-		 *
-		 * @param[in]	version	Visual Studio version for which we're generating the solution file.
-		 * @param[in]	data	Data containing a list of projects and other information required to build the solution text.
-		 * @return				Generated text of the solution file.
-		 */
-		static String writeSolution(VisualStudioVersion version, const CodeSolutionData& data)
-		{
-			struct VersionData
-			{
-				String formatVersion;
-			};
-
-			Map<VisualStudioVersion, VersionData> versionData =
-			{
-				{ VisualStudioVersion::VS2008, { "10.00" } },
-				{ VisualStudioVersion::VS2010, { "11.00" } },
-				{ VisualStudioVersion::VS2012, { "12.00" } },
-				{ VisualStudioVersion::VS2013, { "12.00" } },
-				{ VisualStudioVersion::VS2015, { "12.00" } }
-			};
-
-			StringStream projectEntriesStream;
-			StringStream projectPlatformsStream;
-			for (auto& project : data.projects)
-			{
-				String guid = getProjectGUID(project.name);
-				String projectName = toString(project.name);
-
-				projectEntriesStream << StringUtil::format(PROJ_ENTRY_TEMPLATE, projectName, projectName + ".csproj", guid);
-				projectPlatformsStream << StringUtil::format(PROJ_PLATFORM_TEMPLATE, guid);
-			}
-
-			String projectEntries = projectEntriesStream.str();
-			String projectPlatforms = projectPlatformsStream.str();
-
-			return StringUtil::format(SLN_TEMPLATE, versionData[version].formatVersion, projectEntries, projectPlatforms);
-		}
-
-		/**
-		 * Builds the Visual Studio project text (.csproj) for the provided version, using the provided project data.
-		 *
-		 * @param[in]	version		Visual Studio version for which we're generating the project file.
-		 * @param[in]	projectData	Data containing a list of files, references and other information required to 
-		 *							build the project text.
-		 * @return					Generated text of the project file.
-		 */
-		static String writeProject(VisualStudioVersion version, const CodeProjectData& projectData)
-		{
-			struct VersionData
-			{
-				String toolsVersion;
-			};
-
-			Map<VisualStudioVersion, VersionData> versionData =
-			{
-				{ VisualStudioVersion::VS2008, { "3.5" } },
-				{ VisualStudioVersion::VS2010, { "4.0" } },
-				{ VisualStudioVersion::VS2012, { "4.0" } },
-				{ VisualStudioVersion::VS2013, { "12.0" } },
-				{ VisualStudioVersion::VS2015, { "13.0" } }
-			};
-
-			StringStream tempStream;
-			for (auto& codeEntry : projectData.codeFiles)
-				tempStream << StringUtil::format(CODE_ENTRY_TEMPLATE, codeEntry.toString());
-
-			String codeEntries = tempStream.str();
-			tempStream.str("");
-			tempStream.clear();
-
-			for (auto& nonCodeEntry : projectData.nonCodeFiles)
-				tempStream << StringUtil::format(NON_CODE_ENTRY_TEMPLATE, nonCodeEntry.toString());
-
-			String nonCodeEntries = tempStream.str();
-			tempStream.str("");
-			tempStream.clear();
-
-			for (auto& referenceEntry : projectData.assemblyReferences)
-			{
-				String referenceName = toString(referenceEntry.name);
-
-				if (referenceEntry.path.isEmpty())
-					tempStream << StringUtil::format(REFERENCE_ENTRY_TEMPLATE, referenceName);
-				else
-					tempStream << StringUtil::format(REFERENCE_PATH_ENTRY_TEMPLATE, referenceName, referenceEntry.path.toString());
-			}
-
-			String referenceEntries = tempStream.str();
-			tempStream.str("");
-			tempStream.clear();
-
-			for (auto& referenceEntry : projectData.projectReferences)
-			{
-				String referenceName = toString(referenceEntry.name);
-				String projectGUID = getProjectGUID(referenceEntry.name);
-
-				tempStream << StringUtil::format(REFERENCE_PROJECT_ENTRY_TEMPLATE, referenceName, projectGUID);
-			}
-
-			String projectReferenceEntries = tempStream.str();
-			tempStream.str("");
-			tempStream.clear();
-
-			tempStream << toString(projectData.defines);
-
-			String defines = tempStream.str();
-			String projectGUID = getProjectGUID(projectData.name);
-
-			return StringUtil::format(PROJ_TEMPLATE, versionData[version].toolsVersion, projectGUID, 
-				toString(projectData.name), defines, referenceEntries, projectReferenceEntries, codeEntries, nonCodeEntries);
-		}
-	};
-
-	const String VisualStudio::SLN_TEMPLATE =
+	//class VisualStudio
+	//{
+	//private:
+	//	static const String SLN_TEMPLATE; /**< Template text used for a solution file. */
+	//	static const String PROJ_ENTRY_TEMPLATE; /**< Template text used for a project entry in a solution file. */
+	//	static const String PROJ_PLATFORM_TEMPLATE; /**< Template text used for platform specific information for a project entry in a solution file. */
+
+	//	static const String PROJ_TEMPLATE; /**< Template XML used for a project file. */
+	//	static const String REFERENCE_ENTRY_TEMPLATE; /**< Template XML used for a reference to another assembly entry by name. */
+	//	static const String REFERENCE_PROJECT_ENTRY_TEMPLATE; /**< Template XML used for a reference to another project entry. */
+	//	static const String REFERENCE_PATH_ENTRY_TEMPLATE; /**< Template XML used for a reference to another assembly entry by name and path. */
+	//	static const String CODE_ENTRY_TEMPLATE; /**< Template XML used for a single code file entry in a project. */
+	//	static const String NON_CODE_ENTRY_TEMPLATE; /**< Template XML used for a single non-code file entry in a project. */
+
+	//public:
+	//	/**
+	//	 * Scans the running processes to find a running Visual Studio instance with the specified version and open solution.
+	//	 *
+	//	 * @param[in]	clsID			Class ID of the specific Visual Studio version we are looking for.
+	//	 * @param[in]	solutionPath	Path to the solution the instance needs to have open.
+	//	 * @return						DTE object that may be used to interact with the Visual Studio instance, or null if
+	//	 *								not found.
+	//	 */
+	//	static CComPtr<EnvDTE::_DTE> findRunningInstance(const CLSID& clsID, const Path& solutionPath)
+	//	{
+	//		CComPtr<IRunningObjectTable> runningObjectTable = nullptr;
+	//		if (FAILED(GetRunningObjectTable(0, &runningObjectTable)))
+	//			return nullptr;
+
+	//		CComPtr<IEnumMoniker> enumMoniker = nullptr;
+	//		if (FAILED(runningObjectTable->EnumRunning(&enumMoniker)))
+	//			return nullptr;
+
+	//		CComPtr<IMoniker> dteMoniker = nullptr;
+	//		if (FAILED(CreateClassMoniker(clsID, &dteMoniker)))
+	//			return nullptr;
+
+	//		CComBSTR bstrSolution(solutionPath.toWString(Path::PathType::Windows).c_str());
+	//		CComPtr<IMoniker> moniker;
+	//		ULONG count = 0;
+	//		while (enumMoniker->Next(1, &moniker, &count) == S_OK)
+	//		{
+	//			if (moniker->IsEqual(dteMoniker))
+	//			{
+	//				CComPtr<IUnknown> curObject = nullptr;
+	//				HRESULT result = runningObjectTable->GetObject(moniker, &curObject);
+	//				moniker = nullptr;
+
+	//				if (result != S_OK)
+	//					continue;
+
+	//				CComPtr<EnvDTE::_DTE> dte;
+	//				curObject->QueryInterface(__uuidof(EnvDTE::_DTE), (void**)&dte);
+
+	//				if (dte == nullptr)
+	//					continue;
+
+	//				CComPtr<EnvDTE::_Solution> solution;
+	//				if (FAILED(dte->get_Solution(&solution)))
+	//					continue;
+
+	//				CComBSTR fullName;
+	//				if (FAILED(solution->get_FullName(&fullName)))
+	//					continue;
+
+	//				if (fullName == bstrSolution)
+	//					return dte;
+	//			}
+	//		}
+
+	//		return nullptr;
+	//	}
+
+	//	/**
+	//	 * Opens a new Visual Studio instance of the specified version with the provided solution.
+	//	 *
+	//	 * @param[in]	clsID			Class ID of the specific Visual Studio version to start.
+	//	 * @param[in]	solutionPath	Path to the solution the instance needs to open.
+	//	 */
+	//	static CComPtr<EnvDTE::_DTE> openInstance(const CLSID& clsid, const Path& solutionPath)
+	//	{
+	//		CComPtr<IUnknown> newInstance = nullptr;
+	//		if (FAILED(::CoCreateInstance(clsid, nullptr, CLSCTX_LOCAL_SERVER, EnvDTE::IID__DTE, (LPVOID*)&newInstance)))
+	//			return nullptr;
+
+	//		CComPtr<EnvDTE::_DTE> dte;
+	//		newInstance->QueryInterface(__uuidof(EnvDTE::_DTE), (void**)&dte);
+
+	//		if (dte == nullptr)
+	//			return nullptr;
+
+	//		dte->put_UserControl(TRUE);
+
+	//		CComPtr<EnvDTE::_Solution> solution;
+	//		if (FAILED(dte->get_Solution(&solution)))
+	//			return nullptr;
+
+	//		CComBSTR bstrSolution(solutionPath.toWString(Path::PathType::Windows).c_str());
+	//		if (FAILED(solution->Open(bstrSolution)))
+	//			return nullptr;
+
+	//		// Wait until VS opens
+	//		UINT32 elapsed = 0;
+	//		while (elapsed < 10000)
+	//		{
+	//			EnvDTE::Window* window = nullptr;
+	//			if (SUCCEEDED(dte->get_MainWindow(&window)))
+	//				return dte;
+
+	//			Sleep(100);
+	//			elapsed += 100;
+	//		}
+
+	//		return nullptr;
+	//	}
+
+	//	/**
+	//	 * Opens a file on a specific line in a running Visual Studio instance.
+	//	 *
+	//	 * @param[in]	dte			DTE object retrieved from findRunningInstance() or openInstance().
+	//	 * @param[in]	filePath	Path of the file to open. File should be a part of the VS solution.
+	//	 * @param[in]	line		Line on which to focus Visual Studio after the file is open.
+	//	 */
+	//	static bool openFile(CComPtr<EnvDTE::_DTE> dte, const Path& filePath, UINT32 line)
+	//	{
+	//		// Open file
+	//		CComPtr<EnvDTE::ItemOperations> itemOperations;
+	//		if (FAILED(dte->get_ItemOperations(&itemOperations)))
+	//			return false;
+
+	//		CComBSTR bstrFilePath(filePath.toWString(Path::PathType::Windows).c_str());
+	//		CComBSTR bstrKind(EnvDTE::vsViewKindPrimary);
+	//		CComPtr<EnvDTE::Window> window = nullptr;
+	//		if (FAILED(itemOperations->OpenFile(bstrFilePath, bstrKind, &window)))
+	//			return false;
+
+	//		// Scroll to line
+	//		CComPtr<EnvDTE::Document> activeDocument;
+	//		if (SUCCEEDED(dte->get_ActiveDocument(&activeDocument)))
+	//		{
+	//			CComPtr<IDispatch> selection;
+	//			if (SUCCEEDED(activeDocument->get_Selection(&selection)))
+	//			{
+	//				CComPtr<EnvDTE::TextSelection> textSelection;
+	//				if (SUCCEEDED(selection->QueryInterface(&textSelection)))
+	//				{
+	//					textSelection->GotoLine(line, TRUE);
+	//				}
+	//			}
+	//		}
+
+	//		// Bring the window in focus
+	//		window = nullptr;
+	//		if (SUCCEEDED(dte->get_MainWindow(&window)))
+	//		{
+	//			window->Activate();
+
+	//			HWND hWnd;
+	//			window->get_HWnd((LONG*)&hWnd);
+	//			SetForegroundWindow(hWnd);
+	//		}
+
+	//		return true;
+	//	}
+
+	//	/**	Generates a Visual Studio project GUID from the project name. */
+	//	static String getProjectGUID(const WString& projectName)
+	//	{
+	//		static const String guidTemplate = "{0}-{1}-{2}-{3}-{4}";
+	//		String hash = md5(projectName);
+
+	//		String output = StringUtil::format(guidTemplate, hash.substr(0, 8),
+	//			hash.substr(8, 4), hash.substr(12, 4), hash.substr(16, 4), hash.substr(20, 12));
+	//		StringUtil::toUpperCase(output);
+
+	//		return output;
+	//	}
+
+	//	/**
+	//	 * Builds the Visual Studio solution text (.sln) for the provided version, using the provided solution data.
+	//	 *
+	//	 * @param[in]	version	Visual Studio version for which we're generating the solution file.
+	//	 * @param[in]	data	Data containing a list of projects and other information required to build the solution text.
+	//	 * @return				Generated text of the solution file.
+	//	 */
+	//	static String writeSolution(VisualStudioVersion version, const CodeSolutionData& data)
+	//	{
+	//		struct VersionData
+	//		{
+	//			String formatVersion;
+	//		};
+
+	//		Map<VisualStudioVersion, VersionData> versionData =
+	//		{
+	//			{ VisualStudioVersion::VS2008, { "10.00" } },
+	//			{ VisualStudioVersion::VS2010, { "11.00" } },
+	//			{ VisualStudioVersion::VS2012, { "12.00" } },
+	//			{ VisualStudioVersion::VS2013, { "12.00" } },
+	//			{ VisualStudioVersion::VS2015, { "12.00" } }
+	//		};
+
+	//		StringStream projectEntriesStream;
+	//		StringStream projectPlatformsStream;
+	//		for (auto& project : data.projects)
+	//		{
+	//			String guid = getProjectGUID(project.name);
+	//			String projectName = toString(project.name);
+
+	//			projectEntriesStream << StringUtil::format(PROJ_ENTRY_TEMPLATE, projectName, projectName + ".csproj", guid);
+	//			projectPlatformsStream << StringUtil::format(PROJ_PLATFORM_TEMPLATE, guid);
+	//		}
+
+	//		String projectEntries = projectEntriesStream.str();
+	//		String projectPlatforms = projectPlatformsStream.str();
+
+	//		return StringUtil::format(SLN_TEMPLATE, versionData[version].formatVersion, projectEntries, projectPlatforms);
+	//	}
+
+	//	/**
+	//	 * Builds the Visual Studio project text (.csproj) for the provided version, using the provided project data.
+	//	 *
+	//	 * @param[in]	version		Visual Studio version for which we're generating the project file.
+	//	 * @param[in]	projectData	Data containing a list of files, references and other information required to 
+	//	 *							build the project text.
+	//	 * @return					Generated text of the project file.
+	//	 */
+	//	static String writeProject(VisualStudioVersion version, const CodeProjectData& projectData)
+	//	{
+	//		struct VersionData
+	//		{
+	//			String toolsVersion;
+	//		};
+
+	//		Map<VisualStudioVersion, VersionData> versionData =
+	//		{
+	//			{ VisualStudioVersion::VS2008, { "3.5" } },
+	//			{ VisualStudioVersion::VS2010, { "4.0" } },
+	//			{ VisualStudioVersion::VS2012, { "4.0" } },
+	//			{ VisualStudioVersion::VS2013, { "12.0" } },
+	//			{ VisualStudioVersion::VS2015, { "13.0" } }
+	//		};
+
+	//		StringStream tempStream;
+	//		for (auto& codeEntry : projectData.codeFiles)
+	//			tempStream << StringUtil::format(CODE_ENTRY_TEMPLATE, codeEntry.toString());
+
+	//		String codeEntries = tempStream.str();
+	//		tempStream.str("");
+	//		tempStream.clear();
+
+	//		for (auto& nonCodeEntry : projectData.nonCodeFiles)
+	//			tempStream << StringUtil::format(NON_CODE_ENTRY_TEMPLATE, nonCodeEntry.toString());
+
+	//		String nonCodeEntries = tempStream.str();
+	//		tempStream.str("");
+	//		tempStream.clear();
+
+	//		for (auto& referenceEntry : projectData.assemblyReferences)
+	//		{
+	//			String referenceName = toString(referenceEntry.name);
+
+	//			if (referenceEntry.path.isEmpty())
+	//				tempStream << StringUtil::format(REFERENCE_ENTRY_TEMPLATE, referenceName);
+	//			else
+	//				tempStream << StringUtil::format(REFERENCE_PATH_ENTRY_TEMPLATE, referenceName, referenceEntry.path.toString());
+	//		}
+
+	//		String referenceEntries = tempStream.str();
+	//		tempStream.str("");
+	//		tempStream.clear();
+
+	//		for (auto& referenceEntry : projectData.projectReferences)
+	//		{
+	//			String referenceName = toString(referenceEntry.name);
+	//			String projectGUID = getProjectGUID(referenceEntry.name);
+
+	//			tempStream << StringUtil::format(REFERENCE_PROJECT_ENTRY_TEMPLATE, referenceName, projectGUID);
+	//		}
+
+	//		String projectReferenceEntries = tempStream.str();
+	//		tempStream.str("");
+	//		tempStream.clear();
+
+	//		tempStream << toString(projectData.defines);
+
+	//		String defines = tempStream.str();
+	//		String projectGUID = getProjectGUID(projectData.name);
+
+	//		return StringUtil::format(PROJ_TEMPLATE, versionData[version].toolsVersion, projectGUID, 
+	//			toString(projectData.name), defines, referenceEntries, projectReferenceEntries, codeEntries, nonCodeEntries);
+	//	}
+	//};
+
+	/*const String VisualStudio::SLN_TEMPLATE =
 		R"(Microsoft Visual Studio Solution File, Format Version {0}
 		R"(Microsoft Visual Studio Solution File, Format Version {0}
 # Visual Studio 2013
 # Visual Studio 2013
 VisualStudioVersion = 12.0.30723.0
 VisualStudioVersion = 12.0.30723.0
@@ -505,7 +505,7 @@ EndProject)";
 
 
 	const String VisualStudio::NON_CODE_ENTRY_TEMPLATE =
 	const String VisualStudio::NON_CODE_ENTRY_TEMPLATE =
 		R"(
 		R"(
-    <None Include="{0}"/>)";
+    <None Include="{0}"/>)";*/
 
 
 	VSCodeEditor::VSCodeEditor(VisualStudioVersion version, const Path& execPath, const WString& CLSID)
 	VSCodeEditor::VSCodeEditor(VisualStudioVersion version, const Path& execPath, const WString& CLSID)
 		:mVersion(version), mExecPath(execPath), mCLSID(CLSID)
 		:mVersion(version), mExecPath(execPath), mCLSID(CLSID)
@@ -515,7 +515,7 @@ EndProject)";
 
 
 	void VSCodeEditor::openFile(const Path& solutionPath, const Path& filePath, UINT32 lineNumber) const
 	void VSCodeEditor::openFile(const Path& solutionPath, const Path& filePath, UINT32 lineNumber) const
 	{
 	{
-		CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
+		/*CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
 
 
 		CLSID clsID;
 		CLSID clsID;
 		if (FAILED(CLSIDFromString(mCLSID.c_str(), &clsID)))
 		if (FAILED(CLSIDFromString(mCLSID.c_str(), &clsID)))
@@ -545,12 +545,12 @@ EndProject)";
 		VisualStudio::openFile(dte, filePath, lineNumber);
 		VisualStudio::openFile(dte, filePath, lineNumber);
 		CoRegisterMessageFilter(oldFilter, nullptr);
 		CoRegisterMessageFilter(oldFilter, nullptr);
 
 
-		CoUninitialize();
+		CoUninitialize();*/
 	}
 	}
 
 
 	void VSCodeEditor::syncSolution(const CodeSolutionData& data, const Path& outputPath) const
 	void VSCodeEditor::syncSolution(const CodeSolutionData& data, const Path& outputPath) const
 	{
 	{
-		String solutionString = VisualStudio::writeSolution(mVersion, data);
+		/*String solutionString = VisualStudio::writeSolution(mVersion, data);
 		solutionString = StringUtil::replaceAll(solutionString, "\n", "\r\n");
 		solutionString = StringUtil::replaceAll(solutionString, "\n", "\r\n");
 		Path solutionPath = outputPath;
 		Path solutionPath = outputPath;
 		solutionPath.append(data.name + L".sln");
 		solutionPath.append(data.name + L".sln");
@@ -570,7 +570,7 @@ EndProject)";
 
 
 		SPtr<DataStream> solutionStream = FileSystem::createAndOpenFile(solutionPath);
 		SPtr<DataStream> solutionStream = FileSystem::createAndOpenFile(solutionPath);
 		solutionStream->write(solutionString.c_str(), solutionString.size() * sizeof(String::value_type));
 		solutionStream->write(solutionString.c_str(), solutionString.size() * sizeof(String::value_type));
-		solutionStream->close();
+		solutionStream->close();*/
 	}
 	}
 
 
 	VSCodeEditorFactory::VSCodeEditorFactory()
 	VSCodeEditorFactory::VSCodeEditorFactory()

+ 0 - 12
Source/BansheeEngine/Include/BsCLight.h

@@ -26,18 +26,6 @@ namespace BansheeEngine
 
 
 		virtual ~CLight();
 		virtual ~CLight();
 
 
-	    /** @copydoc Light::getPosition */
-		Vector3 getPosition() const { return mInternal->getPosition(); }
-
-	    /** @copydoc Light::setPosition */
-		void setPosition(const Vector3& position) { mInternal->setPosition(position); }
-
-	    /** @copydoc Light::getRotation */
-		Quaternion getRotation() const { return mInternal->getRotation(); }
-
-	    /** @copydoc Light::setRotation */
-		void setRotation(const Quaternion& rotation) { mInternal->setRotation(rotation); }
-
 	    /** @copydoc Light::getType */
 	    /** @copydoc Light::getType */
 		LightType getType() const { return mInternal->getType(); }
 		LightType getType() const { return mInternal->getType(); }
 
 

+ 1 - 1
Source/BansheeEngine/Include/BsPrerequisites.h

@@ -8,7 +8,7 @@
  *  @{
  *  @{
  */
  */
 
 
-/** @defgroup Engine 3. Engine
+/** @defgroup Engine Engine
  *	Layer that builds upon Core, providing specific implementations of its interfaces as well as other high level systems.
  *	Layer that builds upon Core, providing specific implementations of its interfaces as well as other high level systems.
  *  @{
  *  @{
  */
  */

+ 1 - 1
Source/BansheeEngine/Include/BsRenderableElement.h

@@ -39,7 +39,7 @@ namespace BansheeEngine
 		/**	Material to render the mesh with. */
 		/**	Material to render the mesh with. */
 		SPtr<MaterialCore> material;
 		SPtr<MaterialCore> material;
 
 
-		/**	Custom data that may optionally be set by the RenderableHanbdler. */
+		/**	Custom data that may optionally be set by the RenderableHandler. */
 		Any rendererData;
 		Any rendererData;
 
 
 		Vector<BufferBindInfo> rendererBuffers;
 		Vector<BufferBindInfo> rendererBuffers;

+ 6 - 6
Source/BansheeEngine/Include/BsRenderer.h

@@ -22,42 +22,42 @@ namespace BansheeEngine
 		 *
 		 *
 		 * @note	Core thread.
 		 * @note	Core thread.
 		 */
 		 */
-		virtual void _notifyRenderableAdded(RenderableCore* renderable) { }
+		virtual void notifyRenderableAdded(RenderableCore* renderable) { }
 
 
 		/**
 		/**
 		 * Called whenever a renderable is updated.
 		 * Called whenever a renderable is updated.
 		 *
 		 *
 		 * @note	Core thread.
 		 * @note	Core thread.
 		 */
 		 */
-		virtual void _notifyRenderableUpdated(RenderableCore* renderable) { }
+		virtual void notifyRenderableUpdated(RenderableCore* renderable) { }
 
 
 		/**
 		/**
 		 * Called whenever a renderable is destroyed.
 		 * Called whenever a renderable is destroyed.
 		 *
 		 *
 		 * @note	Core thread.
 		 * @note	Core thread.
 		 */
 		 */
-		virtual void _notifyRenderableRemoved(RenderableCore* renderable) { }
+		virtual void notifyRenderableRemoved(RenderableCore* renderable) { }
 
 
 		/**
 		/**
 		 * Called whenever a new light is created.
 		 * Called whenever a new light is created.
 		 *
 		 *
 		 * @note	Core thread.
 		 * @note	Core thread.
 		 */
 		 */
-		virtual void _notifyLightAdded(LightCore* light) { }
+		virtual void notifyLightAdded(LightCore* light) { }
 
 
 		/**
 		/**
 		 * Called whenever a light is updated.
 		 * Called whenever a light is updated.
 		 *
 		 *
 		 * @note	Core thread.
 		 * @note	Core thread.
 		 */
 		 */
-		virtual void _notifyLightUpdated(LightCore* light) { }
+		virtual void notifyLightUpdated(LightCore* light) { }
 
 
 		/**
 		/**
 		 * Called whenever a light is destroyed.
 		 * Called whenever a light is destroyed.
 		 *
 		 *
 		 * @note	Core thread.
 		 * @note	Core thread.
 		 */
 		 */
-		virtual void _notifyLightRemoved(LightCore* light) { }
+		virtual void notifyLightRemoved(LightCore* light) { }
 	};
 	};
 
 
 	/**	Provides easy access to Renderer. */
 	/**	Provides easy access to Renderer. */

+ 4 - 4
Source/BansheeEngine/Source/BsCamera.cpp

@@ -680,7 +680,7 @@ namespace BansheeEngine
 
 
 	CameraCore::~CameraCore()
 	CameraCore::~CameraCore()
 	{
 	{
-		RendererManager::instance().getActive()->_notifyCameraRemoved(this);
+		RendererManager::instance().getActive()->notifyCameraRemoved(this);
 	}
 	}
 
 
 	CameraCore::CameraCore(SPtr<RenderTargetCore> target, float left, float top, float width, float height)
 	CameraCore::CameraCore(SPtr<RenderTargetCore> target, float left, float top, float width, float height)
@@ -695,7 +695,7 @@ namespace BansheeEngine
 
 
 	void CameraCore::initialize()
 	void CameraCore::initialize()
 	{
 	{
-		RendererManager::instance().getActive()->_notifyCameraAdded(this);
+		RendererManager::instance().getActive()->notifyCameraAdded(this);
 
 
 		CoreObjectCore::initialize();
 		CoreObjectCore::initialize();
 	}
 	}
@@ -707,7 +707,7 @@ namespace BansheeEngine
 
 
 	void CameraCore::syncToCore(const CoreSyncData& data)
 	void CameraCore::syncToCore(const CoreSyncData& data)
 	{
 	{
-		RendererManager::instance().getActive()->_notifyCameraRemoved(this);
+		RendererManager::instance().getActive()->notifyCameraRemoved(this);
 
 
 		char* dataPtr = (char*)data.getBuffer();
 		char* dataPtr = (char*)data.getBuffer();
 
 
@@ -732,7 +732,7 @@ namespace BansheeEngine
 		mRecalcView = true;
 		mRecalcView = true;
 
 
 		if(mIsActive)
 		if(mIsActive)
-			RendererManager::instance().getActive()->_notifyCameraAdded(this);
+			RendererManager::instance().getActive()->notifyCameraAdded(this);
 	}
 	}
 
 
 	Camera::Camera(SPtr<RenderTarget> target, float left, float top, float width, float height)
 	Camera::Camera(SPtr<RenderTarget> target, float left, float top, float width, float height)

+ 3 - 3
Source/BansheeEngine/Source/BsGUIManager.cpp

@@ -1715,7 +1715,7 @@ namespace BansheeEngine
 	{
 	{
 		SPtr<CoreRenderer> activeRenderer = RendererManager::instance().getActive();
 		SPtr<CoreRenderer> activeRenderer = RendererManager::instance().getActive();
 		for (auto& cameraData : mPerCameraData)
 		for (auto& cameraData : mPerCameraData)
-			activeRenderer->_unregisterRenderCallback(cameraData.first.get(), 30);
+			activeRenderer->unregisterRenderCallback(cameraData.first.get(), 30);
 	}
 	}
 
 
 	void GUIManagerCore::initialize(const SPtr<MaterialCore>& textMat, const SPtr<MaterialCore>& imageMat,
 	void GUIManagerCore::initialize(const SPtr<MaterialCore>& textMat, const SPtr<MaterialCore>& imageMat,
@@ -1764,7 +1764,7 @@ namespace BansheeEngine
 					auto insertedData = mPerCameraData.insert(std::make_pair(newCameraData.first, Vector<GUIManager::GUICoreRenderData>()));
 					auto insertedData = mPerCameraData.insert(std::make_pair(newCameraData.first, Vector<GUIManager::GUICoreRenderData>()));
 					renderData = &insertedData.first->second;
 					renderData = &insertedData.first->second;
 
 
-					activeRenderer->_registerRenderCallback(camera.get(), 30, std::bind(&GUIManagerCore::render, this, camera), true);
+					activeRenderer->registerRenderCallback(camera.get(), 30, std::bind(&GUIManagerCore::render, this, camera), true);
 					validCameras.insert(camera);
 					validCameras.insert(camera);
 				}
 				}
 
 
@@ -1781,7 +1781,7 @@ namespace BansheeEngine
 
 
 			for (auto& camera : cameraToRemove)
 			for (auto& camera : cameraToRemove)
 			{
 			{
-				activeRenderer->_unregisterRenderCallback(camera.get(), 30);
+				activeRenderer->unregisterRenderCallback(camera.get(), 30);
 				mPerCameraData.erase(camera);
 				mPerCameraData.erase(camera);
 			}
 			}
 		}
 		}

+ 7 - 7
Source/BansheeEngine/Source/BsLight.cpp

@@ -126,13 +126,13 @@ namespace BansheeEngine
 
 
 	LightCore::~LightCore()
 	LightCore::~LightCore()
 	{
 	{
-		gRenderer()->_notifyLightRemoved(this);
+		gRenderer()->notifyLightRemoved(this);
 	}
 	}
 
 
 	void LightCore::initialize()
 	void LightCore::initialize()
 	{
 	{
 		updateBounds();
 		updateBounds();
-		gRenderer()->_notifyLightAdded(this);
+		gRenderer()->notifyLightAdded(this);
 
 
 		CoreObjectCore::initialize();
 		CoreObjectCore::initialize();
 	}
 	}
@@ -164,19 +164,19 @@ namespace BansheeEngine
 		if (dirtyFlags == (UINT32)LightDirtyFlag::Transform)
 		if (dirtyFlags == (UINT32)LightDirtyFlag::Transform)
 		{
 		{
 			if (mIsActive)
 			if (mIsActive)
-				gRenderer()->_notifyLightUpdated(this);
+				gRenderer()->notifyLightUpdated(this);
 		}
 		}
 		else
 		else
 		{
 		{
 			if (oldIsActive != mIsActive)
 			if (oldIsActive != mIsActive)
 			{
 			{
 				if (mIsActive)
 				if (mIsActive)
-					gRenderer()->_notifyLightAdded(this);
+					gRenderer()->notifyLightAdded(this);
 				else
 				else
 				{
 				{
 					LightType newType = mType;
 					LightType newType = mType;
 					mType = oldType;
 					mType = oldType;
-					gRenderer()->_notifyLightRemoved(this);
+					gRenderer()->notifyLightRemoved(this);
 					mType = newType;
 					mType = newType;
 				}
 				}
 			}
 			}
@@ -184,10 +184,10 @@ namespace BansheeEngine
 			{
 			{
 				LightType newType = mType;
 				LightType newType = mType;
 				mType = oldType;
 				mType = oldType;
-				gRenderer()->_notifyLightRemoved(this);
+				gRenderer()->notifyLightRemoved(this);
 				mType = newType;
 				mType = newType;
 
 
-				gRenderer()->_notifyLightAdded(this);
+				gRenderer()->notifyLightAdded(this);
 			}
 			}
 		}
 		}
 	}
 	}

+ 7 - 7
Source/BansheeEngine/Source/BsRenderable.cpp

@@ -131,12 +131,12 @@ namespace BansheeEngine
 	RenderableCore::~RenderableCore()
 	RenderableCore::~RenderableCore()
 	{
 	{
 		if (mIsActive)
 		if (mIsActive)
-			gRenderer()->_notifyRenderableRemoved(this);
+			gRenderer()->notifyRenderableRemoved(this);
 	}
 	}
 
 
 	void RenderableCore::initialize()
 	void RenderableCore::initialize()
 	{
 	{
-		gRenderer()->_notifyRenderableAdded(this);
+		gRenderer()->notifyRenderableAdded(this);
 
 
 		CoreObjectCore::initialize();
 		CoreObjectCore::initialize();
 	}
 	}
@@ -197,21 +197,21 @@ namespace BansheeEngine
 		if (dirtyFlags == (UINT32)RenderableDirtyFlag::Transform)
 		if (dirtyFlags == (UINT32)RenderableDirtyFlag::Transform)
 		{
 		{
 			if (mIsActive)
 			if (mIsActive)
-				gRenderer()->_notifyRenderableUpdated(this);
+				gRenderer()->notifyRenderableUpdated(this);
 		}
 		}
 		else
 		else
 		{
 		{
 			if (oldIsActive != mIsActive)
 			if (oldIsActive != mIsActive)
 			{
 			{
 				if (mIsActive)
 				if (mIsActive)
-					gRenderer()->_notifyRenderableAdded(this);
+					gRenderer()->notifyRenderableAdded(this);
 				else
 				else
-					gRenderer()->_notifyRenderableRemoved(this);
+					gRenderer()->notifyRenderableRemoved(this);
 			}
 			}
 			else
 			else
 			{
 			{
-				gRenderer()->_notifyRenderableRemoved(this);
-				gRenderer()->_notifyRenderableAdded(this);
+				gRenderer()->notifyRenderableRemoved(this);
+				gRenderer()->notifyRenderableAdded(this);
 			}
 			}
 		}
 		}
 	}
 	}

+ 1 - 1
Source/BansheeUtility/Include/BsPrerequisitesUtil.h

@@ -9,7 +9,7 @@
  *  @{
  *  @{
  */
  */
 
 
-/** @defgroup Utility 1. Utility
+/** @defgroup Utility Utility
  *	Lowest layer of the engine containing a collection of very decoupled and separate systems that are 
  *	Lowest layer of the engine containing a collection of very decoupled and separate systems that are 
  *  likely to be used throughout all of the higher layers.
  *  likely to be used throughout all of the higher layers.
  *  @{
  *  @{

+ 0 - 4
Source/MBansheeEditor/PrefabUtility.cs

@@ -1,11 +1,7 @@
 //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
 //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
 //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
 //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
 using System;
 using System;
-using System.Collections.Generic;
-using System.Linq;
 using System.Runtime.CompilerServices;
 using System.Runtime.CompilerServices;
-using System.Text;
-using System.Threading.Tasks;
 using BansheeEngine;
 using BansheeEngine;
 
 
 namespace BansheeEditor
 namespace BansheeEditor

+ 8 - 8
Source/RenderBeast/Include/BsRenderBeast.h

@@ -133,28 +133,28 @@ namespace BansheeEngine
 
 
 	private:
 	private:
 		/** @copydoc Renderer::_notifyCameraAdded */
 		/** @copydoc Renderer::_notifyCameraAdded */
-		void _notifyCameraAdded(const CameraCore* camera) override;
+		void notifyCameraAdded(const CameraCore* camera) override;
 
 
 		/** @copydocRenderer::_notifyCameraRemoved */
 		/** @copydocRenderer::_notifyCameraRemoved */
-		void _notifyCameraRemoved(const CameraCore* camera) override;
+		void notifyCameraRemoved(const CameraCore* camera) override;
 
 
 		/** @copydoc Renderer::_notifyLightAdded */
 		/** @copydoc Renderer::_notifyLightAdded */
-		void _notifyLightAdded(LightCore* light) override;
+		void notifyLightAdded(LightCore* light) override;
 
 
 		/** @copydoc Renderer::_notifyLightUpdated */
 		/** @copydoc Renderer::_notifyLightUpdated */
-		void _notifyLightUpdated(LightCore* light) override;
+		void notifyLightUpdated(LightCore* light) override;
 
 
 		/** @copydoc Renderer::_notifyLightRemoved */
 		/** @copydoc Renderer::_notifyLightRemoved */
-		void _notifyLightRemoved(LightCore* light) override;
+		void notifyLightRemoved(LightCore* light) override;
 
 
 		/** @copydoc Renderer::_notifyRenderableAdded */
 		/** @copydoc Renderer::_notifyRenderableAdded */
-		void _notifyRenderableAdded(RenderableCore* renderable) override;
+		void notifyRenderableAdded(RenderableCore* renderable) override;
 
 
 		/** @copydoc Renderer::_notifyRenderableUpdated */
 		/** @copydoc Renderer::_notifyRenderableUpdated */
-		void _notifyRenderableUpdated(RenderableCore* renderable) override;
+		void notifyRenderableUpdated(RenderableCore* renderable) override;
 
 
 		/** @copydoc Renderer::_notifyRenderableRemoved */
 		/** @copydoc Renderer::_notifyRenderableRemoved */
-		void _notifyRenderableRemoved(RenderableCore* renderable) override;
+		void notifyRenderableRemoved(RenderableCore* renderable) override;
 
 
 		/**
 		/**
 		 * Updates the render options on the core thread.
 		 * Updates the render options on the core thread.

+ 8 - 8
Source/RenderBeast/Source/BsRenderBeast.cpp

@@ -101,7 +101,7 @@ namespace BansheeEngine
 		assert(mSamplerOverrides.empty());
 		assert(mSamplerOverrides.empty());
 	}
 	}
 
 
-	void RenderBeast::_notifyRenderableAdded(RenderableCore* renderable)
+	void RenderBeast::notifyRenderableAdded(RenderableCore* renderable)
 	{
 	{
 		UINT32 renderableId = (UINT32)mRenderables.size();
 		UINT32 renderableId = (UINT32)mRenderables.size();
 
 
@@ -198,7 +198,7 @@ namespace BansheeEngine
 		}
 		}
 	}
 	}
 
 
-	void RenderBeast::_notifyRenderableRemoved(RenderableCore* renderable)
+	void RenderBeast::notifyRenderableRemoved(RenderableCore* renderable)
 	{
 	{
 		UINT32 renderableId = renderable->getRendererId();
 		UINT32 renderableId = renderable->getRendererId();
 		RenderableCore* lastRenerable = mRenderables.back().renderable;
 		RenderableCore* lastRenerable = mRenderables.back().renderable;
@@ -241,7 +241,7 @@ namespace BansheeEngine
 		mRenderableShaderData.erase(mRenderableShaderData.end() - 1);
 		mRenderableShaderData.erase(mRenderableShaderData.end() - 1);
 	}
 	}
 
 
-	void RenderBeast::_notifyRenderableUpdated(RenderableCore* renderable)
+	void RenderBeast::notifyRenderableUpdated(RenderableCore* renderable)
 	{
 	{
 		UINT32 renderableId = renderable->getRendererId();
 		UINT32 renderableId = renderable->getRendererId();
 
 
@@ -255,7 +255,7 @@ namespace BansheeEngine
 		mWorldBounds[renderableId] = renderable->getBounds();
 		mWorldBounds[renderableId] = renderable->getBounds();
 	}
 	}
 
 
-	void RenderBeast::_notifyLightAdded(LightCore* light)
+	void RenderBeast::notifyLightAdded(LightCore* light)
 	{
 	{
 		if (light->getType() == LightType::Directional)
 		if (light->getType() == LightType::Directional)
 		{
 		{
@@ -281,7 +281,7 @@ namespace BansheeEngine
 		}
 		}
 	}
 	}
 
 
-	void RenderBeast::_notifyLightUpdated(LightCore* light)
+	void RenderBeast::notifyLightUpdated(LightCore* light)
 	{
 	{
 		UINT32 lightId = light->getRendererId();
 		UINT32 lightId = light->getRendererId();
 
 
@@ -289,7 +289,7 @@ namespace BansheeEngine
 			mLightWorldBounds[lightId] = light->getBounds();
 			mLightWorldBounds[lightId] = light->getBounds();
 	}
 	}
 
 
-	void RenderBeast::_notifyLightRemoved(LightCore* light)
+	void RenderBeast::notifyLightRemoved(LightCore* light)
 	{
 	{
 		UINT32 lightId = light->getRendererId();
 		UINT32 lightId = light->getRendererId();
 		if (light->getType() == LightType::Directional)
 		if (light->getType() == LightType::Directional)
@@ -327,7 +327,7 @@ namespace BansheeEngine
 		}
 		}
 	}
 	}
 
 
-	void RenderBeast::_notifyCameraAdded(const CameraCore* camera)
+	void RenderBeast::notifyCameraAdded(const CameraCore* camera)
 	{
 	{
 		SPtr<RenderTargetCore> renderTarget = camera->getViewport()->getTarget();
 		SPtr<RenderTargetCore> renderTarget = camera->getViewport()->getTarget();
 		if (renderTarget == nullptr)
 		if (renderTarget == nullptr)
@@ -373,7 +373,7 @@ namespace BansheeEngine
 		}
 		}
 	}
 	}
 
 
-	void RenderBeast::_notifyCameraRemoved(const CameraCore* camera)
+	void RenderBeast::notifyCameraRemoved(const CameraCore* camera)
 	{
 	{
 		mCameraData.erase(camera);
 		mCameraData.erase(camera);