Class: GL::Registry::Extension

Inherits:
FeatureProvider show all
Defined in:
lib/opengl/registry/extension.rb

Overview

Describes an OpenGL extension.

Instance Attribute Summary collapse

Attributes inherited from FeatureProvider

#additions, #api, #name

Attributes inherited from Token

#comment

Instance Method Summary collapse

Methods inherited from Token

#to_s

Constructor Details

#initialize(node) ⇒ Extension

Creates a new instance of the GL::Registry::Extension class.

Parameters:

  • node (Ox::Element)

    The XML element defining the instance.



16
17
18
19
20
# File 'lib/opengl/registry/extension.rb', line 16

def initialize(node)
  super(node)
  supported = node[Words::SUPPORTED]
  @supported = supported ? supported.split('|').map(&:to_sym) : Array.new
end

Instance Attribute Details

#supportedArray<Symbol> (readonly)

Returns an array of supported APIs this extension is associated with.

Returns:

  • (Array<Symbol>)

    an array of supported APIs this extension is associated with.



10
11
12
# File 'lib/opengl/registry/extension.rb', line 10

def supported
  @supported
end