• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java NewtFactory类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.jogamp.newt.NewtFactory的典型用法代码示例。如果您正苦于以下问题:Java NewtFactory类的具体用法?Java NewtFactory怎么用?Java NewtFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



NewtFactory类属于com.jogamp.newt包,在下文中一共展示了NewtFactory类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: main

import com.jogamp.newt.NewtFactory; //导入依赖的package包/类
public static void main(String[] args) {

        Display display = NewtFactory.createDisplay(null);
        Screen screen = NewtFactory.createScreen(display, 0);
        GLProfile glProfile = GLProfile.get(GLProfile.GL3);
        GLCapabilities glCapabilities = new GLCapabilities(glProfile);
        glWindow = GLWindow.create(screen, glCapabilities);

        glWindow.setSize(1044, 768);
        glWindow.setPosition(100, 50);
        glWindow.setUndecorated(false);
        glWindow.setAlwaysOnTop(false);
        glWindow.setFullscreen(false);
        glWindow.setPointerVisible(true);
        glWindow.confinePointer(false);
        glWindow.setTitle("Tutorial 09 - Interpolation");
        glWindow.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG);
        glWindow.setVisible(true);

        Tutorial09 tutorial09 = new Tutorial09();
        glWindow.addGLEventListener(tutorial09);

        animator = new Animator(glWindow);
        animator.start();
    }
 
开发者ID:java-opengl-labs,项目名称:ogl-dev,代码行数:26,代码来源:Tutorial09.java


示例2: main

import com.jogamp.newt.NewtFactory; //导入依赖的package包/类
public static void main(String[] args) {

        Display display = NewtFactory.createDisplay(null);
        Screen screen = NewtFactory.createScreen(display, 0);
        GLProfile glProfile = GLProfile.get(GLProfile.GL3);
        GLCapabilities glCapabilities = new GLCapabilities(glProfile);
        glWindow = GLWindow.create(screen, glCapabilities);

        glWindow.setSize(1044, 768);
        glWindow.setPosition(100, 50);
        glWindow.setUndecorated(false);
        glWindow.setAlwaysOnTop(false);
        glWindow.setFullscreen(false);
        glWindow.setPointerVisible(true);
        glWindow.confinePointer(false);
        glWindow.setTitle("Tutorial 05 - Uniform Variables");
        glWindow.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG);
        glWindow.setVisible(true);

        Tutorial05 tutorial05 = new Tutorial05();
        glWindow.addGLEventListener(tutorial05);

        animator = new Animator(glWindow);
        animator.start();
    }
 
开发者ID:java-opengl-labs,项目名称:ogl-dev,代码行数:26,代码来源:Tutorial05.java


示例3: main

import com.jogamp.newt.NewtFactory; //导入依赖的package包/类
public static void main(String[] args) {

        Display display = NewtFactory.createDisplay(null);
        Screen screen = NewtFactory.createScreen(display, 0);
        GLProfile glProfile = GLProfile.get(GLProfile.GL3);
        GLCapabilities glCapabilities = new GLCapabilities(glProfile);
        glWindow = GLWindow.create(screen, glCapabilities);

        glWindow.setSize(1034, 768);
        glWindow.setPosition(100, 50);
        glWindow.setUndecorated(false);
        glWindow.setAlwaysOnTop(false);
        glWindow.setFullscreen(false);
        glWindow.setPointerVisible(true);
        glWindow.confinePointer(false);
        glWindow.setTitle("Tutorial 03 - First triangle");
        glWindow.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG);
        glWindow.setVisible(true);

        Tutorial03 tutorial03 = new Tutorial03();
        glWindow.addGLEventListener(tutorial03);

        animator = new Animator(glWindow);
        animator.start();
    }
 
开发者ID:java-opengl-labs,项目名称:ogl-dev,代码行数:26,代码来源:Tutorial03.java


示例4: main

