15 1月 2011

How about thinking before logging on internet.


生活, 似乎已無法與網路分開,
難得在美好的清晨醒來, 泡杯熱牛奶坐在書桌前打開電腦,
還是習慣性地, 縮著尚未醒來的身子, 連上網路, 看新聞, 檢查Mail,
看看別人的facebook動態…
然後, 一兩個小時悄悄消逝, 與看電視新聞一樣,
最後, 成果是一個小小聲的嘆氣:
“啊, 時間過好快, 早知道不要上網…”

近來, 告別光纖網路, 改為用手機上網,
多了個需要先連接手機的步驟, 也多了個生活的靈感;

03 1月 2011

steps to use "texture3d.c"

Platform I used: VC++ 2010 Express.

In order to use this source example of Programming Guide,
I did a few modifications then I can run the example correctly.

1. Solution of the undefined macro:
#ifdef GL_VERSION_1_2
My computer didn't have this definition, so I need to include OpenGL extension library as below:
#include < GL/glext.h >;
And the same time, download the header files from Official Website.

2. The solution of "glTexImage3D not defined":
a. declare a global function pointer:
PFNGLTEXIMAGE3DPROC glTexImage3D;
b. After correctly initializing OpenGL, execute the codes:
glTexImage3D = reinterpret_cast( ::wglGetProcAddress( "glTexImage3D") );
Original post is from here.

3. If you got a error like: "reinterpret_cast : undeclared identifier",
please rename the source "C" code from texture3d.c to texture3d.cpp.
Because this macro is dedicated to C++ language.
Original post is from here.

Result should be:

Record just avoid forgetting. :D