Strict Standards: Non-static method phpbb_feed_factory::init() should not be called statically in /home/jacius/rubygame/forums/feed.php on line 66
[phpBB Debug] PHP Notice: in file /feed.php on line 171: Cannot modify header information - headers already sent by (output started at /feed.php:66)
[phpBB Debug] PHP Notice: in file /feed.php on line 172: Cannot modify header information - headers already sent by (output started at /feed.php:66)
Rubygame Forums 2011-01-22T12:49:38+00:00 http://rubygame.org/forums/feed.php?f=4&t=326 2011-01-22T12:49:38+00:00 http://rubygame.org/forums/viewtopic.php?t=326&p=975#p975 <![CDATA[Re: both rubygame and opengl]]> Statistics: Posted by red — Sat Jan 22, 2011 12:49 pm


]]>
2011-01-22T00:48:48+00:00 http://rubygame.org/forums/viewtopic.php?t=326&p=957#p957 <![CDATA[Re: both rubygame and opengl]]>
I recommend having a look at demo_opengl.rb, a sample application I wrote that uses Rubygame with OpenGL. (That file is not yet shipped with any version of Rubygame, but it's in the repository.) In particular, you will probably be interested in the Cube#setup_texture method, which converts the Rubygame (SDL) Surface to an OpenGL texture. If your Surface has an alpha channel, you should use GL_RGBA instead of GL_RGB.

Hope that helps.

Statistics: Posted by jacius — Sat Jan 22, 2011 12:48 am


]]>
2011-01-21T19:47:51+00:00 http://rubygame.org/forums/viewtopic.php?t=326&p=955#p955 <![CDATA[both rubygame and opengl]]> Anyway I was wondering if I can both draw things with opengl and rubygame. I need to draw text on opengl window with rubygame but I need a surface for it. I don't know how to return screen surface in my setup_screen function.

Code:
  def setup_screen( size=[640,480], fovy=45, clip=[0.1,100] )
   w, h = size
   GL.set_attrib( RED_SIZE, 8)
   GL.set_attrib( GREEN_SIZE, 8)
   GL.set_attrib( BLUE_SIZE, 8)
   GL.set_attrib( DEPTH_SIZE, 16)
   GL.set_attrib( DOUBLEBUFFER, 1)
   Screen.set_mode([w,h], 24, OPENGL)
   glViewport( 0, 0, w, h )
   glMatrixMode( GL_PROJECTION )
   glLoadIdentity()
   gluPerspective( fovy, w/(h.to_f), clip[0], clip[1])
   glEnable(GL_DEPTH_TEST)
   glDepthFunc(GL_LESS)
   glEnable(GL_TEXTURE_2D)
  end

Statistics: Posted by red — Fri Jan 21, 2011 7:47 pm


]]>