Opengl example - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: Opengl example (/thread-7750.html)
Pages: 1 2
Opengl example - beard - May 22, 2002 01:07 AM
Im trying to begin developing an Opengl game but I cant find some examples which show how you make it full screen. I was told Nehe had some but Nehe is for Visual C++. I found two on the Apple website but one is for Cocoa and one is 1500 lines long and doesnt explain anything. Is there any other good examples? I only kjnow Pascal and C so I want to do Opengl with Carbon.
Opengl example - Josh - May 22, 2002 05:10 AM
I am currently making a game that is fullscreen OGL. I use BeginFullScreen and then attach a regular AGL context to it. It works for me, though on a few other computers it is failing to draw. That may be because of other things, though. I am not sure if BeginFullScreen is Carbonized, but I would imagine so. If you want to see the code that I use, just email me.
Opengl example - Jeff Binder - May 22, 2002 06:41 AM
If you're working for OS X only, you can use CGDirectDisplay to get into full screen and CGL to set up GL. There's also SDL, which is for OS 9 and X, and can do both.
I'm not sure if there is any documentation for CGL apart from that example, but you might want to look at the CocoaGLFullscreen example on this page. Sure, it's Cocoa, but it uses CGL which is a plain C API. You can probably figure something out from it.
Opengl example - beard - May 22, 2002 10:39 AM
jabber I would like to see your code but cant email you. could you send it to my email is email@example.com
Opengl example - codemattic - May 22, 2002 05:23 PM
If you are using Carbon - check out Carbon Setup GL which will work os9 and osx. you can also look at the code in fullscreen cgl and Open GL Full Screen
if you are using Cocoa and Obj-C check out Cocoa GL Fullscreen in idevgames.com source code section
and lastly - you can use SDL which not only will handle setting up a full-screen contex. but also let your game run on windows, linux, whatever...
Opengl example - CMagicPoker - May 22, 2002 08:12 PM
Yeah, Nehe made his example in VCS, but if you scroll at the end f each tutorial, you;ll see tghat some people made some conversion, theres some for macos, kinux, IRIX I think, and even BeOS! Im sure I saw some carbon or cocoa tutorials at nehe.
It's GLUT, tought.
For the AGL specific things, whats already posted in this thread are good, you can also check the AGL GLUT source code, if you're adventurous.
THere's nehe.gamedev.net, good site!
Opengl example - Josh - May 24, 2002 07:48 AM
Quote:Originally posted by beardI will send it asap, but right now I am not at my home comp.
Opengl example - Iceman - May 24, 2002 02:17 PM
I've saved half of the OS 9 NeHe tutorials e-mail me if any of you guys want any of them.
Opengl example - CMagicPoker - May 24, 2002 04:32 PM
Oops, Im sorry, Ive got a bit confused.
Ive jsut visited Nehe's website, and now they just gives the VC++ examples.
They used to provides them in a lot of different formats.
Opengl example - furballphat - May 24, 2002 05:17 PM
http://www.cocoadevcentral.com/ has a good tutorial on cocoa full screen. It's in the regular topics sction.
Opengl example - Josh - May 24, 2002 05:36 PM
Quote:Originally posted by CMagicPokerI think he (Nehe) decided that some of the ports were of such bad quality that they were useless. He is looking for someone to do good ports... anyone? Probably he still has the old ports and will give them to you if you email him. Personally, I think bad ports are better than no ports at all...
Opengl example - Deland - May 24, 2002 11:49 PM
Hey guys, I have the NeHe CD and it has almost all tutorials for Mac. Actualy, 31 tutorials for Mac OS 8/9 and 12 for Mac OS X. I'm not sure I'm willing to send them to all of you by email, so maybe we could ask Jeff (NeHe) if we could host the files on idevgames...
( On another note, maybe you guys should buy the CD to help him, it's really worth it. )
Opengl example - beard - May 25, 2002 07:18 AM
Iceman could you email those Nehe examples you saved? my email is firstname.lastname@example.org thanks!
I would buy the Nehe cd, but if the examples are not on the site will they be on te cd, and I really dont have any money. should be able a job after my exams. I hope.
Opengl example - Iceman - May 25, 2002 11:13 AM
Sure. I'd prefer to put it on my iDisk (I have slow internet), but I can e-mail them to you instead if you'd like.
Update: I could only find one OS 9 Lesson (Lesson 31) the others I must have thrown away since I'm programming in OS X now. I have most of the OS X Cocoa ones; although, I'd like to get my hands on the Cel-Shading(formerly lesson 38) which is Lesson 37.
Hope this helps,
Opengl example - CMagicPoker - May 25, 2002 01:23 PM
jabber >> I dont know for the other ports, but the MacOS Classic ones were very correct imho.
Iceman >> I had it, but done some cleaning in my disk, and I disposed of evethyng I thought were not useful for me in the immediate future. And I thought it was possible to download again when needed, as it was the first time.
I dont want to be the devil's advocate, but is the fact that Nehe offers VC++.NET at 89$ has something to do with the fact that the GLUT ports are gone now? (like, kind of a deal with the devil?)