當前位置: 首頁>>代碼示例>>Java>>正文


Java GLCapabilities.setHardwareAccelerated方法代碼示例

本文整理匯總了Java中javax.media.opengl.GLCapabilities.setHardwareAccelerated方法的典型用法代碼示例。如果您正苦於以下問題:Java GLCapabilities.setHardwareAccelerated方法的具體用法?Java GLCapabilities.setHardwareAccelerated怎麽用?Java GLCapabilities.setHardwareAccelerated使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.media.opengl.GLCapabilities的用法示例。


在下文中一共展示了GLCapabilities.setHardwareAccelerated方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getCaps

import javax.media.opengl.GLCapabilities; //導入方法依賴的package包/類
private GLCapabilities getCaps() {
	GLCapabilities caps = new GLCapabilities(GLProfile.getDefault());

	// Anti-aliasing using Multisampling
	if (AA_MULTISAMPLING) {
		try {
			caps.setAlphaBits(ALPHA_BITS);
			caps.setDoubleBuffered(true);
			caps.setHardwareAccelerated(true);
			caps.setSampleBuffers(true);
			caps.setNumSamples(8);

			caps.setAccumAlphaBits(ALPHA_BITS);
			caps.setAccumBlueBits(ALPHA_BITS);
			caps.setAccumGreenBits(ALPHA_BITS);
			caps.setAccumRedBits(ALPHA_BITS);

		} catch (javax.media.opengl.GLException ex) {
			ex.printStackTrace();
		}
	}

	return caps;
}
 
開發者ID:dev-cuttlefish,項目名稱:cuttlefish,代碼行數:25,代碼來源:NetworkRenderer.java

示例2: setup

import javax.media.opengl.GLCapabilities; //導入方法依賴的package包/類
/**
 * Create the GLCanvas and set properties for the graphics device
 * initialization, such as bits per channel. And advanced features for
 * improved rendering performance such as the stencil buffer.
 */
private void setup() {
	GLProfile glp = GLProfile.getDefault();
       // Specifies a set of OpenGL capabilities, based on your profile.
       GLCapabilities caps = new GLCapabilities(glp);
	caps.setDoubleBuffered(true);
	caps.setHardwareAccelerated(true);

	// create the canvas for drawing
	canvas = new GLCanvas(caps);

	// create the render thread
	anim = new Animator();

	// add the canvas to the main window
	add(canvas, BorderLayout.CENTER);

	// need this to receive callbacks for rendering (i.e. display() method)
	canvas.addGLEventListener(this);
}
 
開發者ID:momega,項目名稱:spacesimulator,代碼行數:25,代碼來源:JoglTransparencyDemo.java

示例3: getCapabilities

import javax.media.opengl.GLCapabilities; //導入方法依賴的package包/類
/**
 * I require HW acceleration and double buffering.
 * @return Set of required capabilities
 */
private static GLCapabilities getCapabilities() {
    GLCapabilities caps = new GLCapabilities();
    caps.setHardwareAccelerated(true);
    caps.setDoubleBuffered(true);
    return caps;
}
 
開發者ID:kefik,項目名稱:Pogamut3,代碼行數:11,代碼來源:MapGLPanel.java

示例4: setupAviatrix

import javax.media.opengl.GLCapabilities; //導入方法依賴的package包/類
/**
 * Setup the avaiatrix pipeline here
 */
private void setupAviatrix()
{
    // Assemble a simple single-threaded pipeline.
    GLCapabilities caps = new GLCapabilities();
    caps.setDoubleBuffered(true);
    caps.setHardwareAccelerated(true);

    GraphicsCullStage culler = new NullCullStage();
    culler.setOffscreenCheckEnabled(false);

    GraphicsSortStage sorter = new SimpleTransparencySortStage();
    surface = new DebugAWTSurface(caps);
    surface.setColorClearNeeded(false);  // we're using a background
    DefaultGraphicsPipeline pipeline = new DefaultGraphicsPipeline();

    pipeline.setCuller(culler);
    pipeline.setSorter(sorter);
    pipeline.setGraphicsOutputDevice(surface);

    displayManager = new SingleDisplayCollection();
    displayManager.addPipeline(pipeline);

    // Render manager
    sceneManager = new SingleThreadRenderManager();
    sceneManager.addDisplay(displayManager);
    sceneManager.setMinimumFrameInterval(10);

    // Before putting the pipeline into run mode, put the canvas on
    // screen first.
    Component comp = (Component)surface.getSurfaceObject();
    add(comp, BorderLayout.CENTER);
}
 
