pike.git / lib / modules / GLUE.pmod / module.pmod

version» Context lines:

pike.git/lib/modules/GLUE.pmod/module.pmod:1: - // -  +    #pike __REAL_VERSION__ - #if constant(GL) && constant(GL.glOrtho) + #require constant(GL.glOrtho)      //! GL Universal Environment      import GL;         // --- Driver related code      protected .Driver.Interface driver;   
pike.git/lib/modules/GLUE.pmod/module.pmod:319:    if( (< "Exit", "Escape" >)[evt->name] )    exit(0);    };    if(options->resize_callback)    resize_callback = options->resize_callback;    else    resize_callback = lambda(){};       start_driver(options->driver_names, options->title, options->icon_title);    -  if( !zero_type(options->fullscreen) ) { +  if( !undefinedp(options->fullscreen) ) {    fullscreen = options->fullscreen;    if( !(< 0,1 >)[fullscreen] )    error("options->fullscreen should be 1 or 0.\n");    }    if( options->resolution ) {    if(!arrayp(options->resolution) || sizeof(options->resolution)!=2)    error("options->resolution should be an array of size two.\n");    resolution = options->resolution;    }    if( options->aspect ) {
pike.git/lib/modules/GLUE.pmod/module.pmod:555:    //! };    protected void create( void|function f ) {    id = list_ids->get();   #ifdef __NT__    all_lists[this] = 1;   #endif    if(f) compile(f);    }       //! Deletes this list and frees the list id from the id pool. -  protected void destroy() { +  protected void _destruct() {   #ifdef __NT__    all_lists[this] = 0;   #endif    GL.glDeleteLists(id, 1);    list_ids->free(id);    }       //! Returns this lists' id.    int get_id() { return id; }   
pike.git/lib/modules/GLUE.pmod/module.pmod:764:    resize(width, height, imgs, flags);    all_textures[this] = 1;    }       //! Calls @[construct] with @[args].    protected void create(mixed ... args ) {    construct( @args );    }       //! Properly deallocates the texture. -  protected void destroy() +  protected void _destruct()    {    all_textures[this] = 0;    texture_ids->free(id);    texture_mem -= _sizeof();    }       //! Resizes/creates a texture to meet the dimensions @[width] and    //! @[height]. If @[nocreate] isn't given, @[create_texture] is    //! called to actually perform the resize/creation.    //! @seealso
pike.git/lib/modules/GLUE.pmod/module.pmod:981:    switch( alpha )    {    case 4: m = ([ "luminance":i, "alpha":a ]); break;    case 3: m = ([ "luminance":i ]); break;    case 2: m = ([ "alpha":a ]); break;    case 1: m = ([ "rgb":i, "alpha":a ]); break;    case 0: m = ([ "rgb":i ]); break;    default:    error("Unknown alpha format.\n");    } -  if(zero_type(dx)) +  if(undefinedp(dx))    glTexImage2D( texture_type, ++level, mode || imode, 0, m );    else    glTexSubImage2D( texture_type, ++level, dx >>= 1, dy >>= 1, m);    }    }       //! Clears the texture.    void clear() {    // FIXME: Clear backingstore as well?    use();
pike.git/lib/modules/GLUE.pmod/module.pmod:2105:    "resolution" : "" + resolution[0] + "x" + resolution[1],    "aspect" : aspect,    "gl_flags" : gl_flags,    "depth" : depth,    "rotation" : global_z_rotation,    "mirror" : (mirrorx?"x":"") + (mirrory?"y":""),    "texture_mem" : texture_mem,    "fast_mipmap" : fast_mipmap,    ]);   } -  - #else - constant this_program_does_not_exist=1; - #endif +