Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Keeping a cache of images  (Read 1343 times)
0 Members and 1 Guest are viewing this topic.
Offline Iron Eye

Junior Newbie

« Posted 2005-12-31 07:55:45 »

I'm designing and programming my own (very) simple graphics engine for a small game I'm making.  Although it is small and simple, I still want it to be hardware accelerated.  I read the tutorial and cokeandcode.  He caches the images as Image objects in a hashmap.  It is my understanding that Image objects are not accelerated.  Would it be better keep these stored as BufferedImages?  ImageIO can create them directly without any of the copying of older versions of Java.  It seems like there would be minimal overhead.  Am I just missing something?  It doesn't make sense to be me that the tutorial would use Image objects for storage when the tutorial boasts hardware acceleration.

I'm going to push onward with other parts of the game. 

Thanks in advance,
-Cluesless Newbie
Offline kevglass

« JGO Spiffy Duke »

Medals: 319
Projects: 25
Exp: 22 years

Coder, Trainee Pixel Artist, Game Reviewer

« Reply #1 - Posted 2005-12-31 14:06:44 »

BufferedImages are subclasses of Images so can be stored in the cache quite happily. More to the point to get accelerated images in 1.4 you needed to call createCompatibleImage() which returned you type "Image" which allows the underlying acceleration provider to give you back their own image type to (which fitted their implementation).


Offline Iron Eye

Junior Newbie

« Reply #2 - Posted 2006-01-02 07:05:44 »

Thank you.  Your post was most helpful. 

Pages: [1]
  ignore  |  Print  

EgonOlsen (47 views)
2018-06-10 19:43:48

EgonOlsen (29 views)
2018-06-10 19:43:44

EgonOlsen (49 views)
2018-06-10 19:43:20

DesertCoockie (214 views)
2018-05-13 18:23:11

nelsongames (130 views)
2018-04-24 18:15:36

nelsongames (129 views)
2018-04-24 18:14:32

ivj94 (870 views)
2018-03-24 14:47:39

ivj94 (131 views)
2018-03-24 14:46:31

ivj94 (782 views)
2018-03-24 14:43:53

Solater (146 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!