Fixed-function Shader Library and Other Porting Tools
One of the hurdles when porting legacy OpenGL (read: version 1.x) code to either modern core profile or OpenGL ES 2.0 is the reliance on (or absence of, depending upon your perspective) fixed-function vertex and fragment processing. It would be a nice porting stop-gap (not a long term solution) to have a set of shaders that allowed for smooth conversion from older fixed-function API calls to fully programmable implementations. It has also been suggested that it would be possible to write a tool that scans a code base and determines API calls that may not be supported in all versions of OpenGL and OpenGL ES.
Blueprint information
- Status:
- Complete
- Approver:
- Jesse Barker
- Priority:
- Low
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- Jesse Barker
- Definition:
- Discussion
- Series goal:
- None
- Implementation:
- Implemented
- Milestone target:
- None
- Started by
- Jesse Barker
- Completed by
- Jesse Barker
Whiteboard
Porting helper app idea/proposal:
Scans a code base or GL trace and detects possible constructs that are
incompatible with various versions of GL. It gives advice on how to best
resolve the issue. It is rule based using a mix regular expressions and custom
syntax. For example, a rules file could be something like (rules would apply
sequentially):
Applies-To: gles(>= 2.0)
Rule: glCreateShaderO
Description: glCreateShaderO
Solution: Use glCreateShader() instead.
Applies-To: gles(>= 2.0)
Rule: glUniformMatrix.* param[3]==TRUE
Description: Matrix transposition not supported in gles 2.0
Solution: Use ...
Applies-To: gles(>= 2.0)
Rule: gl.*ARB
Description: ARB extensions are not supported in GLES2.0
Solution: Use the core version of this function...
Could some of the rules be created automatically (eg parameter constraints)?
Work Items
Dependency tree
* Blueprints in grey have been implemented.