Main Contents

bug in python-opengl + mesa

August 20, 2008

Since like forever, I have never succeed in executing python-opengl demos on debian lenny.  It always segfault during glutInitDisplayMode.  After some debugging, here is why.
One should be able to call glGetError at any time.  If there’s nothing wrong, it should just return something like GLNOERROR.  Any raw (native) function call in python-opengl, no matter it […]

Filed under: OpenGL, C, python | Comments (0)

我果然不懂 C 啊。

April 18, 2008

from gcc-4.2.info:
5.34 An Inline Function is As Fast As a Macro
<..snipped..>
If you specify both `inline’ and `extern’ in the function definition,
then the definition is used only for inlining. In no case is the
function compiled on its own, not even if you refer to its address
explicitly. Such an address becomes an external reference, as […]

Filed under: C, programming | Comments (0)

GLOBAL and struct

September 29, 2007

Refer to: Gnu - Global - Help - How to find the definition effectively
To put the story even shorter, the GNU GLOBAL will not treat C struct as definition, but as `other symbol’ . This means you may only find a struct with global -s, which will give you lots of irrelevant results.
This […]

Filed under: C, programming | Comments (0)