import com.jogamp.newt.NewtFactory; //导入依赖的package包/类
public static void main(String[] args) {

        Display display = NewtFactory.createDisplay(null);
        Screen screen = NewtFactory.createScreen(display, 0);
        GLProfile glProfile = GLProfile.get(GLProfile.GL3);
        GLCapabilities glCapabilities = new GLCapabilities(glProfile);
        glWindow = GLWindow.create(screen, glCapabilities);

        glWindow.setSize(1044, 768);
        glWindow.setPosition(100, 50);
        glWindow.setUndecorated(false);
        glWindow.setAlwaysOnTop(false);
        glWindow.setFullscreen(false);
        glWindow.setPointerVisible(true);
        glWindow.confinePointer(false);
        glWindow.setTitle("Tutorial 08 - Scaling Transformation");
        glWindow.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG);
        glWindow.setVisible(true);

        Tutorial08 tutorial08 = new Tutorial08();
        glWindow.addGLEventListener(tutorial08);

        animator = new Animator(glWindow);
        animator.start();
    }
 
开发者ID:java-opengl-labs,项目名称:ogl-dev,代码行数:26,代码来源:Tutorial08.java


示例5: main

import com.jogamp.newt.NewtFactory; //导入依赖的package包/类
public static void main(String[] args) {

        Display display = NewtFactory.createDisplay(null);
        Screen screen = NewtFactory.createScreen(display, 0);
        GLProfile glProfile = GLProfile.get(GLProfile.GL3);
        GLCapabilities glCapabilities = new GLCapabilities(glProfile);
        glWindow = GLWindow.create(screen, glCapabilities);

        glWindow.setSize(1044, 768);
        glWindow.setPosition(100, 50);
        glWindow.setUndecorated(false);
        glWindow.setAlwaysOnTop(false);
        glWindow.setFullscreen(false);
        glWindow.setPointerVisible(true);
        glWindow.confinePointer(false);
        glWindow.setTitle("Tutorial 04 - Shaders");
        glWindow.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG);
        glWindow.setVisible(true);

        Tutorial04 tutorial04 = new Tutorial04();
        glWindow.addGLEventListener(tutorial04);

        animator = new Animator(glWindow);
        animator.start();
    }
 
开发者ID:java-opengl-labs,项目名称:ogl-dev,代码行数:26,代码来源:Tutorial04.java


示例6: main

import com.jogamp.newt.NewtFactory; //导入依赖的package包/类
public static void main(String[] args) {

        Display display = NewtFactory.createDisplay(null);
        Screen screen = NewtFactory.createScreen(display, 0);
        GLProfile glProfile = GLProfile.get(GLProfile.GL3);
        GLCapabilities glCapabilities = new GLCapabilities(glProfile);
        glWindow = GLWindow.create(screen, glCapabilities);

        glWindow.setSize(1044, 768);
        glWindow.setPosition(100, 50);
        glWindow.setUndecorated(false);
        glWindow.setAlwaysOnTop(false);
        glWindow.setFullscreen(false);
        glWindow.setPointerVisible(true);
        glWindow.confinePointer(false);
        glWindow.setTitle("Tutorial 06 - Translation Transformation");
        glWindow.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG);
        glWindow.setVisible(true);

        Tutorial06 tutorial06 = new Tutorial06();
        glWindow.addGLEventListener(tutorial06);

        animator = new Animator(glWindow);
        animator.start();
    }
 
开发者ID:java-opengl-labs,项目名称:ogl-dev,代码行数:26,代码来源:Tutorial06.java


示例7: main

import com.jogamp.newt.NewtFactory; //导入依赖的package包/类
public static void main(String[] args) {

        Display display = NewtFactory.createDisplay(null);
        Screen screen = NewtFactory.createScreen(display, 0);
        GLProfile glProfile = GLProfile.get(GLProfile.GL3);
        GLCapabilities glCapabilities = new GLCapabilities(glProfile);
        glWindow = GLWindow.create(screen, glCapabilities);

        glWindow.setSize(1024, 768);
        glWindow.setPosition(100, 50);
        glWindow.setUndecorated(false);
        glWindow.setAlwaysOnTop(false);
        glWindow.setFullscreen(false);
        glWindow.setPointerVisible(true);
        glWindow.confinePointer(false);
        glWindow.setTitle("Tutorial 02 -  Hello Dot");
        glWindow.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG);
        glWindow.setVisible(true);

        Tutorial02 tutorial02 = new Tutorial02();
        glWindow.addGLEventListener(tutorial02);

        animator = new Animator(glWindow);
        animator.start();
    }
 
