godotengine / godotengine/godot
RenderingDevice.draw_list_begin_for_screen() causes crash without errors.
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
- Reproducible in: 4.2.1.stable
### System information
Godot v4.2.1.stable - Windows 10.0.19045 - Vulkan (Mobile) - dedicated NVIDIA GeForce GTX 1050 Ti () - Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 Threads)
### Issue description
I'm trying to draw a triangle to the screen by using RenderingDevice, and no matter how much i try, the function draw_list_begin_for_screen() causes a crash when i run the project with no explanation whatsoever.
It doesn't crash the editor however, only the game when you hit the "Run Project" button.
If i replace this by adding a custom framebuffer and using a draw_list_begin(), it works fine (but of course it doesn't display anything, so i don't know if its displaying correctly in the first place)
Am i doing something wrong, missing something or is this a bug? If the solution is having to make a custom framebuffer, how do i display the result to the screen?
The full code is just "rendering_test.gd", which contains the entire shader, vertex buffer and index buffer initialization, and the draw process where the crash occurs.
### Steps to reproduce
- Open the MRP (project.zip).
- Open "test.tscn" scene.
- Hit F5 or press the "Run Project" button.
### Minimal reproduction project (MRP)
[project.zip](https://github.com/godotengine/godot/files/14450481/project.zip)
Contributor guide
Assessment
This issue has not been assessed yet.