Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / June 2005



Tip: Looking for answers? Try searching our database.

adding graphics to my console app

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MacRules - 28 Jun 2005 03:43 GMT
I need to add scientific visualization capability to my "console"
application (text-based UI, C code). This just means being able to open
a window and display data in graphical format. I have a couple of
options:

1. Dredge up ancient QuickDraw code I wrote back in the '90s, Carbonize
it, and adapt it for my needs. I used to know all about GrafPorts, etc.
I don't know if this is still useful :-)

2. Develop a graphical front-end in Java, and implement a two-way
communication protocol between the Java code and my C application. My C
app would ship data to the Java app for display, and the Java app would
send graphics-related user commands back to my C app. I would retain
the text-based UI for non-graphics related stuff.

The advantage to #1 is tight integration between the number-crunching
and display code. The disadvantage to #1 is loss of cross-platform
compatibility.

An advantage to #2 is learning Java (the company I work for has gone
bonkers over Java - I gotta get with the program). Also, a Java-based
solution would be cross-platform. A disadvantage to #2 is possible
headaches implementing  the dynamic interface between Java and my C app
(I currently don't know how to do this, although I've heard that it can
be done).

I've been experimenting with the graphics capability of J2SE 1.5 on
Windows. There appears to be sufficiently rich graphics functionality
within Java to do what I need.

Anyone have any thoughts on this?

Thanks,
Steve
Patrick Machielse - 28 Jun 2005 09:50 GMT
> I need to add scientific visualization capability to my "console"
> application (text-based UI, C code). This just means being able to open
[quoted text clipped - 12 lines]
>
> Anyone have any thoughts on this?

If cross platform code is important to you, maybe OpenGL would fit the
bill. It's a C API too. (I've no experience with OpenGL)

If you are sattisfied with an OS X only solution, drawing with the Cocoa
API would seem the best solution. But you'd need to know a bit of
Objective-C.

patrick
MacRules - 29 Jun 2005 13:45 GMT
I've decided to go the Java route for the time being. XCode 2.0's
support for Java is very rough around the edges but works. Apple Xcode
engineers should take a look at JCreator at http://www.jcreator.com/
for an example of what a good Java IDE should look like. Things I'd
like to see: a configurable path to the java compiler that XCode is
using, a configurable path to the java virtual machine that XCode is
using, Java-specific compiler parameters rather than a whole bunch of
irrelevant C/C++ gcc parameters, configurable CLASSPATH (named as
such), etc...

While I'm in whining mode, I'll mention that Apple provides a whole
bunch of ready-to-run Java source code, which is great, but I didn't
see an index for this code, so if I want to learn how to do something,
it's not clear where to go for an example.
Patrick Machielse - 29 Jun 2005 16:08 GMT
> Things I'd like to see: a configurable path to the java compiler that
> XCode is using,

That's in the target settings (extpert view)

> a configurable path to the java virtual machine that XCode is using,

Change this under the 'extecutables' section

> Java-specific compiler parameters rather than a whole bunch of irrelevant
> C/C++ gcc parameters,

That's indeed unfortunate, but just ignore those :-)

> configurable CLASSPATH (named as such), etc...

Target settings again.

You'll have to learn to do things the Xcode way, but after you figure it
out there really _is_ logic behind it...

patrick
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.