开发者ID:java-opengl-labs,项目名称:ogl-dev,代码行数:26,代码来源:Tutorial02.java


示例8: main

import com.jogamp.newt.NewtFactory; //导入依赖的package包/类
public static void main(String[] args) {

        Display display = NewtFactory.createDisplay(null);
        Screen screen = NewtFactory.createScreen(display, 0);
        GLProfile glProfile = GLProfile.get(GLProfile.GL3);
        GLCapabilities glCapabilities = new GLCapabilities(glProfile);
        glWindow = GLWindow.create(screen, glCapabilities);

        glWindow.setSize(1024, 768);
        glWindow.setPosition(100, 50);
        glWindow.setUndecorated(false);
        glWindow.setAlwaysOnTop(false);
        glWindow.setFullscreen(false);
        glWindow.setPointerVisible(true);
        glWindow.confinePointer(false);
        glWindow.setTitle("Tutorial 01 - Open a window");
        glWindow.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG);
        glWindow.setVisible(true);

        Tutorial01 tutorial01 = new Tutorial01();
        glWindow.addGLEventListener(tutorial01);

        animator = new Animator(glWindow);
        animator.start();
    }
 
开发者ID:java-opengl-labs,项目名称:ogl-dev,代码行数:26,代码来源:Tutorial01.java


示例9: main

import com.jogamp.newt.NewtFactory; //导入依赖的package包/类
public static void main(String[] args) {

        Display display = NewtFactory.createDisplay(null);
        Screen screen = NewtFactory.createScreen(display, 0);
        GLProfile glProfile = GLProfile.get(GLProfile.GL3);
        GLCapabilities glCapabilities = new GLCapabilities(glProfile);
        glWindow = GLWindow.create(screen, glCapabilities);

        glWindow.setSize(1044, 768);
        glWindow.setPosition(100, 50);
        glWindow.setUndecorated(false);
        glWindow.setAlwaysOnTop(false);
        glWindow.setFullscreen(false);
        glWindow.setPointerVisible(true);
        glWindow.confinePointer(false);
        glWindow.setTitle("Tutorial 07 - Rotation Transformation");
        glWindow.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG);
        glWindow.setVisible(true);

        Tutorial07 tutorial07 = new Tutorial07();
        glWindow.addGLEventListener(tutorial07);

        animator = new Animator(glWindow);
        animator.start();
    }
 
开发者ID:java-opengl-labs,项目名称:ogl-dev,代码行数:26,代码来源:Tutorial07.java


示例10: main

import com.jogamp.newt.NewtFactory; //导入依赖的package包/类
public static void main(String[] args) {

        Display display = NewtFactory.createDisplay(null);
        Screen screen = NewtFactory.createScreen(display, 0);
        GLProfile glProfile = GLProfile.get(GLProfile.GL3);
        GLCapabilities glCapabilities = new GLCapabilities(glProfile);
        glWindow = GLWindow.create(screen, glCapabilities);

        glWindow.setSize(1044, 768);
        glWindow.setPosition(100, 50);
        glWindow.setUndecorated(false);
        glWindow.setAlwaysOnTop(false);
        glWindow.setFullscreen(false);
        glWindow.setPointerVisible(true);
        glWindow.confinePointer(false);
        glWindow.setTitle("Tutorial10 - Indexed Draws");
        glWindow.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG);
        glWindow.setVisible(true);

        Tutorial10 tutorial10 = new Tutorial10();
        glWindow.addGLEventListener(tutorial10);

        animator = new Animator(glWindow);
        animator.start();
    }
 
开发者ID:java-opengl-labs,项目名称:ogl-dev,代码行数:26,代码来源:Tutorial10.java


示例11: Scene

