diff --git a/src/java/org/lwjgl/opengl/ARBColorBufferFloat.java b/src/java/org/lwjgl/opengl/ARBColorBufferFloat.java new file mode 100644 index 00000000..6f3c87a1 --- /dev/null +++ b/src/java/org/lwjgl/opengl/ARBColorBufferFloat.java @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2002-2004 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; + +public final class ARBColorBufferFloat { + + /* + * Accepted by the parameters of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int RGBA_FLOAT_MODE_ARB = 0x8820; + + /* + * Accepted by the parameter of ClampColorARB and the + * parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. + */ + public static final int CLAMP_VERTEX_COLOR_ARB = 0x891A; + public static final int CLAMP_FRAGMENT_COLOR_ARB = 0x891B; + public static final int CLAMP_READ_COLOR_ARB = 0x891C; + + /* + * Accepted by the parameter of ClampColorARB. + */ + public static final int FIXED_ONLY_ARB = 0x891D; + + /* + * Accepted as a value in the and + * parameter arrays of wglChoosePixelFormatARB, and returned in the + * parameter array of wglGetPixelFormatAttribivARB, and the + * parameter array of wglGetPixelFormatAttribfvARB: + */ + public static final int WGL_TYPE_RGBA_FLOAT_ARB = 0x21A0; + + /* + * Accepted as values of the arguments in the + * glXCreateNewContext and glXCreateContext functions + */ + public static final int GLX_RGBA_FLOAT_TYPE = 0x20B9; + + /* + * Accepted as a bit set in the GLX_RENDER_TYPE variable + */ + public static final int GLX_RGBA_FLOAT_BIT = 0x00000004; + + private ARBColorBufferFloat() { + } + + static native void initNativeStubs() throws LWJGLException; + + public static native void glClampColorARB(int target, int clamp); + +} \ No newline at end of file diff --git a/src/java/org/lwjgl/opengl/ARBHalfFloatPixel.java b/src/java/org/lwjgl/opengl/ARBHalfFloatPixel.java new file mode 100644 index 00000000..7ca225fc --- /dev/null +++ b/src/java/org/lwjgl/opengl/ARBHalfFloatPixel.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2004 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public final class ARBHalfFloatPixel { + + /* + * Accepted by the parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, TexImage3D, GetTexImage, TexSubImage1D, + * TexSubImage2D, TexSubImage3D, GetHistogram, GetMinmax, + * ConvolutionFilter1D, ConvolutionFilter2D, GetConvolutionFilter, + * SeparableFilter2D, GetSeparableFilter, ColorTable, ColorSubTable, + * and GetColorTable: + */ + public static final int HALF_FLOAT_ARB = 0x140B; + + private ARBHalfFloatPixel() { + } + +} \ No newline at end of file diff --git a/src/java/org/lwjgl/opengl/ARBTextureFloat.java b/src/java/org/lwjgl/opengl/ARBTextureFloat.java new file mode 100644 index 00000000..d6d71f30 --- /dev/null +++ b/src/java/org/lwjgl/opengl/ARBTextureFloat.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2002-2004 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public final class ARBTextureFloat { + + /* + * Accepted by the parameter of GetTexLevelParameter: + */ + public static final int TEXTURE_RED_TYPE_ARB = 0x8C10; + public static final int TEXTURE_GREEN_TYPE_ARB = 0x8C11; + public static final int TEXTURE_BLUE_TYPE_ARB = 0x8C12; + public static final int TEXTURE_ALPHA_TYPE_ARB = 0x8C13; + public static final int TEXTURE_LUMINANCE_TYPE_ARB = 0x8C14; + public static final int TEXTURE_INTENSITY_TYPE_ARB = 0x8C15; + public static final int TEXTURE_DEPTH_TYPE_ARB = 0x8C16; + + /* + * Returned by the parameter of GetTexLevelParameter: + */ + public static final int UNSIGNED_NORMALIZED_ARB = 0x8C17; + + /* + * Accepted by the parameter of TexImage1D, + * TexImage2D, and TexImage3D: + */ + public static final int RGBA32F_ARB = 0x8814; + public static final int RGB32F_ARB = 0x8815; + public static final int ALPHA32F_ARB = 0x8816; + public static final int INTENSITY32F_ARB = 0x8817; + public static final int LUMINANCE32F_ARB = 0x8818; + public static final int LUMINANCE_ALPHA32F_ARB = 0x8819; + public static final int RGBA16F_ARB = 0x881A; + public static final int RGB16F_ARB = 0x881B; + public static final int ALPHA16F_ARB = 0x881C; + public static final int INTENSITY16F_ARB = 0x881D; + public static final int LUMINANCE16F_ARB = 0x881E; + public static final int LUMINANCE_ALPHA16F_ARB = 0x881F; + + private ARBTextureFloat() { + } + +} \ No newline at end of file diff --git a/src/java/org/lwjgl/opengl/GLContext.java b/src/java/org/lwjgl/opengl/GLContext.java index b24f6556..7355f4e2 100644 --- a/src/java/org/lwjgl/opengl/GLContext.java +++ b/src/java/org/lwjgl/opengl/GLContext.java @@ -60,11 +60,13 @@ public final class GLContext { /* * Available extensions */ + public static boolean GL_ARB_color_buffer_float; public static boolean GL_ARB_depth_texture; public static boolean GL_ARB_draw_buffers; public static boolean GL_ARB_fragment_program; public static boolean GL_ARB_fragment_program_shadow; public static boolean GL_ARB_fragment_shader; + public static boolean GL_ARB_half_float_pixel; public static boolean GL_ARB_imaging; public static boolean GL_ARB_matrix_palette; public static boolean GL_ARB_multisample; @@ -83,6 +85,7 @@ public final class GLContext { public static boolean GL_ARB_texture_env_combine; public static boolean GL_ARB_texture_env_crossbar; public static boolean GL_ARB_texture_env_dot3; + public static boolean GL_ARB_texture_float; public static boolean GL_ARB_texture_mirrored_repeat; public static boolean GL_ARB_texture_non_power_of_two; public static boolean GL_ARB_texture_rectangle; diff --git a/src/native/common/arb/Makefile.am b/src/native/common/arb/Makefile.am index a75ccec1..4bcb0d30 100644 --- a/src/native/common/arb/Makefile.am +++ b/src/native/common/arb/Makefile.am @@ -3,6 +3,7 @@ noinst_LTLIBRARIES = libarb.la libarb_la_SOURCES = $(SRC) INCLUDES=-I.. SRC = org_lwjgl_opengl_ARBBufferObject.c \ + org_lwjgl_opengl_ARBColorBufferFloat.c \ org_lwjgl_opengl_ARBDrawBuffers.c \ org_lwjgl_opengl_ARBProgram.c \ org_lwjgl_opengl_ARBMatrixPalette.c \ diff --git a/src/native/common/arb/org_lwjgl_opengl_ARBColorBufferFloat.c b/src/native/common/arb/org_lwjgl_opengl_ARBColorBufferFloat.c new file mode 100644 index 00000000..e755c7c8 --- /dev/null +++ b/src/native/common/arb/org_lwjgl_opengl_ARBColorBufferFloat.c @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2002-2004 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +// ---------------------------------- +// IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.ARBColorBufferFloat +// ---------------------------------- + +#include "extgl.h" + + +typedef void (APIENTRY * glClampColorARBPROC) (GLenum target, GLenum clamp); + +static glClampColorARBPROC glClampColorARB; + +/* + * Class: org.lwjgl.opengl.ARBColorBufferFloat + * Method: glClampColorARB + */ +static void JNICALL Java_org_lwjgl_opengl_ARBColorBufferFloat_glClampColorARB + (JNIEnv * env, jclass clazz, jint target, jint clamp) +{ + glClampColorARB(target, clamp); +} + +#ifdef __clplusplus +extern "C" { +#endif +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBColorBufferFloat_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"glClampColorARB", "(II)V", (void*)&Java_org_lwjgl_opengl_ARBColorBufferFloat_glClampColorARB, "glClampColorARB", (void*)&glClampColorARB} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} +#ifdef __cplusplus +} +#endif \ No newline at end of file