原创 DrawText 顯示平面文字

函數:DrawText說明:顯示平面文字,此函數與 API 函數 DrawText 的用法類似。用法:ct3DX.DrawText d3dFont, color, TextString, nRECT, Format參數:d3dFont A

原创 四元數與旋轉

http://caterpillar.onlyfun.net/Gossip/ComputerGraphics/QuaternionsRotate.htm 在討論「四元數」之前,我們來想想對三維直角座標而言,在物體旋轉會有何影響,可以擴充

原创 golang 守護進程

package daemon import ( "os" "os/exec" "syscall" "time" "github.com/inconshreveable/log15" ) type DaemonState

原创 lua面向對象編程之點號與冒號的差異詳細比較

轉自:http://luaer.diandian.com/post/2011-10-09/5673234 首先,先來一段在lua創建一個類與對象的代碼  01    Class = {} 02    Class.__index = Cl

原创 boost 最短路徑 johnson

#include <exception> #include <boost/config.hpp> #include <fstream> #include <iostream> #include <iomanip> #include <ve

原创 C/C++語法知識:typedef struct 用法詳解

第一篇:typedef struct與struct的區別 1. 基本解釋 typedef爲C語言的關鍵字,作用是爲一種數據類型定義一個新名字。這裏的數據類型包括內部數據類型(int,char等)和自定義的數據類型(struct等)。

原创 [python]獲取文件夾大小

import os from os.path import join, getsize adrFloder = "E:\\pythontest\\adr" iosFloder = "E:\\pythont

原创 程序崩潰,但暫停的位置不在錯誤發生的行的解決方法

如果經常遇到程序Crash但暫停的位置不在錯誤發生的行,可以檢查一下VC的Exceptions設置:   Debug>Exceptions  在設置界面中把C++ Exceptions和Win32 Exceptions都選中,這樣出現錯

原创 php format var_dump

// format var_dump function dump($var, $echo=true,$label=null, $strict=true) { $label = ($label===n

原创 Wicket + Spring integration example

jump :http://www.mkyong.com/wicket/wicket-spring-integration-example/ This tutorial demonstrates how to integrate Wic

原创 C++ 內存池 -- C++ Memory Pool

http://www.rosoo.net/a/201010/10268.html http://www.codeproject.com/cpp/MemoryPool.asp

原创 NeHe OpenGL第三十三課:TGA文件

原創作品,允許轉載,轉載時請務必以超鏈接形式標明文章 原始出處 、作者信息和本聲明。否則將追究法律責任。http://yarin.blog.51cto.com/1130898/381885 NeHe OpenGL第三十三課:TGA文

原创 確定GPU/CPU bound

 確定GPU/CPU bound glClear/swapbuffer或某次drawcall佔用大量時間=>GPU bound hide特定模型或關掉特定效果之後fps大漲=>GPU bound 遊戲暫停(邏輯&動畫不更新)之後fps大漲

原创 example for bind

#include <iostream> #include <boost/bind.hpp> #include <boost/function.hpp> using namespace std; class People { pub

原创 pthread_jion

#include <pthread.h> #include <string.h> #include <windows.h> #include <stdlib.h> #include <stdio.h> #pragma warning