To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 10772
10771  |  10773
Subject: 
Re: LPub 4 Status
Newsgroups: 
lugnet.cad.dev
Date: 
Sun, 30 Mar 2008 16:57:34 GMT
Viewed: 
12242 times
  
In lugnet.cad.dev, Travis Cobbs wrote:
In lugnet.cad.dev, Don Heyse wrote:
to be the way to go.  Then I built a new (universal?) ldglite with your
static libpng and some patches to render offscreen via the carbon fns.  It
didn't work from an ssh login (carbon is forbidden), but when I logged
locally I got a png file without opening a graphics window.  Cool!

If you used my code as an example for Core GL setup, then the error was due
to a bug in my code.  If not, put the following in your
CGLPixelFormatAttribute array, and it should work even via ssh:

|    CGLPixelFormatAttribute attrs[] =
|    {
|        kCGLPFADepthSize, (CGLPixelFormatAttribute)24,
|        kCGLPFAColorSize, (CGLPixelFormatAttribute)24,
|        kCGLPFAAlphaSize, (CGLPixelFormatAttribute)8,
|        kCGLPFAStencilSize, (CGLPixelFormatAttribute)8,
|        kCGLPFAAccelerated,
|        kCGLPFAPBuffer,
|        kCGLPFARemotePBuffer,
|        (CGLPixelFormatAttribute)0
|    };

The last setting (kCGLPFARemotePBuffer) is the important one for remote
rendering.  Note, thought, that you don't want that setting set when
saving a file from the UI.  I suspect that you can skip the
kCGLPFAAccelerated entry.

I updated LDView, and it now works fine remotely via ssh from an account
different than the logged in user (and probably when nobody is logged in; I
can't test that right now).

Actually it turned out that despite the warning message my settings
did work from a remote ssh login as a different user.  The old AGL code,
while it worked locally (that was a surprise), did not work remotely and
produced the same warning message:

_RegisterApplication(), FAILED TO establish the default connection to the
WindowServer, _CGSDefaultConnection() is NULL.

When I searched for that I found some dev notes for daemon developnemt
that said carbon and opengl calls were not allowed for this sort of thing.
Since it warned me but still worked I wonder if this was more of a
problem with older versions of OS-X.

I took a peek at your code, but pbuffers make me nervous.  I sorta
remember a Dev Connection table that showed them as unsupported on
some of the older Macs.  (Like before 10.3)

So I skipped the pbuffer and went straight to ordinary offscreen
memory for the absolute lowest performance. ;-)  I only use the stencil
buffer for editing mode, and I forgot to ask for alpha, but got it
anyhow with this setup:

CGLPixelFormatAttribute attribs[] = {
  kCGLPFAOffScreen,
  kCGLPFAColorSize, 32,
  kCGLPFADepthSize, 32,
  0};

Have fun,

Don



Message is in Reply To:
  Re: LPub 4 Status
 
(...) If you used my code as an example for Core GL setup, then the error was due to a bug in my code. If not, put the following in your CGLPixelFormatAttribute array, and it should work even via ssh: CGLPixelFormatAttribute attrs = (...) (17 years ago, 29-Mar-08, to lugnet.cad.dev, FTX)

81 Messages in This Thread:




















Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR