openGL in codewarrior

openGL in codewarrior

Post by andxxco » Wed, 27 Aug 2003 23:26:31


Did anyone know how to apply openGL in CW8.3 ? I didn't found any
record in CW web site, CD, & CW example code that talking about
openGL. I am CW user and I didn't know how to use apple project
builder. Although apple has openGL sample code, I don't know how to
apply this sample code to CW. what should I do to work in CW
powerplant application ? For example,

-- import what kind of Lib in my project inspecter from CW
-- include what header file
-- what is the code that I should write in my programe

did anyone would tell me how to draw a triangle in LPane ? I just want
to know this.
I hope metrowerks could answer me why they didn't have any sample code
or documention for openGL. did metrowerks has a web site that we could
download sample code ?

Best Regards,
Andrew
 
 
 

openGL in codewarrior

Post by David Phil » Thu, 28 Aug 2003 00:25:37

In article < XXXX@XXXXX.COM >,



Under OS X, Make a "New" project either C or C++, start with the Mach-O
stationery, Select the Frameworks tab of the project, and drag the
following framework folders from /System/Library/Frameworks into the
Frameworks tab of the project:

OpenGL
GLUT

in your source code:

#include <OpenGL/gl.h>

etc. (You can browse the framework folders for their .h files.

In OS 9, download Apple's SDK, at a reference to it to the "Source
Trees" panel of the projects's settings, (Dialog box accessed by the
Edit menu.) then add an entry to the SDK to the Access Paths panel of
the project's settings.

For PowerPlant, download GLPane from the PowerPlant Contributed Class
Archives < http://www.yqcomputer.com/ ;.

For general source code, most of the tutorials at
< http://www.yqcomputer.com/ > have downloadable Mac OS 9 and OS X projects,
I've got OS 9 projects for the first 36 tutorials that I can e-mail you,
if any are absent from their site.

 
 
 

openGL in codewarrior

Post by andxxco » Thu, 28 Aug 2003 22:38:55

> Under OS X, Make a "New" project either C or C++, start with the Mach-O

Thank a lot for your help in my questions. I could apply your advise
in my work now.
But GLPane is cannot be found in
< http://www.yqcomputer.com/ ;.
For using OpenGL in my work, I just need to create a simple 3D
graphic. Therefore, tks for you sharing of your tutorials in
nehe.gamedev.net, I don't need them.

Thanks again.
Andrew Chang
 
 
 

openGL in codewarrior

Post by David Phil » Fri, 29 Aug 2003 04:07:44

In article < XXXX@XXXXX.COM >,



As it happens, I need OpenGL + PowerPlant for MY work now. I'm writing a
sample project that uses GLPane from the PowerPlant Contributed Class
Archives (I downloaded it from there after I wrote.) It turns out that
the GLPane in the PowerPlant Contributed Class is incomplete: it won't
compile and run without substantial modification.

My sample is a Carbon CFM project that runs fine under OS 9, but doesn't
draw anything under OS X. Once I have it fully working, I'll document it
and submit it to the PowerPlant Contributed Class Archives. That should
happen later today.

I'm working in a PowerPlant-nased program for vision research, which
needs to update the screen on each frame. Since VBL interrupts aren't
available under OS X, but VBL sycnhronized drawing is available with
OpenGL under OS X, I'd thought we'd draw our experimental stimulus with
OpenGL. If anyone reading this knows a better way to do it under OS X,
please let me know.
 
 
 

openGL in codewarrior

Post by David Phil » Fri, 29 Aug 2003 09:45:02

In article
< XXXX@XXXXX.COM >,



I've submitted the sample code to the PowerPlant Contributed Class
Archives.

It is the complete source for a runnable PowerPlant program, that your
can build either as a CFM binary that runs under both 9 and X, or a
Mach-O binary that runs only on X.

The Mach-O version uses only frameworks that are already available on
your machine. The CFM version required that you download an SDK from
Apple. Its ReadMe file tells you where to get it.

You can also get it from:

< http://www.yqcomputer.com/ ;