From: Jan Dvorak Date: 2008-04-19T06:04:49+09:00 Subject: Re: Ruby Opengl Speed On Thursday 17 April 2008 02:08:16 Diego Bernardes wrote: > Yea, this is what i want to know, thanks Jan :) > I already made some 2d games in ruby using gosu and now im going to 3d > Just another question, i'm dont know opengl already, i'm just starting > my studies, you said "offload anything on GPU", how can this offload can > be done? > > There is a Gears demo made in ruby with opengl comparing with c, it uses > display lists, so get almost the same speed of c, this is what you say > about "offload anything on GPU"? Yes, display lists and vertex arrays/VBO for static objects are good start, but you can do any general per-vertex or per-pixel processing on GPU via shaders. Common example in games is skeletal-bone animation done in vertex shader (a.k.a. hardware skinning) where you send only mesh's base pose in array/VBO and bone matrices as uniform variables or attributes and the shader computes the desired pose. Jan