Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 64位,编译成功,运行报错,窗口闪退 #52

Open
redoc opened this issue May 4, 2014 · 9 comments
Open

Ubuntu 64位,编译成功,运行报错,窗口闪退 #52

redoc opened this issue May 4, 2014 · 9 comments

Comments

@redoc
Copy link

redoc commented May 4, 2014

控制台输出如下:
compile failed:0:1(1): error: syntax error, unexpected NEW_IDENTIFIER
source:
precision lowp float;
varying vec2 v_texcoord;
varying vec4 v_color;
uniform sampler2D texture0;
uniform vec3 additive;

void main() {
vec4 tmp = texture2D(texture0, v_texcoord);
gl_FragColor.xyz = tmp.xyz * v_color.xyz;
gl_FragColor.w = tmp.w;
gl_FragColor *= v_color.w;
gl_FragColor.xyz += additive.xyz * tmp.w;
}

求助.谢谢.

@giveupwithtears
Copy link

Fedora20 has the same problem!!Why!!

@applepwc
Copy link

applepwc commented Jun 1, 2014

厄,我也碰到了。ubuntu 13.10 64位,编译无问题,现象同上。求助,多谢。

@giveupwithtears
Copy link

目前我也是没法解决啦!纠结中!!

Date: Sat, 31 May 2014 20:24:35 -0700
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [ejoy2d] Ubuntu 64位,编译成功,运行报错,窗口闪退 (#52)

厄,我也碰到了。ubuntu 13.10 64位,编译无问题,现象同上。求助,多谢。


Reply to this email directly or view it on GitHub.

@cloudwu
Copy link
Contributor

cloudwu commented Jun 23, 2014

请确认你的系统的显卡以及显卡驱动支持 opengl es 2.0 .
简单说就是先保证你的系统可以正常运行现代的游戏.

@redoc
Copy link
Author

redoc commented Oct 14, 2014

在Ubuntu上怎么"保证系统可以正常运行现代的游戏"呢?

@cloudwu
Copy link
Contributor

cloudwu commented Oct 14, 2014

装个 steam 多买些 3d 游戏(类似文明 V 之类的), 确保都可以运行.

@redoc
Copy link
Author

redoc commented Oct 14, 2014

没有更低成本一点的方法"确认你的系统的显卡以及显卡驱动支持 opengl es 2.0"吗 = =

@cloudwu
Copy link
Contributor

cloudwu commented Oct 14, 2014

打电话给显卡的厂商(包装盒上通常有电话号码), 确认可以支持, 然后问他们要 linux 下的驱动, 并询问怎么安装.

@zt706
Copy link

zt706 commented Oct 26, 2014

1 我是先把ejoy2d/shader.lua中第8和第9行中的精度定义设为""。本人小白按理来说在fragment shader中,必须给出一个计算的精度。重新编译好了以后examples中的ex06和ex07就能够正常运行了。
2 在去运行ex01.lua会提示set your own vector font resource path, error occured in file posix/winfont.c, line 73
3 然后把posix/winfont.c中的TTFONT修改为你自己的系统字体路径就好了。
原来是static const char* TTFONT = "/usr/share/fonts/wenquanyi/wqy-zenhei/wqy-zenhei.ttc";
你是Ubuntu64的话改为
static const char* TTFONT = "/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-B.ttf";
就行了(记得重新make)。
4 之前的ex06和ex07能运行是因为里面没有文字。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants