Java Code Examples for javax.media.opengl.GL#GL_SHORT
The following examples show how to use
javax.media.opengl.GL#GL_SHORT .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JoglRenderer.java From MikuMikuStudio with BSD 2-Clause "Simplified" License | 6 votes |
@Override protected int convertFormat(Format format) { switch (format) { case Byte: return GL.GL_BYTE; case UnsignedByte: return GL.GL_UNSIGNED_BYTE; case Short: return GL.GL_SHORT; case UnsignedShort: return GL.GL_UNSIGNED_SHORT; case Int: return GL2ES2.GL_INT; case UnsignedInt: return GL2ES2.GL_UNSIGNED_INT; case Half: return GL.GL_HALF_FLOAT; case Float: return GL.GL_FLOAT; case Double: return GL2GL3.GL_DOUBLE; default: throw new RuntimeException("Unknown buffer format."); } }
Example 2
Source File: JoglRenderer.java From MikuMikuStudio with BSD 2-Clause "Simplified" License | 6 votes |
@Override protected int convertVertexFormat(VertexBuffer.Format fmt) { switch (fmt) { case Byte: return GL.GL_BYTE; case Double: return GL2GL3.GL_DOUBLE; case Float: return GL.GL_FLOAT; case Half: return GL.GL_HALF_FLOAT; case Int: return GL2ES2.GL_INT; case Short: return GL.GL_SHORT; case UnsignedByte: return GL.GL_UNSIGNED_BYTE; case UnsignedInt: return GL2ES2.GL_UNSIGNED_INT; case UnsignedShort: return GL.GL_UNSIGNED_SHORT; default: throw new UnsupportedOperationException("Unrecognized vertex format: " + fmt); } }