Here is a rundown of my current project:
... and then it just repeats the last line ad infinitum while the application runs.
5 large 1080p displays hooked up to a Radeon 6990. We will attempt to use an Eyefinity 5x1 configuration (if we can ever figure out how to properly set it up) with a bit of a twist. Since we want the displays to be side by side in landscape mode and run along a wall in a VERY wide setup (around 20+ feet), and since Eyefinity 5x1 mode only supports portrait mode (5400 x 1920), I intend to draw to a raster off screen using GLGraphics which will be 9600 x 1080, and then split that into 5 pieces, rotate them 90 degrees, and then place them side by side. The effect is similar to this:
This is a 960 x 108 (1/10th the width and height, ie: 1/100th the final intended size) drawn to a GLGraphicsOffScreen object. When I actually apply it to the GLGraphics context being displayed, which is only 540 x 192, it looks like this:
When all of the displays are rotated 90 degrees into landscape mode, it should all look perfect.
Still with me? Great.
This works as expected at this resolution. However, I am increasing to production size in order to build a jar and send it out to be tested on the production machine with the displays attached. The workstation arrived today featuring an i7 950, 6 gigs of ram, the Radeon 6990, and Windows 7 pro 64-bit. It's a beast. However, I won't be back to work with the hardware myself for another 2 weeks, so I am stuck developing precursor test jars on my laptop (a 1.5 year old thinkpad... not terrible, but no beast).
In preparation for this, I increased my size() parameter to 5400 x 1920, and my off screen size to 9600 x 1080. When I ran my application, I received this error:
Frame buffer is incomplete (GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT)OpenGL error 1280 at top endDraw(): invalid enumerantFrame buffer is incomplete (GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT)OpenGL error 1282 at render_triangles in: invalid operationOpenGL error 1286 at non-binding 6: invalid framebuffer operationFrame buffer is incomplete (GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT)Frame buffer is incomplete (GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT)Frame buffer is incomplete (GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT)Frame buffer is incomplete (GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT)
... and then it just repeats the last line ad infinitum while the application runs.
Having searched the forum for this type of error I don't find a whole lot of results. So I figure one of two things: (1) my relatively puny graphics acceleration chip in my laptop just can't handle the awesomeness, or (2) this is some kind of constraint in either GLGraphics or OpenGL itself... I really don't know.
ANY insight into what these errors mean, or limitation in the software, or even the hardware I'm using, would be MUCH appreciated. Do you think I can build the jar and send it off and it may work on the awesome 6990 hardware, and it's just a limitation of my laptop? Or am I boned thinking that I can execute this entirely?
Included are two snippets of code from my project thus far; NevadaMain.java and NevadaApplet.java. NevadaMain is simply the frame to house my PApplet instance, and NevadaApplet extends PApplet (sorry PDE users, but I only develop in Eclipse now). I have also included the props file which is being read to determine my resolution settings.
NEVADAMAIN.java:
- package com.datadreamer.nevada;
- import java.applet.Applet;
- import java.awt.event.WindowAdapter;
- import java.awt.event.WindowEvent;
- import java.io.File;
- import java.io.FileInputStream;
- import java.io.FileNotFoundException;
- import java.io.IOException;
- import java.util.Properties;
- import javax.swing.JFrame;
- @SuppressWarnings("serial")
- public class NevadaMain extends JFrame {
- private Applet app;
- public NevadaMain() {
- super("Nevada Discovery Museum");
- Properties props = loadProperties("data/main.props");
- int w = Integer.valueOf(props.getProperty("displayWidth"));
- int h = Integer.valueOf(props.getProperty("displayHeight"));
- setResizable(false);
- setBounds(0, 0, w, h);
- setUndecorated(true);
- setVisible(true);
- app = new NevadaApplet(w, h, props);
- add(app);
- addWindowListener(new WindowAdapter() {
- public void windowOpened(WindowEvent e) {
- app.requestFocus();
- }
- public void windowClosing(WindowEvent e) {
- System.exit(0);
- }
- });
- app.init();
- }
- public Properties loadProperties(String file) {
- Properties newprops = new Properties();
- try {
- newprops = new Properties();
- newprops.load(new FileInputStream(new File(file)));
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- return newprops;
- }
- public static void main(String[] args) {
- new NevadaMain();
- }
- }
NEVADAAPPLET.java:
- package com.datadreamer.nevada;
- import java.util.Properties;
- import processing.core.PApplet;
- import processing.core.PImage;
- import codeanticode.glgraphics.GLConstants;
- import codeanticode.glgraphics.GLGraphicsOffScreen;
- import codeanticode.glgraphics.GLTexture;
- @SuppressWarnings("serial")
- public class NevadaApplet extends PApplet {
- private final int w, h;
- // private final Properties props;
- private GLGraphicsOffScreen canvas;
- private final int offscreenWidth;
- private final int offscreenHeight;
- private PImage cloudTest;
- public NevadaApplet(int w, int h, Properties props) {
- // this.props = props;
- this.w = w;
- this.h = h;
- offscreenWidth = Integer.valueOf(props.getProperty("offscreenWidth"));
- offscreenHeight = Integer.valueOf(props.getProperty("offscreenHeight"));
- }
- public void setup() {
- size(w, h, GLConstants.GLGRAPHICS);
- frameRate(60);
- canvas = new GLGraphicsOffScreen(this, offscreenWidth, offscreenHeight);
- cloudTest = loadImage("cloudTest8192.png");
- }
- public void draw() {
- background(255, 0, 0);
- canvas.beginDraw();
- canvas.image(cloudTest, 0, 0, offscreenWidth, offscreenHeight);
- canvas.endDraw();
- GLTexture fullScreen = canvas.getTexture();
- translate(0, height);
- rotate(radians(-90));
- image(fullScreen, 0, 0, offscreenWidth, width / 5);
- image(fullScreen, -(offscreenWidth / 5), (width / 5), offscreenWidth,
- width / 5);
- image(fullScreen, -(offscreenWidth / 5) * 2, (width / 5) * 2,
- offscreenWidth, width / 5);
- image(fullScreen, -(offscreenWidth / 5) * 3, (width / 5) * 3,
- offscreenWidth, width / 5);
- image(fullScreen, -(offscreenWidth / 5) * 4, (width / 5) * 4,
- offscreenWidth, width / 5);
- }
- }
MAIN.props
- # on screen display resolution
- displayWidth = 5400
- displayHeight = 1920
- #displayWidth = 540
- #displayHeight = 192
- # off screen canvas being drawn to
- offscreenWidth = 9600
- offscreenHeight = 1080
- #offscreenWidth = 960
- #offscreenHeight = 108
Toggle the values above to render the 1/100th version without issue, or attempt to strangle your hardware/software with the full version. The image "cloudTest8192.png" is unfortunately quite large (8192 x 922, as that's the widest my laptop's graphics card accepts) and I should probably refrain from uploading it, but I just grabbed a super giant photo of clouds from google images in order to test this.
Also, if you figure out a solution, I will buy you a beer.
1