[ruby-gnome2-doc-cvs] [Hiki] create - Gdk::GL

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2003年 8月 28日 (木) 23:52:52 JST


-------------------------
REMOTE_ADDR = 212.194.13.238
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/?Gdk%3A%3AGL
-------------------------
= module Gdk::GL

== Module Functions
--- Gdk::GL.draw_cone(solid, base, height, slices, stacks)
    Renders a cone oriented along the Z axis. The base of the cone is placed at Z = 0, and the top at Z = height. The cone is subdivided around the Z axis into slices, and along the Z axis into stacks.
    * solid: true if the cone should be solid.
    * base: the radius of the base of the cone.
    * height: the height of the cone.
    * slices: the number of subdivisions around the Z axis.
    * stacks: the number of subdivisions along the Z axis.    
    * Returns: self

--- Gdk::GL.draw_cube(solid, size)
    Renders a cube. The cube is centered at the modeling coordinates origin with sides of length size.
    * solid: true if the cube should be solid.
    * size: length of cube sides.
    * Returns: self

--- Gdk::GL.draw_dodecahedron(gboolean solid)
    Renders a dodecahedron centered at the modeling coordinates origin with a radius of the square root of 3.
    * solid: true if the dodecahedron should be solid. 
    * Returns: self

--- Gdk::GL.draw_icosahedron(solid)
    Renders a icosahedron. The icosahedron is centered at the modeling coordinates origin and has a radius of 1.0.
    * solid: true if the icosahedron should be solid.
    * Returns: self

--- Gdk::GL.draw_octahedron(solid)
    Renders a octahedron centered at the modeling coordinates origin with a radius of 1.0.
    * solid: true if the octahedron should be solid.
    * Returns: self

--- Gdk::GL.draw_sphere(solid, radius, slices, stacks)
    Renders a sphere centered at the modeling coordinates origin of the specified radius. The sphere is subdivided around the Z axis into slices and along the Z axis into stacks.
    * solid: true if the sphere should be solid.
    * radius: the radius of the sphere.
    * slices: the number of subdivisions around the Z axis (similar to lines of longitude).
    * stacks: the number of subdivisions along the Z axis (similar to lines of latitude).
    * Returns: self

--- Gdk::GL.draw_teapot(solid, scale)
    Renders a teapot. Both surface normals and texture coordinates for the teapot are generated. The teapot is generated with OpenGL evaluators.
    * solid: true if the teapot should be solid.
    * scale: relative size of the teapot.
    * Returns: self
--- Gdk::GL.draw_tetrahedron(solid)
    Renders a tetrahedron centered at the modeling coordinates origin with a radius of the square root of 3.
    * solid: true if the tetrahedron should be solid.
    * Returns: self

--- Gdk::GL.draw_torus(solid, inner_radius, outer_radius, nsides, rings)
    Renders a torus (doughnut) centered at the modeling coordinates origin whose axis is aligned with the Z axis.
    * solid: true if the torus should be solid.
    * inner_radius: inner radius of the torus.
    * outer_radius: outer radius of the torus.
    * nsides: number of sides for each radial section.
    * rings: number of radial divisions for the torus.
    * Returns: self

--- Gdk::GL.init(argv = ARGV)
    Call this function before using any other GdkGLExt functions in your applications. It will initialize everything needed to operate the library and parses some standard command line options. argv is adjusted accordingly so your own code will never see those standard arguments.
    Note: This function will throw RuntimeError if it was unable to initialize the library for some reason.
    * argv: the ARGV value. Any parameters understood by Gtk.init are stripped before return.
    * Returns: self

--- Gdk::GL.query_extension?([display])
    Indicates whether the window system supports the OpenGL extension (GLX, WGL, etc.).
    * display: optional, if specified it indicates the Gdk::Display where the query is sent to.
        * You can simply ignore it as on most computers it is not needed.
        * You cannot give any display if Gdk::GL::MULTIHEAD_SUPPORT is false and you must give one if Gdk::GL::MULTIHEAD_SAFE is true.
    * Returns: true if OpenGL is supported, false otherwise.
    
--- Gdk::GL.query_gl_extension?(extension)
    Determines whether a given OpenGL extension is supported.
    There must be a valid current rendering context to call this function.
    It returns information about OpenGL extensions only. This means that window system dependent extensions (for example, GLX extensions) are not reported by this function.
    * extension: name of OpenGL extension.
    * Returns: true if the OpenGL extension is supported, false if not supported.
    
--- Gdk::GL.query_version
    Returns the version numbers of the OpenGL extension to the window system.
    In the X Window System, it returns the GLX version.
    In the Microsoft Windows, it returns the Windows version.
    * Returns: [major, minor] or false if it fails.

--- Gdk::GL.use_pango_font([display,] font_desc, first, count, list_base)
    Creates bitmap display lists from a PangoFont.
    * display: optional, if specified it must be a Gdk::Display.
        * You can simply ignore it as on most computers it is not needed.
        * You cannot give any display if Gdk::GL::MULTIHEAD_SUPPORT is false and you must give one if Gdk::GL::MULTIHEAD_SAFE is true.
    * font_desc: a PangoFontDescription describing the font to use.
    * first: the index of the first glyph to be taken.
    * count: the number of glyphs to be taken.
    * list_base: the index of the first display list to be generated.
    * Returns: the Pango::Font used, or nil if no font matched.

== Constants
--- BINARY_AGE
--- INTERFACE_AGE
--- MAJOR_VERSION
--- MICRO_VERSION
--- MINOR_VERSION
--- MULTIHEAD_SAFE
--- MULTIHEAD_SUPPORT

=== GdkGLRenderTypeMask
--- RGBA_TYPE
--- COLOR_INDEX_TYPE





ruby-gnome2-cvs メーリングリストの案内
Back to archive index