Author Topic: Upload and render concurrently  (Read 2301 times)

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Upload and render concurrently
« on: March 16, 2013, 10:49:20 am »
How can I upload textures to GPU and render concurrently?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Upload and render concurrently
« Reply #1 on: March 16, 2013, 11:52:42 am »
You can't. OpenGL is state based. Uploading textures changes this state and if you are rendering in between, all goes boom.

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Upload and render concurrently
« Reply #2 on: March 16, 2013, 01:14:09 pm »
But full HD movie can play in window and together render something on background (or upload textures). And it has no any dependency on CPU usage...



edit: If someone wanted my Floating calculator, I can upload to the play store...
« Last Edit: March 16, 2013, 01:35:39 pm by Thomas. »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Upload and render concurrently
« Reply #3 on: March 16, 2013, 06:27:21 pm »
But that's not happening in the same context. You can't mix states within one context. If you, for example, are rendering using one texture, you can't upload another one in parallel, because you would have to switch texture state to do that, which will screw up the rendering. In addition, some operations are not allowed within certain states.