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

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

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

AppSettings.getFrequency介绍

[英]Get the frequency
[中]获取频率

代码示例

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

displayFreq = source.getFrequency() + " Hz";

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

&& currentDisplayMode.getHeight() == settings.getHeight()) {
if (currentDisplayMode.getBitDepth() == settings.getBitsPerPixel()) {
  if (currentDisplayMode.getRefreshRate() == settings.getFrequency()) {
    matchingDisplayMode = currentDisplayMode;
  } else if (currentDisplayMode.getRefreshRate() == DisplayMode.REFRESH_RATE_UNKNOWN) {
  if (currentDisplayMode.getRefreshRate() == settings.getFrequency()) {
    multiBitsDepthSupportedDisplayMode = currentDisplayMode;
  } else if (currentDisplayMode.getRefreshRate() == DisplayMode.REFRESH_RATE_UNKNOWN) {

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

screenModes = MonitorModeUtil.filterByResolution(screenModes, dimension);
screenModes = MonitorModeUtil.getHighestAvailableBpp(screenModes);
if (settings.getFrequency() > 0) {
  screenModes = MonitorModeUtil.filterByRate(screenModes, settings.getFrequency());
} else {
  screenModes = MonitorModeUtil.getHighestAvailableRate(screenModes);

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

}else if (settings.isFullscreen()){
  displayMode = getFullscreenDisplayMode(settings.getWidth(), settings.getHeight(),
                      settings.getBitsPerPixel(), settings.getFrequency());
  if (displayMode == null) {
    throw new RuntimeException("Unable to find fullscreen display mode matching settings");

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

glfwWindowHint(GLFW_SAMPLES, settings.getSamples());
glfwWindowHint(GLFW_STEREO, settings.useStereo3D() ? GLFW_TRUE : GLFW_FALSE);
glfwWindowHint(GLFW_REFRESH_RATE, settings.getFrequency());

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

glfwWindowHint(GLFW_SAMPLES, settings.getSamples());
glfwWindowHint(GLFW_STEREO, settings.useStereo3D() ? GLFW_TRUE : GLFW_FALSE);
glfwWindowHint(GLFW_REFRESH_RATE, settings.getFrequency());

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

MyDisplayMode(AppSettings settings) {
  height = settings.getHeight();
  width = settings.getWidth();
  bitDepth = settings.getBitsPerPixel();
  refreshRate.add(settings.getFrequency());
}

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

/**
 * <code>updateDisplayChoices</code> updates the available color depth and
 * display frequency options to match the currently selected resolution.
 */
private void updateDisplayChoices() {
  if (!fullscreenBox.isSelected()) {
    // don't run this function when changing windowed settings
    return;
  }
  String resolution = (String) displayResCombo.getSelectedItem();
  String colorDepth = (String) colorDepthCombo.getSelectedItem();
  if (colorDepth == null) {
    colorDepth = source.getBitsPerPixel() + " bpp";
  }
  String displayFreq = (String) displayFreqCombo.getSelectedItem();
  if (displayFreq == null) {
    displayFreq = source.getFrequency() + " Hz";
  }
  // grab available depths
  String[] depths = getDepths(resolution, modes);
  colorDepthCombo.setModel(new DefaultComboBoxModel(depths));
  colorDepthCombo.setSelectedItem(colorDepth);
  // grab available frequencies
  String[] freqs = getFrequencies(resolution, modes);
  displayFreqCombo.setModel(new DefaultComboBoxModel(freqs));
  // Try to reset freq
  displayFreqCombo.setSelectedItem(displayFreq);
}

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

displayFreq = source.getFrequency() + " Hz";

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

private Settings(final AppSettings settings) {
  // Init the settings
  this.settings = settings;
  //Default resolution
  if (!this.settings.containsKey("Width") || !this.settings.containsKey("Height")) {
    this.settings.setResolution(800, 600); // Default resolution
  }
  File settingsFile = new File(USER_SETTINGS_FILE);
  if (settingsFile.exists()) {
    try (InputStream is = new FileInputStream(settingsFile)) {
      this.settings.load(is);
    } catch (IOException ex) {
      LOGGER.log(java.util.logging.Level.WARNING, "Settings file failed to load from " + settingsFile + "!", ex);
    }
  }
  this.settings.setFrameRate(Math.max(MAX_FPS, settings.getFrequency()));
  // Assing some app level settings
  settings.setTitle(TITLE);
  settings.setIcons(getApplicationIcons());
}

代码示例来源:origin: org.jmonkeyengine/jme3-jogl

&& currentDisplayMode.getHeight() == settings.getHeight()) {
if (currentDisplayMode.getBitDepth() == settings.getBitsPerPixel()) {
  if (currentDisplayMode.getRefreshRate() == settings.getFrequency()) {
    matchingDisplayMode = currentDisplayMode;
  } else if (currentDisplayMode.getRefreshRate() == DisplayMode.REFRESH_RATE_UNKNOWN) {
  if (currentDisplayMode.getRefreshRate() == settings.getFrequency()) {
    multiBitsDepthSupportedDisplayMode = currentDisplayMode;
  } else if (currentDisplayMode.getRefreshRate() == DisplayMode.REFRESH_RATE_UNKNOWN) {

代码示例来源:origin: org.jmonkeyengine/jme3-jogl

screenModes = MonitorModeUtil.filterByResolution(screenModes, dimension);
screenModes = MonitorModeUtil.getHighestAvailableBpp(screenModes);
if (settings.getFrequency() > 0) {
  screenModes = MonitorModeUtil.filterByRate(screenModes, settings.getFrequency());
} else {
  screenModes = MonitorModeUtil.getHighestAvailableRate(screenModes);

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

if (index >= 0) {
  refresh.addAllItems(resolutions.get(index).refreshRate);
  refresh.selectItem(settings.getFrequency());
} else {
  refresh.addItem(mdm.refreshRate.get(0));

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

}else if (settings.isFullscreen()){
  displayMode = getFullscreenDisplayMode(settings.getWidth(), settings.getHeight(),
                      settings.getBitsPerPixel(), settings.getFrequency());
  if (displayMode == null) {
    throw new RuntimeException("Unable to find fullscreen display mode matching settings");

代码示例来源:origin: org.jmonkeyengine/jme3-lwjgl3

glfwWindowHint(GLFW_SAMPLES, settings.getSamples());
glfwWindowHint(GLFW_STEREO, settings.useStereo3D() ? GLFW_TRUE : GLFW_FALSE);
glfwWindowHint(GLFW_REFRESH_RATE, settings.getFrequency());

相关文章

AppSettings类方法