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

Scene does not appear on the screen #1

Open
GoogleCodeExporter opened this issue Feb 5, 2016 · 0 comments
Open

Scene does not appear on the screen #1

GoogleCodeExporter opened this issue Feb 5, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

I am currently trying to "port" this on a OMAP3530 (PowerVR SGX530) on a
hardware very close to the Pandora (screen size is 800x480).

The issue I'm running into is the following: scene does not display at all.
I can only see the background color (which is not too bad to tell the truth
:-).

I've downloaded the latest source code, modified it a little bit and ran it
on hardware. I am an absolute beginner in terms of OpenGL so I would not be
able to say what the issue is.

Two issues I have seen are the following:
1- at init, fragment shader build (wes_program_build(), wes_shader.c) fails
to compile:
this is the fragment shader created
*********************************************
#define LIGHT_NUM                                               8
#define CLIPPLANE_NUM                                   6
#define MULTITEX_NUM                                    4
#define FACE_NUM                                                2

struct sMultiTexture {
    lowp vec4 EnvColor;
    sampler2D Unit;
};

uniform lowp vec4               uFogColor;
uniform sMultiTexture   uTexture[MULTITEX_NUM];
uniform highp float             uAlphaRef;

//Varyings:
varying lowp vec4               vColor;
varying lowp vec2               vFactor;
varying mediump vec4    vTexCoord[MULTITEX_NUM];

void main(){
    gl_FragColor = vColor;
lowp vec4 arg0, arg1, arg2;
gl_FragColor *= texture2D(uTexture[0].Unit, vTexCoord[0].xy);
}
*********************************************


2- Another shader fails to create right when the program starts drawing the
scene:
*********************************************
#define LIGHT_NUM                                               8
#define CLIPPLANE_NUM                                   6
#define MULTITEX_NUM                                    4
#define FACE_NUM                                                2

struct sMultiTexture {
    lowp vec4 EnvColor;
    sampler2D Unit;
};

uniform lowp vec4               uFogColor;
uniform sMultiTexture   uTexture[MULTITEX_NUM];
uniform highp float             uAlphaRef;

//Varyings:
varying lowp vec4               vColor;
varying lowp vec2               vFactor;
varying mediump vec4    vTexCoord[MULTITEX_NUM];

void main(){
    gl_FragColor = vColor;
lowp vec4 arg0, arg1, arg2;
arg0 = gl_FragColor;
arg1 = texture2D(uTexture[0].Unit, vTexCoord[0].xy);
gl_FragColor = arg0 * arg1;
arg0.rgb = vColor.rgb;
arg0.a = gl_FragColor.a;
arg1 = texture2D(uTexture[1].Unit, vTexCoord[1].xy);
gl_FragColor.rgb = arg0.rgb * arg1.rgb;
gl_FragColor.a = arg0.a;
if (gl_FragColor.w == uAlphaRef) discard;
}
*********************************************

any thought?

Original issue reported on code.google.com by [email protected] on 26 Aug 2009 at 1:59

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

No branches or pull requests

1 participant