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.Alternate;
36 import org.lwjgl.util.generator.opengl.*;
37 
38 import java.nio.ByteBuffer;
39 import java.nio.IntBuffer;
40 
41 public interface ARB_shading_language_include {
42 
43 	/** Accepted by the <type> parameter of NamedStringARB: */
44 	int GL_SHADER_INCLUDE_ARB = 0x8DAE;
45 
46 	/** Accepted by the <pname> parameter of GetNamedStringivARB: */
47 	int GL_NAMED_STRING_LENGTH_ARB = 0x8DE9;
48 	int GL_NAMED_STRING_TYPE_ARB = 0x8DEA;
49 
glNamedStringARB(@Lenum int type, @AutoSize(R) int namelen, @Const @GLchar ByteBuffer name, @AutoSize(R) int stringlen, @Const @GLchar ByteBuffer string)50 	void glNamedStringARB(@GLenum int type,
51 	                      @AutoSize("name") int namelen, @Const @GLchar ByteBuffer name,
52 	                      @AutoSize("string") int stringlen, @Const @GLchar ByteBuffer string);
53 
54 	@Alternate("glNamedStringARB")
glNamedStringARB(@Lenum int type, @Constant(R) int namelen, CharSequence name, @Constant(R) int stringlen, CharSequence string)55 	void glNamedStringARB(@GLenum int type,
56 	                      @Constant("name.length()") int namelen, CharSequence name,
57 	                      @Constant("string.length()") int stringlen, CharSequence string);
58 
glDeleteNamedStringARB(@utoSizeR) int namelen, @Const @GLchar ByteBuffer name)59 	void glDeleteNamedStringARB(@AutoSize("name") int namelen, @Const @GLchar ByteBuffer name);
60 
61 	@Alternate("glDeleteNamedStringARB")
glDeleteNamedStringARB(@onstantR) int namelen, CharSequence name)62 	void glDeleteNamedStringARB(@Constant("name.length()") int namelen, CharSequence name);
63 
glCompileShaderIncludeARB(@Luint int shader, @GLsizei int count, @Const @NullTerminated(R) @PointerArray(R) @GLchar ByteBuffer path, @Constant(R) @Const IntBuffer length)64 	void glCompileShaderIncludeARB(@GLuint int shader, @GLsizei int count,
65 	                               @Const @NullTerminated("count") @PointerArray("count") @GLchar ByteBuffer path,
66 	                               @Constant("0L") @Const IntBuffer length);
67 
68 	@Alternate(value = "glCompileShaderIncludeARB", nativeAlt = true)
glCompileShaderIncludeARB2(@Luint int shader, @Constant(R) @GLsizei int count, @Const @PointerArray(value = R, lengths = R) CharSequence[] path, @Constant(R) @Const IntBuffer length)69 	void glCompileShaderIncludeARB2(@GLuint int shader, @Constant("path.length") @GLsizei int count,
70 	                                @Const @PointerArray(value = "count", lengths = "length") CharSequence[] path,
71 	                                @Constant("APIUtil.getLengths(caps, path)") @Const IntBuffer length);
72 
glIsNamedStringARB(@utoSizeR) int namelen, @Const @GLchar ByteBuffer name)73 	boolean glIsNamedStringARB(@AutoSize("name") int namelen, @Const @GLchar ByteBuffer name);
74 
75 	@Alternate("glIsNamedStringARB")
glIsNamedStringARB(@onstantR) int namelen, CharSequence name)76 	boolean glIsNamedStringARB(@Constant("name.length()") int namelen, CharSequence name);
77 
glGetNamedStringARB(@utoSizeR) int namelen, @Const @GLchar ByteBuffer name, @AutoSize(R) @GLsizei int bufSize, @OutParameter @Check(value = R, canBeNull = true) IntBuffer stringlen, @OutParameter @GLchar ByteBuffer string)78 	void glGetNamedStringARB(@AutoSize("name") int namelen, @Const @GLchar ByteBuffer name,
79 	                         @AutoSize("string") @GLsizei int bufSize,
80 	                         @OutParameter @Check(value = "1", canBeNull = true) IntBuffer stringlen,
81 	                         @OutParameter @GLchar ByteBuffer string);
82 
83 	@Alternate("glGetNamedStringARB")
glGetNamedStringARB(@onstantR) int namelen, CharSequence name, @AutoSize(R) @GLsizei int bufSize, @OutParameter @Check(value = R, canBeNull = true) IntBuffer stringlen, @OutParameter @GLchar ByteBuffer string)84 	void glGetNamedStringARB(@Constant("name.length()") int namelen, CharSequence name,
85 	                         @AutoSize("string") @GLsizei int bufSize,
86 	                         @OutParameter @Check(value = "1", canBeNull = true) IntBuffer stringlen,
87 	                         @OutParameter @GLchar ByteBuffer string);
88 
89 	@Alternate("glGetNamedStringARB")
90 	@GLreturn(value = "string", maxLength = "bufSize")
glGetNamedStringARB2(@onstantR) int namelen, CharSequence name, @GLsizei int bufSize, @OutParameter @Constant(R) IntBuffer stringlen, @OutParameter @GLchar ByteBuffer string)91 	void glGetNamedStringARB2(@Constant("name.length()") int namelen, CharSequence name,
92 	                          @GLsizei int bufSize,
93 	                          @OutParameter @Constant("MemoryUtil.getAddress0(string_length)") IntBuffer stringlen,
94 	                          @OutParameter @GLchar ByteBuffer string);
95 
96 	@StripPostfix("params")
glGetNamedStringivARB(@utoSizeR) int namelen, @Const @GLchar ByteBuffer name, @GLenum int pname, @OutParameter @Check(R) IntBuffer params)97 	void glGetNamedStringivARB(@AutoSize("name") int namelen, @Const @GLchar ByteBuffer name, @GLenum int pname, @OutParameter @Check("1") IntBuffer params);
98 
99 	@Alternate("glGetNamedStringivARB")
100 	@StripPostfix(value = "params", hasPostfix = false)
glGetNamedStringivARB(@onstantR) int namelen, CharSequence name, @GLenum int pname, @OutParameter @Check(R) IntBuffer params)101 	void glGetNamedStringivARB(@Constant("name.length()") int namelen, CharSequence name, @GLenum int pname, @OutParameter @Check("1") IntBuffer params);
102 
103 	@Alternate("glGetNamedStringivARB")
104 	@GLreturn("params")
105 	@StripPostfix(value = "params", hasPostfix = false)
glGetNamedStringivARB2(@onstantR) int namelen, CharSequence name, @GLenum int pname, @OutParameter IntBuffer params)106 	void glGetNamedStringivARB2(@Constant("name.length()") int namelen, CharSequence name, @GLenum int pname, @OutParameter IntBuffer params);
107 
108 }