Crea  Modifica  FrontPage  Indici  Cerca  Ultime modifiche  History  RSS  Login

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. The only difference between this function and Gtk::GL#init is that Gtk::GL#init checks for more parameters. You should use Gtk::GL#init instead of this function. 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 Gdk::GL.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.
  • 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.
  • 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.
Ultima modifica:2005/11/17 02:43:41
Parola chiave:
Referenze:[Gdk::GLConfig] [Gtk::GL] [Gdk::GL] [Gdk::GLContext] [Gtk::Widget]