import com.jogamp.newt.NewtFactory; //导入依赖的package包/类
public Scene(String title, Renderer renderer) {
    this.renderer = renderer;

    try {
        this.display = NewtFactory.createDisplay(null);
        this.window = GLWindow.create(new GLCapabilities(GLProfile.get(GLProfile.GL2)));
        this.window.setPosition(0, 0);
        this.window.setSize(window.getScreen().getWidth(), window.getScreen().getHeight());
        this.window.addWindowListener(new WindowHandler(resize, stop));
        this.window.addMouseListener(new MouseHandler(this.window, renderer));
        this.window.setTitle(title);
        this.window.setVisible(true);
    } catch (Throwable t) {
        dispose();
        Throw.unchecked(t);
    }
}
 
开发者ID:slipperyseal,项目名称:atomicobjects,代码行数:18,代码来源:Scene.java


示例12: initGL

import com.jogamp.newt.NewtFactory; //导入依赖的package包/类
private static void initGL() {
  _window = NewtFactory.createWindow(
    new GLCapabilities(GLProfile.getDefault()));
  assertNotNull(_window);
  _glWindow = GLWindow.create(_window);
  assertNotNull(_glWindow);
  _glWindow.setVisible(true);
  _glContext = _glWindow.getContext();
  assertNotNull(_glContext);
  _glContext.makeCurrent();
}
 
开发者ID:MinesJTK,项目名称:jtk,代码行数:12,代码来源:ColorStateTest.java


示例13: Window

import com.jogamp.newt.NewtFactory; //导入依赖的package包/类
public Window(KeyboardInputHandler aKeyboardInputHandler, MouseHandler aMouseHandler) 
{
    //m_GLWindow
    
    //ICON TEST
    //IOUtil.ClassResources res = new ClassResources(new String[]{"brick.png"}, getClass().getClassLoader(), getClass());
    System.setProperty("newt.window.icons", "grimhaus/com/G2Dj/Resource/Graphics/icon-16.png grimhaus/com/G2Dj/Resource/Graphics/icon-32.png");
    //NewtFactory.setWindowIcons(res);
    
    //Configure the GL
    Display display = NewtFactory.createDisplay(null);
    Screen screen = NewtFactory.createScreen(display, 0);
    GLProfile glProfile = GLProfile.get(GLProfile./*GL4ES3*/GL2ES2);
    GLCapabilities glCapabilities = new GLCapabilities(glProfile);
    
    //Create the GL context & create the window
    m_GLWindow = GLWindow.create(screen, glCapabilities);
    
    //Configure the window
    setTitle("G2Dj");
    setSize(1024, 768);
    setPosition(50, 50);
    setAlwaysOnTop(false);
    setDisplayMode(DisplayMode.Windowed);
    setPointerVisible(true);
    setPointerLockMode(PointerLockMode.Free);
            
    //Bypass JOGL's multithreaded event system
    m_GLWindow.setAutoSwapBufferMode(false);//timing of bufferswaps is up to me
    m_GLWindow.getContext().makeCurrent();//Ownership of the context is given to this thread
    
    //Attach window event listeners
    m_GLWindow.addWindowListener((WindowListener)this);
    m_GLWindow.addKeyListener((KeyListener)aKeyboardInputHandler);
    m_GLWindow.addMouseListener((MouseListener)aMouseHandler);
    
    GL gl = m_GLWindow.getGL();
    grimhaus.com.G2Dj.Imp.Graphics.GL.gl = m_GLWindow.getGL().getGL2ES2();
            
}
 
开发者ID:jfcameron,项目名称:G2Dj,代码行数:41,代码来源:Window.java


示例14: Application

