Closed CreedVI closed 3 years ago
After playing around with the settings I discovered this issue only applies to OpenGL 33. OpenGL 11 renders shapes to the window fine.
GenDrawQuad()
renders to the window. So it looks like the issue is somewhere within DrawRenderBatch()
or the shader program.
With commit f7a5a2b there's been a good chuck of progress made in squashing this.
First, a lot of troubleshooting with RenderDoc and a good chuck of test code (removed from file for commit) I discovered the shader property locs[]
was not being initialized correctly leading to no data going to the proper destination.
While all the data is in place as far as I can see (vertexPosition
, vertexTexCoord
, and vertexColor
) and the Vertex Shader is outputting as expected we're still not rendering anything.
This is the last thing I want to get squared away before trying to put out an alpha build for testing.
So, the next issue I've identified is that gl_Position
is passing the values of vertexPosition
which are not in NDC format which is causing the mesh to be placed incorrectly. See the following images I took from RenderDoc to see what I'm talking about:
Raylib-J:
Raylib:
(also there's an issue where DrawRectanglePro()
is passing as if the x and y coordinates are 0, but that's unrelated to the current problem I believe)
This'll probably be my final update for a while as I'm being deployed. It looks like the root issue of all of this (including the issue of incorrect x, y coordinates for the rectangle being drawn in my program) is the projection and modelview matrices are not being populated with the correct values.
Quick update while I have the time. Projection and modelview matrices are populating correct values after fixing an issue with assigning matrix values during the initialization. Unfortunately, I don't have access to all my tools on my laptop (or internet for that matter), so work is slow but progress is being made!
Major update: I have items rendering, however I have a couple hacks in place to get things rendering properly for now, but I'm working on correcting the need for those.
I will try to push my updates later tonight
When running either of the written examples (WindowText.java, BasicShapes.java) Raylib-J will successfully clear the window with the desired color, but will not render any text or shapes.