Real Software Forums
http://forums.realsoftware.com/

OpenGL Controls [Open Source]
http://forums.realsoftware.com/viewtopic.php?f=4&t=26590
Page 1 of 3

Author:  Blake [ Mon Feb 23, 2009 1:26 am ]
Post subject:  OpenGL Controls [Open Source]

Hey guys, I just finished up working on some OpenGL Control Classes to use with rb and am opening them up to the public. I really want these to be customizable for use in any game so feel free to download, use, alter and offer up suggestions to improve them 8)

The OpenGL Code is cross-platform so Mac & Windows programmers are welcome. One note for Mac users, there has been a couple cases of the thread running too quickly and locking up the app, if this happens just change the thread to a timer and remove the do & loop.

Download: OGL Controls v1.1 (Released: 03/08/2009)

Download: OGL Controls v1.0 (Released: 02/23/2009) - Newer Versions of RB, Fixes Super issue.
Download: OGL Controls v1.0 (Released: 02/23/2009) - RB 5.5.5

Author:  jhouck [ Mon Feb 23, 2009 8:35 am ]
Post subject:  Re: OpenGL Controls [Open Source]

Wow... Today is my lucky day! I'm returning to RB to do some cross-platform applications that rely on OGL for the rendering context. I'll sure give your library a go. Thank you!

Author:  Blake [ Mon Feb 23, 2009 12:36 pm ]
Post subject:  Re: OpenGL Controls [Open Source]

You're welcome :)

That is my main goal, to give everyone access to the tools needed to create quality games in rb.

Author:  mitch_stgt [ Tue Feb 24, 2009 4:22 am ]
Post subject:  Re: OpenGL Controls [Open Source]

Thanks !

I tried to compile it with RB 2008 5.1 (Mac) , didnt changed any code
but always get an compiler error

Control Builder.rb : OpenGLSlider1 on Console impements the Event "ValueChanged"
but his superclass Canvas has that event already implemented.

Author:  Blake [ Tue Feb 24, 2009 10:55 am ]
Post subject:  Re: OpenGL Controls [Open Source]

mitch_stgt wrote:
Thanks !

I tried to compile it with RB 2008 5.1 (Mac) , didnt changed any code
but always get an compiler error

Control Builder.rb : OpenGLSlider1 on Console impements the Event "ValueChanged"
but his superclass Canvas has that event already implemented.


Hmm...Is there a value changed event for the canvas now? I'm using 5.5.5 so I am sure some things have changed.

If there is just comment out the even in the OpenGLControl class and it should work.

Author:  Steve Garman [ Tue Feb 24, 2009 11:41 am ]
Post subject:  Re: OpenGL Controls [Open Source]

Blake wrote:
Hmm...Is there a value changed event for the canvas now?

No, the error message is misleading.

When opening the project in some recent versions, the controls lose their super - it reverts to Canvas.

We can all have lots of fun resetting them to OpenGLControl :(

Author:  mitch_stgt [ Tue Feb 24, 2009 2:14 pm ]
Post subject:  Re: OpenGL Controls [Open Source]

Thanks for help with that RB bug .
Q: How many times must i change canvas to OpenGLControl ?
All canvas in the projekt to OpenGLControl ?

Author:  Blake [ Tue Feb 24, 2009 2:26 pm ]
Post subject:  Re: OpenGL Controls [Open Source]

Oh I didn't realize that they lost their super. Luckly I named them what they are so setting the super should be easy without guessing what sub-class it is :)

Author:  Steve Garman [ Tue Feb 24, 2009 3:16 pm ]
Post subject:  Re: OpenGL Controls [Open Source]

Just had a quick play with this - I really like it :D

Author:  jhouck [ Tue Feb 24, 2009 3:54 pm ]
Post subject:  Re: OpenGL Controls [Open Source]

Please excuse my lack of knowledge, I've been away from RB for about 5 years... But how is this installed? I've placed the whole Control Builder folder into the plugins directory but I don't think that's correct. Thx for bearing with me. :oops:

Author:  Blake [ Tue Feb 24, 2009 4:03 pm ]
Post subject:  Re: OpenGL Controls [Open Source]

Its not a plugin, its straight RB code. Just launch the source (.rb) and set the supers of the canvases (if they are incorrect) and you are good to go.

Author:  jhouck [ Tue Feb 24, 2009 4:05 pm ]
Post subject:  Re: OpenGL Controls [Open Source]

Thanks Blake... Looks like I need to spend a bit more time in the User manual... :wink:

Author:  Blake [ Tue Feb 24, 2009 4:09 pm ]
Post subject:  Re: OpenGL Controls [Open Source]

jhouck wrote:
Thanks Blake... Looks like I need to spend a bit more time in the User manual... :wink:


No problem, try the new download (first post) if you are having any more issues getting it working.

Author:  JeremK [ Wed Feb 25, 2009 5:31 am ]
Post subject:  Re: OpenGL Controls [Open Source]

I've downloaded it, opened the project, and tried it in the debugger.
Each time it crashed when opening.

So I created a new Window, set its super property to OpenGLDisplay.
Then I added a control
And when debugging this new window it doesn't work either.

I am using RB 2008r4.2 on Windows Vista 32 bits

Author:  Blake [ Wed Feb 25, 2009 12:32 pm ]
Post subject:  Re: OpenGL Controls [Open Source]

Sounds like it may be in the creation of opengl, can you step through the open event and see where its crashing?

Page 1 of 3 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/