Giter VIP home page Giter VIP logo

gl-wes-v2's People

Watchers

 avatar

gl-wes-v2's Issues

Scene does not appear on the screen

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.