# File lib/as_geometrybuffer.rb, line 64 def add_geom_for_sprite(tex) raise "Buffer must be V2T2 format" unless @n_vert == 2 and @n_tex == 2 and @n_color == 0 w, h = [tex.w, tex.h] tw, th = (tex.tex_target == GL::TEXTURE_RECTANGLE_EXT) ? [tex.w, tex.h] : [1, 1] return add_geom([ 0,0, 0, 0, w,0, tw, 0, w,h, tw,th, 0,h, 0,th, ]) end