Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Software mode OpenGL

Software mode OpenGL
Thread Tools
Mac Elite
Join Date: May 2001
Location: ~/
Status: Offline
Reply With Quote
Jan 20, 2003, 01:46 AM
 
I posted this originally in the MacOS X board but I think it should have gone here instead. I have a Lombard Powerbook with a Rage LT Pro video card in it, being a pre-Rage128 chip OSX has no accelerated driver for it.

I've got some OpenGL programs I wrote on Windows about a year ago and I'm trying to port tham to OSX on my PB. They build just fine but I can't run them because OpenGL won't initialize. I don't need to be running games or anything, my apps are simple exercises an experienced OpenGL programmer could write in their sleep, they're a means for me to better learn to use OpenGL.

Is there a way to force OSX to use software mode OpenGL so I can run these programs? I don't really want to wait until my new Powerbook arrives to be able to work with these things. I've got the time to do it now and might not have it later.

It isn't just a problem with my programs either, any OpenGL program I've tried to run in OSX has failed to run. Interestingly enough I have been able to get GLXGears to run in X11 but it is only getting ~30fps. I assume it is running in software mode no? Any help with this would be appriciated.
     
Junior Member
Join Date: Oct 2001
Status: Offline
Reply With Quote
Jan 21, 2003, 07:49 PM
 
If you are reading this post on OSX then OpenGL is running. Quartz renders the GUI using OpenGL.


type R
I be that insane n***a from the psycho ward.
     
Junior Member
Join Date: Mar 2002
Status: Offline
Reply With Quote
Jan 22, 2003, 03:17 PM
 
Originally posted by type_r503:
If you are reading this post on OSX then OpenGL is running. Quartz renders the GUI using OpenGL.
Not on the Lombard, it doesn't.
     
Forum Regular
Join Date: Aug 2000
Location: UK
Status: Offline
Reply With Quote
Jan 22, 2003, 05:41 PM
 
Originally posted by Graymalkin:
I've got some OpenGL programs I wrote on Windows about a year ago and I'm trying to port tham to OSX on my PB. They build just fine but I can't run them because OpenGL won't initialize.
OS X should default to software mode automatically if hardware acceleration isn't available (as in your case).

What do you mean 'OpenGL won't initialise' - does the app run at all, or does it run and just not display what you were expecting?
     
Dedicated MacNNer
Join Date: Apr 2001
Location: Bethesda, MD
Status: Offline
Reply With Quote
Jan 23, 2003, 09:16 AM
 
There must be something in your program that is querying the OpenGL renderer and bailing out when it doesn't find a hardware renderer. If an OpenGL program doesn't do something like that, it should just run with the software rendering. It'd be slow, but it ought to at least run.
     
awe
Fresh-Faced Recruit
Join Date: Apr 2002
Status: Offline
Reply With Quote
Jan 24, 2003, 08:48 AM
 
I've already posted this reply at the original thread located over at the MacOS X forum. Here it is again, since it did solve the problems of the poster:

You can use OpenGL with unsupported GPUs, but you have to take care of some stuff while coding:

1. The attribute list of your pixelformat mustn't contain the "NSOpenGLPFAAccelerated" flag.

2. The attribute list of your pixelformat mustn't contain the "NSOpenGLPFAFullScreen" flag and you must not use the "CGLSetFullScreen()" function or "setFullScreen" Obj-C method. "Real" fullscreen modes with page-flipping are not available with unsupported GPUs. If you want to go fullscreen you'll have to create a window that covers the desired screen.

awe
     
Mac Elite
Join Date: May 2001
Location: ~/
Status: Offline
Reply With Quote
Jan 28, 2003, 05:21 AM
 
Awe's suggestion helped me a great deal. I removed my full screen test and stopped calling the hardware acceleration flag and everything worked just fine. It isn't fast but it does work.

When I said won't initialize I meant just that, when the program attempts to run it pops up with an error saying OpenGL won't initialize. Besides the OpenGL part my programs were fine, I do sort of have an idea what I'm doing in Cocoa.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:04 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2