태터데스크 관리자

도움말
닫기
적용하기   첫페이지 만들기

태터데스크 메시지

저장하였습니다.

 WWDC(World Wide Developers Comference) keynote 를 감상해 보자. 3배가량 빨라진 iPhone 3GS (여기서 S는 speed)과, $99 iPhone의 등장 등 흥미진진한 내용이 담겨있다. 그러나 안타깝게 Steve jobs는 모습을 드러내지 않았다고 한다. 암튼, 하루빨리 국내에서 iPhone을 만나 보았으면 좋겠다. 그런 아이템은 반드시 구매해주는 것이 인지상정.



Posted by ptptomr
Time Resolution은 좀 떨어지지만, 간단하게 FPS를 측정할 수 있는 방법. "microsoft XNA - xbox 360과 윈도우즈를 위한 그래픽과 프로그래밍" 에 소개된 내용이다.
#include <windows.h>
#include <iostream>
using namespace std;

void draw()
{   
    // do something   
    float exitTick = (float)GetTickCount() + 30.f;       
    while (TRUE) {
        if (exitTick < (float)GetTickCount()) {
            break;
        }
    }

    // FPS
    static float fps = 0.f;
    static float updateInterval = 1000.0f;  // millisecond
    static float timeSinceLastUpdate = 0.f;
    static float frameCount = 0;
    static float currentTick = (float)GetTickCount();
    static float lastTick = currentTick;

    frameCount++;
    currentTick = (float)GetTickCount();
    float elapsed = currentTick - lastTick;   
    lastTick = currentTick;
    timeSinceLastUpdate += elapsed;
    if (timeSinceLastUpdate > updateInterval)
    {
        fps = frameCount / timeSinceLastUpdate * 1000.f;
        cout << "FPS: " << fps << " frame/sec"<< endl;
        frameCount = 0;
        timeSinceLastUpdate -= updateInterval;
    }
}

void main()
{
    for (int i = 0; i < 1000; i++) {
        draw();
    }
   
    cout << "test end ..." << endl;
}

Posted by ptptomr
Because I want to remove repetitive work, I decided to create custom Xcode project templates. But the article I founded on the web was not for Xcode 3.1.2 which is latest one. So, I just retouched the guide, I founded, a little bit.

This guide explains how to create new project templates in Xcode. Project templates appear in the list of project types in the New Project dialog.
  1. Create a new project and setup everything as you'd like (NIB files, graphics, sounds, settings, code etc). Escpecially, use prefix ''___PROJECTNAME___" for *.xcodeproj and "___PROJECTNAMEASIDENTIFIER___" for *AppDelegate.h/m, *_Prefix.pch and etc. That prefix will be altered automatically by project name user entered.
  2. Optionally, build and make sure the project works
  3. Use Finder and locate the project folder for your project you created in step 1
  4. Open another Finder window and navigate to /Developer/Platforms/iPhoneOS.Platform/Developer/Library/Xcode/Project Templates/. You have two options here:
    • Create a new folder for your custom project templates - this will appear as a category when creating a new project in Xcode
    • Choose an already existing folder (eg Application) - this will place the project template in that category
  5. Open the new/chosen category folder and create a new folder inside. You can name this new folder whatever you like and it will appear as the project template name.
  6. Copy all files from the project folder in step 3 to the new template folder created in step 5. Note: If you built the project, delete the build folder from the template folder.
  7. Try to create a new project in Xcode. You should see your project template in one of the original categories or in the category you created, whichever you decided.
Posted by ptptomr
이전페이지 1 2 3 4 5 ... 42 다음페이지
사이드바 열기