discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Kristaps Dzonsons <kristaps@bsd.lv>
To: discuss@mdocml.bsd.lv
Subject: Re: Pathological behavior in glGetString(3)
Date: Wed, 30 Apr 2014 12:16:23 +0200	[thread overview]
Message-ID: <5360CD77.60202@bsd.lv> (raw)
In-Reply-To: <12630.1398845615@cathet.us>

[-- Attachment #1: Type: text/plain, Size: 950 bytes --]

On 30/04/2014 10:13, Anthony J. Bentley wrote:
> Hi,
>
> Maybe this is already known, but I couldn't find it in TODO.
>
> glGetString(3) has some really wonky spacing:

Anthony,

Hm...

The OpenGL manuals are in DocBook.  I've just updated docbook2mdoc to 
catch this particular manual--it needed a few additions--and so that it 
wouldn't crash on the remaining OpenGL ones.  (This doesn't solve the 
man(7) problem, but presents a way to cleanly avoid it.)

Their manuals:

https://www.opengl.org/discussion_boards/showthread.php/165536-Man-pages-source-available-in-Khronos-Subversion

Enclosed is glGetString as mdoc(7).  As you can see, there's still work 
to be done.  Beyond the missing inlineequation that's found in other 
manuals, the element-punctuation case needs to be handled.

That is, "<element>foo</element>, " needs to be properly rendered as 
".XX element ," instead of having a trailing newline.  I'll work on it.

Best,

Kristaps

[-- Attachment #2: glGetString.3g --]
[-- Type: text/plain, Size: 2828 bytes --]

.Dd $Mdocdate$
.Dt GLGETSTRING 3G
.Os
.Sh NAME
.Nm glGetString
.Nd return a string describing the current GL connection
.Sh SYNOPSIS
.Ft const GLubyte*
.Fo glGetString
.Fa "GLenum  name"
.Fc
.Ft const GLubyte*
.Fo glGetStringi
.Fa "GLenum  name"
.Fa "GLuint  index"
.Fc
.Sh PARAMETERS
.Bl -tag -width Ds
.It Fa "name"
Specifies a symbolic constant, one of
.Dv GL_VENDOR
,
.Dv GL_RENDERER
,
.Dv GL_VERSION
, or
.Dv GL_SHADING_LANGUAGE_VERSION
\&.
Additionally,
.Fn glGetStringi
accepts the
.Dv GL_EXTENSIONS
token.
.It Fa "index"
For
.Fn glGetStringi
, specifies the index of the string to return.
.El
.Sh DESCRIPTION
.Pp
.Fn glGetString
returns a pointer to a static string
describing some aspect of the current GL connection.
.Fa "name"
can be one of the following:
.Bl -tag -width Ds
.It Dv GL_VENDOR
Returns the company responsible for this GL implementation.
This name does not change from release to release.
.It Dv GL_RENDERER
Returns the name of the renderer.
This name is typically specific to a particular configuration of a hardware
platform.
It does not change from release to release.
.It Dv GL_VERSION
Returns a version or release number.
.It Dv GL_SHADING_LANGUAGE_VERSION
Returns a version or release number for the shading language.
.El
.Pp
.Fn glGetStringi
returns a pointer to a static string
indexed by
.Fa "index"
\&.
.Fa "name"
can be one of the following:
.Bl -tag -width Ds
.It Dv GL_EXTENSIONS
For
.Fn glGetStringi
only, returns the extension string
supported by the implementation at
.Fa "index"
\&.
.El
.Pp
Strings
.Dv GL_VENDOR
and
.Dv GL_RENDERER
together uniquely specify
a platform. They do not change from release to release and should be used
by platform-recognition algorithms.
.Pp
The
.Dv GL_VERSION
and
.Dv GL_SHADING_LANGUAGE_VERSION
strings begin with a version number.
The version number uses one
of these forms:
.Pp
.Em major_number.minor_number
.Em major_number.minor_number.release_number
.Pp
Vendor-specific information may follow the version
number. Its format depends on the implementation, but
a space always separates the version number and
the vendor-specific information.
.Pp
All strings are null-terminated.
.Sh NOTES
.Pp
If an error is generated,
.Fn glGetString
returns 0.
.Pp
The client and server may support different versions.
.Fn glGetString
always returns a compatible version number.
The release number always describes the server.
.Sh ERRORS
.Pp
.Dv GL_INVALID_ENUM
is generated if
.Fa "name"
is not an accepted value.
.Pp
.Dv GL_INVALID_VALUE
is generated by
.Fn glGetStringi
if
.Fa "index"
is outside the valid range for indexed state
.Fa "name"
\&.
.Sh COPYRIGHT
.Pp
Copyright
1991-2006 Silicon Graphics, Inc.
Copyright
2010-2013 Khronos Group.
This document is licensed under the SGI
Free Software B License. For details, see
http://oss.sgi.com/projects/FreeB/
\&.

  reply	other threads:[~2014-04-30 10:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-30  8:13 Anthony J. Bentley
2014-04-30 10:16 ` Kristaps Dzonsons [this message]
2014-04-30 16:56   ` Kristaps Dzonsons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5360CD77.60202@bsd.lv \
    --to=kristaps@bsd.lv \
    --cc=discuss@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).