本文整理了Java中com.jme3.system.AppSettings.getDepthBits()
方法的一些代码示例,展示了AppSettings.getDepthBits()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AppSettings.getDepthBits()
方法的具体详情如下:
包路径:com.jme3.system.AppSettings
类名称:AppSettings
方法名:getDepthBits
[英]Get the number of depth bits
[中]获取深度位数
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
private Config getRequestedConfig() {
int r, g, b;
if (settings.getBitsPerPixel() == 24) {
r = g = b = 8;
} else {
if (settings.getBitsPerPixel() != 16) {
logger.log(Level.SEVERE, "Invalid bitsPerPixel setting: {0}, setting to RGB565 (16)", settings.getBitsPerPixel());
settings.setBitsPerPixel(16);
}
r = 5;
g = 6;
b = 5;
}
logger.log(Level.FINE, "Requested Display Config:");
logger.log(Level.FINE, "RGB: {0}, alpha: {1}, depth: {2}, samples: {3}, stencil: {4}",
new Object[]{settings.getBitsPerPixel(),
settings.getAlphaBits(), settings.getDepthBits(),
settings.getSamples(), settings.getStencilBits()});
return new Config(
r, g, b,
settings.getAlphaBits(),
settings.getDepthBits(),
settings.getSamples(),
settings.getStencilBits());
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
pixelFormat = new PixelFormat(settings.getBitsPerPixel(),
settings.getAlphaBits(),
settings.getDepthBits(),
settings.getStencilBits(),
samples);
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
pbufferFormat = new PixelFormat(settings.getBitsPerPixel(),
settings.getAlphaBits(),
settings.getDepthBits(),
settings.getStencilBits(),
0, // samples
canvasFormat = new PixelFormat(settings.getBitsPerPixel(),
settings.getAlphaBits(),
settings.getDepthBits(),
settings.getStencilBits(),
samples,
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
caps.setDoubleBuffered(true);
caps.setStencilBits(settings.getStencilBits());
caps.setDepthBits(settings.getDepthBits());
caps.setOnscreen(false);
caps.setSampleBuffers(true);
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
caps.setDoubleBuffered(true);
caps.setStencilBits(settings.getStencilBits());
caps.setDepthBits(settings.getDepthBits());
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
protected void initGLCanvas() {
GLCapabilities caps;
if (settings.getRenderer().equals(AppSettings.JOGL_OPENGL_FORWARD_COMPATIBLE)) {
caps = new GLCapabilities(GLProfile.getMaxProgrammable(true));
} else {
caps = new GLCapabilities(GLProfile.getMaxFixedFunc(true));
}
caps.setHardwareAccelerated(true);
caps.setDoubleBuffered(true);
caps.setStencilBits(settings.getStencilBits());
caps.setDepthBits(settings.getDepthBits());
if (settings.getSamples() > 1) {
caps.setSampleBuffers(true);
caps.setNumSamples(settings.getSamples());
}
canvas = GLWindow.create(caps);
canvas.invoke(false, new GLRunnable() {
public boolean run(GLAutoDrawable glad) {
canvas.getGL().setSwapInterval(settings.isVSync() ? 1 : 0);
return true;
}
});
canvas.requestFocus();
canvas.setSize(settings.getWidth(), settings.getHeight());
canvas.addGLEventListener(this);
//FIXME not sure it is the best place to do that
renderable.set(true);
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
PixelFormat pf = new PixelFormat(settings.getBitsPerPixel(),
settings.getAlphaBits(),
settings.getDepthBits(),
settings.getStencilBits(),
samples,
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
glfwWindowHint(GLFW_DEPTH_BITS, settings.getDepthBits());
glfwWindowHint(GLFW_STENCIL_BITS, settings.getStencilBits());
glfwWindowHint(GLFW_SAMPLES, settings.getSamples());
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
glfwWindowHint(GLFW_RESIZABLE, settings.isResizable() ? GLFW_TRUE : GLFW_FALSE);
glfwWindowHint(GLFW_DOUBLEBUFFER, GLFW_TRUE);
glfwWindowHint(GLFW_DEPTH_BITS, settings.getDepthBits());
glfwWindowHint(GLFW_STENCIL_BITS, settings.getStencilBits());
glfwWindowHint(GLFW_SAMPLES, settings.getSamples());
代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-lwjgl
pbufferFormat = new PixelFormat(settings.getBitsPerPixel(),
0,
settings.getDepthBits(),
settings.getStencilBits(),
0, // samples
canvasFormat = new PixelFormat(settings.getBitsPerPixel(),
0,
settings.getDepthBits(),
settings.getStencilBits(),
samples,
代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-lwjgl
pixelFormat = new PixelFormat(settings.getBitsPerPixel(),
0,
settings.getDepthBits(),
settings.getStencilBits(),
samples);
代码示例来源:origin: org.jmonkeyengine/jme3-jogl
protected void initInThread(){
GL gl = GLContext.getCurrentGL();
if (!gl.hasFullFBOSupport()){
logger.severe("Offscreen surfaces are not supported.");
return;
}
int samples = getNumSamplesToUse();
caps = new GLCapabilities(GLProfile.getMaxFixedFunc(true));
caps.setHardwareAccelerated(true);
caps.setDoubleBuffered(true);
caps.setStencilBits(settings.getStencilBits());
caps.setDepthBits(settings.getDepthBits());
caps.setOnscreen(false);
caps.setSampleBuffers(true);
caps.setNumSamples(samples);
offscreenDrawable = GLDrawableFactory.getFactory(GLProfile.getMaxFixedFunc(true)).createOffscreenAutoDrawable(null, caps, null, width, height);
offscreenDrawable.display();
renderable.set(true);
logger.fine("Offscreen buffer created.");
super.internalCreate();
listener.initialize();
}
代码示例来源:origin: org.jmonkeyengine/jme3-jogl
caps.setDoubleBuffered(true);
caps.setStencilBits(settings.getStencilBits());
caps.setDepthBits(settings.getDepthBits());
代码示例来源:origin: org.jmonkeyengine/jme3-jogl
protected void initGLCanvas() {
GLCapabilities caps;
if (settings.getRenderer().equals(AppSettings.JOGL_OPENGL_FORWARD_COMPATIBLE)) {
caps = new GLCapabilities(GLProfile.getMaxProgrammable(true));
} else {
caps = new GLCapabilities(GLProfile.getMaxFixedFunc(true));
}
caps.setHardwareAccelerated(true);
caps.setDoubleBuffered(true);
caps.setStencilBits(settings.getStencilBits());
caps.setDepthBits(settings.getDepthBits());
if (settings.getSamples() > 1) {
caps.setSampleBuffers(true);
caps.setNumSamples(settings.getSamples());
}
canvas = GLWindow.create(caps);
canvas.invoke(false, new GLRunnable() {
public boolean run(GLAutoDrawable glad) {
canvas.getGL().setSwapInterval(settings.isVSync() ? 1 : 0);
return true;
}
});
canvas.requestFocus();
canvas.setSize(settings.getWidth(), settings.getHeight());
canvas.addGLEventListener(this);
//FIXME not sure it is the best place to do that
renderable.set(true);
}
代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-lwjgl
PixelFormat pf = new PixelFormat(settings.getBitsPerPixel(),
0,
settings.getDepthBits(),
settings.getStencilBits(),
samples,
代码示例来源:origin: org.jmonkeyengine/jme3-lwjgl3
glfwWindowHint(GLFW_DEPTH_BITS, settings.getDepthBits());
glfwWindowHint(GLFW_STENCIL_BITS, settings.getStencilBits());
glfwWindowHint(GLFW_SAMPLES, settings.getSamples());
内容来源于网络,如有侵权,请联系作者删除!