import com.jogamp.newt.NewtFactory; //导入依赖的package包/类
public Application() {

        Display display = NewtFactory.createDisplay(null);
        Screen screen = NewtFactory.createScreen(display, 0);
        GLProfile glProfile = GLProfile.get(GLProfile.GL4);
        GLCapabilities glCapabilities = new GLCapabilities(glProfile);
        glWindow = GLWindow.create(screen, glCapabilities);

        glWindow.setSize(windowSize.x, windowSize.y);
        glWindow.setPosition(700, 100);
        glWindow.setUndecorated(false);
        glWindow.setAlwaysOnTop(false);
        glWindow.setFullscreen(false);
        glWindow.setPointerVisible(true);
        glWindow.confinePointer(false);
        glWindow.setTitle("hellovr_jogl");

        if (debugOpenGL) {
            glWindow.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG);
        }
        glWindow.setVisible(true);
        if (debugOpenGL) {
            glWindow.getContext().addGLDebugListener(new GlDebugOutput());
        }

        glWindow.setAutoSwapBufferMode(false);
        animator = new Animator(glWindow);
        animator.start();
    }
 
开发者ID:java-opengl-labs,项目名称:jogl-hello-vr,代码行数:30,代码来源:Application.java


示例15: ClearGLWindow

import com.jogamp.newt.NewtFactory; //导入依赖的package包/类
public ClearGLWindow(final String pWindowTitle,
		final int pDefaultWidth,
		final int pDefaultHeight,
		final String pGLVersion,
		final int pNumberOfSamples,
		final ClearGLEventListener pClearGLWindowEventListener) {
	mWindowTitle = pWindowTitle;
	mWindowDefaultWidth = pDefaultWidth;
	mWindowDefaultHeight = pDefaultHeight;

	mProjectionMatrix = new GLMatrix();
	mViewMatrix = new GLMatrix();

	final GLProfile lProfile = GLProfile.get(pGLVersion);
	System.out.println(this.getClass().getSimpleName() + ": "
			+ lProfile);
	final GLCapabilities lCapabilities = new GLCapabilities(lProfile);

	lCapabilities.setSampleBuffers(pNumberOfSamples > 1);
	lCapabilities.setNumSamples(pNumberOfSamples);
	lCapabilities.setDepthBits(24);
	lCapabilities.setHardwareAccelerated(true);

	final GLCapabilitiesChooser lMultisampleChooser = new MultisampleChooser();

	mWindow = NewtFactory.createWindow(lCapabilities);
	mGlWindow = GLWindow.create(mWindow);
	mGlWindow.setCapabilitiesChooser(lMultisampleChooser);
	mGlWindow.setTitle(pWindowTitle);

	pClearGLWindowEventListener.setClearGLWindow(this);
	mGlWindow.addGLEventListener(pClearGLWindowEventListener);
	mGlWindow.setSurfaceSize(pDefaultWidth, pDefaultHeight);
	mGlWindow.setAutoSwapBufferMode(true);

	// lAnimator.add(mClearGLWindow.getGLAutoDrawable());
}
 
开发者ID:ClearVolume,项目名称:ClearGL,代码行数:38,代码来源:ClearGLWindow.java


示例16: main

import com.jogamp.newt.NewtFactory; //导入依赖的package包/类
public static void main(String[] args) {

        Display display = NewtFactory.createDisplay(null);
        Screen screen = NewtFactory.createScreen(display, 0);
        GLProfile glProfile = GLProfile.get(GLProfile.GL4);
        GLCapabilities glCapabilities = new GLCapabilities(glProfile);
        Resources.glWindow = GLWindow.create(screen, glCapabilities);

        Resources.glWindow.setSize(Resources.imageSize.x, Resources.imageSize.y);
        Resources.glWindow.setPosition(50, 50);
        Resources.glWindow.setUndecorated(false);
        Resources.glWindow.setAlwaysOnTop(false);
        Resources.glWindow.setFullscreen(false);
        Resources.glWindow.setPointerVisible(true);
        Resources.glWindow.confinePointer(false);
        Resources.glWindow.setTitle("Weighted Blended");
        Resources.glWindow.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG);
        Resources.glWindow.setVisible(true);

        Viewer viewer = new Viewer();
        Resources.glWindow.addGLEventListener(viewer);

        InputListener inputListener = new InputListener();
        Resources.glWindow.addMouseListener(inputListener);
        Resources.glWindow.addKeyListener(inputListener);

        Resources.animator = new Animator(Resources.glWindow);
        Resources.animator.setRunAsFastAsPossible(true);
        Resources.animator.setExclusiveContext(true);
        Resources.animator.start();
    }
 
