bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quartz Display Services and then NSOpenGLPixelFormat


From: Julien Isorce
Subject: Re: Quartz Display Services and then NSOpenGLPixelFormat
Date: Wed, 11 Feb 2009 00:19:42 +0100



2009/2/10 Julien Isorce <julien.isorce@gmail.com>
 

> Then when the following code is executed :
>
> NSOpenGLPixelFormat *fmt;
>   NSOpenGLPixelFormatAttribute attribs[] = {
>     NSOpenGLPFAAccelerated,
>     NSOpenGLPFANoRecovery,
>     NSOpenGLPFADoubleBuffer,
>     NSOpenGLPFAColorSize, 24,
>     NSOpenGLPFAAlphaSize, 8,
>     NSOpenGLPFADepthSize, 24,
>     NSOpenGLPFAWindow,
>     0
>   };
>
>   fmt = [[NSOpenGLPixelFormat alloc]
>       initWithAttributes:attribs];
>
> I got the following error :"File NSOpenGLPixelFormat.m: 59. In
> [NSOpenGLPixelFormat +_classPixelFormat] Backend doesn't have any
> glPixelFormatClass"
>

which backend/platform? it sounds like when your backend was compiled
either WGL or the GL/GLX libraries were not found.

Windows XP  (I installed GNUstep using gnustep-core-0.22.0-setup.exe and gnustep-system-0.22.0-setup.exe)

In which .a there is the glPixelFormatClass backend ?

>2009/2/10 Matt Rice <ratmice@gmail.com>
>sorry I really don't know anything about the windows backend,
>I had already typed in 'only works under x11' in my previous email
>before I decided to check if someone had implemented it since the last
>I checked, and sure enough it looks to be implemented.

>its in back/Source/win32/WIN32Server.
>m -glPixelFormatClass
>probably in libgnustep-back.a or something to that effect.
>the class name is Win32GLPixelFormat.

>the implementation of -glPixelFormatClass
>looks like this:

>#ifdef HAVE_WGL
> return [Win32GLPixelFormat class];
>#else
> return nil;
>#endif

>so it is likely that when you ran configure it never found WGL for
>some reason, so thats the first place I would look, maybe send the
>config.log to the list.

When should I run configure ?
I wrote a GNUmakefile (for a small lib)

it seems that gnustep-core-0.22.0-setup.exe and gnustep-system-0.22.0-setup.exe  do not install" GNUstep Backend" package.

I will try to compile it by my self so, or any other explanation ?

Last question: do you how to remove the "-0" suffix that appears in the .dll file name ? (include $(GNUSTEP_MAKEFILES)/library.make)
 

I just compiled gnustep backend package (see config.log in attachement) and it installed files which were already installed with gnustep-core-0.22.0-setup.exe
(I mean libgnustep-back-016.dll and libgnustep-back-016.bundle etc..)

There is no .a associated to this dll so I think I have to activate something in my makefile (GNUMakefile)
Any idea ?

 
Thx

I made a minimal test to reproduce the error on Windows.

test.m and GNUmakefile attached to this mail.

--------- test.m----------

#include <Cocoa/Cocoa.h>

int
main (void)
{
  NSLog (@"start");
 
  NSOpenGLPixelFormatAttribute attribs[] = {
    NSOpenGLPFAAccelerated,
    NSOpenGLPFANoRecovery,
    NSOpenGLPFADoubleBuffer,
    NSOpenGLPFAColorSize, 24,
    NSOpenGLPFAAlphaSize, 8,
    NSOpenGLPFADepthSize, 24,
    NSOpenGLPFAWindow,
    0
  };

  NSOpenGLPixelFormat *fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:attribs];
 
  if (!fmt) {
    NSLog (@"fail");
  }
    
  NSLog (@"end");
 
  return 0;
}

-----------------------------------------


-------GNUmakefile---------------

include $(GNUSTEP_MAKEFILES)/common.make

TOOL_NAME = test
test_OBJC_FILES = test.m

test_TOOL_LIBS += -lgnustep-gui

include $(GNUSTEP_MAKEFILES)/tool.make

----------------------------------------

make
./obj/test.exe

output:

2009-02-11 00:12:02.406 test[2168] start
2009-02-11 00:12:02.421 test[2168] autorelease called without pool for object (1
923e08) of class GSCBufferString in thread <NSThread: 0x3e86f8>
2009-02-11 00:12:02.421 test[2168] autorelease called without pool for object (1
934200) of class GSCBufferString in thread <NSThread: 0x3e86f8>
2009-02-11 00:12:02.421 test[2168] autorelease called without pool for object (1
9366f0) of class GSCInlineString in thread <NSThread: 0x3e86f8>
2009-02-11 00:12:02.421 test[2168] File NSOpenGLPixelFormat.m: 59. In [NSOpenGLP
ixelFormat +_classPixelFormat] Backend doesn't have any glPixelFormatClass

2009-02-11 00:12:02.421 test[2168] fail
2009-02-11 00:12:02.421 test[2168] end

I think the win32 back end is not found. Should  I try a newer version of GNUstep system ? (I think it thinks there is no win32 backend but it exits)

Any idea ?

Sincerely

Julien


reply via email to

[Prev in Thread] Current Thread [Next in Thread]