開發者ID:Norkart,項目名稱:NK-VirtualGlobe,代碼行數:36,代碼來源:ViewportLayersDemo.java

示例5: setupAviatrix

import javax.media.opengl.GLCapabilities; //導入方法依賴的package包/類
/**
 * Setup the avaiatrix pipeline here
 */
private void setupAviatrix()
{
    // Assemble a simple single-threaded pipeline.
    GLCapabilities caps = new GLCapabilities();
    caps.setDoubleBuffered(true);
    caps.setHardwareAccelerated(true);

    GraphicsCullStage culler = new NullCullStage();
    culler.setOffscreenCheckEnabled(false);

    GraphicsSortStage sorter = new SimpleTransparencySortStage();
    surface = new DebugAWTSurface(caps);
    DefaultGraphicsPipeline pipeline = new DefaultGraphicsPipeline();

    pipeline.setCuller(culler);
    pipeline.setSorter(sorter);
    pipeline.setGraphicsOutputDevice(surface);

    displayManager = new SingleDisplayCollection();
    displayManager.addPipeline(pipeline);

    // Render manager
    sceneManager = new SingleThreadRenderManager();
    sceneManager.addDisplay(displayManager);
    sceneManager.setMinimumFrameInterval(10);

    // Before putting the pipeline into run mode, put the canvas on
    // screen first.
    Component comp = (Component)surface.getSurfaceObject();
    add(comp, BorderLayout.CENTER);
}
 
開發者ID:Norkart,項目名稱:NK-VirtualGlobe,代碼行數:35,代碼來源:ViewportResizeDemo.java

示例6: setupAviatrix

import javax.media.opengl.GLCapabilities; //導入方法依賴的package包/類
/**
 * Setup the avaiatrix pipeline here
 */
private void setupAviatrix(Shell parent)
{
    // Assemble a simple single-threaded pipeline.
    GLCapabilities caps = new GLCapabilities();
    caps.setDoubleBuffered(true);
    caps.setHardwareAccelerated(true);

    GraphicsCullStage culler = new NullCullStage();
    culler.setOffscreenCheckEnabled(false);

    GraphicsSortStage sorter = new NullSortStage();
    surface = new SimpleSWTSurface(parent, SWT.NONE, caps);
    DefaultGraphicsPipeline pipeline = new DefaultGraphicsPipeline();

    pipeline.setCuller(culler);
    pipeline.setSorter(sorter);
    pipeline.setGraphicsOutputDevice(surface);

    displayManager = new SingleDisplayCollection();
    displayManager.addPipeline(pipeline);

    // Render manager
    sceneManager = new SingleThreadRenderManager();
    sceneManager.addDisplay(displayManager);
    sceneManager.setMinimumFrameInterval(100);
}
 
開發者ID:Norkart,項目名稱:NK-VirtualGlobe,代碼行數:30,代碼來源:AnimationDemo.java

示例7: setupAviatrix

import javax.media.opengl.GLCapabilities; //導入方法依賴的package包/類
/**
 * Setup the avaiatrix pipeline here
 */
private void setupAviatrix()
{
    // Assemble a simple single-threaded pipeline.
    GLCapabilities caps = new GLCapabilities();
    caps.setDoubleBuffered(true);
    caps.setHardwareAccelerated(true);

    GraphicsCullStage culler = new GenericCullStage();
    culler.setOffscreenCheckEnabled(false);

    GraphicsSortStage sorter = new NullSortStage();
    surface = new DebugAWTSurface(caps);
    DefaultGraphicsPipeline pipeline = new DefaultGraphicsPipeline();

    pipeline.setCuller(culler);
    pipeline.setSorter(sorter);
    pipeline.setGraphicsOutputDevice(surface);

    displayManager = new SingleDisplayCollection();
    displayManager.addPipeline(pipeline);

    // Render manager
    sceneManager = new SingleThreadRenderManager();
    sceneManager.addDisplay(displayManager);
    sceneManager.setMinimumFrameInterval(100);

    // Before putting the pipeline into run mode, put the canvas on
    // screen first.
    Component comp = (Component)surface.getSurfaceObject();
    add(comp, BorderLayout.CENTER);
}
 
開發者ID:Norkart,項目名稱:NK-VirtualGlobe,代碼行數:35,代碼來源:OctTreeDemo.java

示例8: setupAviatrix

import javax.media.opengl.GLCapabilities; //導入方法依賴的package包/類
/**
 * Setup the avaiatrix pipeline here
 */
private void setupAviatrix()
{
    // Assemble a simple single-threaded pipeline.
    GLCapabilities caps = new GLCapabilities();
    caps.setDoubleBuffered(true);
    caps.setHardwareAccelerated(true);

    GraphicsCullStage culler = new NullCullStage();
    culler.setOffscreenCheckEnabled(false);

    GraphicsSortStage sorter = new NullSortStage();
    surface = new SimpleAWTSurface(caps);
    surface.setClearColor(FOG_COLOUR[0], FOG_COLOUR[1], FOG_COLOUR[2], 1);
    DefaultGraphicsPipeline pipeline = new DefaultGraphicsPipeline();

    pipeline.setCuller(culler);
    pipeline.setSorter(sorter);
    pipeline.setGraphicsOutputDevice(surface);

    displayManager = new SingleDisplayCollection();
    displayManager.addPipeline(pipeline);

    // Render manager
    sceneManager = new SingleThreadRenderManager();
    sceneManager.addDisplay(displayManager);
    sceneManager.setMinimumFrameInterval(100);

    // Before putting the pipeline into run mode, put the canvas on
    // screen first.
    Component comp = (Component)surface.getSurfaceObject();
    add(comp, BorderLayout.CENTER);
}
 
開發者ID:Norkart,項目名稱:NK-VirtualGlobe,代碼行數:36,代碼來源:SceneWalkDemo.java

示例9: setupAviatrix

import javax.media.opengl.GLCapabilities; //導入方法依賴的package包/類
/**
 * Setup the avaiatrix pipeline here
 */
private void setupAviatrix(Shell parent)
{
    // Assemble a simple single-threaded pipeline.
    GLCapabilities caps = new GLCapabilities();
    caps.setDoubleBuffered(true);
    caps.setHardwareAccelerated(true);

    GraphicsCullStage culler = new NullCullStage();
    culler.setOffscreenCheckEnabled(false);

    GraphicsSortStage sorter = new NullSortStage();
    surface = new DebugSWTSurface(parent, SWT.NONE, caps);
    surface.setClearColor(0.2f, 0.2f, 0.2f, 1);
    DefaultGraphicsPipeline pipeline = new DefaultGraphicsPipeline();

    pipeline.setCuller(culler);
    pipeline.setSorter(sorter);
    pipeline.setGraphicsOutputDevice(surface);

    displayManager = new SingleDisplayCollection();
    displayManager.addPipeline(pipeline);

    // Render manager
    sceneManager = new SingleThreadRenderManager();
    sceneManager.addDisplay(displayManager);
    sceneManager.setMinimumFrameInterval(100);
}
 
開發者ID:Norkart,項目名稱:NK-VirtualGlobe,代碼行數:31,代碼來源:SWTLoaderDemo.java

示例10: setupAviatrix

import javax.media.opengl.GLCapabilities; //導入方法依賴的package包/類
/**
 * Setup the avaiatrix pipeline here
 */
