astrofimov / gl-wes-v2 Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/gl-wes-v2
Automatically exported from code.google.com/p/gl-wes-v2
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.