Added precision preprocessor ifdefs to the source code of the fragment shaders

This commit is contained in:
codeanticode
2012-03-29 05:12:56 +00:00
parent bdfcd8e16e
commit 7fac90bf9b
6 changed files with 21 additions and 22 deletions
@@ -19,6 +19,11 @@
Boston, MA 02111-1307 USA
*/
#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif
varying vec4 vertColor;
void main() {
@@ -19,6 +19,11 @@
Boston, MA 02111-1307 USA
*/
#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif
uniform sampler2D textureSampler;
uniform vec2 texcoordOffset;
@@ -19,6 +19,11 @@
Boston, MA 02111-1307 USA
*/
#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif
varying vec4 vertColor;
void main() {
@@ -129,7 +129,7 @@ public class PGL {
protected static final String SHADER_PREPROCESSOR_DIRECTIVE = "#ifdef GL_ES\n" +
"precision mediump float;\n" +
"precision mediump int;\n" +
"#endif;\n";
"#endif\n";
///////////////////////////////////////////////////////////////////////////////////
@@ -4626,18 +4626,6 @@ public class PGraphicsOpenGL extends PGraphics {
public int get(int x, int y) {
flush();
loadPixels();
// beginScreenOp();
// int color = pgl.getColorValue(x, y);
// endScreenOp();
//
// if (PGL.BIG_ENDIAN) {
// return 0xff000000 | ((color >> 8) & 0x00ffffff);
// } else {
// return 0xff000000 | ((color << 16) & 0xff0000) |
// (color & 0xff00) |
// ((color >> 16) & 0xff);
// }
int i = y * width + x;
if (0 <= i && i < pixels.length) {
@@ -4679,15 +4667,6 @@ public class PGraphicsOpenGL extends PGraphics {
flush();
loadPixels();
settingPixels = true;
// float a = ((argb >> 24) & 0xFF) / 255.0f;
// float r = ((argb >> 16) & 0xFF) / 255.0f;
// float g = ((argb >> 8) & 0xFF) / 255.0f;
// float b = ((argb >> 0) & 0xFF) / 255.0f;
//
// beginScreenOp();
// pgl.drawRectangle(r, g, b, a, x, height - y - 1, x + 1, height - y);
// endScreenOp();
int i = y * width + x;
if (0 <= i && i < pixels.length) {
@@ -19,6 +19,11 @@
Boston, MA 02111-1307 USA
*/
#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif
varying vec4 vertColor;
void main() {