Hi !
Featured games (87)
games approved by the League of Dukes
Games in Showcase (649)
Games in Android Showcase (181)
games submitted by our members
Games in WIP (699)
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  
  Fullscreen mode Screenshot awt.robot  (Read 1506 times)
0 Members and 1 Guest are viewing this topic.
Offline Pyrodragoon

Junior Devvie

Art calculated with java...

« Posted 2011-05-18 19:13:57 »

I have the following problem:
I have a game running in fullscreen mode with
bufferStrategy = getBufferStrategy();

and I'd like to have an ingame button for making screenshots.
I've been using awt.robot so far, but the image is just plain white when I save it.
I read somewhere else that it has to do with java not drawing to it's own components
but rather to some OS-component...
So I hope for you to give me an answer to one of the two possibilities:
1) Is there an easy way to get an image from that external source with java-code?
  I don't want to use something like FRAPS, it should be possible ingame.
2) Is there a way to get an image from bufferStrategy or related components ?

Thanks, I appreciate any help.
Offline Pyrodragoon

Junior Devvie

Art calculated with java...

« Reply #1 - Posted 2011-05-18 19:57:39 »

I solved the problem with a workaround.
I apply my whole rendering routine to a BufferedImage once
and save it, when calling the  "getScreenshot"- method.

But either way I'm curious to know if there's a way to get it directly.
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

KaiHH (88 views)
2016-01-31 23:15:29

sci4me (115 views)
2016-01-23 21:47:05

sci4me (102 views)
2016-01-23 21:46:58

KaiHH (135 views)
2016-01-19 13:26:42

theagentd (221 views)
2016-01-05 17:10:00

ClaasJG (236 views)
2016-01-03 16:58:36

chrisdalke (225 views)
2015-12-28 06:31:21

Guerra2442 (245 views)
2015-12-25 03:42:55

Guerra2442 (249 views)
2015-12-25 03:27:21

theagentd (287 views)
2015-12-21 14:43:24
List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50

Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30

Rendering resources
by Roquen
2015-10-15 07:40:48 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!