1. 在 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0000、0001、0002等主鍵下,查找DriverDesc,內(nèi)容為你要修改的網(wǎng)卡的描述,如“Realtek RTL8029(AS)-based PCI Ethernet Adapter”。
2. 如果在0001下找到了1中的DriverDesc,在其下,添加一個(gè)字符串,命名為NetworkAddress,其值設(shè)為你要的MAC地址(注意地址還是連續(xù)寫)。如:00E0DDE0E0E0。
3. 然后到其下Ndi\params中添加一項(xiàng)名為NetworkAddress的主鍵,在該主鍵下添加名為default的字符串,其值是你要設(shè)的MAC地址,要連續(xù)寫,如:000000000000。(實(shí)際上這只是設(shè)置在后面提到的高級(jí)屬性中的“初始值”,實(shí)際使用的MAC地址還是取決于在第2點(diǎn)中提到的NetworkAddress參數(shù),這個(gè)參數(shù)一旦設(shè)置后,以后高級(jí)屬性中的值就是NetworkAddress給出的值而非default給出的了。)
4. 在NetworkAddress的主鍵下繼續(xù)添加名為ParamDesc的字符串,其作用為指定NetworkAddress主鍵的描述,其值可自己命名,如“Network Address”,這樣在網(wǎng)卡的高級(jí)屬性中就會(huì)出現(xiàn)Network Address選項(xiàng),就是你剛在注冊(cè)表中加的新項(xiàng)NetworkAddress,以后只要在此修改MAC地址就可以了。繼續(xù)添加名為Optional的字符串,其值設(shè)為“1”,則以后當(dāng)你在網(wǎng)卡的高級(jí)屬性中選擇Network Address項(xiàng)時(shí),右邊會(huì)出現(xiàn)“不存在”選項(xiàng)。
5. 重新啟動(dòng)你的計(jì)算機(jī),打開網(wǎng)絡(luò)鄰居的屬性,雙擊相應(yīng)網(wǎng)卡項(xiàng)會(huì)發(fā)現(xiàn)有一個(gè)Network Address的高級(jí)設(shè)置項(xiàng),可以用來(lái)直接修改MAC地址或恢復(fù)原來(lái)的地址(選中不存在)。
For Windows 2000/XPMethod 1:This is depending on the type of Network Interface Card (NIC) you have. If you have a card that doesn’t support Clone MAC address, then you have to go to second method.
a) Go to Start->Settings->Control Panel and double click on Network and Dial-up Connections.
b) Right click on the NIC you want to change the MAC address and click on properties.
c) Under "General" tab, click on the "Configure" button
d) Click on "Advanced" tab
e) Under "Property section", you should see an item called "Network Address" or "Locally Administered Address", click on it.
f) On the right side, under "Value", type in the New MAC address you want to assign to your NIC. Usually this value is entered without the "-" between the MAC address numbers.
g) Goto command prompt and type in "ipconfig /all" or "net config rdr" to verify the changes. If the changes are not materialized, then use the second method.
h) If successful, reboot your system.
Method 2:This should work on all Windows 2000/XP systems
a) Go to Start -> Run, type "regedt32" to start registry editor. Do not use "Regedit".
b) Go to "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}". Double click on it to expand the tree. The subkeys are 4-digit numbers, which represent particular network adapters. You should see it starts with 0000, then 0001, 0002, 0003 and so on.
c) Find the interface you want by searching for the proper "DriverDesc" key.
d) Edit, or add, the string key "NetworkAddress" (has the data type "REG_SZ") to contain the new MAC address.
e) Disable then re-enable the network interface that you changed (or reboot the system).
Method 3:Use the program Etherchange from http://ntsecurity.nu/toolbox/etherchange/
http://www.raytheon.com/newsroom/technology/rtn08_exoskeleton/
1. 安裝firefox 2/3,先不要運(yùn)行
2. 在其各自的快捷方式中添加命令參數(shù)"-profilemanager -no-remote"
3. 運(yùn)行之,在配置文件管理器中分別為ff 2/3創(chuàng)建獨(dú)立的配置文件,比方說(shuō)ff2、ff3
4. 然后,在各自的快捷方式中將命令行參數(shù)改為"-p ff2 -no-remote"和"-p ff3 -no-remote"
5. 至此,共存配置完畢,二者可以獨(dú)立或同時(shí)運(yùn)行且互不影響....
http://www.blueidea.com/computer/soft/2008/5368.asp
http://www.firefox.net.cn/newforum/viewtopic.php?p=170719
1. 安裝TortoiseSVN客戶端
2. 安裝服務(wù)器端svn-x.x.x-setup.exe
3. 手工創(chuàng)建svn儲(chǔ)存庫(kù)(repository),也可以用TortoiseSVN來(lái)做
svnadmin create F:\svn\
4. 配置svn儲(chǔ)存庫(kù),使用密碼,設(shè)置用戶名/密碼
編輯/conf/svnserve.conf,
# [general]
password-db = passwd
編輯/conf/passwd,
# [users]
my_id = my_password
5. 手工后臺(tái)運(yùn)行svn服務(wù)器,用TortoiseSVN測(cè)試一下成功否
svnserve -d -r F:\svn
6. 如果需要將svn配置成windows服務(wù),安裝svnservice最簡(jiǎn)單
7. 接下來(lái),用TortoiseSVN簽入簽出吧
8. Apache就免了,不跨平臺(tái)開發(fā)的話,沒(méi)太多用
http://tortoisesvn.tigris.org/http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91http://svnservice.tigris.org/
1. 啟用內(nèi)存泄漏檢測(cè)#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
當(dāng)退出程序位置固定時(shí),用:
_CrtDumpMemoryLeaks();
定義了_CRTDBG_MAP_ALLOC 時(shí),會(huì)顯示內(nèi)存塊類型和內(nèi)存塊分配編號(hào)(在大括號(hào)內(nèi))。
當(dāng)退出位置不固定時(shí),用:
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
該語(yǔ)句在程序退出時(shí)自動(dòng)調(diào)用 _CrtDumpMemoryLeaks。必須同時(shí)設(shè)置 _CRTDBG_ALLOC_MEM_DF 和 _CRTDBG_ALLOC_MEM_DF 兩個(gè)位域。
2. 內(nèi)存塊類型“普通塊”是由程序分配的普通內(nèi)存。
“客戶端塊”是由 MFC 程序用于需要析構(gòu)函數(shù)的對(duì)象的特殊類型內(nèi)存塊。MFC new 操作根據(jù)創(chuàng)建對(duì)象的需要?jiǎng)?chuàng)建普通塊或客戶端塊。
“CRT 塊”是由 CRT 庫(kù)為自己使用而分配的內(nèi)存塊。CRT 庫(kù)處理這些塊的釋放,因此您不大可能在內(nèi)存泄漏報(bào)告中看到這些塊,除非出現(xiàn)嚴(yán)重錯(cuò)誤(例如 CRT 庫(kù)損壞)。
3. 內(nèi)存泄露定位 - 在內(nèi)存分配編號(hào)上設(shè)置斷點(diǎn)先通過(guò)_CrtDumpMemoryLeaks查到泄露的內(nèi)存塊分配號(hào)n,然后添加語(yǔ)句
_CrtSetBreakAlloc(n);
Debug程序運(yùn)行后,將自動(dòng)斷點(diǎn)至分配處
4. 內(nèi)存狀態(tài)比較_CrtMemCheckpoint( &s1 );
// memory allocations take place here
_CrtMemCheckpoint( &s2 );
if ( _CrtMemDifference( &s3, &s1, &s2) )
_CrtMemDumpStatistics( &s3 );
5. CRT內(nèi)存泄露誤報(bào)在某些情況下,_CrtDumpMemoryLeaks 可能給出錯(cuò)誤的內(nèi)存泄漏指示。如果使用將內(nèi)部分配標(biāo)記為 _NORMAL_BLOCK 而不是 _CRT_BLOCK 或 _CLIENT_BLOCK 的庫(kù),則可能發(fā)生這種情況。其結(jié)果是,_CrtDumpMemoryLeaks 無(wú)法區(qū)分用戶分配和內(nèi)部庫(kù)分配。如果庫(kù)分配的全局析構(gòu)函數(shù)在您調(diào)用 _CrtDumpMemoryLeaks 的位置之后運(yùn)行,則每個(gè)內(nèi)部庫(kù)分配都被作為內(nèi)存泄漏進(jìn)行報(bào)告。Visual Studio .NET 之前的早期版本的標(biāo)準(zhǔn)模板庫(kù)會(huì)導(dǎo)致 _CrtDumpMemoryLeaks 報(bào)告這樣的錯(cuò)誤指示,但在最新版本中此問(wèn)題已經(jīng)得到解決。
OpenGL VBO并不難,但是較繁瑣,其實(shí)其概念跟加載紋理是一樣的:
初始化階段:
1.
glGenBuffersARB(1, &nVBOVertices); //生成一個(gè)句柄
2.
glBindBufferARB(GL_ARRAY_BUFFER_ARB, nVBOVertices); //聲明該句柄為一個(gè)vbo句柄,并選擇之
3.
glBufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(vertices), vertices,GL_STATIC_DRAW); //將頂點(diǎn)集上傳至server端
使用階段:
1.
glEnableClientState(GL_VERTEX_ARRAY); //開始使用vbo
2.
glBindBufferARB(GL_ARRAY_BUFFER_ARB, nVBOVertices); //選擇當(dāng)前使用的vbo
3.
glVertexPointer(3, GL_FLOAT, 0, BUFFER_OFFSET(0)); //指定vbo頂點(diǎn)格式
4.
glDrawArrays( GL_TRIANGLES, 0, g_pMesh->m_nVertexCount ); //畫吧
5.
glDisableClientState(GL_VERTEX_ARRAY); //停止使用vbo
收尾階段:
1.
glDeleteBuffersARB(1,&nVBOVertices); //刪除句柄,同時(shí)刪除server端頂點(diǎn)緩沖
再來(lái)看看紋理緩沖是怎么使用的,其實(shí)差不多:
初始化階段:
1.
glGenTextures(1, &texID);//創(chuàng)建句柄
2.
glBindTexture(GL_TEXTURE_2D, texID); //設(shè)置句柄類型
3.
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, img->GetWidth(), img->GetHeight(), 0, GL_RGBA, GL_UNSIGNED_BYTE, raw_rgba); //上傳紋理緩沖
使用階段:
1.
glEnable(GL_TEXTURE_2D); //開始使用紋理緩沖
2.
glBindTexture(GL_TEXTURE_2D, texID); //選擇當(dāng)前使用的紋理緩沖
3. 發(fā)送頂點(diǎn)和紋理坐標(biāo),畫吧...省略
4.
glDisable(GL_TEXTURE_2D); //停止使用紋理
收尾階段:
1.
glDeleteTextures(1,&texID);//刪除句柄,,同時(shí)刪除server端緩沖
看到了么,這個(gè)概念是不是很相似?都是:
1. 創(chuàng)建句柄
2. 設(shè)置句柄類型
3. 上傳數(shù)據(jù)
4. 開始使用緩沖
5. 選擇句柄
6. 使用緩沖
7. 停止使用緩沖
8. 刪除句柄和緩沖
Jack Ritter, "An Efficient Bounding Sphere" in Graphic Gems (1990)
1. 在三維點(diǎn)集S中找到較遠(yuǎn)的兩點(diǎn),構(gòu)成一個(gè)初始包圍球估計(jì)B0。該球可以如是求:遍歷S,求出其中x坐標(biāo)最大/最小、y最大/最小及z最大/最小的3對(duì)點(diǎn),然后取其中距離最大的一對(duì),以其二點(diǎn)連線中點(diǎn)為球心C0,距離的一半為初始半徑R0
2. 然后再次遍歷S,逐一測(cè)試S中其他點(diǎn)是否處于B中;
3. 如果點(diǎn)Pk處于Bk中,則繼續(xù)測(cè)試下一個(gè)點(diǎn)Pk+1
4. 如果Pk不處于Bk中,則:作Bk的球心Ck與Pk的連線矢量(Ck,Pk),并反向延長(zhǎng)至與Bk相交,交點(diǎn)為Qk,以連線(Qk,Pk)的中點(diǎn)為新的球心Ck+1,其距離的一半為新的球半徑Rk+1,構(gòu)成新的包圍球Bk+1,不難發(fā)現(xiàn),Bk與Bk+1相切于Qk處
5. 上述過(guò)程迭代至所有S中的P點(diǎn)遍歷完為止。以上近似算法可擴(kuò)展到n維空間。
6. 該算法特點(diǎn):快速,且包圍球幾乎最小,雖不能保證絕對(duì)最小,但絕對(duì)優(yōu)于基于包圍盒算出來(lái)的解

