Package ch.blackspirit.graphics.jogl

Examples of ch.blackspirit.graphics.jogl.CanvasFactory


 
  static int imageWidth = 64;
  static int imageHeight = 64;
 
  public void test() throws IOException {
    CanvasFactory factory = new CanvasFactory();   
    RealtimeCanvas canvas = factory.createRealtimeCanvasWindow(800,600);
   
    final Image bw = canvas.getImageFactory().createBufferedImage(imageWidth, imageHeight, BufferTypes.RGB_3Byte);
   
    byte[] bytes = (byte[])bw.getBuffer();
    for(int x = 0; x < imageWidth; x++) {
View Full Code Here


import ch.blackspirit.graphics.jogl.BufferTypes;
import ch.blackspirit.graphics.jogl.CanvasFactory;

public class ImageConverterTest {
  public static void main(String[] args) {
    RealtimeCanvas canvas = new CanvasFactory().createRealtimeCanvasWindow(512, 512);
    canvas.setWindowTitle("bla");
    final Image image = canvas.getImageFactory().createBufferedImage(521, 512, BufferTypes.RGB_3Byte);
   
    canvas.setGraphicsListener(new GraphicsListener() {
      public void draw(View view, Graphics renderer) {
View Full Code Here

import ch.blackspirit.graphics.jogl.BufferTypes;
import ch.blackspirit.graphics.jogl.CanvasFactory;

public class ImageConverterAlphaTest {
  public static void main(String[] args) {
    RealtimeCanvas canvas = new CanvasFactory().createRealtimeCanvasWindow(512, 512);
    canvas.setWindowTitle("bla");
    final Image image = canvas.getImageFactory().createBufferedImage(521, 512, BufferTypes.RGBA_4Byte);
   
    canvas.setGraphicsListener(new GraphicsListener() {
      public void draw(View view, Graphics renderer) {
View Full Code Here

    ModeChangeDemo demo = new ModeChangeDemo();
    demo.start();
  }
 
  public void start() throws IOException {
    CanvasFactory factory = new ch.blackspirit.graphics.jogl.CanvasFactory();

//    Configurator configurator = new Configurator(factory);
//    configurator.show();
   
    // TODO create display mode (window, fullscreen, resolution) and capability (antialiasing) switcher
   
    // Create a fullscreen realtime canvas using the current display mode.
    RealtimeCanvas tempCanvas;// = factory.createRealtimeCanvasFullscreen();
    DisplayMode mode = factory.getDisplayMode(WIDTH, HEIGHT);
//    if(mode != null) {
//      tempCanvas = factory.createRealtimeCanvasFullscreen(mode);
//    } else {
//      tempCanvas = factory.createRealtimeCanvasFullscreen();
//    }
    tempCanvas = factory.createRealtimeCanvasWindow(WIDTH, HEIGHT);
   
   
    final RealtimeCanvas canvas = tempCanvas;

    // Add Escape and Q as quitting keys
View Full Code Here

TOP

Related Classes of ch.blackspirit.graphics.jogl.CanvasFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.