LINUX.ORG.RU

OpenGL/SDL == окно в рамке


0

0

У меня разрешение экрана - 1024*768 (максимальное).
Если запустить OpenGL/SDL игру в полноэкранном режиме и выбрать разрешение 800*600 (Doom3, Quake4 не тянет мой комп), то игра идет в окне, вокруг которой черная рамка.

Картинка должна масштабироваться, а этого не происходит.

Вот часть иксовых конфигов:

Section "Monitor"

    Identifier  "LCD"
    HorizSync   60.241
    VertRefresh 74.927

    Modeline "1024x768_75.00"  81.80  1024 1080 1192 1360  768 769 772 802  -HSync +Vsync
    Modeline "800x600_75.00"  48.91  800 840 920 1040  600 601 604 627  -HSync +Vsync
    Modeline "640x480_75.00"  30.72  640 664 728 816  480 481 484 502  -HSync +Vsync

EndSection

Section "Device"
    Identifier  "FX5700"
    Driver      "nvidia"
    Option      "__GL_FSAA_MODE"        "1"
EndSection

Section "Screen"
    Identifier  "Screen0"
    Device      "FX5700"
    Monitor     "LCD"
    DefaultDepth 24

    Subsection "Display"
        Depth       8
        Modes       "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       16
        Modes       "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       24
        Modes       "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
EndSection
anonymous

Ответ на: комментарий от lester_dev

Добавил, не помогло.
Привожу весь xorg.conf:

 ~ $ sudo cat /etc/X11/xorg.conf
Section "Module"

    Load        "dbe"   # Double buffer extension
    SubSection  "extmod"
      Option    "omit xfree86-dga"   # don't initialise the DGA extension
    EndSubSection
    Load       "glx"
    Load       "extmod"

EndSection

Section "Files"

    RgbPath    "/usr/share/X11/rgb"
    FontPath   "/usr/share/fonts/misc"
    FontPath   "/usr/share/fonts/75dpi"
    FontPath   "/usr/share/fonts/100dpi"
    FontPath   "/usr/share/fonts/TTF"
    FontPath   "/usr/share/fonts/Type1"
    FontPath   "/usr/share/fonts/corefonts/"
    FontPath   "/usr/share/fonts/terminus/"
    ModulePath "/usr/lib/xorg/modules"

EndSection

Section "ServerFlags"

EndSection

Section "InputDevice"

    Identifier  "Keyboard0"
    Driver      "kbd"
    Option "AutoRepeat" "500 30"

    Option "XkbRules"   "xorg"
    Option "XkbModel"   "pc105"
    Option "XkbLayout"  "us,ru(winkeys)"
    Option "XkbOptions" "grp:ctrl_shift_toggle,grp_led:scroll"
EndSection

Section "InputDevice"

    Identifier  "Mouse0"
    Driver      "mouse"
    Option "Protocol"    "IMPS/2"       # IntelliMouse PS/2
    Option "Device"      "/dev/psaux"

EndSection

Section "Monitor"

    Identifier  "LCD"
    HorizSync   60.241
    VertRefresh 74.927

    Modeline "1024x768_75.00"  81.80  1024 1080 1192 1360  768 769 772 802  -HSync +Vsync
    Modeline "800x600_75.00"  48.91  800 840 920 1040  600 601 604 627  -HSync +Vsync
    Modeline "640x480_75.00"  30.72  640 664 728 816  480 481 484 502  -HSync +Vsync

EndSection

Section "Device"
    Identifier  "FX5700"
    Driver      "nvidia"
    Option      "__GL_FSAA_MODE"        "1"
#    Option     "RenderAccel" "true"
#    Option     "AllowGLXWithComposite" "true"
EndSection

Section "Extensions"
#    Option "Composite" "Enable"
#    Option "RENDER" "Enable"
EndSection

Section "Screen"
    Identifier  "Screen0"
    Device      "FX5700"
    Monitor     "LCD"
    DefaultDepth 24

    Subsection "Display"
        Depth       8
        Modes       "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       16
        Modes       "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       24
        Modes       "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
EndSection

Section "ServerLayout"

    Identifier  "Simple Layout"
    Screen "Screen0"
    InputDevice "Mouse0" "CorePointer"
    InputDevice "Keyboard0" "CoreKeyboard"

EndSection
 ~ $

 ~ $ epm -q nvidia-glx xorg-x11
nvidia-glx-1.0.8178
xorg-x11-7.0-r1
 ~ $

anonymous
()
Ответ на: комментарий от anonymous

Убери Option "omit xfree86-dga". И, кстати, разве твои modeline'ы работают? у тебя таких и режимов-то нет 1024x768_75.00. Убери _75.00.

Envel ★★★
()
Ответ на: комментарий от anonymous

Мдя... Яркий пример, как не надо писать xorg.conf...

Deleted
()
Ответ на: комментарий от Envel

Если убрать _75.00, и закомментировать фиксированные частоты монитора, то иксы запускаются в режиме 640*480.

А что с моим конфигом не так? Покажите свой.
Модлайны получал с помощью утилиты:

~ $ gtf 1024 768 75

# 1024x768 @ 75.00 Hz (GTF) hsync: 60.15 kHz; pclk: 81.80 MHz
Modeline "1024x768_75.00" 81.80 1024 1080 1192 1360 768 769 772 802 -HSync +Vsync

~ $

anonymous
()
Ответ на: комментарий от Envel

Спасибо!
Я задал частоты большим диапозоном - теперь все работает.

И все таки, что не так в моем конфиге кроме частот?

anonymous
()
Ответ на: комментарий от anonymous

> И все таки, что не так в моем конфиге кроме частот?

Видимо, ничего. Чтение Xorg.0.log позволяет это определить - иксы при старте ругаются на нерабочие моделайны...

anonymous
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.