Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace MiniTK.Graphics with custom OpenGL shim. #10288

Merged
merged 1 commit into from Dec 27, 2015

Conversation

pchote
Copy link
Member

@pchote pchote commented Dec 26, 2015

This replaces the ~30k line monster that's hidden in our custom sdl2-cs.dll with a minimal shim that only exposes the functionality that we actually need and uses the proper c-style conventions. This removes the relatively long delay (at least on my machine) between window creation and first render, and gets us a step closer to being able to use the "official" sdl2-cs library.

Depends on #10249 which currently makes up the first 6 commits in this pr (don't review these here!).

@pchote
Copy link
Member Author

pchote commented Dec 26, 2015

This may also fix #7622 (which was closed prematurely).

@Mailaender
Copy link
Member

I don't see any faster startup, but the more light weight dependencies are still very much appreciated. 👍 We should get rid of the unnecessary parts from SDL2-CS and OpenTK.OpenAL as well.

@pchote
Copy link
Member Author

pchote commented Dec 27, 2015

Rebased.

@pchote pchote force-pushed the remove-minitk branch 4 times, most recently from 71fde9a to 2d71ccf Compare December 27, 2015 13:51
@pchote
Copy link
Member Author

pchote commented Dec 27, 2015

Updated to drop the OpenRA.Constants enum. The constants are now defined on the class for consistency with OpenAL-CS, which will be introduced in the next pr.

// ClearBufferMask
public const int GL_COLOR_BUFFER_BIT = 0x4000;
public const int GL_DEPTH_BUFFER_BIT = 0x0100;
public const int GL_STENCIL_BUFFER_BIT = 0x0400;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spurious whitespace after =.

@phrohdoh
Copy link
Member

The code looks good to me and everything renders ingame. 👍

@pchote
Copy link
Member Author

pchote commented Dec 27, 2015

Fixed.

@phrohdoh
Copy link
Member

Merging with this comment from @reaperrr:

09:23 < reaperrr> [16:02] <+Phrohdoh> Hm, it may be good to get a windows +1 before merging.
09:23 < reaperrr> no problems on Win7x64

phrohdoh added a commit that referenced this pull request Dec 27, 2015
Replace MiniTK.Graphics with custom OpenGL shim.
@phrohdoh phrohdoh merged commit 453cb17 into OpenRA:bleed Dec 27, 2015
@phrohdoh
Copy link
Member

Changelog entry.

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

Successfully merging this pull request may close these issues.

None yet

3 participants