This is in regards to my last topic, where I was having problems with 
lag, I got around to thinking that maybe it was just the way RUDL 
handled opengl, and somehow caused lag, so I thought I'd go ahead and 
try in normal SDL, now.. so far I am running 32 polygons, and am at 200+ 
fps, rather then the old 20+ fps, it seems to be working perfectly now, 
all for the fact SDL doesnt give me a good error message.. IE:
---------------------------
rubyw.exe - Application Error
---------------------------
The exception Breakpoint

A breakpoint has been reached.

 (0x80000003) occurred in the application at location 0x7c901230.


Click on OK to terminate the program
Click on CANCEL to debug the program
---------------------------
OK   Cancel
---------------------------

although, I know where the problem is located, just not sure what to do 
to fix it, seeing how that error is no help. It could be anything. But I 
at least know its because of my code, I cant seem to load a texture 
inopengl with the SDL library.. my code so far is

  def load_texture(texture,arr)
    if (texture.nil?)
      exit
    end
    #texture.convert!
    texture.setColorKey SDL::SRCCOLORKEY, texture[0,0]
    texture = texture.displayFormat
    image = SDL::Surface.new(SDL::SRCCOLORKEY | SDL::SRCALPHA,
    [texture.w,texture.h], 32, [0x000000FF, 0x0000FF00, 0x00FF0000, 
0xFF000000])
    #image.fill [0,0,0,0]
    image.put(texture, [0,0])
    image = image.displayFormat
    GL.BindTexture(GL::TEXTURE_2D,arr[0]);
    GL.TexParameter(GL::TEXTURE_2D, GL::TEXTURE_MAG_FILTER, GL::LINEAR);
    GL.TexParameter(GL::TEXTURE_2D, GL::TEXTURE_MIN_FILTER, GL::LINEAR);
    GL.TexImage2D(GL::TEXTURE_2D, 0, GL::RGBA,image.w, image.h, 0, 
GL::RGBA, GL::UNSIGNED_BYTE, image.pixels)
  end

wich is a quick transformation from the RUDL version to SDL.. if anyone 
knows how to load textures with SDL, tell me.. I am achen to get this to 
work.

-- 
Posted via http://www.ruby-forum.com/.