作者druid0214 (键盘榜首)
看板Python
标题[问题] 如何取得LP_c_char_p 型态?
时间Sun Aug 21 17:14:58 2016
程式码范例:
http://www.pygame.org/wiki/GLSL_ARB_Example
一开始说59行 source = c_char_p(source)
TypeError: bytes or integer address expected instead of str instance
将c_char_p改成c_wchar_p
换61行glShaderSourceARB(shader, 1, byref(source), byref(length))
ctypes.ArgumentError: argument 3: <class 'TypeError'>:
expected LP_c_char_p instance instead of pointer to c_wchar_p
找不太到ctypes的文件
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 140.116.16.235
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Python/M.1471770903.A.C50.html