com.jme3.system.AppSettings.setBitsPerPixel()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(105)

本文整理了Java中com.jme3.system.AppSettings.setBitsPerPixel()方法的一些代码示例,展示了AppSettings.setBitsPerPixel()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AppSettings.setBitsPerPixel()方法的具体详情如下:
包路径:com.jme3.system.AppSettings
类名称:AppSettings
方法名:setBitsPerPixel

AppSettings.setBitsPerPixel介绍

[英]Set the bits per pixel for the display. Appropriate values are 16 for RGB565 color format, or 24 for RGB8 color format.
[中]设置显示器的每像素位数。RGB565颜色格式的相应值为16,RGB8颜色格式的相应值为24。

代码示例

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

source.setBitsPerPixel(depth);
source.setFrequency(freq);
source.setFullscreen(fullscreen);

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

settings.setEmulateKeyboard(keyEventsEnabled);
settings.setBitsPerPixel(eglBitsPerPixel);
settings.setAlphaBits(eglAlphaBits);
settings.setDepthBits(eglDepthBits);

代码示例来源: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

settings.setBitsPerPixel(useDM.getBitDepth());
    settings.setFrequency(useDM.getRefreshRate());
    settings.setSwapBuffers(true);
settings.setBitsPerPixel(24);     
settings.setFrameRate(0); // never sleep in main loop
settings.setFrequency(VRhardware.getDisplayFrequency());

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

settings.setBitsPerPixel(useDM.getBitDepth());
    settings.setFrequency(useDM.getRefreshRate());
    settings.setSwapBuffers(true);
settings.setWidth(xWin);
settings.setHeight(yWin);
settings.setBitsPerPixel(32);     
settings.setFrameRate(0);
settings.setFrequency(environment.getVRHardware().getDisplayFrequency());

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

settings.setEmulateKeyboard(keyEventsEnabled);
settings.setBitsPerPixel(eglBitsPerPixel);
settings.setAlphaBits(eglAlphaBits);
settings.setDepthBits(eglDepthBits);

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

private void storeSelectedConfig(EGL10 egl, EGLDisplay display, EGLConfig eglConfig) {
  int r = eglGetConfigAttribSafe(egl, display, eglConfig, EGL10.EGL_RED_SIZE);
  int g = eglGetConfigAttribSafe(egl, display, eglConfig, EGL10.EGL_GREEN_SIZE);
  int b = eglGetConfigAttribSafe(egl, display, eglConfig, EGL10.EGL_BLUE_SIZE);
  settings.setBitsPerPixel(r+g+b);
  settings.setAlphaBits(
      eglGetConfigAttribSafe(egl, display, eglConfig, EGL10.EGL_ALPHA_SIZE));
  settings.setDepthBits(
      eglGetConfigAttribSafe(egl, display, eglConfig, EGL10.EGL_DEPTH_SIZE));
  settings.setSamples(
      eglGetConfigAttribSafe(egl, display, eglConfig, EGL10.EGL_SAMPLES));
  settings.setStencilBits(
      eglGetConfigAttribSafe(egl, display, eglConfig, EGL10.EGL_STENCIL_SIZE));
}

代码示例来源:origin: info.projectkyoto/mms-engine

source.setBitsPerPixel(depth);
source.setFrequency(freq);
source.setFullscreen(fullscreen);

代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-desktop

source.setBitsPerPixel(depth);
source.setFrequency(freq);
source.setFullscreen(fullscreen);

代码示例来源:origin: tonihele/OpenKeeper

settings.getAppSettings().setBitsPerPixel(mdm.bitDepth);
settings.getAppSettings().setFrequency((Integer) refresh.getSelection());
settings.getAppSettings().setFullscreen(fullscreen.isChecked());

相关文章

AppSettings类方法