OpenGL Online Documentation

BlitzMax Forums/BlitzMax Beginners Area/OpenGL Online Documentation

Rozek(Posted 2007) [#1]
Hello!

I don't know how useful this is, but as the OpenGL module lacks some documentation, I've just compiled a list with links to an online description for every OpenGL command in the BlitzMax module.

If desired, I could easily provide a similar list for the BlitzMax module itself - it would be a starting point, at least.

glAccum (op:int, value:float)
glAlphaFunc (func:int, ref:float)
glAreTexturesResident:byte (n:int, textures:int ptr, residences:byte ptr)
glArrayElement (i:int)
glBegin (mode:int)
glBindTexture (target:int, texture:int)
glBitmap (width:int, height:int, xorig:float, yorig:float, xmove:float, ymove:float, bitmap:byte ptr)
glBlendFunc (sfactor:int, dfactor:int)
glCallList (list:int)
glCallLists (n:int, type:int, lists:byte ptr)
glClear (mask:int)
glClearAccum (red:float, green:float, blue:float, alpha:float)
glClearColor (red:float, green:float, blue:float, alpha:float)
glClearDepth (depth:double)
glClearIndex (c:float)
glClearStencil (s:int)
glClipPlane (plane:int, equation:double ptr)
glColor3b (red:byte, green:byte, blue:byte)
glColor3bv (v:byte ptr)
glColor3d (red:double, green:double, blue:double)
glColor3dv (v:double ptr)
glColor3f (red:float, green:float, blue:float)
glColor3fv (v:float ptr)
glColor3i (red:int, green:int, blue:int)
glColor3iv (v:int ptr)
glColor3s (red:short, green:short, blue:short)
glColor3sv (v:short ptr)
glColor3ub (red:byte, green:byte, blue:byte)
glColor3ubv (v:byte ptr)
glColor3ui (red:int, green:int, blue:int)
glColor3uiv (v:int ptr)
glColor3us (red:short, green:short, blue:short)
glColor3usv (v:short ptr)
glColor4b (red:byte, green:byte, blue:byte, alpha:byte)
glColor4bv (v:byte ptr)
glColor4d (red:double, green:double, blue:double, alpha:double)
glColor4dv (v:double ptr)
glColor4f (red:float, green:float, blue:float, alpha:float)
glColor4fv (v:float ptr)
glColor4i (red:int, green:int, blue:int, alpha:int)
glColor4iv (v:int ptr)
glColor4s (red:short, green:short, blue:short, alpha:short)
glColor4sv (v:short ptr)
glColor4ub (red:byte, green:byte, blue:byte, alpha:byte)
glColor4ubv (v:byte ptr)
glColor4ui (red:int, green:int, blue:int, alpha:int)
glColor4uiv (v:int ptr)
glColor4us (red:short, green:short, blue:short, alpha:short)
glColor4usv (v:short ptr)
glColorMask (red:byte, green:byte, blue:byte, alpha:byte)
glColorMaterial (face:int, mode:int)
glColorPointer (size:int, type:int, stride:int, pointer:byte ptr)
glCopyPixels (x:int, y:int, width:int, height:int, type:int)
glCopyTexImage1D (target:int, level:int, internalFormat:int, x:int, y:int, width:int, border:int)
glCopyTexImage2D (target:int, level:int, internalFormat:int, x:int, y:int, width:int, height:int, border:int)
glCopyTexSubImage1D (target:int, level:int, xoffset:int, x:int, y:int, width:int)
glCopyTexSubImage2D (target:int, level:int, xoffset:int, yoffset:int, x:int, y:int, width:int, height:int)
glCullFace (mode:int)
glDeleteLists (list:int, range:int)
glDeleteTextures (n:int, textures:int ptr)
glDepthFunc (func:int)
glDepthMask (flag:byte)
glDepthRange (zNear:double, zFar:double)
glDrawArrays (mode:int, first:int, count:int)
glDrawBuffer (mode:int)
glDrawElements (mode:int, count:int, type:int, indices:byte ptr)
glDrawPixels (width:int, height:int, format:int, type:int, pixels:byte ptr)
glEdgeFlag (flag:byte)
glEdgeFlagPointer (stride:int, pointer:byte ptr)
glEdgeFlagv (flag:byte ptr)
glEnable (cap:int)
glEnableClientState (array:int)
glEvalCoord1d (u:double)
glEvalCoord1dv (u:double ptr)
glEvalCoord1f (u:float)
glEvalCoord1fv (u:float ptr)
glEvalCoord2d (u:double, v:double)
glEvalCoord2dv (u:double ptr)
glEvalCoord2f (u:float, v:float)
glEvalCoord2fv (u:float ptr)
glEvalMesh1 (mode:int, i1:int, i2:int)
glEvalMesh2 (mode:int, i1:int, i2:int, j1:int, j2:int)
glEvalPoint1 (i:int)
glEvalPoint2 (i:int, j:int)
glFeedbackBuffer (size:int, type:int, buffer:float ptr)
glFinish ()
glFlush ()
glFogf (pname:int, param:float)
glFogfv (pname:int, params:float ptr)
glFogi (pname:int, param:int)
glFogiv (pname:int, params:int ptr)
glFrontFace (mode:int)
glFrustum (left:double, right:double, bottom:double, top:double, zNear:double, zFar:double)
glGenLists:int (range:int)
glGenTextures (n:int, textures:int ptr)
glGetBooleanv (pname:int, params:byte ptr)
glGetClipPlane (plane:int, equation:double ptr)
glGetDoublev (pname:int, params:double ptr)
glGetError:int ()
glGetFloatv (pname:int, params:float ptr)
glGetIntegerv (pname:int, params:int ptr)
glGetLightfv (light:int, pname:int, params:float ptr)
glGetLightiv (light:int, pname:int, params:int ptr)
glGetMapdv (target:int, query:int, v:double ptr)
glGetMapfv (target:int, query:int, v:float ptr)
glGetMapiv (target:int, query:int, v:int ptr)
glGetMaterialfv (face:int, pname:int, params:float ptr)
glGetMaterialiv (face:int, pname:int, params:int ptr)
glGetPixelMapfv (map:int, values:float ptr)
glGetPixelMapuiv (map:int, values:int ptr)
glGetPixelMapusv (map:int, values:short ptr)
glGetPointerv (pname:int, params:byte ptr ptr)
glGetPolygonStipple (mask:byte ptr)
glGetString:byte ptr (name:int)
glGetTexEnvfv (target:int, pname:int, params:float ptr)
glGetTexEnviv (target:int, pname:int, params:int ptr)
glGetTexGendv (coord:int, pname:int, params:double ptr)
glGetTexGenfv (coord:int, pname:int, params:float ptr)
glGetTexGeniv (coord:int, pname:int, params:int ptr)
glGetTexImage (target:int, level:int, format:int, type:int, pixels:byte ptr)
glGetTexLevelParameterfv (target:int, level:int, pname:int, params:float ptr)
glGetTexLevelParameteriv (target:int, level:int, pname:int, params:int ptr)
glGetTexParameterfv (target:int, pname:int, params:float ptr)
glGetTexParameteriv (target:int, pname:int, params:int ptr)
glHint (target:int, mode:int)
glIndexMask (mask:int)
glIndexPointer (type:int, stride:int, pointer:byte ptr)
glIndexd (c:double)
glIndexdv (c:double ptr)
glIndexf (c:float)
glIndexfv (c:float ptr)
glIndexi (c:int)
glIndexiv (c:int ptr)
glIndexs (c:short)
glIndexsv (c:short ptr)
glIndexub (c:byte)
glIndexubv (c:byte ptr)
glInitNames ()
glInterleavedArrays (format:int, stride:int, pointer:byte ptr)
glIsEnabled:byte (cap:int)
glIsList:byte (list:int)
glIsTexture:byte (texture:int)
glLightModelf (pname:int, param:float)
glLightModelfv (pname:int, params:float ptr)
glLightModeli (pname:int, param:int)
glLightModeliv (pname:int, params:int ptr)
glLightf (light:int, pname:int, param:float)
glLightfv (light:int, pname:int, params:float ptr)
glLighti (light:int, pname:int, param:int)
glLightiv (light:int, pname:int, params:int ptr)
glLineStipple (factor:int, pattern:short)
glLineWidth (width:float)
glListBase (base:int)
glLoadIdentity ()
glLoadMatrixd (m:double ptr)
glLoadMatrixf (m:float ptr)
glLoadName (name:int)
glLogicOp (opcode:int)
glMap1d (target:int, u1:double, u2:double, stride:int, order:int, points:double ptr)
glMap1f (target:int, u1:float, u2:float, stride:int, order:int, points:float ptr)
glMap2d (target:int, u1:double, u2:double, ustride:int, uorder:int, v1:double, v2:double, vstride:int, vorder:int, points:double ptr)
glMap2f (target:int, u1:float, u2:float, ustride:int, uorder:int, v1:float, v2:float, vstride:int, vorder:int, points:float ptr)
glMapGrid1d (un:int, u1:double, u2:double)
glMapGrid1f (un:int, u1:float, u2:float)
glMapGrid2d (un:int, u1:double, u2:double, vn:int, v1:double, v2:double)
glMapGrid2f (un:int, u1:float, u2:float, vn:int, v1:float, v2:float)
glMaterialf (face:int, pname:int, param:float)
glMaterialfv (face:int, pname:int, params:float ptr)
glMateriali (face:int, pname:int, param:int)
glMaterialiv (face:int, pname:int, params:int ptr)
glMatrixMode (mode:int)
glMultMatrixd (m:double ptr)
glMultMatrixf (m:float ptr)
glNewList (list:int, mode:int)
glNormal3b (nx:byte, ny:byte, nz:byte)
glNormal3bv (v:byte ptr)
glNormal3d (nx:double, ny:double, nz:double)
glNormal3dv (v:double ptr)
glNormal3f (nx:float, ny:float, nz:float)
glNormal3fv (v:float ptr)
glNormal3i (nx:int, ny:int, nz:int)
glNormal3iv (v:int ptr)
glNormal3s (nx:short, ny:short, nz:short)
glNormal3sv (v:short ptr)
glNormalPointer (type:int, stride:int, pointer:byte ptr)
glOrtho (left:double, right:double, bottom:double, top:double, zNear:double, zFar:double)
glPassThrough (token:float)
glPixelMapfv (map:int, mapsize:int, values:float ptr)
glPixelMapuiv (map:int, mapsize:int, values:int ptr)
glPixelMapusv (map:int, mapsize:int, values:short ptr)
glPixelStoref (pname:int, param:float)
glPixelStorei (pname:int, param:int)
glPixelTransferf (pname:int, param:float)
glPixelTransferi (pname:int, param:int)
glPixelZoom (xfactor:float, yfactor:float)
glPointSize (size:float)
glPolygonMode (face:int, mode:int)
glPolygonOffset (factor:float, units:float)
glPolygonStipple (mask:byte ptr)
glPrioritizeTextures (n:int, textures:int ptr, priorities:float ptr)
glPushAttrib (mask:int)
glPushClientAttrib (mask:int)
glPushMatrix ()
glPushName (name:int)
glRasterPos2d (x:double, y:double)
glRasterPos2dv (v:double ptr)
glRasterPos2f (x:float, y:float)
glRasterPos2fv (v:float ptr)
glRasterPos2i (x:int, y:int)
glRasterPos2iv (v:int ptr)
glRasterPos2s (x:short, y:short)
glRasterPos2sv (v:short ptr)
glRasterPos3d (x:double, y:double, z:double)
glRasterPos3dv (v:double ptr)
glRasterPos3f (x:float, y:float, z:float)
glRasterPos3fv (v:float ptr)
glRasterPos3i (x:int, y:int, z:int)
glRasterPos3iv (v:int ptr)
glRasterPos3s (x:short, y:short, z:short)
glRasterPos3sv (v:short ptr)
glRasterPos4d (x:double, y:double, z:double, w:double)
glRasterPos4dv (v:double ptr)
glRasterPos4f (x:float, y:float, z:float, w:float)
glRasterPos4fv (v:float ptr)
glRasterPos4i (x:int, y:int, z:int, w:int)
glRasterPos4iv (v:int ptr)
glRasterPos4s (x:short, y:short, z:short, w:short)
glRasterPos4sv (v:short ptr)
glReadBuffer (mode:int)
glReadPixels (x:int, y:int, width:int, height:int, format:int, type:int, pixels:byte ptr)
glRectd (x1:double, y1:double, x2:double, y2:double)
glRectdv (v1:double ptr, v2:double ptr)
glRectf (x1:float, y1:float, x2:float, y2:float)
glRectfv (v1:float ptr, v2:float ptr)
glRecti (x1:int, y1:int, x2:int, y2:int)
glRectiv (v1:int ptr, v2:int ptr)
glRects (x1:short, y1:short, x2:short, y2:short)
glRectsv (v1:short ptr, v2:short ptr)
glRenderMode:int (mode:int)
glRotated (angle:double, x:double, y:double, z:double)
glRotatef (angle:float, x:float, y:float, z:float)
glScaled (x:double, y:double, z:double)
glScalef (x:float, y:float, z:float)
glScissor (x:int, y:int, width:int, height:int)
glSelectBuffer (size:int, buffer:int ptr)
glShadeModel (mode:int)
glStencilFunc (func:int, ref:int, mask:int)
glStencilMask (mask:int)
glStencilOp (fail:int, zfail:int, zpass:int)
glTexCoord1d (s:double)
glTexCoord1dv (v:double ptr)
glTexCoord1f (s:float)
glTexCoord1fv (v:float ptr)
glTexCoord1i (s:int)
glTexCoord1iv (v:int ptr)
glTexCoord1s (s:short)
glTexCoord1sv (v:short ptr)
glTexCoord2d (s:double, t:double)
glTexCoord2dv (v:double ptr)
glTexCoord2f (s:float, t:float)
glTexCoord2fv (v:float ptr)
glTexCoord2i (s:int, t:int)
glTexCoord2iv (v:int ptr)
glTexCoord2s (s:short, t:short)
glTexCoord2sv (v:short ptr)
glTexCoord3d (s:double, t:double, r:double)
glTexCoord3dv (v:double ptr)
glTexCoord3f (s:float, t:float, r:float)
glTexCoord3fv (v:float ptr)
glTexCoord3i (s:int, t:int, r:int)
glTexCoord3iv (v:int ptr)
glTexCoord3s (s:short, t:short, r:short)
glTexCoord3sv (v:short ptr)
glTexCoord4d (s:double, t:double, r:double, q:double)
glTexCoord4dv (v:double ptr)
glTexCoord4f (s:float, t:float, r:float, q:float)
glTexCoord4fv (v:float ptr)
glTexCoord4i (s:int, t:int, r:int, q:int)
glTexCoord4iv (v:int ptr)
glTexCoord4s (s:short, t:short, r:short, q:short)
glTexCoord4sv (v:short ptr)
glTexCoordPointer (size:int, type:int, stride:int, pointer:byte ptr)
glTexEnvf (target:int, pname:int, param:float)
glTexEnvfv (target:int, pname:int, params:float ptr)
glTexEnvi (target:int, pname:int, param:int)
glTexEnviv (target:int, pname:int, params:int ptr)
glTexGend (coord:int, pname:int, param:double)
glTexGendv (coord:int, pname:int, params:double ptr)
glTexGenf (coord:int, pname:int, param:float)
glTexGenfv (coord:int, pname:int, params:float ptr)
glTexGeni (coord:int, pname:int, param:int)
glTexGeniv (coord:int, pname:int, params:int ptr)
glTexImage1D (target:int, level:int, internalformat:int, width:int, border:int, format:int, type:int, pixels:byte ptr)
glTexImage2D (target:int, level:int, internalformat:int, width:int, height:int, border:int, format:int, type:int, pixels:byte ptr)
glTexParameterf (target:int, pname:int, param:float)
glTexParameterfv (target:int, pname:int, params:float ptr)
glTexParameteri (target:int, pname:int, param:int)
glTexParameteriv (target:int, pname:int, params:int ptr)
glTexSubImage1D (target:int, level:int, xoffset:int, width:int, format:int, type:int, pixels:byte ptr)
glTexSubImage2D (target:int, level:int, xoffset:int, yoffset:int, width:int, height:int, format:int, type:int, pixels:byte ptr)
glTranslated (x:double, y:double, z:double)
glTranslatef (x:float, y:float, z:float)
glVertexPointer (size:int, type:int, stride:int, pointer:byte ptr)
glViewport (x:int, y:int, width:int, height:int)


mongia2(Posted 2007) [#2]
thanks


Rozek(Posted 2007) [#3]
Well,

I now also have a modified opengl.bmx source with references to the abovementioned online documentation:

http://www.Andreas-Rozek.de/BlitzMax/opengl.bmx

Just replace your original opengl.bmx file with the modified version and choose "Program -> Document Modules..." from within your IDE. Afterwards, you will be able to access the online reference directly from within the IDE.

But be warned: you'll need an internet connection to access the external HTML files and they will open in a separate HTML browser!

I do not know BRL's opinion about this kind of documentation - they may not like it at all (which I would understand) If you still find it useful, feel free to add the OpenGL documentation yourself as described.


LAB[au](Posted 2007) [#4]
see this thread,maybe you can join efforts ...

http://www.blitzbasic.com/Community/posts.php?topic=68215


Rozek(Posted 2007) [#5]
Thanks for the hint...

...do you want me to add "bbdoc"s for the "const"s as well?

I could easily do that - but beware: there are hundreds of them and I don't know if the result would still be useful (I really don't know - if anybody of you out there already uses Paul's (AngelDaniel's) version (the one with bbdoc'ed constants) and likes it, please tell me - I've my version only in the moment)


computercoder(Posted 2007) [#6]
bbdoc is the Max standard way of doing the documentation, but I'm thinking if your way works well, why mess with it? However, you could supply it both ways if the demand is great enough. Honestly, either looks fine for me.


Rozek(Posted 2007) [#7]
Oh,

perhaps, there is some misunderstanding: my modified opengl.bmx already contains "bbdoc" lines for all the functions - which already produces a large documentation file. Adding further "bbdoc" lines for all the (more than 500!) constants would make the file even larger (I do not know what happens to the list of entries in the documentation explorer: if the constants will be shown there, too, I will *definitely not* add "bbdoc"s for them).

The list shown above was just a (very) first attempt to provide some documentation (before I found out how to add docs to the BMX code itself)


computercoder(Posted 2007) [#8]
I gotcha. Its still useful the way it is right now. I installed your bmx version, and its rather intuitive. I get what you're saying with the constants now tho. Wasn't thinking that way earlier :P (too many hours awakle these days, not enough sleep.. 8D )

It would prolly be very useful. Then you could look right here locally without referencing the web should you not have a connection to the internet. Give it a go with say 100 of them, and see what it looks like. Either way, I'd enjoy the luxury.


ImaginaryHuman(Posted 2007) [#9]
I added the consts in my version of the module, with bbdoc, so that they are hilited in the IDE even if they have no description in the documentation. It's hard enough to remember exactly how those are written, but it helps to stumble upon the right syntax when it gets hilited.

What I really wanted to do, however, is have the full OpenGL documentation (from blue book) as a single bbdoc file. ie instead of linking to a website page for each command, include that website page in the bbdoc instructions so that docmods makes it all into a single file. Alternatively maybe just generate a single html file including all functions and constants and overwrite the documentation file with it and not use bbdoc for the documentation. I would like to be able to press F1 twice and be taken straight to the documentation page for that command and have it show the full details about it, all the syntax, possibilities, descriptions, allowed parameters, suggested uses, error codes, etc.


ImaginaryHuman(Posted 2007) [#10]
I incorporated these html links into my opengl file, keeping the constants as bbdoc items. Cool, thanks for the efforts.

Here is the OpenGL GLU commands bbdoc'd (no html or descriptions, just syntax hiliting and parameters):




Rozek(Posted 2007) [#11]
Good morning!

Sure, having all the docs on the local disk is definitely the preferrable way - I did not do that yet because of copyright issues (and because I'm definitely unable to document all these functions myself)

Thus, unless anybody is able and willing to write the docs him/herself, the primary question will now be: will we be allowed to copy the HTML files into the BMX OpenGL module? I don't worry about a single HTML file - just the opposite: it might be easier to get a permission, if we leave the structure of the original OpenGL command reference intact.

Will anybody ask for the permission? Otherwise, I'll do - but we should avoid that multiple people bother the copyright holders with the same request...


Rozek(Posted 2007) [#12]
P.S.

It would be preferrable, if anybody from BRL (Mark, Simon, etc.) could ask for the permission to copy the original OpenGL documentation, rather than an "unofficial" individual.

Given the permission, I would then volunteer to incorporate the files into the OpenGL module.


LAB[au](Posted 2007) [#13]
"You are allowed to freely copy, alter and distribute these documents provided the copyright notice appears in every copy and you mark all changes in the documents clearly as such."

Taken from General license of OpenGL docs (online html version).


Rozek(Posted 2007) [#14]
Really?

Seems, as if I have to look at them once again...

Ok, give me an hour or two and youll get your documentation!


Rozek(Posted 2007) [#15]
Hmmm,

I can't find that copyright notice on the "Talisman" pages.

Keep in mind: BlitzMax implements OpenGL 1.1, thus, the documentation should reflect this state. The "Talisman" pages describe OpenGL 1.1, the official OpenGL pages describe OpenGL 2.1


ImaginaryHuman(Posted 2007) [#16]
The official docs come in several versions from 1.1 through 2.1


Rozek(Posted 2007) [#17]
Hmm,

do you have a pointer to the official docs in version 1.1?

I did not find them...(sorry)


Rozek(Posted 2007) [#18]
Well,

my next "time slot" will be on Tuesday, April 24th. Provided that I get a pointer to an OpenGL 1.1 reference in HTML format together with the permission to download and copy it by then, I'll update the opengl module with links to that reference (which is then held locally, of course)...unless somebody else did it before...


LAB[au](Posted 2007) [#19]
I thought that the license for the docs is "SGI Free Software License B" which grants the rights to duplicate/distribute the docs as long as a mention to the copyrights holder and to the license type is done... for version 1.1, I don't know.


Russell(Posted 2007) [#20]
I found the OpenGL red and blue books at www.glprogramming.com and then used the free httrack to download the entire websites related to those books to my PC and placed links to those downloaded files in my BMX folder. I haven't really looked at the licensing/copyrighting for the books, but since OpenGL is 'open' it may be permissable to include those files in the BMax docs officially.

Pointer to red and blue books is here:
red (Programming Guide): http://www.glprogramming.com/red/
(HTTRack found a few misspelled link errors in the html code, but I fixed them and placed them here: www.geocities.com/amiga6k/OGLUser.zip - All the links are relative, so you can place it anywhere you want)

blue (Reference Manual): http://www.glprogramming.com/blue/
(no link errors found)

HTTrack (free, open source and extremely useful) can be found here: http://www.httrack.com/


Russell