We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello
I just started to learn processing and would like to learn more about how the draw calls are implemented. For example i would like to see rect() implementation and its relevant OpenGL calls. Problem is i can not locate the files of the code. Can anyone point me in the right direction and name the location of code files.
Thank you
Answers
This will be a good start:
https://github.com/processing/processing/blob/master/core/src/processing/core/PGraphics.java#L2582
https://github.com/processing/processing/blob/master/core/src/processing/opengl/PGraphicsOpenGL.java#L3109
https://github.com/processing/processing/blob/master/core/src/processing/awt/PGraphicsJava2D.java#L1234
Kf
the opengl stuff quickly disappears into the InGeometry class:
https://github.com/processing/processing/blob/master/core/src/processing/opengl/PGraphicsOpenGL.java#L7594
i could not actually find any OpenGl commands from these files. For example glDrawArrays,, , glGenBuffers, glBindBuffers or glBufferdata.
What i am interested in is that when i call rect() in a loop, does Processing first generate new buffer for each rectangle fill vertex and color data arrays and copy those into array buffer and then call draw for each rectangle. i can not get hold on how this is done in processing.