According to Jack Ritter a near-optimal sphere can be created by:
1) Finding the minimal and maximal vertices along each axis (x,y,z).
2) For those three pairs chose the one pair which has the largest distance.
3) The center of the sphere is the midpoint between those two vertices and its radius is half the distance between them.
4) Go through all vertices again, if you find a vertex whose distance (d) is greater than the radius (r), move the sphere towards this vertex by (d-r)/2 and then set the new sphere radius to (d+r)/2.
glut/glew簡(jiǎn)單配置1. 所有l(wèi)ib,丟C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Lib
2. 所有.h,丟C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\gl
3. 所有.dll和bin,丟C:\WINDOWS\system32
4. 把項(xiàng)目的Unicode去掉,包括Debug和Release(for glut)
5. 項(xiàng)目預(yù)編譯頭文件里面,添:
#include <GL/glew.h>
#include <GL/glut.h>
#pragma comment(lib,"opengl32.lib")
#pragma comment(lib,"glew32.lib")
#pragma comment(lib,"glut.lib")
#pragma comment(lib,"glut32.lib")
6. 開始玩....進(jìn)一步參考簡(jiǎn)單glut及glew程序模板
CxImage在OpenGl中的應(yīng)用
注意,不能將CxImage::GetBits()直接用于OpenGL,否則會(huì):
1. 紋理上下顛倒
2. 紋理中像素點(diǎn)格式為BGR
3. 不能用于GL_RGBA,只能GL_RGB,GetBits獲取不到Alpha分量
如果一定要用CxImage::GetBits(),必須進(jìn)行如下操作:
1. CxImage::SwapRGB2BGR()
2. CxImage::Flip()
推薦在OpenGl全用CxImage::Encode2RGBA獲取Bitmap,用了之后啥麻煩事都沒(méi)了.....
First, think what you want these matrices do.
Let we have transformation matrices A and B . We want to transform vector V by both and get vector V'.
But above is not enough to specify what we want to do, as
first transform by A then transform by B
and
first transform by B then transform by A
are different. You can just try to play with rotations in real world.(get a cube, paint x,y,z on sides, etc.)
Now, more on how it's done:
first transform by A then transform by B
It is easy to see that this is accomplished by:
In openGL's convention:
V'=B*(A*V)
Note that it is same as
V'=(B*A)*V
so you can do it as
C=B*A;
V'=C*V;
In DX's convention:
V'=(V*A)*B
C=A*B;
V'=V*C;
(note: real operations done on memory is the same. It's just matter how we map matrix indices to memory)
As you see, V*A*B and B*A*V is kind of symmetrical. Same for consequently applied transforms like V*A*B*C*D*E*F or F*E*D*C*B*A*V
Now, write it down for "transform by B then transform by A" yourself to remember it better.
When you render something , you want points to be transformed by
matrix of object
matrix of parent object
matrix of grandparent object ...
matrix of camera
(and done by API, projection matrix)
From there you can find what order of multiplications you want. In OGL, you need to
m=matrix_of_camera*matrix_of_grandparent_objectmatrix_of_parent object*matrix_of_object;
...
then if you'll glLoadMatrix, OpenGL will do
vertice=m*vertice;
Some more notes: Let you have spacecraft with spacecraft-to-world matrix M
And you use OpenGL convention.
For example, to turn spacecraft around spacecraft's local X direction, you need to
M=M*axis_angle_to_matrix(Vector(1,0,0),angle);
(note: you need to reorthonormalize matrix if you do that incrementally)
To turn spacecraft around global X direction, you need to
M=axis_angle_to_matrix(Vector(1,0,0),angle)*M;
On openGL:
This sequence
glMatrixMode(GL_MODELVIEW);
glMultMatrix(A);
glMultMatrix(B);
glMultMatrix(C);
... render your mesh ...
works as if your mesh would be transformed by C,then B, then A
It makes lot of sense, if you for example want to render a robot with
matrices giving positions of child nodes (fingers) relativelty to
parent (arm), and arm are responsible for positioning fingers, you can
do
RenderArm(){
glPushMatrix();
glMultMatrix(matrix_of_first_finger);
RenderFinger();
glPopMatrix();
glPushMatrix();
glMultMatrix(matrix_of_second_finger);
RenderFinger();
glPopMatrix();
}
and so-on(simplified example)
Then, you can have
glPushMatrix();
glMultMatrix(matrix_of_arm);
RenderArm();
glPopMatrix();
and it will work properly.
If you have more questions, ask.
等待
完美生活