Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

Implement wzSetSwapInterval for SDL #3054

Closed
wzdev-ci opened this issue Jan 10, 2012 · 17 comments
Closed

Implement wzSetSwapInterval for SDL #3054

wzdev-ci opened this issue Jan 10, 2012 · 17 comments

Comments

@wzdev-ci
Copy link
Contributor

resolution_fixed type_to-do (no feature requests!) | by Safety0ff


This basically amounts to doing the same thing as in lib/qtgame/swapinterval.cpp using SDL_GL_GetProcAddress instead of QGLContext::getProcAddress (for windows and linux).

The mac implementation shouldn't differ much from the qtgame one.


Issue migrated from trac:3054 at 2022-04-16 08:46:59 -0700

@wzdev-ci
Copy link
Contributor Author

Safety0ff edited the issue description

@wzdev-ci
Copy link
Contributor Author

Safety0ff commented


Just needs Mac method and more testing.

@wzdev-ci
Copy link
Contributor Author

Safety0ff uploaded file 0001-Add-SDL1.2swapintervalsupport..patch (6.4 KiB)

@wzdev-ci
Copy link
Contributor Author

vexed commented


I am not sure why you are doing this, this way, that commit that you showed before shouldn't matter in this case.
Glew is already init at the point the frontend is up and running, so we shouldn't have any issues by doing it like this patch.
(tested only on windows)

@wzdev-ci
Copy link
Contributor Author

vexed uploaded file 0001-Enable-Vsync-toggle-with-SDL.patch (1.1 KiB)

@wzdev-ci
Copy link
Contributor Author

vexed commented


BTW, you need glew 1.7.0 it seems, and that was released on [08-26-11] GLEW 1.7.0.

@wzdev-ci
Copy link
Contributor Author

Safety0ff commented


@ 0001-Enable-Vsync-toggle-with-SDL.patch​ added:

You need GLX_SWAP_INTERVAL_EXT and GLX_MESA_SWAP_control to get best coverage. GLX_SGI_SWAP_control slightly differs from the other two (cannot disable, doesn't include a getter).

@wzdev-ci
Copy link
Contributor Author

safety0ff commented


Add swap interval support for SDL 1.2 backend on Windows and Linux.

Refs #3054.

  • Changeset: [/changeset/358dcb434a85083e415457d7f07afe95f47f0aa8 358dcb434a85083e415457d7f07afe95f47f0aa8]
  • URL: [358]dcb434a85083e415457d7f07afe95f47f0aa8

@wzdev-ci
Copy link
Contributor Author

dak180 commented


The current mac patch has the following issue:

lib/sdl/swapinterval.mm: In function 'int wzGetSwapInterval()':
lib/sdl/swapinterval.mm:20: error: 'context' was not declared in this scope

@wzdev-ci
Copy link
Contributor Author

Safety0ff uploaded file 0001-Add-MacSDLswapintervalsupport..patch (1.4 KiB)

This should work now.

@wzdev-ci
Copy link
Contributor Author

Safety0ff changed milestone from unspecified to 3.1

@wzdev-ci
Copy link
Contributor Author

Safety0ff commented


dak180 added the mac build system changes to this patch here: https://github.com/dak180/warzone2100/commits/topic/sdlswap

@wzdev-ci
Copy link
Contributor Author

safety0ff changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

safety0ff changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

safety0ff commented


Add Mac SDL swap interval support.

Closes #3054.

Signed-off-by: dak180

  • Changeset: [/changeset/764e0c2134d56bb8b3845a4ec434a571d5a64343 764e0c2134d56bb8b3845a4ec434a571d5a64343]
  • URL: [764]e0c2134d56bb8b3845a4ec434a571d5a64343

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 4, 2012

safety0ff commented


Add swap interval support for SDL 1.2 backend on Windows and Linux.

Refs #3054.

  • Changeset: [/changeset/358dcb434a85083e415457d7f07afe95f47f0aa8 358dcb434a85083e415457d7f07afe95f47f0aa8]
  • URL: [358]dcb434a85083e415457d7f07afe95f47f0aa8

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 4, 2012

safety0ff commented


Add Mac SDL swap interval support.

Closes #3054.

Signed-off-by: dak180

  • Changeset: [/changeset/764e0c2134d56bb8b3845a4ec434a571d5a64343 764e0c2134d56bb8b3845a4ec434a571d5a64343]
  • URL: [764]e0c2134d56bb8b3845a4ec434a571d5a64343

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant