Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  TextureRenderer multi-threaded?  (Read 355 times)
0 Members and 1 Guest are viewing this topic.
Offline sunsett

Sr. Member
**

Posts: 445


ribbit!


« on: 2009-06-08 14:27:44 »

Hey guys, I'd like to regenerate the contents of a TextureRenderer in a non-OpenGL thread and though this works sometimes it is somewhat of a hit-and-miss. Apart from generating a BufferedImage in another thread and then applying to a new TextureRenderer in the OpenGL thread, is there another route I can go to keep the regeneration load off the OGL thread?  The reason I don't want to create a BufferedImage and then apply it is because of memory restrictions for large textures because at creation time there will be two very large BufferedImages (the one I created and the TextureRenderer backing image).
Offline sunsett

Sr. Member
**

Posts: 445


ribbit!


« Reply #1 on: 2009-06-09 14:37:32 »

Ah, I finally figured it out. Like an idiot I wasn't calling "markDirty" after changing and re-using TextureRenderer (when possible) instead of creating a new one each time also helped a lot.  Now all of my updates are quite smooth.
Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.114 seconds with 21 queries.