Copied from vtkglShaderProgram, time to move into a common header?
| 21 | { |
| 22 | // Copied from vtkglShaderProgram, time to move into a common header? |
| 23 | inline GLenum convertTypeToGL(int type) |
| 24 | { |
| 25 | switch (type) |
| 26 | { |
| 27 | case VTK_CHAR: |
| 28 | return GL_BYTE; |
| 29 | case VTK_UNSIGNED_CHAR: |
| 30 | return GL_UNSIGNED_BYTE; |
| 31 | case VTK_SHORT: |
| 32 | return GL_SHORT; |
| 33 | case VTK_UNSIGNED_SHORT: |
| 34 | return GL_UNSIGNED_SHORT; |
| 35 | case VTK_INT: |
| 36 | return GL_INT; |
| 37 | case VTK_UNSIGNED_INT: |
| 38 | return GL_UNSIGNED_INT; |
| 39 | case VTK_FLOAT: |
| 40 | return GL_FLOAT; |
| 41 | case VTK_DOUBLE: |
| 42 | #ifdef GL_DOUBLE |
| 43 | return GL_DOUBLE; |
| 44 | #else |
| 45 | vtkGenericWarningMacro(<< "Attempt to use GL_DOUBLE when not supported"); |
| 46 | return 0; |
| 47 | #endif |
| 48 | default: |
| 49 | return 0; |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | struct VertexAttributes |
| 54 | { |
no outgoing calls
no test coverage detected