Live data from Hacker News

OpenGL API Documentation

docs.gl

21–30 of 44 posts

Re: OpenGL API Documentation

#21

As a complete newcomer to OpenGL, my first thought was "where's the WebGL column?" Now, that makes probably no sense; can someone clarify what these versions mean (apart from API availability described by this table, obviously), and if there's a relationship to the WebGL subset (it is a subset, right?).

WebGL has some differences from OpenGL ES, but the functions mostly have the same functionality. For example, instead of passing a pointer to glTexImage2D(), you can pass a typed array or an image element from the HTML DOM. Objects such as textures are also passed to the API as opaque objects rather than integer indexes.

Re: OpenGL API Documentation

#23

Earlier quoted context omitted.

I find term "function" rather confusing and improper for programming language construct, because we use the same term in natural languages that is not necessarily 1:1 mapping. Consider commit message: "Implemented function `sort()` implementing sort(ing) function(ality)".

If we want to get really picky, they are procedures. I think we should start to transition to using the word function only in the connotation provided in functional programming languages, where functions are first class citizens and can be treated as values. Also, should probably prefer to imply a lack of side effects from the word function. Method is clearly a certain function or procedure that is scoped to a class.…

So, the distinction that I've learnt is that functions return values and procedures are run for their side effects.

So, strlen, for example, is a function, and printf is a procedure.

(Yes I know prints returns an int, but it's run for it's side effects primarily.)

Re: OpenGL API Documentation

#24
Here is a little JS snippet you can adapt to filter the list down to remove the procedures not supported by a particular profile you want to view.

    Array.prototype.filter.call(document.querySelectorAll(".disabled"), function(v){return v.innerHTML === "es2";}).forEach(function(v){v.parentElement.parentElement.removeChild(v.parentElement);});
Notice the "es2", that is where you select the profile.

Re: OpenGL API Documentation

#26
post #4

There is something oddly satisfying about just the methods names on the left.

What else would be there? ("Method" as the column name is actually incorrect... they're just bare C functions.)

What else would be there?

It's pretty standard to have the function's type signature and possibly a short description in the function lists of API docs. Here's a random example:

http://ffmpeg.org/doxygen/trunk/group__lavc__fft.html#func-m...

If a function has the same name across different versions of the OpenGL API, does it also have the same type signature? If so, it would be nice to have a version of this with more details.

Re: OpenGL API Documentation

#27
post #9

Also good is https://open.gl/ which has a good modern introduction to OpenGL.

Thank you for this link! I first used gl ages ago when it was a library that came with Irix, and I've been away from it for about 15 years. I was curious about modern OpenGL, but had no idea where to start.

Re: OpenGL API Documentation

#28
I don't know what it is but web devs seem to have a horrible idea on how to present documentation. This fails as a quick reference and as an index. It should show the function signature (unless it's an class?) and should be separated into sections either by alphabet or by some category (I see Images and Samplers as possible sections).

What's strange is that the categories and function signature are hidden from the main view. Weird.

Post reply on HN