1 /* 2 * Copyright (c) 2002-2008 LWJGL Project 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: 8 * 9 * * Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 12 * * Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 16 * * Neither the name of 'LWJGL' nor the names of 17 * its contributors may be used to endorse or promote products derived 18 * from this software without specific prior written permission. 19 * 20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 package org.lwjgl.opengl; 33 34 import org.lwjgl.util.generator.*; 35 import org.lwjgl.util.generator.opengl.GLenum; 36 import org.lwjgl.util.generator.opengl.GLhalf; 37 import org.lwjgl.util.generator.opengl.GLsizei; 38 import org.lwjgl.util.generator.opengl.GLuint; 39 40 import java.nio.*; 41 42 @Dependent 43 public interface NV_half_float { 44 45 /** 46 * Accepted by the <type> argument of VertexPointer, NormalPointer, 47 * ColorPointer, TexCoordPointer, FogCoordPointerEXT, 48 * SecondaryColorPointerEXT, VertexWeightPointerEXT, VertexAttribPointerNV, 49 * DrawPixels, ReadPixels, TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, 50 * TexSubImage2D, TexSubImage3D, and GetTexImage: 51 */ 52 int GL_HALF_FLOAT_NV = 0x140B; 53 54 @NoErrorCheck glVertex2hNV(@Lhalf short x, @GLhalf short y)55 void glVertex2hNV(@GLhalf short x, @GLhalf short y); 56 57 @NoErrorCheck glVertex3hNV(@Lhalf short x, @GLhalf short y, @GLhalf short z)58 void glVertex3hNV(@GLhalf short x, @GLhalf short y, @GLhalf short z); 59 60 @NoErrorCheck glVertex4hNV(@Lhalf short x, @GLhalf short y, @GLhalf short z, @GLhalf short w)61 void glVertex4hNV(@GLhalf short x, @GLhalf short y, @GLhalf short z, @GLhalf short w); 62 63 @NoErrorCheck glNormal3hNV(@Lhalf short nx, @GLhalf short ny, @GLhalf short nz)64 void glNormal3hNV(@GLhalf short nx, @GLhalf short ny, @GLhalf short nz); 65 66 @NoErrorCheck glColor3hNV(@Lhalf short red, @GLhalf short green, @GLhalf short blue)67 void glColor3hNV(@GLhalf short red, @GLhalf short green, @GLhalf short blue); 68 69 @NoErrorCheck glColor4hNV(@Lhalf short red, @GLhalf short green, @GLhalf short blue, @GLhalf short alpha)70 void glColor4hNV(@GLhalf short red, @GLhalf short green, @GLhalf short blue, @GLhalf short alpha); 71 72 @NoErrorCheck glTexCoord1hNV(@Lhalf short s)73 void glTexCoord1hNV(@GLhalf short s); 74 75 @NoErrorCheck glTexCoord2hNV(@Lhalf short s, @GLhalf short t)76 void glTexCoord2hNV(@GLhalf short s, @GLhalf short t); 77 78 @NoErrorCheck glTexCoord3hNV(@Lhalf short s, @GLhalf short t, @GLhalf short r)79 void glTexCoord3hNV(@GLhalf short s, @GLhalf short t, @GLhalf short r); 80 81 @NoErrorCheck glTexCoord4hNV(@Lhalf short s, @GLhalf short t, @GLhalf short r, @GLhalf short q)82 void glTexCoord4hNV(@GLhalf short s, @GLhalf short t, @GLhalf short r, @GLhalf short q); 83 84 @NoErrorCheck glMultiTexCoord1hNV(@Lenum int target, @GLhalf short s)85 void glMultiTexCoord1hNV(@GLenum int target, @GLhalf short s); 86 87 @NoErrorCheck glMultiTexCoord2hNV(@Lenum int target, @GLhalf short s, @GLhalf short t)88 void glMultiTexCoord2hNV(@GLenum int target, @GLhalf short s, @GLhalf short t); 89 90 @NoErrorCheck glMultiTexCoord3hNV(@Lenum int target, @GLhalf short s, @GLhalf short t, @GLhalf short r)91 void glMultiTexCoord3hNV(@GLenum int target, @GLhalf short s, @GLhalf short t, @GLhalf short r); 92 93 @NoErrorCheck glMultiTexCoord4hNV(@Lenum int target, @GLhalf short s, @GLhalf short t, @GLhalf short r, @GLhalf short q)94 void glMultiTexCoord4hNV(@GLenum int target, @GLhalf short s, @GLhalf short t, @GLhalf short r, @GLhalf short q); 95 96 @Dependent("GL_EXT_fog_coord") 97 @NoErrorCheck glFogCoordhNV(@Lhalf short fog)98 void glFogCoordhNV(@GLhalf short fog); 99 100 @Dependent("GL_EXT_secondary_color") 101 @NoErrorCheck glSecondaryColor3hNV(@Lhalf short red, @GLhalf short green, @GLhalf short blue)102 void glSecondaryColor3hNV(@GLhalf short red, @GLhalf short green, @GLhalf short blue); 103 104 @Dependent("GL_EXT_vertex_weighting") 105 @NoErrorCheck glVertexWeighthNV(@Lhalf short weight)106 void glVertexWeighthNV(@GLhalf short weight); 107 108 @Dependent("GL_NV_vertex_program") 109 @NoErrorCheck glVertexAttrib1hNV(@Luint int index, @GLhalf short x)110 void glVertexAttrib1hNV(@GLuint int index, @GLhalf short x); 111 112 @Dependent("GL_NV_vertex_program") 113 @NoErrorCheck glVertexAttrib2hNV(@Luint int index, @GLhalf short x, @GLhalf short y)114 void glVertexAttrib2hNV(@GLuint int index, @GLhalf short x, @GLhalf short y); 115 116 @Dependent("GL_NV_vertex_program") 117 @NoErrorCheck glVertexAttrib3hNV(@Luint int index, @GLhalf short x, @GLhalf short y, @GLhalf short z)118 void glVertexAttrib3hNV(@GLuint int index, @GLhalf short x, @GLhalf short y, @GLhalf short z); 119 120 @Dependent("GL_NV_vertex_program") 121 @NoErrorCheck glVertexAttrib4hNV(@Luint int index, @GLhalf short x, @GLhalf short y, @GLhalf short z, @GLhalf short w)122 void glVertexAttrib4hNV(@GLuint int index, @GLhalf short x, @GLhalf short y, @GLhalf short z, @GLhalf short w); 123 124 @Dependent("GL_NV_vertex_program") 125 @NoErrorCheck 126 @StripPostfix("attribs") glVertexAttribs1hvNV(@Luint int index, @AutoSize(R) @GLsizei int n, @Const @GLhalf ShortBuffer attribs)127 void glVertexAttribs1hvNV(@GLuint int index, @AutoSize("attribs") @GLsizei int n, @Const @GLhalf ShortBuffer attribs); 128 129 @Dependent("GL_NV_vertex_program") 130 @NoErrorCheck 131 @StripPostfix("attribs") glVertexAttribs2hvNV(@Luint int index, @AutoSize(value = R, expression = R) @GLsizei int n, @Const @GLhalf ShortBuffer attribs)132 void glVertexAttribs2hvNV(@GLuint int index, @AutoSize(value = "attribs", expression = " >> 1") @GLsizei int n, @Const @GLhalf ShortBuffer attribs); 133 134 @Dependent("GL_NV_vertex_program") 135 @NoErrorCheck 136 @StripPostfix("attribs") glVertexAttribs3hvNV(@Luint int index, @AutoSize(value = R, expression = R) @GLsizei int n, @Const @GLhalf ShortBuffer attribs)137 void glVertexAttribs3hvNV(@GLuint int index, @AutoSize(value = "attribs", expression = " / 3") @GLsizei int n, @Const @GLhalf ShortBuffer attribs); 138 139 @Dependent("GL_NV_vertex_program") 140 @NoErrorCheck 141 @StripPostfix("attribs") glVertexAttribs4hvNV(@Luint int index, @AutoSize(value = R, expression = R) @GLsizei int n, @Const @GLhalf ShortBuffer attribs)142 void glVertexAttribs4hvNV(@GLuint int index, @AutoSize(value = "attribs", expression = " >> 2") @GLsizei int n, @Const @GLhalf ShortBuffer attribs); 143 } 144