My wish list for OpenGL next versions

For the preprocessor.
Allow the version to be a string.
Because now, it’s already 1.5.0.
In the future,
it could be too little space to have something like e.g. 1.11.0.
Would be handy to have something like e.g.:
VERSION_STRING

Further: wherever there are versions, using a string datatype.
Defining some general API with some methods to check < > = for the whole string or substring. Generalization, standardization for versions related stuff across all opengl.
(Maybe also other e.g. OpenVG, OpenMAX, OpenKODE, OpenCL,…

Direct State Access present and in core:

http://www.slideshare.net/Mark_Kilgard/opengl-32-and-more
It’s discussed on slide 59 to 68.

Is this usable everywhere?

What do you mean by “everywhere?” It can only be used while OpenGL is active, and outside of glBegin/glEnd (I think). Other than that, yes.

For the preprocessor.
Allow the version to be a string.
Because now, it’s already 1.5.0.

Are you talking about the GLSL preprocessor? If so, what does it matter whether it’s a string or a number?

@Alfonse:

That’s what I mean by everywhere, thanks.

About the preprocessor, the version attribute.
It’s said it not very good.
What I mean is that it is rather inconvenient to check for the minor version. (A string with three sub strings would be handier to work with in those situations.)

For flexibility, it would be handier and safer to being able to manipulate it as a string consisting of sub strings.
Nothing wrong with using an array of integers internally since an unsigned 16bit integer has a range of 0 to +65,535.

Why safer? It doesn’t matter until the version number would hit something e.g. 1.10! Internally converting to integer and recoding to display again could represent if programmer doesn’t code right, bugs: 2.0)
It opens a few pitfalls (things that could get easy overlooked) to make it robust.

What I mean is that it is rather inconvenient to check for the minor version. (A string with three sub strings would be handier to work with in those situations.)

GLSL is a shading language. As such, it neither has nor needs strings or string manipulation functions.

I don’t know how exactly it is difficult to use the floating-point version number. Wouldn’t a “>= 1.3” test be sufficient for your needs?

However if it is, then the proper solution is to have a separate major and minor version numbers.

I’m not sure I’m parsing Gedolo’s post correctly, but it would make sense to add two new GetProgam parameters that return the major and minor versions, respectively (as integers).

The issue with string parsing is that it exposes you to localization and string comparison issues (where the dot might not mean what you think it does and the sorting order might not be what you expect, i.e. “1.100” < “1.50” or “1.20” != “1,20”…)

Relatively easy to avoid, yes, but still a potential issue that you have to test and verify. Better get the API right from the beginning and return plain ints.

@Stephen:

You’re correct, I didn’t thought of that as a reason.
(Main focus was flexibility.)
Speaking about it, ogl would be better if all version parameters consist of a few int:
ui - uint (32 bits)
For being complete, the version should have 3 ints.
Because the version is in the form: x.y.z
Writing code to compare values is easy with this system.

Thus change of request:
change all version strings into array of ints, with a defined naming and comparing behaviour.

Something e.g. (This is for illustration purposes)
3 int:
Major = first int
Minor = second int
third = third int

Methods:
(API: Minor and major is a good idea, wait a minute, why not use numbers that also indicate the importance and leaving the 0 for the build, if there is no build then don’t use zero:
1 comes first thus:

getVersion: returns all, everything
get1Version: returns the major version number
get2Version: returns minor version number
get3Version

Notice how naming the numbers this way is very intuitive, efficient and clear.
Determining which number is larger is just a matter of comparing the 1st if they match the second and so on…
And the first numbers always have a higher importance
(Major > Minor) then the numbers after them in sorting:
example: 3.1 > 1.4, tada no string issues.
Because it’s comparing two sets of two ints that are ordered by precedence. One has the highest precedence, the larger the number the lower the precedence.

Not to mention flexible, scalable:
//When version number of something is something weird with:
x.y.z.w.v.
then the following becomes:
for w: get4Version
for v: get5Version

For completeness:
Build version is an int
method:
get0Version: returns the build version

Please do allow modular use of these methods:
glversion.get1Version
shadingLanguageVersion.get1Version

End of e.g.

About the ogl --> svg
The geometry shader looks a very convenient starting point for this. Maybe this is (??going to be??) possible to do with ogl, ocl (and openvg)?

Another feature request:
OpenGL: IGP’s, Discrete cards and other graphic card control stuff.
(I’m serious starting to consider a thread in OpenCL)
(Just one more.)

Something that is coming up fairly recent.
Graphic card switching while running.
Switching between a discrete and integrated graphic processor while running.
It would be useful if the developer who is e.g. making a game to ask for maximum performance without IGP fall-back if he WANTS to. Because when you’re in a game where the load is considered on the edge between going Discrete or Integrated. The computer could be switching a lot. Thus it would be handy to limit such scenarios OS-side/application-side.

It would also be handy for debugging and profiling purposes to be able to control what cards are being used. If the IGP instead of or with the Discrete graphic card is being used. If the developer doesn’t want/does want multiple graphic cards to stay on. (profiling and testing purposes, write once deploy anywhere)

Having some GPU-minimal mode where it’s still possible to pipe things too the connectors of the discrete card. And some slightly less minimal mode for asking the GPU-minimal and being able to use VRAM for e.g. an IGP. This would be especially useful when the IGP has very little VRAM, but the processing power in the discrete card isn’t needed. (The power savings are a good thing too.) The IGP can still access all resources very fast and even pipe the output back to the discrete cards connector. (Handy for applications to decide what screen they want to be on.) This is more something for drivers. But applications can also benefit from load balancing Thus the reasoning for having an API in OpenCL/OpenGL?/OpenWF?(the port, output connector thinghie)

This could be handy for e.g. profiling, load balancing of applications with settings.
Such an API would give a standard interface for Applications or/and OperatingSystem to communicate about use of/load balancing/profiling/power savings in graphic cards.
(e.g. being able to seperately let the application use the present graphic processors resources: memory, ports, gpu. )

e.g.
More granularity for instancing please.