我想通过gf_layer_attach取得main_layer,方法如下:
gf_layer_attach(&layer, display, main_layer_index, 0)
但是报错误说,GF_ERR_INUSE,资源正在被使用,这怎么办呀。
取得main_layer的目的是想通过gf_3d_target_create取得gf_3d_target_t,进而以gf_3d_target_t作为参数调用eglCreateWindowSurface,取得一个物理Surface。
各位强人,QNX下eglCreateWindowSurface的第三个参数除了上述方法,还能怎么填呀?
你的程序应该是在 photon 里面运行这个的吧
你可以在text mode 里面运行你的程序
这样 main——layer 就不会被占用了
xtang1
4
我的理解,gf_layer_attach()里的main_layer_index是你给出的layer号(一个0, 1, 2 ..那样的数)。如果你有Photon运行的话,layer 0可能已经被占用了。你可以试试设成layer 1,如果你的显卡支持multi-layer的话。也可以象ball-point说的,把Photon杀掉,把layer 0空出来。
顺便说一下,egl-gear的源码在这里,你可以参考一下。
http://community.qnx.com/integration/viewvc/viewvc.cgi/trunk/apps/egl/demos/gles1-egl-gears/?root=graphics&system=exsy1001
zollee
6
问一下楼主,我调用eglGetDisplay提示函数没有实现,请问是否需要包含库,库在什么地方?