开发者ID:java-opengl-labs,项目名称:oit,代码行数:32,代码来源:Viewer.java


示例17: main

import com.jogamp.newt.NewtFactory; //导入依赖的package包/类
public static void main(String[] args) {

        Display display = NewtFactory.createDisplay(null);
        Screen screen = NewtFactory.createScreen(display, 0);
        GLProfile glProfile = GLProfile.get(GLProfile.GL3);
        GLCapabilities glCapabilities = new GLCapabilities(glProfile);
        Resources.glWindow = GLWindow.create(screen, glCapabilities);

        Resources.glWindow.setSize(Resources.imageSize.x, Resources.imageSize.y);
        Resources.glWindow.setPosition(50, 50);
        Resources.glWindow.setUndecorated(false);
        Resources.glWindow.setAlwaysOnTop(false);
        Resources.glWindow.setFullscreen(false);
        Resources.glWindow.setPointerVisible(true);
        Resources.glWindow.confinePointer(false);
        Resources.glWindow.setTitle(TITLE);

        Viewer viewer = new Viewer();

        Resources.glWindow.addGLEventListener(viewer);

        InputListener inputListener = new InputListener();
        Resources.glWindow.addMouseListener(inputListener);
        Resources.glWindow.addKeyListener(inputListener);

        Resources.animator = new Animator(Resources.glWindow);
        Resources.animator.setRunAsFastAsPossible(true);
        Resources.animator.setExclusiveContext(true);
        Resources.animator.start();

        Resources.glWindow.setVisible(true);
    }
 
开发者ID:java-opengl-labs,项目名称:oit,代码行数:33,代码来源:Viewer.java


示例18: setFullscreen

import com.jogamp.newt.NewtFactory; //导入依赖的package包/类
@Override
public void setFullscreen(final boolean pFullScreen) {

	runOnEDT(false, () -> {
		if (pFullScreen) {
			final Display display = NewtFactory.createDisplay(null); // local
			// display
			final Screen screen = NewtFactory.createScreen(display, 0); // screen
			// 0
			final ArrayList<MonitorDevice> monitors = new ArrayList<MonitorDevice>();
			int lFullscreen;

			int index = 0;
			for (final MonitorDevice m : screen.getMonitorDevices()) {
				System.out.println(index + ": " + m.toString());
				index++;
			}

			try {
				lFullscreen = Integer.parseInt(System.getProperty("ClearGL.FullscreenDevice"));
				System.out.println("Fullscreen ID set to " + lFullscreen
						+ " by property.");
			} catch (final java.lang.NumberFormatException e) {
				lFullscreen = 0;
			}

			System.out.println(screen.getMonitorDevices()
					.get(lFullscreen)
					.toString());
			System.out.println(screen.getMonitorDevices()
					.get(lFullscreen)
					.getScreen()
					.getFQName());

			screen.addReference(); // trigger creation

			if (pFullScreen) {
				monitors.add(screen.getMonitorDevices().get(lFullscreen)); // Q1
			} else {
				// monitor array stays empty
			}
			mGlWindow.setSurfaceSize(screen.getMonitorDevices()
					.get(lFullscreen)
					.getCurrentMode()
					.getSurfaceSize()
					.getResolution()
					.getWidth(),
					screen.getMonitorDevices()
							.get(lFullscreen)
							.getCurrentMode()
							.getSurfaceSize()
							.getResolution()
							.getHeight());
			mGlWindow.setFullscreen(monitors);
		} else {
			mGlWindow.setFullscreen(false);
		}
	});
}
 
开发者ID:ClearVolume,项目名称:ClearGL,代码行数:60,代码来源:ClearGLWindow.java


示例19: CVViewer

