LWJGL and coredumps

Some constructive criticism: I was using glTexImage2D(), and I forgot to rewind() the buffer that I was passing in. This caused a coredump in my video driver.

I know you guys want to be a very minimalistic binding to OpenGL, but I think that validating arguments that would otherwise cause coredumps would gain you much love for very little effort. I spent about 4 hours trying to track the problem down. Definitely irritating to say the least.

On a somewhat unrelated note, I find the lack of even the most basic LWJGL documentation highly frustrating. I look in the JavaDocs, on the LWJGL wiki, on the forums, even Google, and it’s still a pain in the ass to figure out how certain things work. I’ll soon be reverting to reading the source code. sigh

God bless,
-Toby Reyelts

It’s a little unfair to say that we are too minimalistic to check arguments. We do check arguments (check the source) but for some gl calls (like glTexImage2D) it would require extensive “parsing” of arguments to do accurate bounds checking, so those calls are not perfectly safe yet.

As to documentation, yes, you’re absolutely right.

  • elias

Care to, errr, help with the Javadoc :P? No-one wants to do it…

Cas :slight_smile:

Hum I could make the javadoc part of the GL1* classes… I think I would just copy the official GL doc for each method and change some typo to convert it to java…

Don’t kown what you would like to see in the doc… Any ideas ?

Chman

javadoc for the methods would be awesome - but quite a bit of work!!!
The only issue with that, is the license of the opengl manual text. I would think that it is free to use, since it’s part of the spec - and for all intents and purposes, I don’t think anyone will be unhappy about doing so.

Javadoc for the non-GL parts would be useful - currently most of it just states the method name and arguments. No explanation of anything.

Wasn’t Javadoc invented to make documenting code easier? So why don’t you use it ? :-[ >:( :-/ :stuck_out_tongue: ::slight_smile: ???

If all your going to do is use the reference text why not just write a tool that processes methods and adds URL references to the online OpenGL spec?

I think it would be way more useful to know what validation of parameters is and isn’t down on each method tho.

Kev

[quote] Wasn’t Javadoc invented to make documenting code easier? So why don’t you use it ?
[/quote]
Indeed, but you still have to actually type it all in. And curiously we’ve spend time actually implementing stuff istead of documenting it. And by all arguments, we strive for an API that doesn’t need documentation :wink: (not completely there though)

Well, that’s commendable, but having reams of empty Javadoc does not look professional, and I’m afraid if you want LWJGL to be taken more seriously then you will have to bite the bullet and document the whole shebang.

IYO, IMO it would be mighty unprofessional to waste time I’m stuff thats already document elsewhere.

Kev

As long as I am getting payed as I am (read: 0$) I have no intentions on doing boooring gloomy stuff. That said, you’re more than welcome to supply a patch :wink:

As for the LWJGL specific methods, it will probably be done by 1.0

Yeah, what he said. There’s also the rather tricky problem that the documentation is “changed” by the available extensions…

Cas :slight_smile:

[quote]IYO, IMO it would be mighty unprofessional to waste time I’m stuff thats already document elsewhere.

Kev
[/quote]
I don’t mean the OpenGL stuff, obviously there’s loads of doc for that, I mean all the other stuff that isn’t documented anywhere else.

Anyway, I shouldn’t moan about a pre-1.0 release! ;D

BTW, I really don’t mind writing docs, I quite enjoy it. So I might write some if I get time…