summaryrefslogtreecommitdiff
path: root/drivers/gles2/rasterizer_storage_gles2.cpp
AgeCommit message (Collapse)Author
2020-08-13Remove obsolete GLES2 backend codeRémi Verschelde
This code currently isn't compiled (and cannot compile). We plan to re-add OpenGL ES-based renderer(s) in Godot 4.0 alongside Vulkan (probably ES 3.0, possibly also a low-end ES 2.0), but the code will be quite different so it's not relevant to keep this old Godot 3.2 code. The `drivers/gles2` code from the `3.2` branch can be used as a reference for a potential new implementation.
2020-07-09Fixed mesh data access errors in GLES2PouleyKetchoupp
1. Removed errors in mesh_surface_get_array as it's supported now 2. More accurate errors in mesh_surface_get_blend_shapes
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-04-12Implement MSAAJuan Linietsky
2020-04-02Replace NULL with nullptrlupoDharkael
2020-03-27Renaming of servers for coherency.Juan Linietsky
VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
2020-03-19Add shader based background modeBastiaan Olij
2020-03-17Style: Set clang-format Standard to Cpp11Rémi Verschelde
For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
2020-02-25Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky
- Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
2020-02-18PoolVector is gone, replaced by VectorJuan Linietsky
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
2020-02-11Implementation of 'struct' for shadersYuri Roubinsky
2020-02-11Rewritten StreamTexture for better code reuse, added basis universal supportJuan Linietsky
2020-02-11basic 2D engine is more or less working with Vulkan, including editor.Juan Linietsky
Still a lot to do
2020-02-11A lot of progress with canvas rendering, still far from working.Juan Linietsky
2020-02-11Texture refactorJuan Linietsky
-Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD
2020-02-11Refactored RID/RID_Owner to always use O(1) allocation.Juan Linietsky
* Implements a growing chunked allocator * Removed redudant methods get and getptr, only getornull is supported now.
2020-02-07Merge pull request #35142 from clayjohn/GLES2-add-3d-texturesRémi Verschelde
Add support for 3D textures to GLES2
2020-02-05Remove duplicate WARN_PRINT macro.Marcel Admiraal
2020-02-05Remove duplicate ERR_PRINT macro.Marcel Admiraal
2020-01-31Add support for 3D textures to GLES2clayjohn
2020-01-24Fix Softbody always spawns from world center [gles2]Eric Rybicki
Fixes #35373
2020-01-21Remove unused #if 0'ed codeRémi Verschelde
2020-01-16Merge pull request #35215 from clayjohn/multimesh-errorRémi Verschelde
Add multimesh format max for proper error checking
2020-01-16Add multimesh format max for proper error checkingclayjohn
2020-01-16Gracefully handle 3D textures in GLES2clayjohn
2020-01-12Fix light and multimesh crashesclayjohn
2020-01-06Add VisualServer methods to get the video adapter name and vendorHugo Locurcio
These methods can be used in scripts to retrieve the OpenGL `GL_RENDERER` and `GL_VENDOR` strings (respectively). This closes #28404.
2020-01-03Fix crash on trimesh_create by making surface->data available in non-tool buildsclayjohn
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-12-19Always use 16 bit renderbuffer depth on WebGLclayjohn
2019-12-10Merge pull request #34238 from clayjohn/GLES2-use-renderbuffer-post-processRémi Verschelde
Use renderbuffer depth for post-process buffers when appropriate
2019-12-09Use renderbuffer depth for post-process buffers when appropriateclayjohn
2019-12-09Force 32 bit depth buffer for WebGLclayjohn
2019-11-26Use ANGLE multisample extensions for UWPGeorge Marques
2019-11-23Restructure depth_internalformat code to work on mobileclayjohn
This changes the code path so that `glRenderBufferStorage*` always uses values appropriate for renderbuffers and `glTexImage2D` never uses an internalformat meant for buffers. Fixes #33825.
2019-11-23glTexImage2D: Fix confusion between format and internal formatRémi Verschelde
The `format` parameter is similar to `internalFormat` but takes different values, and especially only `GL_DEPTH_COMPONENT` for depth, without size specifier. Cf. https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/glTexImage2D.xhtml Fixes a regression from #33278 and another occurrence.
2019-11-19Need to use GL_RGB8 and GL_RGBA8 as the internal format for GLES2Bastiaan Olij
2019-11-11Add special external MSAA modes for GLES2 Rift S/Quest and OpenXR optimisationBastiaan Olij
2019-11-08Revert "fix #33188 MSAA depth buffer not used for external texture"Bastiaan Olij
This reverts commit 418b035ddaaf9b40892ba88632c3aa6f3bf128b5.
2019-11-04fix #33188 MSAA depth buffer not used for external textureHolger Dammertz
When rendering to an external texture and MSAA was active (as happened in the Oculus Mobile ARVR plugin) no MSAA was rendered as the correct depth buffer and multisample texture target was not used. This also fixes https://github.com/GodotVR/godot_oculus_mobile/issues/54
2019-11-03Merge pull request #33278 from clayjohn/GLES2-depth-formatRémi Verschelde
Fix depth format on Android in GLES2
2019-11-02Fix depth format on Android in GLES2clayjohn
2019-10-30When framebuffer allocation fails for MSAA in GLES2 revert to normal without ↵clayjohn
ERR_FAIL
2019-10-28Merge pull request #33104 from qarmin/fix_some_crashesRémi Verschelde
Fix some crashes and using null pointers
2019-10-28Merge pull request #33097 from clayjohn/GLES2-HTML-sampler_limitRémi Verschelde
Fixed using compressed textures and add work around for firefox webgl mesa sampler limit
2019-10-28Fix some crashes and using null pointersRafał Mikrut
2019-10-27Fixed using compressed textures and add work around for firefox webgl mesa ↵clayjohn
sampler limit
2019-10-27use proper texture in Android MSAAclayjohn
2019-10-26Merge pull request #33093 from clayjohn/GLES2-HTML-shadowsRémi Verschelde
Fix shadow mapping with RGBA textures on html