Skip to content
Snippets Groups Projects
Commit 2f0d1527 authored by Johannes Eder's avatar Johannes Eder
Browse files

extended visualization

parent 6004538e
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,8 @@ import org.eclipse.swt.opengl.GLData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Listener;
import org.lwjgl.LWJGLException;
import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.DisplayMode;
import org.newdawn.slick.Color;
import org.newdawn.slick.TrueTypeFont;
......@@ -54,6 +56,16 @@ public class LwjglCanvas extends GLCanvas {
/** Constructor. */
public LwjglCanvas(Composite parent, GLData data) {
super(parent, SWT.NONE, data);
DisplayMode arg0 = new DisplayMode(1280, 800);
try {
arg0 =
org.lwjgl.util.Display.getAvailableDisplayModes(800, 600, 800, 600, 32, 32, 60,
60)[0];
Display.setDisplayMode(arg0);
} catch(LWJGLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/** Constructor. */
......@@ -71,6 +83,7 @@ public class LwjglCanvas extends GLCanvas {
// enable four sample buffers for anti-aliasing
data.sampleBuffers = 1;
data.samples = 4;
return data;
}
......
......@@ -115,6 +115,8 @@ public class Graph3DViewObject extends ViewObjectBase {
setColor(WHITE);
}
}
setColor(BLACK);
for(GraphLine3D l : graph.getLinesList()) {
drawLine(l.getStart().getPosition(), l.getEnd().getPosition());
}
......
......@@ -41,6 +41,8 @@ public class Graphics3DModelElementFactory {
public static final Color3D BLUE = color(0, 0, 1.0f);
/** White color. */
public static final Color3D WHITE = color(1.0f, 1.0f, 1.0f);
/** Grey color. */
public static final Color3D GREY = color(0.8f, 0.8f, 0.8f);
/** The origin vector. */
public static final Vector3D ORIGIN = vector(0, 0, 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment