Mode switching for GHOST under X11 #29747

Closed
opened 2012-01-01 14:28:42 +01:00 by Alex Fraser · 8 comments
Member

%%%This patch adds the ability to change screen resolutions under X Windows (e.g. on GNU/Linux). It is a port of the mode-setting code in Quake 2, which is licensed under the GPL version 2+.

The patch works on my system (Ubuntu 11.10 64-bit, ATI Radeon with fglrx driver) - however, after changing modes, GLSL fails to initialise: calls to glCreateShaderObjectARB return zero. I don't know why this happens. Looking through the Quake 3 source, it doesn't look like anything else is done to fix the GL state. But I'll keep looking.

Attached is the first cut of the patch, and a test scene. By running the scene through blenderplayer, the screen resolution should be set to 640x480 until the player exits. The test scene also has a script that changes the modes mid-game, but that won't work without another patch for the game engine API.%%%

%%%This patch adds the ability to change screen resolutions under X Windows (e.g. on GNU/Linux). It is a port of the mode-setting code in Quake 2, which is licensed under the GPL version 2+. The patch works on my system (Ubuntu 11.10 64-bit, ATI Radeon with fglrx driver) - however, after changing modes, GLSL fails to initialise: calls to glCreateShaderObjectARB return zero. I don't know why this happens. Looking through the Quake 3 source, it doesn't look like anything else is done to fix the GL state. But I'll keep looking. Attached is the first cut of the patch, and a test scene. By running the scene through blenderplayer, the screen resolution should be set to 640x480 until the player exits. The test scene also has a script that changes the modes mid-game, but that won't work without another patch for the game engine API.%%%
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'

%%%attached a patch with updates to cmake part.%%%

%%%attached a patch with updates to cmake part.%%%
Author
Member

%%%x11_modeswitch_2.patch: Minor fix for cmake vidmode library test.

Miraculously, GLSL is working for me now. Maybe I just needed to do a clean rebuild!%%%

%%%x11_modeswitch_2.patch: Minor fix for cmake vidmode library test. Miraculously, GLSL is working for me now. Maybe I just needed to do a clean rebuild!%%%
Author
Member

%%%Committed with Campbell's approval, r43070. Currently disabled by default; enable by turning on WITH_X11_XF86VMODE in cmake.%%%

%%%Committed with Campbell's approval, r43070. Currently disabled by default; enable by turning on WITH_X11_XF86VMODE in cmake.%%%
Author
Member

%%%Forgot to mention: thanks to Campbell for helping with CMake, and with testing!%%%

%%%Forgot to mention: thanks to Campbell for helping with CMake, and with testing!%%%
Author
Member

%%%Adding a new patch (x11_modeswitch_3) that implements the mode-getting functions too. Cam, maybe this fixes the problems you were seeing? Before I implemented these in the SDL version, I was seeing crashes too. This patch applies against r43233 (the previous patch has already been committed to trunk).

This patch also enables the xvidmode extension by default for cmake.

Cam, is it ok to commit this?%%%

%%%Adding a new patch (x11_modeswitch_3) that implements the mode-getting functions too. Cam, maybe this fixes the problems you were seeing? Before I implemented these in the SDL version, I was seeing crashes too. This patch applies against r43233 (the previous patch has already been committed to trunk). This patch also enables the xvidmode extension by default for cmake. Cam, is it ok to commit this?%%%
Author
Member

%%%Committed, r43286. Thanks, Campbell!%%%

%%%Committed, r43286. Thanks, Campbell!%%%
Author
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#29747
No description provided.