import com.jogamp.newt.NewtFactory; //导入依赖的package包/类
public CVViewer(Studio studio, Datastore store) {
   // first make sure that our app's icon will not change:
   // This call still seems to generate a null pointer exception, at 
   // at jogamp.newt.driver.windows.DisplayDriver.<clinit>(DisplayDriver.java:70)
   // which is ugly but seems harmless
   try {
      NewtFactory.setWindowIcons(null);
   } catch (NullPointerException npe) {
      // this seems to always happen, but otherwise not be a problem
   }
   
   ourClass_ = this.getClass();
   studio_ = studio;
   UserProfile profile = studio_.getUserProfile();
   if (store == null) {
      clonedDisplay_ = studio_.displays().getCurrentWindow();
      if (clonedDisplay_ != null) {
         store_ = clonedDisplay_.getDatastore();
         name_ = clonedDisplay_.getName() + "-ClearVolume";
      }
   } else {
      store_ = store;
      clonedDisplay_ = getDisplay(store_);
      if (clonedDisplay_ != null) {
         name_ = clonedDisplay_.getName() + "-ClearVolume";
      }
   }
   displayBus_ = new EventBus();
   cvFrame_ = new JFrame();
   int xLoc = profile.getInt(ourClass_, XLOC, 100);
   int yLoc = profile.getInt(ourClass_, YLOC, 100);
   cvFrame_.setLocation(xLoc, yLoc);
   coordsBuilder_ = studio_.data().getCoordsBuilder();
   
   if (store_ == null) {
      studio_.logs().showMessage("No data set open");
      return;
   }
   
   if (name_ == null) {
      name_ = store_.getSummaryMetadata().getPrefix();
   }

   // check if we have all z slices in the first time point
   // if not, rely on the onNewImage function to initialize the renderer
   Coords zStackCoords = studio_.data().getCoordsBuilder().time(0).build();
   final int nrImages = store_.getImagesMatching(zStackCoords).size();
   currentlyShownTimePoint_ = -1; // set to make sure the first volume will be drawn
   Coords intendedDimensions = store_.getSummaryMetadata().getIntendedDimensions();
   if (store_.getIsFrozen()) {
       initializeRenderer(0);
   } else if (intendedDimensions != null && 
           nrImages >= intendedDimensions.getChannel() * intendedDimensions.getZ()) {
      initializeRenderer(0);
   } else if (intendedDimensions == null) {
      initializeRenderer(0);
   }


}
 
开发者ID:nicost,项目名称:MMClearVolumePlugin,代码行数:61,代码来源:CVViewer.java


示例20: initGL

import com.jogamp.newt.NewtFactory; //导入依赖的package包/类
/**
 * Initialise the JOGL Window
 */
private void initGL()
{
	// Get the OpenGL profile and its capabilities.
	// Tries to get OpenGL 3
	final GLProfile glp = GLProfile.get( GLProfile.GL2 );
	final GLCapabilities caps = new GLCapabilities( glp );

	// Get the display
	final Display dpy = NewtFactory.createDisplay( null );

	// Get the screen on the display (defaults to the first screen)
	final Screen screen = NewtFactory.createScreen( dpy, this.screenIdx );

	// Create a window
	this.glWindow = GLWindow.create( screen, caps );

	// Set the size and position of the window
	this.glWindow.setSize( this.width, this.height );
	if( null != this.wpos ) this.glWindow.setPosition( this.wpos.getX(), this.wpos.getY() );

	// Set the properties of the window
	this.glWindow.setUndecorated( this.undecorated );
	this.glWindow.setAlwaysOnTop( this.alwaysOnTop );
	this.glWindow.setFullscreen( this.fullscreen );
	this.glWindow.setPointerVisible( this.mouseVisible );
	this.glWindow.confinePointer( this.mouseConfined );

	// Add a listener to kill the app once the window is closed
	this.glWindow.addWindowListener( new WindowAdapter()
	{
		@Override
		public void windowDestroyNotify(final WindowEvent e)
		{
			System.exit(1);
		};
	} );

	// Show the window
	this.glWindow.setVisible( true );
}
 
开发者ID:openimaj,项目名称:openimaj,代码行数:44,代码来源:JOGLWindow.java



注:本文中的com.jogamp.newt.NewtFactory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java NaNStrategy类代码示例发布时间:2022-05-22
下一篇:
Java BaseRecordGenerator类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap