本文整理匯總了Java中javax.media.opengl.GLCapabilities.setAccumGreenBits方法的典型用法代碼示例。如果您正苦於以下問題:Java GLCapabilities.setAccumGreenBits方法的具體用法?Java GLCapabilities.setAccumGreenBits怎麽用?Java GLCapabilities.setAccumGreenBits使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.media.opengl.GLCapabilities
的用法示例。
在下文中一共展示了GLCapabilities.setAccumGreenBits方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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;
}
示例2: 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.setAccumAlphaBits(16);
caps.setAccumBlueBits(16);
caps.setAccumGreenBits(16);
caps.setAccumRedBits(16);
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(30);
// Before putting the pipeline into run mode, put the canvas on
// screen first.
Component comp = (Component)surface.getSurfaceObject();
add(comp, BorderLayout.CENTER);
}