Path: utzoo!attcan!uunet!microsoft!alistair From: alistair@microsoft.UUCP (Alistair BANKS) Newsgroups: comp.os.os2 Subject: Re: Can you do graphics in OS/2 without using PM? Message-ID: <53791@microsoft.UUCP> Date: 26 Mar 90 23:26:27 GMT References: <1289@batman.moravian.EDU> <28236@cup.portal.com> <1990Mar25.014347.25497@caen.engin.umich.edu> Reply-To: alistair@microsoft.UUCP (Alistair BANKS) Organization: Microsoft Corp., Redmond WA Lines: 77 In article <1990Mar25.014347.25497@caen.engin.umich.edu> chrisl@caen.engin.umich.edu (Chris Lang) writes: >In article <28236@cup.portal.com> Will@cup.portal.com (Will E Estes) writes: >>< Is there any way to do graphics in OS/2 without spending the time to >>< learn the PM programmers interface? Something that would allow just >>< drawing graphics like DOS provides. >> >>It's amazing to me that this is the first time I've seen this question >>asked. Somehow we have been convinced into thinking that OS/2 application >>means PM application where anything more than a utility or systems >>software program is concerned. I doubt this assumption is anything more >>than focused public relations on behalf of those trying to push PM as >>an industry-standard. > >If only your statement were true... ("...OS/2 application means PM >application...") With every new release of OS/2, it becomes more and more >obvious that the intention is to encourage PM rather than full-screen >applications. I can't think of many reasons not to use PM, especially >for graphics-oriented applications. Unwillingness to learn the API doesn't >strike me as a good reason (it really isn't as tough as some people make it >out to be; I learned it in a couple of weeks with only the reference manuals >and Petzold's book, and if *I* can, anyone can). > >Now, after that brief tirade, I can say that there is no directly supported >way to do graphics without using PM. That's not to say it isn't possible, >since it most definitely is. But don't expect it to be as nice as using >GPI for everything...wish I could help you more, but I really would suggest >that doing it under PM is probably the wisest move (the time it will take you >to work around OS/2 to draw directly on the screen will probably more than >offset the time it would take you to learn PM and GPI, IMHO). > Well, I know this is likely to cause some to rant and rave, but I'll try to straighten some things out - and give reasons for some direction in OS/2. #1. Graphics programs can be written under os/2 using much the same techniques as you used under dos - ie, you change screen mode, then you toggle i/o ports and you toggle bits on screen and you've done the work. Your work is specific to cga/ega/vga or whatever subset of adaptor you uderstand. #2. PM is a better way. The direction for OS/2 is that, since PM is, and will remain, an in-built part of os/2 - we believe the majority of successful os/2 programs will have their user interface written for PM. This is true today, and will become truer over time. Therefore we make PM easier, and we will make it easier still. You are unlikely to find non-PM applications becoming easier to write. What will make graphics programming easier will be the availability of tools and libraries which themselves handle PM and leave something more familiar or 'easier' (although this depends on your point of view). We are right to try to get ISVs standardize on a graphics API and PM with GPI are the standards we are setting. GPI is a drawing library which is consistant and available for all OS/2 supported screens and printers. This list will increase over time. (I will not enter into which screen/which printer discussions). The greatest advatage is that we are putting resposibility for supporting standard APIs in the hands of oems, so that ISVs can write to the smallest number of standard APIs and oems will be motivted to do the support work for their hardware. This will allow much greater improvement in hardware than today where we are constantly restricted by the demand of backwards compatibility. Enough said. I urge you to use Presentation Manager when writing the user interface portion of you OS/2 application - I similarly urge you to use GPI as PM's graphics library when writing to your printer. This is not marketing BS. Alistair Banks OS/2 Group Microsoft