Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#ActualMathias_L

Posted 30 August 2012 - 03:41 AM

Thank you, calling glFinish() after rendering the quad made it run fast so that I don't need the glReadPixels-hack anymore! Seems like glReadPixels does something like glFinish internally.

(btw. Putting glGetError at locations behind context creation also removed any gl-errors Posted Image )

I'm also wondering what you mean by "submitting the results to GPU", if you never read back the texture data to CPU won't you just keep working on the same data? The piece of code you commented as submitting the results just binds another texture.

I'm not deep into that but I think it's like this:
The texture data doesn't need to be transferred to the CPU, since after rendering the quad the data is inside the texture memory on GPU - binding the texture and sending the texture unit via glUniform to the shader allows accessing the texture memory on GPU where the texture data still is.
(Is that right?)

#3Mathias_L

Posted 30 August 2012 - 03:40 AM

Thank you, calling glFinish() after rendering the quad made it run fast so that I don't need the glReadPixels-hack anymore! Seems like glReadPixels does something like glFinish internally.

(btw. Putting glGetError at locations behind context creation also removed any gl-errors Posted Image )

I'm also wondering what you mean by "submitting the results to GPU", if you never read back the texture data to CPU won't you just keep working on the same data? The piece of code you commented as submitting the results just binds another texture.

I'm not deep into that but I think it's like this:
The texture data doesn't need to be transferred to the CPU, since after rendering the quad the data is inside the texture memory on GPU - binding the texture and sending the texture unit via glUniform to the shader allows accessing the texture memory.
(Is that right?)

#2Mathias_L

Posted 30 August 2012 - 03:40 AM

Thank you, calling glFinish() after rendering the quad made it run fast so that I don't need the glReadPixels-hack anymore! Seems like glReadPixels does something like glFinish internally.

(btw. Putting glGetError at locations behind context creation also removes any gl-errors :) )

I'm also wondering what you mean by "submitting the results to GPU", if you never read back the texture data to CPU won't you just keep working on the same data? The piece of code you commented as submitting the results just binds another texture.

I'm not deep into that but I think it's like this:
The texture data doesn't need to be transferred to the CPU, since after rendering the quad the data is inside the texture memory on GPU - binding the texture and sending the texture unit via glUniform to the shader allows accessing the texture memory.
(Is that right?)

#1Mathias_L

Posted 30 August 2012 - 03:39 AM

Thank you, calling glFinish() after rendering the quad made it run fast so that I don't need the glReadPixels-hack anymore! Seems like glReadPixels does something like glFinish internally.

After putting glGetError at locations behind Context Creation there doesn't seem to be an OpenGL error for the whole rest of the program.

I'm also wondering what you mean by "submitting the results to GPU", if you never read back the texture data to CPU won't you just keep working on the same data? The piece of code you commented as submitting the results just binds another texture.

I'm not deep into that but I think it's like this:
The texture data doesn't need to be transferred to the CPU, since after rendering the quad the data is inside the texture memory on GPU - binding the texture and sending the texture unit via glUniform to the shader allows accessing the texture memory.
(Is that right?)

PARTNERS