Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Arg ¶
type Arg struct { Name string // The name of the argument. Desc string // A brief description of the argument. }
An Arg describes the name and description of a function argument.
type Entry ¶
type Entry struct { // The shorthand name of the function(s), without any suffix, etc. // // For example, the following functions would all be defined within the "glUniform" entry: // // - glUniform2d // - glUniform3fv // - glUniformMatrix4fv Name string `json:"name"` // Desc is the description/summary for all functions covered within this entry. This is typically a brief single // sentence, often without a subject and/or ending punctuation. // // For example, the entry for "glGet" reads verbatim as: "return the value or values of a selected parameter" Desc string `json:"desc"` // Description of each OpenGL function this entry pertains to. These functions describe the full names of actual // functions as they are defined in the OpenGL specification. Funcs []Function `json:"functions"` // Documentation for function parameters, using name as key and summary as value. // // Unlike the Desc field, these are typically full sentences. Any inner XML or links are flattened to only provide // the text value. Newlines and tabs used for formatting on a webpage are stripped. Params map[string]string `json:"params"` // Contains the names of other related functions. SeeAlso []string `json:"seealso"` // Possible error value constants OpenGL will emit when using this function. Errors []string `json:"errors"` }
A Entry describes a simplified reference page of the OpenGL spec, intended for providing brief inline documentation.
func (*Entry) Func ¶
Func returns the function definition with the given name and flag indicating if it was found.
func (*Entry) UnmarshalXML ¶
UnmarshalXML implements the xml.Unmarshaler interface.
type Function ¶
type Function struct { // The OpenGL name of the function. Name string `xml:"funcdef>function" json:"name"` // The ordered list of names for the function arguments. Args []string `xml:"paramdef>parameter" json:"args"` }
A Function describes the prototype and parameter names/types of an OpenGL function.
func (*Function) String ¶
String implements the fmt.Stringer interface.
type Spec ¶
type Spec struct { Name string // The name of the specification (i.e. "gl4", "es3.0", etc). Entries map[string]*Entry // Documentation entries defined in the specification. }
A Spec defines the reference documentation sources for an OpenGL API and version.
type Text ¶
type Text string
A Text object captures the inner XML as text, but also flattens nested elements into their inner text value.
func (*Text) UnmarshalXML ¶
UnmarshalXML implements the xml.Unmarshaler interface.