001: /*
002: * $RCSfile: JoglGraphicsConfiguration.java,v $
003: *
004: * Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved.
005: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
006: *
007: * This code is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU General Public License version 2 only, as
009: * published by the Free Software Foundation. Sun designates this
010: * particular file as subject to the "Classpath" exception as provided
011: * by Sun in the LICENSE file that accompanied this code.
012: *
013: * This code is distributed in the hope that it will be useful, but WITHOUT
014: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
015: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
016: * version 2 for more details (a copy is included in the LICENSE file that
017: * accompanied this code).
018: *
019: * You should have received a copy of the GNU General Public License version
020: * 2 along with this work; if not, write to the Free Software Foundation,
021: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
022: *
023: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
024: * CA 95054 USA or visit www.sun.com if you need additional information or
025: * have any questions.
026: *
027: * $Revision: 1.4 $
028: * $Date: 2008/02/28 20:17:18 $
029: * $State: Exp $
030: */
031:
032: package javax.media.j3d;
033:
034: import java.awt.*;
035: import java.awt.geom.*;
036: import java.awt.image.*;
037: import javax.media.opengl.*;
038:
039: /**
040: * Class implementing the GraphicsConfiguration API, but not a "real"
041: * GraphicsConfiguration object. Wraps a GLCapabilities object and
042: * supports either immediate or deferred pixel format / visual
043: * selection depending on which platform we are running.
044: */
045:
046: class JoglGraphicsConfiguration extends GraphicsConfiguration {
047: private GLCapabilities caps;
048: private int chosenIndex;
049: private GraphicsDevice device;
050: // Needed for Screen3D
051: private int width;
052: private int height;
053:
054: JoglGraphicsConfiguration(GLCapabilities caps, int chosenIndex,
055: GraphicsDevice device) {
056: super ();
057: this .caps = caps;
058: this .chosenIndex = chosenIndex;
059: this .device = device;
060: DisplayMode m = device.getDisplayMode();
061: width = m.getWidth();
062: height = m.getHeight();
063: }
064:
065: GLCapabilities getGLCapabilities() {
066: return caps;
067: }
068:
069: int getChosenIndex() {
070: return chosenIndex;
071: }
072:
073: public BufferedImage createCompatibleImage(int width, int height) {
074: throw new RuntimeException("Unimplemented");
075: }
076:
077: public BufferedImage createCompatibleImage(int width, int height,
078: int transparency) {
079: throw new RuntimeException("Unimplemented");
080: }
081:
082: public VolatileImage createCompatibleVolatileImage(int width,
083: int height) {
084: throw new RuntimeException("Unimplemented");
085: }
086:
087: public VolatileImage createCompatibleVolatileImage(int width,
088: int height, int transparency) {
089: throw new RuntimeException("Unimplemented");
090: }
091:
092: public VolatileImage createCompatibleVolatileImage(int width,
093: int height, ImageCapabilities caps) throws AWTException {
094: throw new RuntimeException("Unimplemented");
095: }
096:
097: public VolatileImage createCompatibleVolatileImage(int width,
098: int height, ImageCapabilities caps, int transparency)
099: throws AWTException {
100: throw new RuntimeException("Unimplemented");
101: }
102:
103: public Rectangle getBounds() {
104: return new Rectangle(0, 0, width, height);
105: }
106:
107: public ColorModel getColorModel() {
108: throw new RuntimeException("Unimplemented");
109: }
110:
111: public ColorModel getColorModel(int transparency) {
112: throw new RuntimeException("Unimplemented");
113: }
114:
115: public AffineTransform getDefaultTransform() {
116: throw new RuntimeException("Unimplemented");
117: }
118:
119: public GraphicsDevice getDevice() {
120: return device;
121: }
122:
123: public AffineTransform getNormalizingTransform() {
124: throw new RuntimeException("Unimplemented");
125: }
126: }
|