/*  call-seq:
 *    get_attrib( attrib )  ->  Integer
 *
 *  Return the value of the the SDL/OpenGL attribute identified by +attrib+,
 *  which should be one of the constants defined in the Rubygame::GL module.
 *  See #set_attrib for a list of attribute constants.
 *
 *  This method is useful after using #set_attrib and calling Screen#set_mode,
 *  to make sure the attribute is the expected value.
 */
VALUE rbgm_gl_getattrib(VALUE module, VALUE attr)
{
  int val;
  if(SDL_GL_GetAttribute(NUM2INT(attr),&val)==-1)
    rb_raise(eSDLError,"GL get attribute failed: %s",SDL_GetError());
  return INT2NUM(val);
}