private void setupAviatrix()
{
    // Assemble a simple single-threaded pipeline.
    GLCapabilities caps = new GLCapabilities();
    caps.setDoubleBuffered(true);
    caps.setHardwareAccelerated(true);

    GraphicsCullStage culler = new NullCullStage();
    culler.setOffscreenCheckEnabled(false);

    GraphicsSortStage sorter = new NullSortStage();
    surface = new DebugAWTSurface(caps);
    DefaultGraphicsPipeline pipeline = new DefaultGraphicsPipeline();

    pipeline.setCuller(culler);
    pipeline.setSorter(sorter);
    pipeline.setGraphicsOutputDevice(surface);

    displayManager = new SingleDisplayCollection();
    displayManager.addPipeline(pipeline);

    // Render manager
    sceneManager = new SingleThreadRenderManager();
    sceneManager.addDisplay(displayManager);
    sceneManager.setMinimumFrameInterval(100);

    // Before putting the pipeline into run mode, put the canvas on
    // screen first.
    Component comp = (Component)surface.getSurfaceObject();
    add(comp, BorderLayout.CENTER);
}
 
開發者ID:Norkart,項目名稱:NK-VirtualGlobe,代碼行數:35,代碼來源:Texture3DDemo.java

示例11: setupAviatrix

import javax.media.opengl.GLCapabilities; //導入方法依賴的package包/類
/**
 * Setup the avaiatrix pipeline here
 *
 * @param parent The parent widget of the display
 */
private void setupAviatrix(Shell parent)
{
    // Assemble a simple single-threaded pipeline.
    GLCapabilities caps = new GLCapabilities();
    caps.setDoubleBuffered(true);
    caps.setHardwareAccelerated(true);

    GraphicsCullStage culler = new NullCullStage(2);
    culler.setOffscreenCheckEnabled(true);

    GraphicsSortStage sorter = new NullSortStage();
    surface = new SimpleSWTSurface(parent, SWT.NONE, caps);
    DefaultGraphicsPipeline pipeline = new DefaultGraphicsPipeline();

    pipeline.setCuller(culler);
    pipeline.setSorter(sorter);
    pipeline.setGraphicsOutputDevice(surface);

    displayManager = new SingleDisplayCollection();
    displayManager.addPipeline(pipeline);

    // Render manager
    sceneManager = new SingleThreadRenderManager();
    sceneManager.addDisplay(displayManager);
    sceneManager.setMinimumFrameInterval(100);
}
 
開發者ID:Norkart,項目名稱:NK-VirtualGlobe,代碼行數:32,代碼來源:SWTRenderToTextureDemo.java

示例12: setupAviatrix

import javax.media.opengl.GLCapabilities; //導入方法依賴的package包/類
/**
 * Setup the avaiatrix pipeline here
 */
private void setupAviatrix()
{
    // Assemble a simple single-threaded pipeline.
    GLCapabilities caps = new GLCapabilities();
    caps.setDoubleBuffered(true);
    caps.setHardwareAccelerated(true);

    GraphicsCullStage culler = new NullCullStage();
    culler.setOffscreenCheckEnabled(false);

    GraphicsSortStage sorter = new NullSortStage();
    surface = new DebugAWTSurface(caps);
    DefaultGraphicsPipeline pipeline = new DefaultGraphicsPipeline();

    pipeline.setCuller(culler);
    pipeline.setSorter(sorter);
    pipeline.setGraphicsOutputDevice(surface);

    displayManager = new SingleDisplayCollection();
    displayManager.addPipeline(pipeline);

    // Render manager
    sceneManager = new SingleThreadRenderManager();
    sceneManager.addDisplay(displayManager);
    sceneManager.setMinimumFrameInterval(0);

    // Before putting the pipeline into run mode, put the canvas on
    // screen first.
    Component comp = (Component)surface.getSurfaceObject();
    add(comp, BorderLayout.CENTER);
}
 
開發者ID:Norkart,項目名稱:NK-VirtualGlobe,代碼行數:35,代碼來源:ElectroEffectDemo.java

示例13: setupAviatrix

import javax.media.opengl.GLCapabilities; //導入方法依賴的package包/類
/**
 * Setup the avaiatrix pipeline here
 */
