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 > BSD Api Advice

BSD Api Advice
Thread Tools
Fresh-Faced Recruit
Join Date: Feb 2003
Status: Offline
Reply With Quote
Feb 12, 2003, 10:38 AM
 
I'm working on porting an OpenGL software package to the Mac (and maybe Linux in the future). The software currently runs on Windows, but it was written to support multiple platforms. There is a library that contains some OS abstraction classes, such as threads, shared memory, mutex, timer, keyboard input, mouse input...

My question is where to find a description of the BSD Api's that I should use in the abstraction layer?

Second question. Could someone give me an example (or point me in the right direction) on how to programically create a window. I know that Project Builder/Interface Builder allow for easy building of GUI's, but I would like to build a simple window with an OpenGL context without the use of a nib file.

Thank you
     
Professional Poster
Join Date: Apr 2001
Location: Long Beach, CA
Status: Offline
Reply With Quote
Feb 12, 2003, 11:03 AM
 
As far as threads, you'll want to look into pthreads. This would also cover your Linux version.

As far as NOT using a nib file... well, why?? It's much easier to build a user interface and make the connections by hand than it is to do it in code. You're looking at comparing something that may take a few minutes at the most with something that could take days to figure out. Why do it the hard way?

Anyway, there are ways to do that with the GLUT library. It's cross platform. That might be what you need to look into.

ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
     
bona  (op)
Fresh-Faced Recruit
Join Date: Feb 2003
Status: Offline
Reply With Quote
Feb 12, 2003, 11:55 AM
 
The reason that I wanted to create the window without the nib file is that the Windows version has a generic create window method. You pass it a set of arguements and it creates a window or full screen OpenGL context. From that point on all the action is within the window. I don't want to make a complete app by hand, just a single window.

I hope this makes sense.
     
Junior Member
Join Date: Oct 2001
Status: Offline
Reply With Quote
Feb 12, 2003, 03:31 PM
 
There is a tutorial at cocoa dev central that does what I think you need.
     
   
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 08:47 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