Inertia's picture

Wishlist

For the mentioned upcoming release, here are minor issues I came around. Nothing serious, and too small issues to create a new topic for them alone.

1) The enum GetTextureParameter doesn't contain GL_TEXTURE_COMPRESSED.

2) Glu.ErrorString expects different type as parameter, than what is returned by GL.GetError(); Unnecessary cast? Don't see any other use for these commands.

3) KeyboardDevice.cs
public bool KeyRepeat
Documentation unclear about "on", true/false might be better.

4) GL.Color could use a Vector overload, colors can be nicely stored in Vector3/4. The function was also behaving a bit weird always expecting (int) for fixed-point types. E.g. (byte)255 for RGB would result in black as it got cast to int32. Anything but byte/float is not really useful?

5) GL.Material could aswell use a Vector4 overload. I understand why this is difficult for all functions where modes can expect different types for their own parameters, but I think this is a special case where this would make sense. How about adding GL.Materialv4, which can be used for convenience with a Vector4 for specifying colors (ambient/diffuse/specular/emissive), where shininess can still be set through default GL.Material().
This is just something to consider, the current implementation is fine.

Ironically 3) was the point where I decided that it'd be quicker to implement that "keystroke manager" in a few minutes than going through documentation. All I wanted was Glut-like handling for a handful of toggles and getting other functions further, no offense/critique against your design - just a subjective decision for that small project.


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Inertia's picture

6) PixelInternalFormat enum is missing GL_DEPTH_COMPONENT, PixelFormat.DepthComponent exists already.

7) I'm also having troubles porting this to OpenTK, but I have the feeling i'm looking in the wrong enum? There are SGI extensions with similar names in TextureParameterName, but I think that's not it.

glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC_ARB, GL_LEQUAL );
glTexParameteri( GL_TEXTURE_2D, GL_DEPTH_TEXTURE_MODE_ARB, GL_INTENSITY );

Edit: Is there any way the forum could directly show you the last page of a forum topic spanning multiple pages? Call me lazy, but I think it's stupid always getting the 1st page, have to scroll all the way down and then select the page you actually want.

the Fiddler.'s picture

6) Will fix.

Off topic, but this is not an officially sanctioned enum. It seems the ARB implemented it, then left it out of the specs with a comment in the spirit of: "Maybe we should use this?" I'll never understand the logic behind the current specs...

7) Just checked and the SGI ones are different. The ARB ones were promoted to core in 1.4 (they exist in "Version14") - the SGI ones shouldn't even be there, just one of the many inconsistencies in the specs. Provided they don't break anything else I'll add these to TextureParameterName, for convenience's sake.

[forum]
I'm hoping to add this functionality in the new site (currently under construction at http://opentk.ath.cx -- obligatory here be dragons, not ready yet, angry hamsters etc etc warnings)

Inertia's picture

6) I guess the specs travel alot per mail, and frequent meetings like those for GL3 are more an exception?

7) Thanks, those are from the extensions ARB_shadow and ARB_depth_texture.

[forum]
rofl good ToDo-list :) Looks promising, what happened to the links collection though?

the Fiddler.'s picture

6) Guess so.

[links collection]
It's still there, somewhere. Maybe it would be better suited to the manual, where it can be edited and updated by anyone.

Inertia's picture

6) Guess that's an inevitable problem with open specs developed by multiple entities, compared to a private spec like DirectX.

[GL3]
I'm really curious what extensions make it into GL3 though, my prayers are for instancing (or enlightenment to understand the greatness of GL.MultiDraw*) and geometry shaders ;)

[links]
The way I understood it, you want to develop OpenTK primarily for use in games? The Presentation (graphics and sound) programming is ~10% of a full game, thus links to Gamasutra&Co are kinda inevitable. I'm not sure how far you wish to promote OpenTK, but with growing number of projects developed with it, you will want an easy-to-find list with links to hosted/external sites. Just take a look at the DelphiGL.Community website, they have been around for ~5 years now providing Delphi bindings to OpenGL. I believe the links are placed there so easy to spot, because it's just not possible to cover all topics OpenGL and in a single website.

the Fiddler.'s picture

[links]
Agreed. I'm still looking were to put them (they currently reside in the main menu).

Inertia's picture

Maybe replace the "who's online" bit, that function is always outdated and not really useful. Some Survey/Poll might be interesting though, like you asked people to vote on priorities for 3.14.

Regarding GL3, you will use the bindings Generator again if .spec files become available? How about extensions like the SM4.0 GPUs? There's several nice features like fp depth buffers and CSAA that looked really interesting in the Slides.

P.S. The only design flaw in the current header is that the OpenTK logo is below the "horizon". Besides that it's decent.

the Fiddler.'s picture

[who's online]
This block was slowing down browsing on Sourceforge, so I've set it to update only once every ten minutes (on another server, a timeout of 1-3 minutes would be more reasonable). I'll make it toggleable in any case, so you can always hide it if you don't like it :)

[poll/survey]
These weren't possible on Sourceforge (memory limits), but I'll be adding them on the new site.

[logo]
II'm not sure what you mean by "horizon"?

[GL3 specs]
I've asked this question on the OpenGL board and was told that some kind of specs will be available. OpenTK/Tao use the latest available spec files (February 2007 IIRC), which should already contain SM4 functions.

Even if the specs files aren't published (and I can't think why they'd do that), the generator can still parse the C headers and generate the specs from that (the very first version did just that, actually). Unfortunately we wouldn't be able to generate enums information in that case, which is annoying. Hopefully they'll just publish an XML file & it's schema, and make our lives easier.

Inertia's picture

[who's online]
If it does show who is online it will be more useful, it was simply the least important thing that could be removed to make room. Just trying constructive critique here ;)

[logo]
Well the current logo shows 2 blue gradients, the color choice lets you assume this is supposed to be water and the sky above. What i meant was that the logo is placed in the water, and thus below the horizon. If it was placed in the sky above the horizon, the header would suggest something different than it does now.
Currently the header implies that "OpenTK" is below/under the ground, while with "OpenTK" written above the horizon it would imply being ontop/floating/above.
I really hope this somehow makes sense, never been good at verbally interpreting art. :P

[GL3 specs]
Thanks for clarifying that. What I don't understand though, how are extensions like glDrawElementsInstancedEXT() handled? Does this fall into the category user-contributions or will all extensions without ARB approval not be included? I really hope GL3 delays so much because of useful extensions like instancing being added, but in case they don't it'd be good to know what your politics on extensions are?

the Fiddler.'s picture

[logo]
Ah, I think I see what you mean now, thanks. I'm not an artist (the logo was created by someone much better in design than I ever was), but I'll try a few more variations to see what fits.

[GL3 specs]
Extensions are added to the spec registry regularly. AFAIK, IHV's keep their own headers with experimental extensions (which are included in ATI's or Nvidia's SDK's) and propose some of these to the Khronos group for inclusion. If two or more vendors agree on a common spec, this is added in the EXT namespace, otherwise it stays vendor-specific (NV, ATI, MESA, etc). Once an an EXT function is approved by Khronos (former Architecture Review Board) it is moved in the ARB namespace and there is a good chance that it will become core in the next GL revision.

All OpenGL functions are defined in the gl.spec file (the latest version is included with the OpenTK source, under Source/Bind/Specifications/GL). Khronos uses a custom program to scan this and produce the official gl.h and glext.h headers (an old version of this program is available in the public SGI repository, I think). Tao/OpenTK do the same so we just need an up-to-date gl.spec file; the same will probably hold true for GL3.