This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Tips & Tricks: OpenGL vs. OpenGL ES

Note: This was originally posted on 15th October 2009 at http://forums.arm.com

As we come up with various tips and hints that might help application developers working on Mali GPUs we will be posting them here so that you have instant access to them prior to the hints being turned into formal knowledgebase articles or other documentation.

If there are questions that you have, we will do our best to answer them in a timely manner.

This first topic will cover general differences between coding for the OpenGL (desktop graphics library) and OpenGL ES (embedded system graphics library) APIs from Khronos...
Parents
  • Note: This was originally posted on 27th October 2009 at http://forums.arm.com

    If you are writing code to run on both OpenGL 2.0 and OpenGL ES 2.0, be aware of slight differences between the shader languages used in the two APIs. For example, OpenGL ES 2.0 requires a precision declaration in the fragment shader code, while OpenGL 2.0 does not support this.

    To enable your code to run on both OpenGL 2.0 and OpenGL ES 2.0, start every fragment shader with:

    [font="Courier New"]#ifdef GL_ES
    precision mediump float;
    #endif[/font]
Reply
  • Note: This was originally posted on 27th October 2009 at http://forums.arm.com

    If you are writing code to run on both OpenGL 2.0 and OpenGL ES 2.0, be aware of slight differences between the shader languages used in the two APIs. For example, OpenGL ES 2.0 requires a precision declaration in the fragment shader code, while OpenGL 2.0 does not support this.

    To enable your code to run on both OpenGL 2.0 and OpenGL ES 2.0, start every fragment shader with:

    [font="Courier New"]#ifdef GL_ES
    precision mediump float;
    #endif[/font]
Children
No data