Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Tue Jul 25, 2017 3:31 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: OpenGL example
PostPosted: Thu Feb 03, 2011 3:12 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
does someone have a simple RealStudio example of moving a camera [fwd/back/left/right/ and rotate] through a simple grid with random cubes?

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: OpenGL example
PostPosted: Fri Feb 04, 2011 3:38 pm 
Offline

Joined: Mon Feb 05, 2007 11:35 am
Posts: 98
The first six OpenGL tutorials on Nehe's site http://nehe.gamedev.net/ have a REALbasic equivalent that you can download. Click into the lesson, read up and learn, and at the bottom you'll find the code example.

Should be enough to get you started.

_________________
Regards,

Jeff Quan
jeff@jcquan.com
http://www.jcquan.com/JQportfolio
My RBGL replacement classes: http://www.jcquan.com/REALbasic


Top
 Profile  
Reply with quote  
 Post subject: Re: OpenGL example
PostPosted: Fri Feb 04, 2011 4:30 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
I didn't see any RB examples.... tons of "C" code [which I can figure out if I have to], but would rather not decypher "C" and try and learn OPENGL from that at the same time... Plus no where did I see any real explanation of "WHY" things were done,

but thanks anyways.

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: OpenGL example
PostPosted: Fri Feb 04, 2011 5:39 pm 
Offline

Joined: Mon Feb 05, 2007 11:35 am
Posts: 98
Here are the direct links to the RB files:
http://nehe.gamedev.net/data/lessons/realbasic/RBlesson02.zip
http://nehe.gamedev.net/data/lessons/realbasic/RBlesson03.zip
http://nehe.gamedev.net/data/lessons/realbasic/RBlesson04.zip
http://nehe.gamedev.net/data/lessons/realbasic/RBlesson05.zip
http://nehe.gamedev.net/data/lessons/realbasic/RBlesson06.zip

_________________
Regards,

Jeff Quan
jeff@jcquan.com
http://www.jcquan.com/JQportfolio
My RBGL replacement classes: http://www.jcquan.com/REALbasic


Top
 Profile  
Reply with quote  
 Post subject: Re: OpenGL example
PostPosted: Sun Mar 18, 2012 6:05 pm 
Offline
User avatar

Joined: Sat May 28, 2011 11:28 pm
Posts: 130
Location: Beijing China
Those Lessons do not compiles, tons of errors.
also if I play around with the code, till all errors are gone, then I get an application Crash report

_________________
For great Music got to my podcast Website!!!
http://podcast.1945mf-china.com


Top
 Profile  
Reply with quote  
 Post subject: Re: OpenGL example
PostPosted: Sun Mar 18, 2012 7:23 pm 
Offline
User avatar

Joined: Thu Feb 16, 2006 10:04 pm
Posts: 262
I did those a very, very long time ago ... you're welcome ... :roll:

Shouldn't take much to clear the errors, not sure about crash. If I get some time I'll try and clear up the errors or perhaps I'll have the lessons removed.

I had a project, again a very long time ago, that did what you were asking for Dave. Not sure if it's still on this computer, probably not.

Great learning here,
http://www.songho.ca/opengl/index.html

Google, "opengl tutorial camera movement". Most recent write-ups are for ESOpenGL, iPhones, etc. Same thing really. ES is embedded systems and it is a subset of functions for the desktop.

The convenience function call that will allow you to move the eye point around is gluLookAt(....). If for example you use lesson five from NeHe as a stating point, you'd make this call in the InitGL method of the LessonFive class. It's tricky getting the three vectors correct.

_________________
Thomas C.
Real Studio Blog
http://bigdaddysurf.com/blog/

https://itunes.apple.com/us/app/maui-dragstrip-2013/id604516033?mt=8
https://itunes.apple.com/us/book/how-to-waterstart/id576214730?mt=11


Last edited by mauitom on Sun Mar 18, 2012 11:39 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: OpenGL example
PostPosted: Sun Mar 18, 2012 10:01 pm 
Offline
User avatar

Joined: Thu Feb 16, 2006 10:04 pm
Posts: 262
Here are updated versions of Lessons 2-6 from the NeHe site. Please let me know if something is foobar. Mac Carbon only.

http://bigdaddysurf.com/blog/?p=488


Top
 Profile  
Reply with quote  
 Post subject: Re: OpenGL example
PostPosted: Thu Jun 14, 2012 5:03 am 
Offline
User avatar

Joined: Sun Aug 22, 2010 10:27 pm
Posts: 108
http://www.real3dtutorials.com/

:)

_________________
Zero-Null-Bit Software.
Code Generator for RealBasic: http://rb.znb.cc


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group