OpenGL does not have the concept of a "frame", logical or otherwise.
OpenGL is actually very simple: each command is executed as if all previous commands were executed before the start.
Pay attention to the key phrase "as if". Let's say you render from a buffer object, and then immediately modify its data. Like this:
glBindVertexArray(someVaoThatUsesBufferX); glDrawArrays(...); glBindBuffer(GL_ARRAY_BUFFER, BufferX); glBufferSubData(GL_ARRAY_BUFFER, ...);
This is 100% eligible to participate in OpenGL. There are no reservations, questions, problems, etc. About how it will function. This call to glBufferSubData will execute as if the glDrawArrays command glDrawArrays completed.
The only thing you need to consider is that the specification does not indicate: performance.
Realization within your rights allows you to detect that you are modifying a buffer that can be used, and therefore stop the CPU in glBufferSubData until the rendering from this buffer is complete. An implementation of OpenGL requires either this or another, which prevents the actual source buffer from being modified during its use.
Thus, OpenGL implementations execute commands asynchronously, wherever possible, in accordance with the specification. While the outside world cannot say that glDrawArrays has not finished drawing, the implementation can do whatever it wants. If you select glReadPixels immediately after the draw command, the pipeline should stop. You can do this, but there is no guarantee of effectiveness.
This is why OpenGL is defined as a closed box as it is. This gives implementations a lot of freedom to be asynchronous where possible. Each access to OpenGL data requires a call to the OpenGL function, which allows you to check whether this data is really available. If not, he stops.
Getting rid of stalls is one of the reasons why the invalidity of the object-object is possible; it effectively tells OpenGL that you want to overpower the buffer data store. This is the reason why buffer objects can be used to transmit pixels ; It allows you to transmit asynchronously. This is the reason why fence synchronization objects exist, so you can determine if the resource is being used (possibly to display the GL_UNSYNCHRONIZED_BIT buffer). Etc.
However, this calls up blocks to support v-sync, meaning you cannot issue new commands until you return.
Who says? The buffer replacement command may stop. This is not true. This is determined by the implementation and can be modified with specific commands . The documentation for eglSwapBuffers only says that it runs a flash, which can lead to a processor stop, but not necessarily.