-
Notifications
You must be signed in to change notification settings - Fork 199
#2490 Added version and profile information to GLData, #3280
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
Open
FluBBaOfWard
wants to merge
5
commits into
eclipse-platform:master
Choose a base branch
from
FluBBaOfWard:Add_GL3_support_for_MacOS
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+54
−1
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a93db5e
#2490 Added version and profile information to GLData, MacOS uses thi…
FluBBaOfWard f9b0917
Reworked the GL Profile check.
FluBBaOfWard 390e821
Renamed Profile.COMPATIBILITY to Profile.LEGACY, removed setting of G…
FluBBaOfWard 1b94699
Rearranged profiles for better clarity.
FluBBaOfWard ffe49a4
Fixed java doc for (GL) Profile.
FluBBaOfWard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,11 @@ | |
| */ | ||
|
|
||
| public class GLData { | ||
|
|
||
| public static enum Profile { | ||
| CORE, LEGACY; | ||
| } | ||
|
|
||
| /** | ||
| * Specifies a double-buffered surface. During context | ||
| * creation, only double-buffered formats are considered | ||
|
|
@@ -133,6 +138,24 @@ public class GLData { | |
| */ | ||
| public GLCanvas shareContext; | ||
|
|
||
| /** | ||
| * The major GL context version to use. It defaults to 0 for | ||
| * "not specified". | ||
| */ | ||
| public int majorVersion; | ||
|
|
||
| /** | ||
| * The minor GL context version to use. If {@link #majorVersion} | ||
| * is 0 this field is unused. | ||
| */ | ||
| public int minorVersion; | ||
|
|
||
| /** | ||
| * The GL profile to use, {@link Profile#CORE} is only valid when | ||
| * ({@link #majorVersion}.{@link #minorVersion}) is at least 3.0. | ||
| */ | ||
| public Profile profile; | ||
|
Comment on lines
+153
to
+157
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The comment here is technically no longer correct, since Profile.CORE is only valid when |
||
|
|
||
| /** | ||
| * Returns a string containing a concise, human-readable | ||
| * description of the receiver. | ||
|
|
@@ -146,6 +169,7 @@ public String toString() { | |
| "r:" + redSize + " g:" + greenSize + " b:" + blueSize + " a:" + alphaSize + "," + | ||
| "depth:" + depthSize + ",stencil:" + stencilSize + | ||
| ",accum r:" + accumRedSize + "g:" + accumGreenSize + "b:" + accumBlueSize + "a:" + accumAlphaSize + | ||
| ",sampleBuffers:" + sampleBuffers + ",samples:" + samples; | ||
| ",sampleBuffers:" + sampleBuffers + ",samples:" + samples + | ||
| ",majorVersion:" + majorVersion + ",minorVersion:" + minorVersion + ",profile:" + profile; | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm. Would there be a down side to making legacy the default even in circumstances where nothing is specified? And requiring an explicit
Profile.COREin addition to the version numbers? IOW,(Then you wouldn't technically even need
Profile.LEGACY, except to have a value other thanProfile.COREthat can be stuck indata.profile. But just not setting it would get you the same thing, so it doesn't have to be explicit.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But overall it looks workable to me as-is, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it might be good that it works exactly like before if you don't specify anything.