Commit Graph

9836 Commits

Author SHA1 Message Date
Lasse Öörni
f450d0c3b4 Reuse constant buffer object number when resizing. Do not mark light queue to shadow batches, as it is unnecessary and could lead to shader parameter update bugs (requires further refactoring to prevent in the Graphics class.) 2015-03-18 20:19:05 +02:00
Lasse Öörni
2cefd437de Check if shader uses uniforms outside buffer and invalidate all parameter groups in that case, when switching shaders. Add define in Uniforms.glsl which allows to disable constant buffers on OpenGL 3, as using them may actually be slower. 2015-03-18 10:27:46 +02:00
Lasse Öörni
0e5a05afc7 OpenGL 3 constant buffer support. 2015-03-18 02:40:28 +02:00
Lasse Öörni
5fd6d42159 Use core functions for FBO operations when using OpenGL 3. 2015-03-17 22:06:09 +02:00
Lasse Öörni
006c17f78e Added command line & engine startup option to disable OpenGL 3. 2015-03-17 20:44:49 +02:00
Lasse Öörni
5ba234e68c Minor documentation tweaks. 2015-03-17 02:15:58 +02:00
Lasse Öörni
992cbcc73f Fix GLSL deprecation warnings. OpenGL 3 clip plane support. Use R32F format on OpenGL 3 for deferred linear depth instead of manual RGB encoding & decoding. 2015-03-17 01:01:11 +02:00
Lasse Öörni
07a75dc37b Initial OpenGL 3.2 support. 2015-03-16 23:36:35 +02:00
Lasse Öörni
a0a1d13109 Do pass queue lookup only once when executing the scene pass command. 2015-03-16 02:50:38 +02:00
Lasse Öörni
918d299450 Minor optimization of Drawable::MarkInView(): resize once instead of clear and push. 2015-03-16 00:57:43 +02:00
Lasse Öörni
6c3b8078f6 Split GetBatches() into sub-functions to aid in profiling. Minor optimization of View::GetTechnique() when using the default material. 2015-03-16 00:34:08 +02:00
Lasse Öörni
e2afa34bb7 Refactor Technique to not use HashTable for passes, but instead a vector with dynamically allocated pass indices. HashTable class removed as there were no other uses for it, and it was programmer-unfriendly compared to HashMap. 2015-03-15 21:07:51 +02:00
Yao Wei Tjong 姚伟忠
adcf016433 Fix ToCpHook.lua when it is being used in external project. 2015-03-15 10:58:21 +08:00
Lasse Öörni
0c58651c5c Store constant buffer pointer directly to the ShaderProgram parameters to avoid indirection and if statement choosing between VS & PS parameters. 2015-03-15 01:21:36 +02:00
Lasse Öörni
2858755334 Log missing vertex element(s) when vertex layout fails to create. Add texcoords to the editor grid to keep D3D11 happy. 2015-03-15 00:23:49 +02:00
Yao Wei Tjong 姚伟忠
d2ea0ca934 Finetune the default test timeout value for Emscripten platform.
We have a time constraint on Travis CI side for all our CI builds and tests. Default value of 10 for Emscripten and 5 for native platform is also inline with Emscripten's claim that asm.js is about 50% slower than native speed.
2015-03-14 12:46:15 +08:00
Yao Wei Tjong 姚伟忠
bcf5286158 For Travis CI - attempt to enable integration tests in Emscripten-CI. 2015-03-14 11:04:12 +08:00
Lasse Öörni
e17a88b46f GetData() on D3D11 for Texture3D & TextureCube. 2015-03-13 09:09:41 +02:00
Lasse Öörni
d1b03d95db Texture2D::GetData() for D3D11. D3D11 texture code cleanup. 2015-03-13 01:11:01 +02:00
Lasse Öörni
785df863e4 Save spot textures generated by RampGenerator as RGB. 2015-03-12 21:39:28 +02:00
Lasse Öörni
3759570319 Remove rrr swizzle from lighting shaders to allow the spotlight to be colored. Convert the default spot textures to RGB color to avoid sampling only the R channel on D3D11. 2015-03-12 21:25:42 +02:00
Yao Wei Tjong 姚伟忠
3503a1069e Fix test case setup. Only add test case when URHO3D_TESTING is enabled. 2015-03-12 18:58:31 +08:00
Yao Wei Tjong 姚伟忠
8a77399bd0 Fix integration tests execution for Emscripten platform.
A test case is considered passed when the html exits as the result of emscripten_force_exit() function being called, which happens when the engine's elapsed time reaches URHO3D_TEST_TIMEOUT seconds. When something goes wrong, the engine's elapsed time does not progress as per normal, in this case the emrun's timeout would kick in and terminate the test case with failed exit status. The EMRUN'S timeout is set to be 2 times URHO3D_TEST_TIMEOUT auotmatically.
Add new build option EMSCRIPTEN_EMRUN_BROWSER to select which browser to use for testing. Default is 'firefox'. Refer to https://github.com/kripken/emscripten/issues/3234 to apply the recommended Firefox preference setting for emrun.
2015-03-12 18:04:16 +08:00
Lasse Öörni
e3f2220fe0 Remove forgotten todo. Implement Graphics::GetMultisampleLevels() properly on D3D11. 2015-03-12 10:15:54 +02:00
Yao Wei Tjong 姚伟忠
10e18da92e Slightly improve code size and startup speed for Emscripten platform. 2015-03-12 11:30:47 +08:00
Lasse Öörni
9dae13c4ab Disable system bell sounds from Alt key combinations. 2015-03-12 01:03:14 +02:00
Lasse Öörni
b55321fc40 When AnimatedSprite2D creates new sprite components, use the AnimatedSprite2D's enabled status. Closes #678. 2015-03-11 14:12:00 +02:00
Yao Wei Tjong 姚伟忠
17f6bc5ff8 Make it more bullet-proof to copy paste error by new user.
The project name 'Urho3D' is reserved just for Urho3D project.
2015-03-11 15:37:06 +08:00
Yao Wei Tjong 姚伟忠
2c798dd5bf Add support for ToCppHook.lua to accept extra parameter.
The extra param 'IS_BUILDING_URHO3D' should not be passed by external project.
2015-03-11 14:57:59 +08:00
Lasse Öörni
43a7e8a430 sRGB texture sampling on D3D11. 2015-03-11 01:17:59 +02:00
Lasse Öörni
242a675b01 sRGB backbuffer support on D3D11. 2015-03-11 00:56:14 +02:00
Lasse Öörni
c8e406489d Revert OpenGL-incompatible change in Batch::Prepare(). 2015-03-10 23:22:39 +02:00
Lasse Öörni
db62248def Only collect the shadow caster projection space merged bounding box when necessary (focused spot lights.) 2015-03-10 23:12:27 +02:00
Lasse Öörni
401585972d Optimize Graphics::SetVertexBuffers() on D3D11. 2015-03-10 22:07:06 +02:00
Lasse Öörni
c833b34b7a Remove Graphics::SetDrawAntialiased() as it does not help the situation it was created for (blurred UI rendering on Nvidia 16x multisampling on OpenGL) and it cannot be implemented on D3D11. 2015-03-10 21:30:09 +02:00
Lasse Öörni
16ec1f5812 Strip D3D11 shader bytecode. 2015-03-10 12:35:49 +02:00
Lasse Öörni
a5a8442397 Keep track of the dirtied vertex buffer range to not set D3D11 buffer slots unnecessarily. 2015-03-10 01:45:42 +02:00
Lasse Öörni
dffab8cff1 Add item to Edit menu ("Add children to SM-group") to add all children of the StaticModelGroup node as instances. Closes #676. 2015-03-09 21:14:04 +02:00
Lasse Öörni
12c4f2a2b9 Nullcheck materials before using them in Drawable2D sorting. 2015-03-09 20:23:08 +02:00
Lasse Öörni
2239f5750f D3D11 screenshot save. Fix not releasing the backbuffer texture after GetResource(). 2015-03-08 22:45:59 +02:00
Lasse Öörni
4e308f21c3 3D textures on D3D11. Fixed the ColorCorrection shader. 2015-03-08 20:16:15 +02:00
Lasse Öörni
72a153f1a3 Fix Tonemap shader for D3D11. 2015-03-08 16:23:23 +02:00
Lasse Öörni
871fc3abea Fix erroneous UI rendering after compiling the Text shader, by listing texcoord interpolator before color. 2015-03-08 16:15:17 +02:00
Lasse Öörni
e106f1b389 D3D11 clip plane support. Check that multisample level is supported. Various shader fixes. 2015-03-08 02:57:08 +02:00
Lasse Öörni
b9278e0a94 Implement partial rendertarget clear on D3D11. Implement Graphics::ResolveToTexture() on D3D11. Fix most post-process shaders on D3D11. Readded the custom constant buffer slot. Update documentation. 2015-03-07 23:02:31 +02:00
Lasse Öörni
988f1fdc33 Merge branch 'master' into render-refactor 2015-03-07 17:59:37 +02:00
Lasse Öörni
e6194640ff Do not skip the assimp scene root, if it has non-identity transform or contains models itself. 2015-03-07 16:34:29 +02:00
Lasse Öörni
1c549bceee Import also empty child nodes in AssetImporter scene mode, unless disabled with the -ne option. Refactor handling of the root scene node to prevent unnecessary creation of a duplicate root node. Do not attempt to parse .json files as XML in the editor resource browser. Closes #673. 2015-03-07 13:36:27 +02:00
Yao Wei Tjong 姚伟忠
429f8d50fd Fix to addd EMSCRIPTEN_SYSROOT into internal SYSROOT variable.
[ci skip]
2015-03-07 13:32:32 +08:00
Yao Wei Tjong 姚伟忠
693aeb97a8 Add '--emrun' to general linker flag var instead of just for debug. 2015-03-07 12:14:53 +08:00