-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some 2D nodes aren't visible: canvas_item_add_triangle_array() doesn't work #7840
Comments
Can confirm with some Shape2D nodes. |
Adding another confirmation to the choir. Has this been narrowed down to canvas_item_add_triangle_array or does it perhaps pass some unexpected arguments to canvas_item_add_polygon? EDIT: I thought I saw some funkiness in the indices. That turns out not to be the case. For a horizontal line from 0,0 to 10,0:
GL_FRONT_FACING is CCW by default, so this looks okay. EDIT2: Just noticed that in rasterizer_canvas_gles3.cpp : 626, _draw_polygon is commented out:
And with good reason: ERROR: _gl_debug_print: GL ERROR: Source: OpenGL Type: Error ID: 1282 Severity: High Message: GL_INVALID_OPERATION error generated. Array object is not active. |
Seems like the default vertex array object (the name zero) became deprecated in GLES 3.3. The _draw_polygon function binds data using VertexAttribPointer, which now fails because the default VAO is no longer there. Binding a non-default VAO also seems to fails because VertexAttribPointer then cannot specify client-side data. rasterizer_canvas_gles3.cpp : 250
ERROR: _gl_debug_print: GL ERROR: Source: OpenGL Type: Error ID: 2100 Severity: High Message: glVertexAttribPointer failed because it is not allowed to specify a client-side vertex or element array when a non-default vertex array object is bound (GL_INVALID_OPERATION) Any ideas? I'm not at all an expert on OpenGL, so I'm hoping someone can point out flaws with this. |
polygons are now drawn, so closing this |
Tested on Godot 3.0 master 5e3fc7d
Windows 10 64 bits
All nodes using
VisualServer::canvas_item_add_triangle_array
can't be seen.I thought backface culling was on, so I tried inverting index order in Line2D, but no luck.
The text was updated successfully, but these errors were encountered: