Time of Update: 2018-12-03
#include "HandleKey.h" BOOL InitKeyboard(){//建立DirectInput介面對象HRESULT
Time of Update: 2018-12-03
SSE和SSE2,3指令 ,一般需要處理的資料是16位元組對齊。有兩種方法。1,當使用MMX/SSE/SSE2操作以位元組為單位的BUFFER時,比如MEMCPY,MEMSET之類的,利用64/128BIT操作指令加快拷貝過程。輸入的資料不一定要求8/16位元組對齊。在彙編代碼中,對資料掐頭,去尾,找到16位元組對齊開始和結束的資料區段位置,使用MMX/SSE/SSE2 進行64/128BIT操作。然後使用一般彙編指令對非16位元組對齊的資料進行操作。同事研究的VC8 CRT
Time of Update: 2018-12-03
#include "../../GameEngine/GameEngine_Common.h"#include "Triangle.h" CTriangle::CTriangle(){} CTriangle::~CTriangle(){Direct3DRelease();} bool CTriangle::CreateD3DDevice(HWND hWnd,bool
Time of Update: 2018-12-03
opengl的進階菜鳥問題 看了一本書《OpenGL三維圖形系統開發與應用技術》,但是,其中涉及到glut.h檔案的函數無法正常串連,典型的錯誤如下:------ 已啟動產生: 項目: gears, 配置: Debug Win32 ------1>正在連結...1>GEARS.obj : error LNK2019: 無法解析的外部符號 ___glutInitWithExit@12,該符號在函數 _glutInit_ATEXIT_HACK@8 中被引用1>GEARS.obj :
Time of Update: 2018-12-03
1 水題。。。非常松的限制條件,如果都去掉的話,或許會成為challenge的一道好題2 非常噁心的問題,一個trick把我給繞進去了。。不能線序的遍曆一遍,需要不斷設定,不斷擴充未完成的集合,並附設標記位3 又是一道噁心的題目。。。這種1000分的題目,一定不要放棄,不斷思考,一定會有結果的。。This problem can be solved greedily with the following powerful observation.Let X1, X2, X3, ..., XN
Time of Update: 2018-12-03
#include <vector>#include <list>#include <map>#include <set>#include <deque>#include <stack>#include <bitset>#include <algorithm>#include <functional>#include <numeric>#include
Time of Update: 2018-12-03
比較簡單吧。。套模板。。Gabow#include "cstdlib" #include "cctype" #include "cstring" #include "cstdio" #include "cmath" #include "algorithm" #include "vector" #include "string" #include "iostream" #include "sstream" #include "set" #include "queue" #include
Time of Update: 2018-12-03
轉載hhang大牛的blog。。。A – Winner這個比較簡單 ,Pass,簡單迭代B. The least round
Time of Update: 2018-12-03
STL set 容易引起誤解的一個地方#include <set>#include <string>#include <iostream> using namespace std;using std::set;using std::string; struct student { string name; int grade; student(string const&name_, intgrade_)
Time of Update: 2018-12-03
並查集的刪除---WOJ 1403: Quick Answer 連續想了好幾天的題=。=,晚上跟人討論過後終於AC了.在本題中,需要刪除一些元素,而又不希望被刪除的元素(記為d)的改變影響到其他和 d 在同一組的元素(比如d是所有同組元素的祖先) 因此可以另外開一個數組 pid[], pid[i]存放的是元素 i 的編號,這個編號在程式運行過程中是逐漸層化的。 當刪除了 元素 i 以後,將元素 i 的編號更改為當前最大的編號+1(新的pid[i]),再把parent[i]賦值為新的pid[i]
Time of Update: 2018-12-03
這段時間看了一下有關Deferred Shading的文章,總結起來還是不敢用。關鍵還是1. 顯存消耗太大 ,基本不可以移植到console上,要知道,ps3和xbox360的生命還有4~5年2. 對主要是室外的渲染環境協助不大,對室內多光源多互動的獲得的增益更大3. 不能支援alpha blend,所以需要blending的還是要用Forward Rendering當然,好處是有的,想法是精妙而美麗的,以後會有大量的運用。當然,現在不太適合用完全的Deferred
Time of Update: 2018-12-03
關於MSVC下QT項目的警告層級:用MSVC建立一個QT 項目.似乎是自動化佈建成最低層級,WARNNING 1 ! 記住一定要自己設定回第三層級! 否則,無數C++中會導致萬劫不複的錯誤會被編譯器放過 。舉個例子:===================A.h===================class A{public :A(){m_buf = new char[1024*1024*1024];//en ,... 1G ...just see see};virtual
Time of Update: 2018-12-03
現在在寫記憶體管理這一塊,有些問題想請教大家。首先,我寫了一個記憶體管理的singleton性質的管理類:class MemoryManagement ...{public: MemoryManagement(); ~MemoryManagement(); void Initialize(); void Finalize(); void* Alloc( Uint32 size ); void Free( void* p ); vo
Time of Update: 2018-12-03
#include <windows.h>#include <dinput.h>#include <stdio.h> #pragma comment(lib,"dxguid.lib")#pragma comment(lib,"dinput8.lib")#pragma comment(lib,"odbc32.lib")#pragma comment(lib,"odbccp32.lib") //定義全域變數HINSTANCE
Time of Update: 2018-12-03
#include <vector>#include <list>#include <map>#include <set>#include <deque>#include <stack>#include <bitset>#include <algorithm>#include <functional>#include <numeric>#include
Time of Update: 2018-12-03
項目從VC6換到VS2003,編譯的時候提示如下:logEx.cpp(189) : fatal error C1010: 在尋找先行編譯頭指令時遇到意外的檔案結尾查了下資料發現,原來是它的標頭檔中沒有引用#include "Stdafx.h"由於這個類是我自已寫的,我不打算加入Stdafx.h的引用,所以要做一下修改,如下:1、選中提示出錯的檔案,這裡是logEx.cpp。2、在選中的檔案上右鍵選屬性,找到“先行編譯頭”。3、在“建立/使用先行編譯頭”這裡選成“不使用先行編譯頭”()。
Time of Update: 2018-12-03
題目:Problem Statement It's only 9 AM, and already your day has been horrible. You overslept your alarm, your oatmeal got cold as you listened to the traffic report, and the water in your shower was frigid. To make matters worse, as you got onto
Time of Update: 2018-12-03
練一下俄羅斯大牛n年前出的題目。。都飽經風霜,仍然熠熠生輝。。搞個最簡單的開個頭。。。 http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1313 比較簡單的一個道題,有一個數學公式需要明確 m*k % n 如果想要遍曆到0-n-1,必要條件是gcd(k,n)=1 ,如果推出了這個公式就是要求1<=k<=N/2的滿足這樣條件的解。 下面分4的同餘類來考慮一下即可。。。。
Time of Update: 2018-12-03
一個人沒看過佛經是幸福的,因為他還有這麼精妙而有趣的東西可以去看 。一個看過佛經的人也是幸福的,因為他發現了一個從未發現過的精妙而有趣的領域。一個看完所有佛經,並且都忘了的人,就無所謂幸福不幸福了,因為他可能成佛了,也可能更不懂了。宗教是個奇妙的領域。我們中的大多數人從小受過無神論的唯物哲學觀的教育,所以大多數並不瞭解宗教和科學的本質是什麼,當然,唯物哲學的本質他們也是沒有學到的。一個小姑娘可以嚴肅的對你說,我是無神論的。有次一個朋友嚴肅的對我說,你請我洗腳,我跟你講點佛的更多的東西,然後我們就
Time of Update: 2018-12-03
這些年一直在用OpenGL,但是,估計到了說88的時候了。OpenGL ARB這麼多年吵來吵去,眾多成員因為利益原因,很多問題不能迅速達成一致,造成API遠遠拖後於硬體的實際發展。或許可以用廠商專有的擴充來實現新的功能,但是,我可不想每種硬體寫一套代碼啊。以前一直用GLSL。這幾天研究了一下Cg。雖然我一貫對廠商專有的API持反對態度,但是,實話說,Cg確實遠遠比GLSL成熟的多。特別是,移植性好。當年opengl.org為選下一代OpenGL shading