I'm still working on it and have progress. I'm able to draw on top and behing a classical Gosu::Image but I have troubles.
With this code on my GameWindow draw method :
def draw
@bg.draw(-0.1, 0, 0, 0.005, 0.005)
gl do
GL.ClearColor(0.0, 0.2, 0.5, 1.0)
GL.ClearDepth(1.0)
GL.Clear(GL::DEPTH_BUFFER_BIT)
@logo.draw
end
@bg2.draw(0, 0, 0, 0.005, 0.005)
end
I get this :
http://bestguigui.free.fr/tutoriel_gosu/wip_loader.pngon line "@logo.draw", I have some OpenGL Code to describe the 3D World (Camera) and to draw the 3D Model.
To be able to see the Gosu::Image objects, I had to scale down A LOT and I finally understood that Gosu seems to draw using a classic opengl Window coordinates system, with the origin point on center of the window and coordinates from -1.0 to 1.0 on both 2D axis.
Also, I'm not able anymore to draw a Gosu::Image if hard_border flag is not set to true and if textures are not powers of 2 !
Finally, objects are drawn in method call order, any value set for Z coordinate and images are reversed vertically.
Do you have clues to correct this ?
Thanks a lot