필요없는 파일은 맞는데 .hgignore 에 넣기는 후달릴때 쓰는 방법
참고 에 소개되어있다. hg st 때렸을때 깔끔하게 프롬프트만 떨어지게 하고 쓰자. 무시하고 살다보면 add 를 까먹기도 한다.


워킹카피내의 .hg/hgrc 에 아래내용 추가하고 hgignore 작성하면 끝.

[ui]
ignore = /path/to/repo/.hg/hgignore



태그 : mercurial
환경설정 보다 알았네
그런데 지원언어가 많지 않다.

음.. 그냥 지금처럼 emacs 에서 html 뽑아서 붙이는쪽이 끌리는데..
어쨌건 기억해 두자.

여태껏 집에서 돌리던 리파지토리 서버를 내리고 드랍박스에서 리파지토리를 돌리고 있어서 전처럼 필요할때 집에 로그인해서 코드를 꺼내가기 힘들어졌으니 앞으로 코드조각들을 블로그에 올려둬야 할 판인데 자주 써먹게되겠군.


오우거 시작코드를 스크래치부터 짜보고 있는데 그 코드 올려본다.

/*
  흠. 외부데이타를 읽을게 많아서 초기기동이 상당히 성가시다.
  setupResourceLocations() 함수를 참고해보자.
*/
#include <iostream>
#include <string>
#include "Ogre.h"

using namespace std;
using namespace Ogre;


class MyFrameListener : public FrameListener
{
public:
    virtual bool frameStarted(const FrameEvent& e)
    {
        return true;
    }
    virtual bool frameEnded(const FrameEvent& e)
    {
        return true;
    }
};


class OgreApp
{
public:
    OgreApp()
    {
        setupLog();
        setupRoot();
        setupRenderWindow();
        setupSceneManager();
        setupCamera();
        setupViewport();
        setupResourceLocations();
        createScene();
    }
    
    virtual ~OgreApp()
    {
        delete root_;
        delete logMgr_;
    }

    void run()
    {
        while(true)
        {
            if(!root_->renderOneFrame())
                break;
            messageLoop();
        }
    }

    void addFrameListener(FrameListener* fl)
    {
        root_->addFrameListener(fl);
    }

private:
    LogManager*   logMgr_;
    Root*         root_;
    RenderWindow* window_;
    SceneManager* sceneMgr_;
    Camera*       cam_;
    Viewport*     vp_;


    void setupLog()
    {
        logMgr_ = new LogManager;
        LogManager::getSingleton().createLog("ogre.log", true, true, false);
        logMgr_->setLogDetail(LL_BOREME);
    }

    void setupRoot()
    {
        root_ = new Root("", "");
        loadPlugin("RenderSystem_Direct3D9");
        loadPlugin("Plugin_OctreeSceneManager");            
        root_->setRenderSystem(*root_->getAvailableRenderers()->begin());
        root_->initialise(false);
    }
    void loadPlugin(const char* name)
    {
        string n = name;
#if _DEBUG
        n += "_d";
#endif
        root_->loadPlugin(n);
    }
    void setupRenderWindow()
    {
        root_->getRenderSystem()->setConfigOption("Full Screen", "No");
        root_->getRenderSystem()->setConfigOption("Video Mode", "1024 x 768 @ 32-bit colour");
        window_ = root_->createRenderWindow("Manual Ogre Window", 1024, 768, false, 0);
    }
    void setupSceneManager()
    {
        sceneMgr_ = root_->createSceneManager(ST_GENERIC, "MySceneManager");
    }

    void setupCamera()
    {
        cam_ = sceneMgr_->createCamera("MainCam");
        // Z 방향으로 500 거리에 카메라 위치
        cam_->setPosition(Vector3(0,0,500));
        // Z 쪽으로 향하게
        cam_->lookAt(Vector3(0,0,-300));
        cam_->setAspectRatio(1.33333f);
        cam_->setNearClipDistance(5);
        cam_->setFarClipDistance(1000);
    }
    void setupViewport()
    {
        vp_ = window_->addViewport(cam_);
        vp_->setBackgroundColour(ColourValue(0,0,0));
    }
    void setupResourceLocations()
    {
        //addResourceLocation("/packs/OgreCore.zip", "Zip", "Boostrap");
        addResourceLocation("/materials/programs", "FileSystem", "General");
        addResourceLocation("/materials/scripts", "FileSystem", "General");
        addResourceLocation("/materials/textures", "FileSystem", "General");
        addResourceLocation("/models", "FileSystem", "General");
        ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); // 그룹별로 초기화도 가능하다 기억해두자.
    }
    void addResourceLocation(const char* name, const char* type, const char* group)
    {
        const char* ogrehome = getenv("OGRE_HOME");
        if(!ogrehome) throw runtime_error("need OGRE_HOME env");

        ResourceGroupManager::getSingleton().addResourceLocation(string(ogrehome) + "/media" + name,
                                                                 type,
                                                                 group);        
    }
    void createScene()
    {
        sceneMgr_->setAmbientLight(ColourValue(0.5,0.5,0.5));
        Light* l = sceneMgr_->createLight("MainLight");
        l->setPosition(20,80,50);
        Entity* ent = sceneMgr_->createEntity("head", "ogrehead.mesh");
        //ent->setMaterialName("Examples/EnvMappedRustySteel");
        sceneMgr_->getRootSceneNode()->createChildSceneNode()->attachObject(ent);
    }

    void messageLoop()
    {
        MSG msg;
        while(PeekMessage(&msg, NULL, 0, 0,  PM_REMOVE))
        {
            TranslateMessage(&msg);
            DispatchMessage(&msg);
        }
    }
};




int main()
{
    MyFrameListener fl;
    
    OgreApp app;
    app.addFrameListener(&fl);
    app.run();
}

s7, 간단한 scheme 구현

분류없음 | 2010/01/26 11:23 | 기냄
https://ccrma.stanford.edu/software/snd/snd/s7.html
https://ccrma.stanford.edu/software/snd/

http://www.reddit.com/r/programming/comments/arvdl/choosing_a_game_scripting_language/

중 s7 언급을 보고 알았다.
다음에 스크립트 올릴일 있으면 tinyscheme 말고 이놈 한번 써보자.

후에 이게 기억나길..
태그 : S7,scheme
흠. 집에 항상 켜두는 PC 가 있어서 거기 colinux 를 깔고 hg 서버로 활용했는데 이제 그렇게 쓰기 힘들게 됐다. 그래서 전부터 생각해오던 몇가지 대안을 테스트중.

1. 유료 웹호스팅 활용.
몇몇 호스팅의 경우 계정에 hg 설치가 가능해서.. 충분히 써먹을수 있지만 난 돈이 없다.

2. svn, hg 무료 호스팅 서비스
용량 작거나 라이센스 제한.

3. N 드라이브
네이버 서비스인데, 드라이브가 N 으로 잡혀서 콘솔에서 쓰기 쉬운게 매력적.. 이라고 생각했었지만 hg clone 부터 실패하더라. 흠. 제길슨.

4. 드랍박스
헐 이미 다른용도로 용량을 거의 다 쓰고 있어서.. 그리고 무료계정은 2기가를 주는데 그다지 넉넉치 못하다. 그래도 가장 나아보인다.

5. 라이브메쉬
현재 라이브메쉬로 hg 리파지토리 폴더를 동기화중.. 느리고 동기화가 얼마나 진행됐는지 알기 어려운데.. 흠 달리 대안이 없으니 일단 이걸 써볼 예정. 하지만 리눅스 미지원때문에
오래 쓰진 못할것같다.



으음.. 전에 S3 에 리파지토리 올리는거 찾아보다가 말았는데 다시 뒤져보자.
유료라 쓰진 않겠지만..

아.. skydrive 도 한번 고려해보자.. 이쪽은 서드파티 클라이언트들을 좀 뒤져봐야 겠다.



2010/01/26
흠 mesh 는 좀 요상하네. 분명 수정을 했는데 싱크가 되지 않고 있더라.. 음.. 5G 는 매력적인데 어차피 리눅 미지원이니 별 고민없이 드랍박스로 세팅했다. 현재 드랍박스에 동기화중.
존내 느린건 마찬가지...
언제 짬내서 보너스용량 받아 챙겨야겠다.
https://www.dropbox.com/referrals/NTEyOTUzMjE5
적어둬야지..


2010/02/02
push 중 lock 됐다는 에러가 뜨던데 이글을 참고하여 .hg/store/lock 을 지워버렸다.
흠. 집에서 PC 를 끌때 동기화가 잘 안된건가???



이전 1 2 3 4 5 ... 37 다음