• OPENGL SOURCE

    OPENGL SOURCE BOOK glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient); glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); glMaterialf(GL_FRONT, GL_SHININESS, 50.0); glLightfv(GL_LIGHT0, GL_POSITION, light_position); glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lm_ambient);

    2
    46
    693KB
    2010-05-07
    0
  • Beginning+OpenGL+Game+Programming+Source+Code.rar

    OpenGL Game Programming Source Code,和书对应的源代码,对学OPENGL 游戏编程比较有用

    5
    60
    14.39MB
    2010-05-06
    3
  • tcp,ip编程实类

    tcp ip 编程,集合了几个常用的类,封装了SOCKET编程里面常用的协议,tcp,ip,http等,可以看下,值得参考哦

    0
    34
    10KB
    2010-03-17
    10
  • cocoa something related

    int i; > > //initialize the threadLock with the number of thread > > [threadLock lock]; > [threadLock unlockWithCondition:count]; > > NSPort *mainPort = [NSMachPort port]; > if (!mainPort) > { > return; > } > > [mainPort setDelegate:self]; > > [[NSRunLoop currentRunLoop] addPort:mainPort > forMode:NSDefaultRunLoopMode]; > > NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; > [parameters setObject:mainPort forKey:@"port"]; > > // start the secondary threads > // loop starts at 1 because the main thread is also used (see below) > > for (i=0;i<count;i++) { > [NSThread detachNewThreadSelector:@selector(runJobs:) > toTarget:self > withObject:parameters]; > } > > //wait until done, ie until the count of threads in threadLock is > down to 0 > > [threadLock lockWhenCondition:0]; > [threadLock unlock]; > }

    4
    55
    105KB
    2009-09-16
    5
  • cocoa animation examples

    // // MyView.m // CustomAnimationTiming // // Created by Bill Dudney on 12/18/07. // Copyright 2007 Gala Factory. All rights reserved. // #import "MyView.h" @implementation MyView //START:code.MyView.setup -(void)setupMover { NSRect bounds = self.bounds; NSRect moverFrame = NSInsetRect(bounds, NSWidth(bounds) / 4.0f, NSHeight(bounds) / 4.0f); moverFrame.origin.x = 0.0f; mover = [[NSImageView alloc] initWithFrame:moverFrame]; [mover setImageScaling:NSScaleToFit]; [mover setImage:[NSImage imageNamed:@"photo.jpg"]]; [self addSubview:mover]; } - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { [self setupMover]; } return self; } //END:code.MyView.setup //START:code.MyView.move - (CABasicAnimation *)moveAnimation { if(nil == moveAnimation) { moveAnimation = [CABasicAnimation animation]; moveAnimation.duration = 2.0f; moveAnimation.timingFunction = [[CAMediaTimingFunction alloc] initWithControlPoints:0.5 :1.0 :0.5 :0.0]; } return moveAnimation; } - (void)move { NSDictionary *animations = [NSDictionary dictionaryWithObject:[self moveAnimation] forKey:@"frameOrigin"]; [mover setAnimations:animations]; NSPoint origin = mover.frame.origin; origin.x += NSWidth(mover.frame); [mover.animator setFrameOrigin:origin]; } //END:code.MyView.move //START:code.MyView.events - (BOOL)acceptsFirstResponder { return YES; } - (void)keyDown:(NSEvent *)event { [self move]; } //END:code.MyView.events @end

    4
    164
    3.12MB
    2009-09-14
    9
  • COCOA相关资料(XML解析).rar

    #pragma mark UIAlertSheet delegation - (void)alertSheet: (UIAlertSheet *)sheet buttonClicked: (int)button { [sheet dismiss]; [sheet release]; switch (button) { case 1: [_pushr openURL: [self authURL]]; break; default: [_pushr terminate]; break; } } #pragma mark XML helper functions - (BOOL)sanityCheck: (id)responseDocument error: (NSError *)err { NSXMLNode *rsp = [[responseDocument children] objectAtIndex: 0]; if (![[rsp name] isEqualToString: @"rsp"]) { NSLog(@"This is not an <rsp> tag! Bailing out."); return FALSE; } id element = [[NSClassFromString(@"NSXMLElement") alloc] initWithXMLString: [rsp XMLString] error: &err]; if (![[[element attributeForName: @"stat"] stringValue] isEqualToString: @"ok"]) { NSLog(@"The status is not 'ok', and we have no error recovery."); [element release]; return FALSE; } [element release]; return TRUE; }

    5
    69
    14KB
    2009-09-01
    4
  • cocoa 相关资料

    cocoa 相关资料 NSApplicationMain() 函数,其实功能如下: void NSApplicationMain(int argc, char *argv[]) { [NSApplication sharedApplication]; [NSBundle loadNibNamed:@"MainMenu" owner:NSApp]; [NSApp run]; }

    0
    100
    4.02MB
    2009-08-31
    9
  • COCOA DOCUMENT

    If the application you create is useful, you will want to share it with all the people of the world. Unfortunately, we don't all speak the same language. Suppose that you wish to make your RaiseMan application available to French speakers. We would say, "You are going to localize RaiseMan for French speakers." If you are creating an application for the world, you should plan on localizing it for at least the following languages: English, French, Spanish, German, Dutch, Italian, and Japanese. Clearly, you do not want to have to rewrite the entire app for each language. In fact, our goal is to ensure that you don't have to rewrite any Objective-C code for each language. That way, all the nations of the world can use a single executable in peace and harmony. Instead of creating multiple executables, you will localize resources and create string tables. Inside your project directory, an English.lproj directory holds all the resources for English speakers: nib files, images, and sounds. To localize the app for French speakers, you will add a French.lproj directory. The nibs, images, and sounds in this directory will be appropriate for French speakers. At runtime, the app will automatically use the version of the resource appropriate to the user's language preference.

    0
    51
    324KB
    2009-07-29
    9
  • cocoaFrameworkProjectPrograming

    Framework bundles use a bundle structure different from the bundle structure used by applications. The structure for frameworks is based on an earlier bundle format, and allows for multiple versions of the framework code and header files to be stored inside the bundle. This type of bundle is known as a versioned bundle. Supporting multiple versions of a framework allows older applications to continue running even as the framework binary continues to evolve.

    0
    89
    465KB
    2009-07-27
    3
  • 关于VC,MFC的好的学术文章,资料篇

    自己网上收集的文章,拿来和大家分享。。。

    0
    42
    5.03MB
    2008-11-05
    0
  • 签到新秀

    累计签到获取,不积跬步,无以至千里,继续坚持!
关注 私信
上传资源赚积分or赚钱