macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

initWithAttributes:

ピクセルフォーマットで初期化して返します
-(id)initWithAttributes:(NSOpenGLPixelFormatAttribute *)attribs:

解説

ピクセルフォーマットで初期化して返します。
【属性】
● NSOpenGLPFAAllRenderers
● NSOpenGLPFADoubleBuffer
● NSOpenGLPFAStereo
● NSOpenGLPFAMinimumPolicy
● NSOpenGLPFAMaximumPolicy
● NSOpenGLPFAOffScreen
● NSOpenGLPFAFullScreen
● NSOpenGLPFASingleRenderer
● NSOpenGLPFANoRecovery
● NSOpenGLPFAAccelerated
● NSOpenGLPFAClosestPolicy
● NSOpenGLPFARobust
● NSOpenGLPFABackingStore
● NSOpenGLPFAWindow
● NSOpenGLPFAMultiScreen
● NSOpenGLPFACompliant

● NSOpenGLPFAAuxBuffers
● NSOpenGLPFAColorSize
● NSOpenGLPFAAlphaSize
● NSOpenGLPFADepthSize
● NSOpenGLPFAStencilSize
● NSOpenGLPFAAccumSize
● NSOpenGLPFARendererID
● NSOpenGLPFAScreenMask

返り値

( id )

オブジェクト

引数

( NSOpenGLPixelFormatAttribute * )attribs

フレームワーク

ApplicationKit

クラス

NSOpenGLPixelFormat

Instance Methods

使用可能

10.0

参照

例文

#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction:(id)sender
{
NSOpenGLPixelFormatAttribute attrs[] =
{
    NSOpenGLPFADoubleBuffer,
    NSOpenGLPFADepthSize, 32,
    nil
};

NSOpenGLPixelFormat* pixFmt = [[[NSOpenGLPixelFormat alloc] initWithAttributes:attrs] autorelease];

NSLog([pixFmt description]);
}

@end