Drawing to primary surface

Hi,

I need to read and write directly to the screen ( more accurately, the screen buffer or primary surface).

I would be very grateful if someone could tell me how to do this in Java.

I don't want to enter full screen mode, the whole point is to overlay a message on top of the existing windowed environment, without putting up a new window. The objective is to be able to alter ( and restore ) the image at any point on the screen.

I imagine that there is a simple way to get a reference for the window of the whole screen, but I have been unable to find it.

( I've looked everywhere! I've searched the forums, I have read the Full-Screen Exclusive Mode API tutorial, and much much more, but I have not been able to find this information.)

I would be especially happy if you know where I can find a program or code snippet that does this.

Thanks.

[899 byte] By [triplemayaa] at [2007-9-29 6:17:55]
# 1

The entire interface between Java 'code' and the underlying operating system is in the java executable (java.exe).

I think if you wanted to write directly to the screen, you would have to call the hardware directly. I kinda doubt there are many system calls to bypass the windowing system.

Given that, what do you think the chances are that the people who wrote the JVM bypassed the operating system?

bbrittaa at 2007-7-14 20:24:48 > top of Java-index,Other Topics,Java Game Development...
# 2
I would think you'd need C++ for that. One of the things about java that makes it web friendly is the secure fact that you can't go right to the guts of the computer, to the video hardware like bbritta said. I don't think you're going to get what you're wanting there from Java.
Malohkana at 2007-7-14 20:24:48 > top of Java-index,Other Topics,Java Game Development...
# 3
Thanks for the info bbritta and Malohkan, point(s) taken.Can anyone tell me how to do this in Windows using C/C++?
triplemayaa at 2007-7-14 20:24:48 > top of Java-index,Other Topics,Java Game Development...