Ignore:
Timestamp:
Feb 22, 2011, 2:17:48 AM (9 years ago)
Author:
sam
Message:

Try to fix GLES 2 rendering. No luck so far.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/video.cpp

    r682 r683  
    3131#if defined HAVE_GL_2X || defined HAVE_GLES_2X
    3232static char const *vertexshader =
     33#if !defined HAVE_GLES_2X
     34    "#version 130\n"
     35#endif
     36    "\n"
    3337#if defined HAVE_GLES_2X
    3438    "attribute vec3 in_Position;\n"
     
    3640    "varying vec2 pass_TexCoord;\n"
    3741#else
    38     "#version 130\n"
    39     "\n"
    4042    "in vec3 in_Position;\n"
    4143    "in vec2 in_TexCoord;\n"
     
    6062
    6163static char const *fragmentshader =
     64#if !defined HAVE_GLES_2X
    6265    "#version 130\n"
     66#endif
    6367    "\n"
    6468    "uniform sampler2D in_Texture;\n"
     
    7175    "void main()\n"
    7276    "{\n"
    73     //"    gl_FragColor = 0.5 * (texture2D(in_Texture, vec2(gl_TexCoord[0]))\n"
    74     //"                           + vec4(pass_Color, 1.0));\n"
    75 #if defined HAVE_GLES_2X
    76     "    gl_FragColor = vec4(0.5, 1.0, 0.0, 0.5);\n"
     77#if defined HAVE_GLES_2X
     78    "    gl_FragColor = texture2D(in_Texture, pass_TexCoord);\n"
     79    //"    gl_FragColor = vec4(0.5, 1.0, 0.0, 0.5);\n"
     80    //"    gl_FragColor = vec4(pass_TexCoord * 4.0, 0.0, 0.25);\n"
    7781#else
    7882    "    gl_FragColor = texture2D(in_Texture, vec2(gl_TexCoord[0]));\n"
    7983#endif
    80     //"    gl_FragColor = texture2D(in_Texture, pass_TexCoord);\n"
    8184    "}\n";
    8285#endif
Note: See TracChangeset for help on using the changeset viewer.