private void setupAviatrix()
{
    // Assemble a simple single-threaded pipeline.
    GLCapabilities caps = new GLCapabilities();
    caps.setDoubleBuffered(true);
    caps.setHardwareAccelerated(true);

    GraphicsCullStage culler = new NullCullStage();
    culler.setOffscreenCheckEnabled(false);

    GraphicsSortStage sorter = new NullSortStage();
    surface = new DebugAWTSurface(caps);
    surface.setClearColor(0.2f, 0.2f, 0.2f, 1);
    DefaultGraphicsPipeline pipeline = new DefaultGraphicsPipeline();

    pipeline.setCuller(culler);
    pipeline.setSorter(sorter);
    pipeline.setGraphicsOutputDevice(surface);

    displayManager = new SingleDisplayCollection();
    displayManager.addPipeline(pipeline);

    // Render manager
    sceneManager = new SingleThreadRenderManager();
    sceneManager.addDisplay(displayManager);
    sceneManager.setMinimumFrameInterval(100);

    // Before putting the pipeline into run mode, put the canvas on
    // screen first.
    Component comp = (Component)surface.getSurfaceObject();
    add(comp, BorderLayout.CENTER);
}
 
開發者ID:Norkart,項目名稱:NK-VirtualGlobe,代碼行數:36,代碼來源:BasicLoaderDemo.java

示例14: setupAviatrix

import javax.media.opengl.GLCapabilities; //導入方法依賴的package包/類
/**
 * Setup the avaiatrix pipeline here
 */
private void setupAviatrix()
{
    // Assemble a simple single-threaded pipeline.
    GLCapabilities caps = new GLCapabilities();
    caps.setDoubleBuffered(true);
    caps.setHardwareAccelerated(true);

    GraphicsCullStage culler = new NullCullStage();
    culler.setOffscreenCheckEnabled(false);

    GraphicsSortStage sorter = new NullSortStage();
    surface = new DebugAWTSurface(caps);
    DefaultGraphicsPipeline pipeline = new DefaultGraphicsPipeline();

    pipeline.setCuller(culler);
    pipeline.setSorter(sorter);
    pipeline.setGraphicsOutputDevice(surface);

    displayManager = new SingleDisplayCollection();
    displayManager.addPipeline(pipeline);

    // Render manager
    sceneManager = new SingleThreadRenderManager();
    sceneManager.addDisplay(displayManager);
    sceneManager.setMinimumFrameInterval(20);

    // Before putting the pipeline into run mode, put the canvas on
    // screen first.
    Component comp = (Component)surface.getSurfaceObject();
    add(comp, BorderLayout.CENTER);
}
 
開發者ID:Norkart,項目名稱:NK-VirtualGlobe,代碼行數:35,代碼來源:HumusFlagDemo.java

示例15: setupAviatrix

import javax.media.opengl.GLCapabilities; //導入方法依賴的package包/類
/**
 * Setup the avaiatrix pipeline here
 *
 * @param parent The parent widget of the display
 */
private void setupAviatrix(Shell parent)
{
    // Assemble a simple single-threaded pipeline.
    GLCapabilities caps = new GLCapabilities();
    caps.setDoubleBuffered(true);
    caps.setHardwareAccelerated(true);

    GraphicsCullStage culler = new NullCullStage();
    culler.setOffscreenCheckEnabled(false);

    GraphicsSortStage sorter = new NullSortStage();
    surface = new SimpleSWTSurface(parent, SWT.NONE, caps);
    DefaultGraphicsPipeline pipeline = new DefaultGraphicsPipeline();

    pipeline.setCuller(culler);
    pipeline.setSorter(sorter);
    pipeline.setGraphicsOutputDevice(surface);

    displayManager = new SingleDisplayCollection();
    displayManager.addPipeline(pipeline);

    // Render manager
    sceneManager = new SingleThreadRenderManager();
    sceneManager.addDisplay(displayManager);
    sceneManager.setMinimumFrameInterval(100);
}
 
開發者ID:Norkart,項目名稱:NK-VirtualGlobe,代碼行數:32,代碼來源:BasicDemo.java


注:本文中的javax.media.opengl.GLCapabilities.setHardwareAccelerated方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。