From 28353cf747eeb1ceade6900987eb8015ea3524ba Mon Sep 17 00:00:00 2001 From: javasabr Date: Mon, 12 Feb 2018 09:51:31 +0300 Subject: [PATCH] refactored core interfaces. --- .../main/java/com/jme3/audio/openal/AL.java | 325 +++- .../main/java/com/jme3/audio/openal/ALC.java | 91 +- .../main/java/com/jme3/audio/openal/EFX.java | 1398 +++++++-------- .../java/com/jme3/renderer/opengl/GL.java | 1497 ++++++++++++++--- .../java/com/jme3/renderer/opengl/GL2.java | 136 +- .../java/com/jme3/renderer/opengl/GL3.java | 52 +- .../java/com/jme3/renderer/opengl/GL4.java | 17 +- .../java/com/jme3/renderer/opengl/GLExt.java | 261 ++- .../java/com/jme3/renderer/opengl/GLFbo.java | 52 +- 9 files changed, 2729 insertions(+), 1100 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/audio/openal/AL.java b/jme3-core/src/main/java/com/jme3/audio/openal/AL.java index 4fcfb6eeb..380550254 100644 --- a/jme3-core/src/main/java/com/jme3/audio/openal/AL.java +++ b/jme3-core/src/main/java/com/jme3/audio/openal/AL.java @@ -12,37 +12,37 @@ public interface AL { /** * Boolean False. */ - static final int AL_FALSE = 0; + public static final int AL_FALSE = 0; /** * Boolean True. */ - static final int AL_TRUE = 1; + public static final int AL_TRUE = 1; /* "no distance model" or "no buffer" */ - static final int AL_NONE = 0; + public static final int AL_NONE = 0; /** * Indicate Source has relative coordinates. */ - static final int AL_SOURCE_RELATIVE = 0x202; + public static final int AL_SOURCE_RELATIVE = 0x202; /** * Directional source, inner cone angle, in degrees. Range: [0-360] Default: * 360 */ - static final int AL_CONE_INNER_ANGLE = 0x1001; + public static final int AL_CONE_INNER_ANGLE = 0x1001; /** * Directional source, outer cone angle, in degrees. Range: [0-360] Default: * 360 */ - static final int AL_CONE_OUTER_ANGLE = 0x1002; + public static final int AL_CONE_OUTER_ANGLE = 0x1002; /** * Specify the pitch to be applied at source. Range: [0.5-2.0] Default: 1.0 */ - static final int AL_PITCH = 0x1003; + public static final int AL_PITCH = 0x1003; /** * Specify the current location in three dimensional space. OpenAL, like @@ -52,29 +52,29 @@ public interface AL { * coordinate system, flip the sign on the Z coordinate. Listener position * is always in the world coordinate system. */ - static final int AL_POSITION = 0x1004; + public static final int AL_POSITION = 0x1004; /** * Specify the current direction. */ - static final int AL_DIRECTION = 0x1005; + public static final int AL_DIRECTION = 0x1005; /** * Specify the current velocity in three dimensional space. */ - static final int AL_VELOCITY = 0x1006; + public static final int AL_VELOCITY = 0x1006; /** * Indicate whether source is looping. Type: ALboolean? Range: [AL_TRUE, * AL_FALSE] Default: FALSE. */ - static final int AL_LOOPING = 0x1007; + public static final int AL_LOOPING = 0x1007; /** * Indicate the buffer to provide sound samples. Type: ALuint. Range: any * valid Buffer id. */ - static final int AL_BUFFER = 0x1009; + public static final int AL_BUFFER = 0x1009; /** * Indicate the gain (volume amplification) applied. Type: ALfloat. Range: @@ -84,7 +84,7 @@ public interface AL { * logarithmic scale; it is interpreted as zero volume - the channel is * effectively disabled. */ - static final int AL_GAIN = 0x100A; + public static final int AL_GAIN = 0x100A; /* * Indicate minimum source attenuation @@ -93,43 +93,43 @@ public interface AL { * * Logarithmic */ - static final int AL_MIN_GAIN = 0x100D; + public static final int AL_MIN_GAIN = 0x100D; /** * Indicate maximum source attenuation Type: ALfloat Range: [0.0 - 1.0] * * Logarithmic */ - static final int AL_MAX_GAIN = 0x100E; + public static final int AL_MAX_GAIN = 0x100E; /** * Indicate listener orientation. * * at/up */ - static final int AL_ORIENTATION = 0x100F; + public static final int AL_ORIENTATION = 0x100F; /** * Source state information. */ - static final int AL_SOURCE_STATE = 0x1010; - static final int AL_INITIAL = 0x1011; - static final int AL_PLAYING = 0x1012; - static final int AL_PAUSED = 0x1013; - static final int AL_STOPPED = 0x1014; + public static final int AL_SOURCE_STATE = 0x1010; + public static final int AL_INITIAL = 0x1011; + public static final int AL_PLAYING = 0x1012; + public static final int AL_PAUSED = 0x1013; + public static final int AL_STOPPED = 0x1014; /** * Buffer Queue params */ - static final int AL_BUFFERS_QUEUED = 0x1015; - static final int AL_BUFFERS_PROCESSED = 0x1016; + public static final int AL_BUFFERS_QUEUED = 0x1015; + public static final int AL_BUFFERS_PROCESSED = 0x1016; /** * Source buffer position information */ - static final int AL_SEC_OFFSET = 0x1024; - static final int AL_SAMPLE_OFFSET = 0x1025; - static final int AL_BYTE_OFFSET = 0x1026; + public static final int AL_SEC_OFFSET = 0x1024; + public static final int AL_SAMPLE_OFFSET = 0x1025; + public static final int AL_BYTE_OFFSET = 0x1026; /* * Source type (Static, Streaming or undetermined) @@ -137,38 +137,38 @@ public interface AL { * Source is Streaming if one or more Buffers have been attached using alSourceQueueBuffers * Source is undetermined when it has the NULL buffer attached */ - static final int AL_SOURCE_TYPE = 0x1027; - static final int AL_STATIC = 0x1028; - static final int AL_STREAMING = 0x1029; - static final int AL_UNDETERMINED = 0x1030; + public static final int AL_SOURCE_TYPE = 0x1027; + public static final int AL_STATIC = 0x1028; + public static final int AL_STREAMING = 0x1029; + public static final int AL_UNDETERMINED = 0x1030; /** * Sound samples: format specifier. */ - static final int AL_FORMAT_MONO8 = 0x1100; - static final int AL_FORMAT_MONO16 = 0x1101; - static final int AL_FORMAT_STEREO8 = 0x1102; - static final int AL_FORMAT_STEREO16 = 0x1103; + public static final int AL_FORMAT_MONO8 = 0x1100; + public static final int AL_FORMAT_MONO16 = 0x1101; + public static final int AL_FORMAT_STEREO8 = 0x1102; + public static final int AL_FORMAT_STEREO16 = 0x1103; /** * source specific reference distance Type: ALfloat Range: 0.0 - +inf * * At 0.0, no distance attenuation occurs. Default is 1.0. */ - static final int AL_REFERENCE_DISTANCE = 0x1020; + public static final int AL_REFERENCE_DISTANCE = 0x1020; /** * source specific rolloff factor Type: ALfloat Range: 0.0 - +inf * */ - static final int AL_ROLLOFF_FACTOR = 0x1021; + public static final int AL_ROLLOFF_FACTOR = 0x1021; /** * Directional source, outer cone gain. * * Default: 0.0 Range: [0.0 - 1.0] Logarithmic */ - static final int AL_CONE_OUTER_GAIN = 0x1022; + public static final int AL_CONE_OUTER_GAIN = 0x1022; /** * Indicate distance above which sources are not attenuated using the @@ -176,64 +176,64 @@ public interface AL { * * Default: +inf Type: ALfloat Range: 0.0 - +inf */ - static final int AL_MAX_DISTANCE = 0x1023; + public static final int AL_MAX_DISTANCE = 0x1023; /** * Sound samples: frequency, in units of Hertz [Hz]. This is the number of * samples per second. Half of the sample frequency marks the maximum * significant frequency component. */ - static final int AL_FREQUENCY = 0x2001; - static final int AL_BITS = 0x2002; - static final int AL_CHANNELS = 0x2003; - static final int AL_SIZE = 0x2004; + public static final int AL_FREQUENCY = 0x2001; + public static final int AL_BITS = 0x2002; + public static final int AL_CHANNELS = 0x2003; + public static final int AL_SIZE = 0x2004; /** * Buffer state. * * Not supported for public use (yet). */ - static final int AL_UNUSED = 0x2010; - static final int AL_PENDING = 0x2011; - static final int AL_PROCESSED = 0x2012; + public static final int AL_UNUSED = 0x2010; + public static final int AL_PENDING = 0x2011; + public static final int AL_PROCESSED = 0x2012; /** * Errors: No Error. */ - static final int AL_NO_ERROR = 0; + public static final int AL_NO_ERROR = 0; /** * Invalid Name parameter passed to AL call. */ - static final int AL_INVALID_NAME = 0xA001; + public static final int AL_INVALID_NAME = 0xA001; /** * Invalid parameter passed to AL call. */ - static final int AL_INVALID_ENUM = 0xA002; + public static final int AL_INVALID_ENUM = 0xA002; /** * Invalid enum parameter value. */ - static final int AL_INVALID_VALUE = 0xA003; + public static final int AL_INVALID_VALUE = 0xA003; /** * Illegal call. */ - static final int AL_INVALID_OPERATION = 0xA004; + public static final int AL_INVALID_OPERATION = 0xA004; /** * No mojo. */ - static final int AL_OUT_OF_MEMORY = 0xA005; + public static final int AL_OUT_OF_MEMORY = 0xA005; /** * Context strings: Vendor Name. */ - static final int AL_VENDOR = 0xB001; - static final int AL_VERSION = 0xB002; - static final int AL_RENDERER = 0xB003; - static final int AL_EXTENSIONS = 0xB004; + public static final int AL_VENDOR = 0xB001; + public static final int AL_VERSION = 0xB002; + public static final int AL_RENDERER = 0xB003; + public static final int AL_EXTENSIONS = 0xB004; /** * Global tweakage. @@ -241,17 +241,17 @@ public interface AL { /** * Doppler scale. Default 1.0 */ - static final int AL_DOPPLER_FACTOR = 0xC000; + public static final int AL_DOPPLER_FACTOR = 0xC000; /** * Tweaks speed of propagation. */ - static final int AL_DOPPLER_VELOCITY = 0xC001; + public static final int AL_DOPPLER_VELOCITY = 0xC001; /** * Speed of Sound in units per second */ - static final int AL_SPEED_OF_SOUND = 0xC003; + public static final int AL_SPEED_OF_SOUND = 0xC003; /** * Distance models @@ -260,37 +260,222 @@ public interface AL { * * implicit: NONE, which disables distance attenuation. */ - static final int AL_DISTANCE_MODEL = 0xD000; - static final int AL_INVERSE_DISTANCE = 0xD001; - static final int AL_INVERSE_DISTANCE_CLAMPED = 0xD002; - static final int AL_LINEAR_DISTANCE = 0xD003; - static final int AL_LINEAR_DISTANCE_CLAMPED = 0xD004; - static final int AL_EXPONENT_DISTANCE = 0xD005; - static final int AL_EXPONENT_DISTANCE_CLAMPED = 0xD006; -// -///* Listener parameter value ranges and defaults. */ -//#define AL_MIN_METERS_PER_UNIT FLT_MIN -//#define AL_MAX_METERS_PER_UNIT FLT_MAX -//#define AL_DEFAULT_METERS_PER_UNIT (1.0f) + public static final int AL_DISTANCE_MODEL = 0xD000; + public static final int AL_INVERSE_DISTANCE = 0xD001; + public static final int AL_INVERSE_DISTANCE_CLAMPED = 0xD002; + public static final int AL_LINEAR_DISTANCE = 0xD003; + public static final int AL_LINEAR_DISTANCE_CLAMPED = 0xD004; + public static final int AL_EXPONENT_DISTANCE = 0xD005; + public static final int AL_EXPONENT_DISTANCE_CLAMPED = 0xD006; + + // + ///* Listener parameter value ranges and defaults. */ + //#define AL_MIN_METERS_PER_UNIT FLT_MIN + //#define AL_MAX_METERS_PER_UNIT FLT_MAX + //#define AL_DEFAULT_METERS_PER_UNIT (1.0f) public String alGetString(int parameter); + + /** + * Requests a number of source names. + * + * @return the number of source names. + */ public int alGenSources(); + + /** + * Obtains error information. + *

+ *

Each detectable error is assigned a numeric code. When an error is detected by AL, a flag is set and the error code is recorded. Further errors, if they + * occur, do not affect this recorded code. When alGetError is called, the code is returned and the flag is cleared, so that a further error will again + * record its code. If a call to alGetError returns AL_NO_ERROR then there has been no detectable error since the last call to alGetError (or since the AL + * was initialized).

+ *

+ *

Error codes can be mapped to strings. The alGetString function returns a pointer to a constant (literal) string that is identical to the identifier used + * for the enumeration value, as defined in the specification.

+ */ public int alGetError(); + + /** + * Requests the deletion of a number of sources. + * + * @param numSources the number of sources. + * @param sources the sources to delete. + */ public void alDeleteSources(int numSources, IntBuffer sources); + + /** + * Requests a number of buffer names. + * + * @param numBuffers the number of buffers. + * @param buffers the buffer that will receive the buffer names. + */ public void alGenBuffers(int numBuffers, IntBuffer buffers); + + /** + * Requests the deletion of a number of buffers. + * + * @param numBuffers the number of buffers. + * @param buffers the buffers to delete. + */ public void alDeleteBuffers(int numBuffers, IntBuffer buffers); + + /** + * Sets the source state to AL_STOPPED. + *

+ *

alSourceStop applied to an AL_INITIAL source is a legal NOP. alSourceStop applied to a AL_PLAYING source will change its state to AL_STOPPED. The source + * is exempt from processing, its current state is preserved. alSourceStop applied to a AL_PAUSED source will change its state to AL_STOPPED, with the same + * consequences as on a AL_PLAYING source. alSourceStop applied to a AL_STOPPED source is a legal NOP.

+ * + * @param source the source to stop. + */ public void alSourceStop(int source); + + /** + * Integer version of {@link #alSourcef Sourcef}. + * + * @param source the source to modify. + * @param param the parameter to modify. + * @param value the parameter value. + */ public void alSourcei(int source, int param, int value); + + /** + * Sets the sample data of the specified buffer. + *

+ *

The data specified is copied to an internal software, or if possible, hardware buffer. The implementation is free to apply decompression, conversion, + * resampling, and filtering as needed.

+ *

+ *

8-bit data is expressed as an unsigned value over the range 0 to 255, 128 being an audio output level of zero.

+ *

+ *

16-bit data is expressed as a signed value over the range -32768 to 32767, 0 being an audio output level of zero. Byte order for 16-bit values is + * determined by the native format of the CPU.

+ *

+ *

Stereo data is expressed in an interleaved format, left channel sample followed by the right channel sample.

+ *

+ *

Buffers containing audio data with more than one channel will be played without 3D spatialization features – these formats are normally used for + * background music.

+ * + * @param buffer the buffer to modify. + * @param format the data format. One of:
{@link #AL_FORMAT_MONO8 FORMAT_MONO8}{@link #AL_FORMAT_MONO16 FORMAT_MONO16}{@link #AL_FORMAT_STEREO8 FORMAT_STEREO8}{@link #AL_FORMAT_STEREO16 FORMAT_STEREO16}
+ * @param data the sample data. + * @param frequency the data frequency. + */ public void alBufferData(int buffer, int format, ByteBuffer data, int size, int frequency); + + /** + * Sets the source state to AL_PLAYING. + *

+ *

alSourcePlay applied to an AL_INITIAL source will promote the source to AL_PLAYING, thus the data found in the buffer will be fed into the processing, + * starting at the beginning. alSourcePlay applied to a AL_PLAYING source will restart the source from the beginning. It will not affect the configuration, + * and will leave the source in AL_PLAYING state, but reset the sampling offset to the beginning. alSourcePlay applied to a AL_PAUSED source will resume + * processing using the source state as preserved at the alSourcePause operation. alSourcePlay applied to a AL_STOPPED source will propagate it to + * AL_INITIAL then to AL_PLAYING immediately.

+ * + * @param source the source to play. + */ public void alSourcePlay(int source); + + /** + * Sets the source state to AL_PAUSED. + *

+ *

alSourcePause applied to an AL_INITIAL source is a legal NOP. alSourcePause applied to a AL_PLAYING source will change its state to AL_PAUSED. The + * source is exempt from processing, its current state is preserved. alSourcePause applied to a AL_PAUSED source is a legal NOP. alSourcePause applied to a + * AL_STOPPED source is a legal NOP.

+ * + * @param source the source to pause. + */ public void alSourcePause(int source); + + /** + * Sets the float value of a source parameter. + * + * @param source the source to modify. + * @param param the parameter to modify. One of:
{@link #AL_CONE_INNER_ANGLE CONE_INNER_ANGLE}{@link #AL_CONE_OUTER_ANGLE CONE_OUTER_ANGLE}{@link #AL_PITCH PITCH}{@link #AL_DIRECTION DIRECTION}{@link #AL_LOOPING LOOPING}{@link #AL_BUFFER BUFFER}{@link #AL_SOURCE_STATE SOURCE_STATE}
{@link #AL_CONE_OUTER_GAIN CONE_OUTER_GAIN}{@link #AL_SOURCE_TYPE SOURCE_TYPE}{@link #AL_POSITION POSITION}{@link #AL_VELOCITY VELOCITY}{@link #AL_GAIN GAIN}{@link #AL_REFERENCE_DISTANCE REFERENCE_DISTANCE}{@link #AL_ROLLOFF_FACTOR ROLLOFF_FACTOR}
{@link #AL_MAX_DISTANCE MAX_DISTANCE}
+ * @param value the parameter value. + */ public void alSourcef(int source, int param, float value); + + /** + * Sets the 3 dimensional values of a source parameter. + * + * @param source the source to modify. + * @param param the parameter to modify. One of:
{@link #AL_CONE_INNER_ANGLE CONE_INNER_ANGLE}{@link #AL_CONE_OUTER_ANGLE CONE_OUTER_ANGLE}{@link #AL_PITCH PITCH}{@link #AL_DIRECTION DIRECTION}{@link #AL_LOOPING LOOPING}{@link #AL_BUFFER BUFFER}{@link #AL_SOURCE_STATE SOURCE_STATE}
{@link #AL_CONE_OUTER_GAIN CONE_OUTER_GAIN}{@link #AL_SOURCE_TYPE SOURCE_TYPE}{@link #AL_POSITION POSITION}{@link #AL_VELOCITY VELOCITY}{@link #AL_GAIN GAIN}{@link #AL_REFERENCE_DISTANCE REFERENCE_DISTANCE}{@link #AL_ROLLOFF_FACTOR ROLLOFF_FACTOR}
{@link #AL_MAX_DISTANCE MAX_DISTANCE}
+ * @param value1 the first parameter value. + * @param value2 the second parameter value. + * @param value3 the third parameter value. + */ public void alSource3f(int source, int param, float value1, float value2, float value3); + + /** + * Returns the integer value of the specified source parameter. + * + * @param source the source to query. + * @param param the parameter to query. One of:
{@link #AL_CONE_INNER_ANGLE CONE_INNER_ANGLE}{@link #AL_CONE_OUTER_ANGLE CONE_OUTER_ANGLE}{@link #AL_PITCH PITCH}{@link #AL_DIRECTION DIRECTION}{@link #AL_LOOPING LOOPING}{@link #AL_BUFFER BUFFER}{@link #AL_SOURCE_STATE SOURCE_STATE}
{@link #AL_CONE_OUTER_GAIN CONE_OUTER_GAIN}{@link #AL_SOURCE_TYPE SOURCE_TYPE}{@link #AL_POSITION POSITION}{@link #AL_VELOCITY VELOCITY}{@link #AL_GAIN GAIN}{@link #AL_REFERENCE_DISTANCE REFERENCE_DISTANCE}{@link #AL_ROLLOFF_FACTOR ROLLOFF_FACTOR}
{@link #AL_MAX_DISTANCE MAX_DISTANCE}
+ */ public int alGetSourcei(int source, int param); + + /** + * Removes a number of buffer entries that have finished processing, in the order of apperance, from the queue of the specified source. + *

+ *

Once a queue entry for a buffer has been appended to a queue and is pending processing, it should not be changed. Removal of a given queue entry is not + * possible unless either the source is stopped (in which case then entire queue is considered processed), or if the queue entry has already been processed + * (AL_PLAYING or AL_PAUSED source). A playing source will enter the AL_STOPPED state if it completes playback of the last buffer in its queue (the same + * behavior as when a single buffer has been attached to a source and has finished playback).

+ * + * @param source the target source + * @param numBuffers the names count. + * @param buffers the buffer names + */ public void alSourceUnqueueBuffers(int source, int numBuffers, IntBuffer buffers); + + /** + * Queues up one or multiple buffer names to the specified source. + *

+ *

The buffers will be queued in the sequence in which they appear in the array. This command is legal on a source in any playback state (to allow for + * streaming, queuing has to be possible on a AL_PLAYING source). All buffers in a queue must have the same format and attributes, with the exception of + * the {@code NULL} buffer (i.e., 0) which can always be queued.

+ * + * @param source the target source. + * @param numBuffers the names count. + * @param buffers the buffer names. + */ public void alSourceQueueBuffers(int source, int numBuffers, IntBuffer buffers); + + /** + * Pointer version of {@link #alListenerf Listenerf}. + * + * @param param the parameter to modify. + * @param data the parameter values. + */ public void alListener(int param, FloatBuffer data); + + /** + * Sets the float value of a listener parameter. + * + * @param param the parameter to modify. One of:
{@link #AL_ORIENTATION ORIENTATION}{@link #AL_POSITION POSITION}{@link #AL_VELOCITY VELOCITY}{@link #AL_GAIN GAIN}
+ * @param value the parameter value. + */ public void alListenerf(int param, float value); + + /** + * Sets the 3 dimensional float values of a listener parameter. + * + * @param param the parameter to modify. One of:
{@link #AL_ORIENTATION ORIENTATION}{@link #AL_POSITION POSITION}{@link #AL_VELOCITY VELOCITY}{@link #AL_GAIN GAIN}
+ * @param value1 the first value. + * @param value2 the second value. + * @param value3 the third value. + */ public void alListener3f(int param, float value1, float value2, float value3); + + /** + * Sets the 3 dimensional integer values of a source parameter. + * + * @param source the source to modify. + * @param param the parameter to modify. + * @param value1 the first value. + * @param value2 the second value. + * @param value3 the third value. + */ public void alSource3i(int source, int param, int value1, int value2, int value3); } diff --git a/jme3-core/src/main/java/com/jme3/audio/openal/ALC.java b/jme3-core/src/main/java/com/jme3/audio/openal/ALC.java index ef9996de9..0d3c6301f 100644 --- a/jme3-core/src/main/java/com/jme3/audio/openal/ALC.java +++ b/jme3-core/src/main/java/com/jme3/audio/openal/ALC.java @@ -7,67 +7,120 @@ public interface ALC { /** * No error */ - static final int ALC_NO_ERROR = 0; + public static final int ALC_NO_ERROR = 0; /** * No device */ - static final int ALC_INVALID_DEVICE = 0xA001; + public static final int ALC_INVALID_DEVICE = 0xA001; /** * invalid context ID */ - static final int ALC_INVALID_CONTEXT = 0xA002; + public static final int ALC_INVALID_CONTEXT = 0xA002; /** * bad enum */ - static final int ALC_INVALID_ENUM = 0xA003; + public static final int ALC_INVALID_ENUM = 0xA003; /** * bad value */ - static final int ALC_INVALID_VALUE = 0xA004; + public static final int ALC_INVALID_VALUE = 0xA004; /** * Out of memory. */ - static final int ALC_OUT_OF_MEMORY = 0xA005; + public static final int ALC_OUT_OF_MEMORY = 0xA005; /** * The Specifier string for default device */ - static final int ALC_DEFAULT_DEVICE_SPECIFIER = 0x1004; - static final int ALC_DEVICE_SPECIFIER = 0x1005; - static final int ALC_EXTENSIONS = 0x1006; + public static final int ALC_DEFAULT_DEVICE_SPECIFIER = 0x1004; + public static final int ALC_DEVICE_SPECIFIER = 0x1005; + public static final int ALC_EXTENSIONS = 0x1006; - static final int ALC_MAJOR_VERSION = 0x1000; - static final int ALC_MINOR_VERSION = 0x1001; + public static final int ALC_MAJOR_VERSION = 0x1000; + public static final int ALC_MINOR_VERSION = 0x1001; - static final int ALC_ATTRIBUTES_SIZE = 0x1002; - static final int ALC_ALL_ATTRIBUTES = 0x1003; + public static final int ALC_ATTRIBUTES_SIZE = 0x1002; + public static final int ALC_ALL_ATTRIBUTES = 0x1003; /** * Capture extension */ - static final int ALC_CAPTURE_DEVICE_SPECIFIER = 0x310; - static final int ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER = 0x311; - static final int ALC_CAPTURE_SAMPLES = 0x312; + public static final int ALC_CAPTURE_DEVICE_SPECIFIER = 0x310; + public static final int ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER = 0x311; + public static final int ALC_CAPTURE_SAMPLES = 0x312; /** * ALC_ENUMERATE_ALL_EXT enums */ - static final int ALC_DEFAULT_ALL_DEVICES_SPECIFIER = 0x1012; - static final int ALC_ALL_DEVICES_SPECIFIER = 0x1013; + public static final int ALC_DEFAULT_ALL_DEVICES_SPECIFIER = 0x1012; + public static final int ALC_ALL_DEVICES_SPECIFIER = 0x1013; //public static ALCCapabilities createCapabilities(long device); - + + /** + * Creates an AL context. + */ public void createALC(); + + /** + * Destroys an AL context. + */ public void destroyALC(); + + /** + * Checks of creating an AL context. + * + * @return true if an AL context is created. + */ public boolean isCreated(); + + /** + * Obtains string value(s) from ALC. + * + * @param parameter the information to query. One of:
{@link #ALC_DEFAULT_DEVICE_SPECIFIER DEFAULT_DEVICE_SPECIFIER}{@link #ALC_DEVICE_SPECIFIER DEVICE_SPECIFIER}{@link #ALC_EXTENSIONS EXTENSIONS}
{@link #ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER CAPTURE_DEFAULT_DEVICE_SPECIFIER}{@link #ALC_CAPTURE_DEVICE_SPECIFIER CAPTURE_DEVICE_SPECIFIER}
+ */ public String alcGetString(int parameter); + + /** + * Verifies that a given extension is available for the current context and the device it is associated with. + *

+ *

Invalid and unsupported string tokens return ALC_FALSE. A {@code NULL} deviceHandle is acceptable. {@code extName} is not case sensitive – the implementation + * will convert the name to all upper-case internally (and will express extension names in upper-case).

+ * + * @param extension the extension name. + */ public boolean alcIsExtensionPresent(String extension); + + /** + * Obtains integer value(s) from ALC. + * + * @param param the information to query. One of:
{@link #ALC_MAJOR_VERSION MAJOR_VERSION}{@link #ALC_MINOR_VERSION MINOR_VERSION}{@link #ALC_ATTRIBUTES_SIZE ATTRIBUTES_SIZE}{@link #ALC_ALL_ATTRIBUTES ALL_ATTRIBUTES}{@link #ALC_CAPTURE_SAMPLES CAPTURE_SAMPLES}
+ * @param buffer the destination buffer. + * @param size the buffer size. + */ public void alcGetInteger(int param, IntBuffer buffer, int size); + + /** + * Pauses a playback device. + *

+ *

When paused, no contexts associated with the device will be processed or updated. Playing sources will not produce sound, have their offsets + * incremented, or process any more buffers, until the device is resumed. Pausing a device that is already paused is a legal no-op.

+ */ public void alcDevicePauseSOFT(); + + /** + * Resumes playback of a paused device. + *

+ *

This will restart processing on the device -- sources will resume playing sound as normal. Resuming playback on a device that is not paused is a legal + * no-op.

+ *

+ *

These functions are not reference counted. alcDeviceResumeSOFT only needs to be called once to resume playback, regardless of how many times + * {@link #alcDevicePauseSOFT DevicePauseSOFT} was called.

+ */ public void alcDeviceResumeSOFT(); } diff --git a/jme3-core/src/main/java/com/jme3/audio/openal/EFX.java b/jme3-core/src/main/java/com/jme3/audio/openal/EFX.java index 89f0a6e0c..4ae546263 100644 --- a/jme3-core/src/main/java/com/jme3/audio/openal/EFX.java +++ b/jme3-core/src/main/java/com/jme3/audio/openal/EFX.java @@ -4,676 +4,754 @@ import java.nio.IntBuffer; public interface EFX { - static final String ALC_EXT_EFX_NAME = "ALC_EXT_EFX"; - - static final int ALC_EFX_MAJOR_VERSION = 0x20001; - static final int ALC_EFX_MINOR_VERSION = 0x20002; - static final int ALC_MAX_AUXILIARY_SENDS = 0x20003; - -///* Listener properties. */ -//#define AL_METERS_PER_UNIT 0x20004 -// -///* Source properties. */ - static final int AL_DIRECT_FILTER = 0x20005; - static final int AL_AUXILIARY_SEND_FILTER = 0x20006; -//#define AL_AIR_ABSORPTION_FACTOR 0x20007 -//#define AL_ROOM_ROLLOFF_FACTOR 0x20008 -//#define AL_CONE_OUTER_GAINHF 0x20009 - static final int AL_DIRECT_FILTER_GAINHF_AUTO = 0x2000A; -//#define AL_AUXILIARY_SEND_FILTER_GAIN_AUTO 0x2000B -//#define AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO 0x2000C -// -// -///* Effect properties. */ -// -///* Reverb effect parameters */ - static final int AL_REVERB_DENSITY = 0x0001; - static final int AL_REVERB_DIFFUSION = 0x0002; - static final int AL_REVERB_GAIN = 0x0003; - static final int AL_REVERB_GAINHF = 0x0004; - static final int AL_REVERB_DECAY_TIME = 0x0005; - static final int AL_REVERB_DECAY_HFRATIO = 0x0006; - static final int AL_REVERB_REFLECTIONS_GAIN = 0x0007; - static final int AL_REVERB_REFLECTIONS_DELAY = 0x0008; - static final int AL_REVERB_LATE_REVERB_GAIN = 0x0009; - static final int AL_REVERB_LATE_REVERB_DELAY = 0x000A; - static final int AL_REVERB_AIR_ABSORPTION_GAINHF = 0x000B; - static final int AL_REVERB_ROOM_ROLLOFF_FACTOR = 0x000C; - static final int AL_REVERB_DECAY_HFLIMIT = 0x000D; - -///* EAX Reverb effect parameters */ -//#define AL_EAXREVERB_DENSITY 0x0001 -//#define AL_EAXREVERB_DIFFUSION 0x0002 -//#define AL_EAXREVERB_GAIN 0x0003 -//#define AL_EAXREVERB_GAINHF 0x0004 -//#define AL_EAXREVERB_GAINLF 0x0005 -//#define AL_EAXREVERB_DECAY_TIME 0x0006 -//#define AL_EAXREVERB_DECAY_HFRATIO 0x0007 -//#define AL_EAXREVERB_DECAY_LFRATIO 0x0008 -//#define AL_EAXREVERB_REFLECTIONS_GAIN 0x0009 -//#define AL_EAXREVERB_REFLECTIONS_DELAY 0x000A -//#define AL_EAXREVERB_REFLECTIONS_PAN 0x000B -//#define AL_EAXREVERB_LATE_REVERB_GAIN 0x000C -//#define AL_EAXREVERB_LATE_REVERB_DELAY 0x000D -//#define AL_EAXREVERB_LATE_REVERB_PAN 0x000E -//#define AL_EAXREVERB_ECHO_TIME 0x000F -//#define AL_EAXREVERB_ECHO_DEPTH 0x0010 -//#define AL_EAXREVERB_MODULATION_TIME 0x0011 -//#define AL_EAXREVERB_MODULATION_DEPTH 0x0012 -//#define AL_EAXREVERB_AIR_ABSORPTION_GAINHF 0x0013 -//#define AL_EAXREVERB_HFREFERENCE 0x0014 -//#define AL_EAXREVERB_LFREFERENCE 0x0015 -//#define AL_EAXREVERB_ROOM_ROLLOFF_FACTOR 0x0016 -//#define AL_EAXREVERB_DECAY_HFLIMIT 0x0017 -// -///* Chorus effect parameters */ -//#define AL_CHORUS_WAVEFORM 0x0001 -//#define AL_CHORUS_PHASE 0x0002 -//#define AL_CHORUS_RATE 0x0003 -//#define AL_CHORUS_DEPTH 0x0004 -//#define AL_CHORUS_FEEDBACK 0x0005 -//#define AL_CHORUS_DELAY 0x0006 -// -///* Distortion effect parameters */ -//#define AL_DISTORTION_EDGE 0x0001 -//#define AL_DISTORTION_GAIN 0x0002 -//#define AL_DISTORTION_LOWPASS_CUTOFF 0x0003 -//#define AL_DISTORTION_EQCENTER 0x0004 -//#define AL_DISTORTION_EQBANDWIDTH 0x0005 -// -///* Echo effect parameters */ -//#define AL_ECHO_DELAY 0x0001 -//#define AL_ECHO_LRDELAY 0x0002 -//#define AL_ECHO_DAMPING 0x0003 -//#define AL_ECHO_FEEDBACK 0x0004 -//#define AL_ECHO_SPREAD 0x0005 -// -///* Flanger effect parameters */ -//#define AL_FLANGER_WAVEFORM 0x0001 -//#define AL_FLANGER_PHASE 0x0002 -//#define AL_FLANGER_RATE 0x0003 -//#define AL_FLANGER_DEPTH 0x0004 -//#define AL_FLANGER_FEEDBACK 0x0005 -//#define AL_FLANGER_DELAY 0x0006 -// -///* Frequency shifter effect parameters */ -//#define AL_FREQUENCY_SHIFTER_FREQUENCY 0x0001 -//#define AL_FREQUENCY_SHIFTER_LEFT_DIRECTION 0x0002 -//#define AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION 0x0003 -// -///* Vocal morpher effect parameters */ -//#define AL_VOCAL_MORPHER_PHONEMEA 0x0001 -//#define AL_VOCAL_MORPHER_PHONEMEA_COARSE_TUNING 0x0002 -//#define AL_VOCAL_MORPHER_PHONEMEB 0x0003 -//#define AL_VOCAL_MORPHER_PHONEMEB_COARSE_TUNING 0x0004 -//#define AL_VOCAL_MORPHER_WAVEFORM 0x0005 -//#define AL_VOCAL_MORPHER_RATE 0x0006 -// -///* Pitchshifter effect parameters */ -//#define AL_PITCH_SHIFTER_COARSE_TUNE 0x0001 -//#define AL_PITCH_SHIFTER_FINE_TUNE 0x0002 -// -///* Ringmodulator effect parameters */ -//#define AL_RING_MODULATOR_FREQUENCY 0x0001 -//#define AL_RING_MODULATOR_HIGHPASS_CUTOFF 0x0002 -//#define AL_RING_MODULATOR_WAVEFORM 0x0003 -// -///* Autowah effect parameters */ -//#define AL_AUTOWAH_ATTACK_TIME 0x0001 -//#define AL_AUTOWAH_RELEASE_TIME 0x0002 -//#define AL_AUTOWAH_RESONANCE 0x0003 -//#define AL_AUTOWAH_PEAK_GAIN 0x0004 -// -///* Compressor effect parameters */ -//#define AL_COMPRESSOR_ONOFF 0x0001 -// -///* Equalizer effect parameters */ -//#define AL_EQUALIZER_LOW_GAIN 0x0001 -//#define AL_EQUALIZER_LOW_CUTOFF 0x0002 -//#define AL_EQUALIZER_MID1_GAIN 0x0003 -//#define AL_EQUALIZER_MID1_CENTER 0x0004 -//#define AL_EQUALIZER_MID1_WIDTH 0x0005 -//#define AL_EQUALIZER_MID2_GAIN 0x0006 -//#define AL_EQUALIZER_MID2_CENTER 0x0007 -//#define AL_EQUALIZER_MID2_WIDTH 0x0008 -//#define AL_EQUALIZER_HIGH_GAIN 0x0009 -//#define AL_EQUALIZER_HIGH_CUTOFF 0x000A -// -///* Effect type */ -//#define AL_EFFECT_FIRST_PARAMETER 0x0000 -//#define AL_EFFECT_LAST_PARAMETER 0x8000 - static final int AL_EFFECT_TYPE = 0x8001; -// -///* Effect types, used with the AL_EFFECT_TYPE property */ -//#define AL_EFFECT_NULL 0x0000 - static final int AL_EFFECT_REVERB = 0x0001; -//#define AL_EFFECT_CHORUS 0x0002 -//#define AL_EFFECT_DISTORTION 0x0003 -//#define AL_EFFECT_ECHO 0x0004 -//#define AL_EFFECT_FLANGER 0x0005 -//#define AL_EFFECT_FREQUENCY_SHIFTER 0x0006 -//#define AL_EFFECT_VOCAL_MORPHER 0x0007 -//#define AL_EFFECT_PITCH_SHIFTER 0x0008 -//#define AL_EFFECT_RING_MODULATOR 0x0009 -//#define AL_EFFECT_AUTOWAH 0x000A -//#define AL_EFFECT_COMPRESSOR 0x000B -//#define AL_EFFECT_EQUALIZER 0x000C -//#define AL_EFFECT_EAXREVERB 0x8000 -// -///* Auxiliary Effect Slot properties. */ - static final int AL_EFFECTSLOT_EFFECT = 0x0001; -//#define AL_EFFECTSLOT_GAIN 0x0002 -//#define AL_EFFECTSLOT_AUXILIARY_SEND_AUTO 0x0003 -// -///* NULL Auxiliary Slot ID to disable a source send. */ -//#define AL_EFFECTSLOT_NULL 0x0000 -// -// -///* Filter properties. */ -// -///* Lowpass filter parameters */ - static final int AL_LOWPASS_GAIN = 0x0001; - static final int AL_LOWPASS_GAINHF = 0x0002; -// -///* Highpass filter parameters */ -//#define AL_HIGHPASS_GAIN 0x0001 -//#define AL_HIGHPASS_GAINLF 0x0002 -// -///* Bandpass filter parameters */ -//#define AL_BANDPASS_GAIN 0x0001 -//#define AL_BANDPASS_GAINLF 0x0002 -//#define AL_BANDPASS_GAINHF 0x0003 -// -///* Filter type */ -//#define AL_FILTER_FIRST_PARAMETER 0x0000 -//#define AL_FILTER_LAST_PARAMETER 0x8000 - static final int AL_FILTER_TYPE = 0x8001; -// -///* Filter types, used with the AL_FILTER_TYPE property */ - static final int AL_FILTER_NULL = 0x0000; - static final int AL_FILTER_LOWPASS = 0x0001; - static final int AL_FILTER_HIGHPASS = 0x0002; -//#define AL_FILTER_BANDPASS 0x0003 -// -///* Filter ranges and defaults. */ -// -///* Lowpass filter */ -//#define AL_LOWPASS_MIN_GAIN (0.0f) -//#define AL_LOWPASS_MAX_GAIN (1.0f) -//#define AL_LOWPASS_DEFAULT_GAIN (1.0f) -// -//#define AL_LOWPASS_MIN_GAINHF (0.0f) -//#define AL_LOWPASS_MAX_GAINHF (1.0f) -//#define AL_LOWPASS_DEFAULT_GAINHF (1.0f) -// -///* Highpass filter */ -//#define AL_HIGHPASS_MIN_GAIN (0.0f) -//#define AL_HIGHPASS_MAX_GAIN (1.0f) -//#define AL_HIGHPASS_DEFAULT_GAIN (1.0f) -// -//#define AL_HIGHPASS_MIN_GAINLF (0.0f) -//#define AL_HIGHPASS_MAX_GAINLF (1.0f) -//#define AL_HIGHPASS_DEFAULT_GAINLF (1.0f) -// -///* Bandpass filter */ -//#define AL_BANDPASS_MIN_GAIN (0.0f) -//#define AL_BANDPASS_MAX_GAIN (1.0f) -//#define AL_BANDPASS_DEFAULT_GAIN (1.0f) -// -//#define AL_BANDPASS_MIN_GAINHF (0.0f) -//#define AL_BANDPASS_MAX_GAINHF (1.0f) -//#define AL_BANDPASS_DEFAULT_GAINHF (1.0f) -// -//#define AL_BANDPASS_MIN_GAINLF (0.0f) -//#define AL_BANDPASS_MAX_GAINLF (1.0f) -//#define AL_BANDPASS_DEFAULT_GAINLF (1.0f) -// -// -///* Effect parameter ranges and defaults. */ -// -///* Standard reverb effect */ -//#define AL_REVERB_MIN_DENSITY (0.0f) -//#define AL_REVERB_MAX_DENSITY (1.0f) -//#define AL_REVERB_DEFAULT_DENSITY (1.0f) -// -//#define AL_REVERB_MIN_DIFFUSION (0.0f) -//#define AL_REVERB_MAX_DIFFUSION (1.0f) -//#define AL_REVERB_DEFAULT_DIFFUSION (1.0f) -// -//#define AL_REVERB_MIN_GAIN (0.0f) -//#define AL_REVERB_MAX_GAIN (1.0f) -//#define AL_REVERB_DEFAULT_GAIN (0.32f) -// -//#define AL_REVERB_MIN_GAINHF (0.0f) -//#define AL_REVERB_MAX_GAINHF (1.0f) -//#define AL_REVERB_DEFAULT_GAINHF (0.89f) -// -//#define AL_REVERB_MIN_DECAY_TIME (0.1f) -//#define AL_REVERB_MAX_DECAY_TIME (20.0f) -//#define AL_REVERB_DEFAULT_DECAY_TIME (1.49f) -// -//#define AL_REVERB_MIN_DECAY_HFRATIO (0.1f) -//#define AL_REVERB_MAX_DECAY_HFRATIO (2.0f) -//#define AL_REVERB_DEFAULT_DECAY_HFRATIO (0.83f) -// -//#define AL_REVERB_MIN_REFLECTIONS_GAIN (0.0f) -//#define AL_REVERB_MAX_REFLECTIONS_GAIN (3.16f) -//#define AL_REVERB_DEFAULT_REFLECTIONS_GAIN (0.05f) -// -//#define AL_REVERB_MIN_REFLECTIONS_DELAY (0.0f) -//#define AL_REVERB_MAX_REFLECTIONS_DELAY (0.3f) -//#define AL_REVERB_DEFAULT_REFLECTIONS_DELAY (0.007f) -// -//#define AL_REVERB_MIN_LATE_REVERB_GAIN (0.0f) -//#define AL_REVERB_MAX_LATE_REVERB_GAIN (10.0f) -//#define AL_REVERB_DEFAULT_LATE_REVERB_GAIN (1.26f) -// -//#define AL_REVERB_MIN_LATE_REVERB_DELAY (0.0f) -//#define AL_REVERB_MAX_LATE_REVERB_DELAY (0.1f) -//#define AL_REVERB_DEFAULT_LATE_REVERB_DELAY (0.011f) -// -//#define AL_REVERB_MIN_AIR_ABSORPTION_GAINHF (0.892f) -//#define AL_REVERB_MAX_AIR_ABSORPTION_GAINHF (1.0f) -//#define AL_REVERB_DEFAULT_AIR_ABSORPTION_GAINHF (0.994f) -// -//#define AL_REVERB_MIN_ROOM_ROLLOFF_FACTOR (0.0f) -//#define AL_REVERB_MAX_ROOM_ROLLOFF_FACTOR (10.0f) -//#define AL_REVERB_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f) -// -//#define AL_REVERB_MIN_DECAY_HFLIMIT AL_FALSE -//#define AL_REVERB_MAX_DECAY_HFLIMIT AL_TRUE -//#define AL_REVERB_DEFAULT_DECAY_HFLIMIT AL_TRUE -// -///* EAX reverb effect */ -//#define AL_EAXREVERB_MIN_DENSITY (0.0f) -//#define AL_EAXREVERB_MAX_DENSITY (1.0f) -//#define AL_EAXREVERB_DEFAULT_DENSITY (1.0f) -// -//#define AL_EAXREVERB_MIN_DIFFUSION (0.0f) -//#define AL_EAXREVERB_MAX_DIFFUSION (1.0f) -//#define AL_EAXREVERB_DEFAULT_DIFFUSION (1.0f) -// -//#define AL_EAXREVERB_MIN_GAIN (0.0f) -//#define AL_EAXREVERB_MAX_GAIN (1.0f) -//#define AL_EAXREVERB_DEFAULT_GAIN (0.32f) -// -//#define AL_EAXREVERB_MIN_GAINHF (0.0f) -//#define AL_EAXREVERB_MAX_GAINHF (1.0f) -//#define AL_EAXREVERB_DEFAULT_GAINHF (0.89f) -// -//#define AL_EAXREVERB_MIN_GAINLF (0.0f) -//#define AL_EAXREVERB_MAX_GAINLF (1.0f) -//#define AL_EAXREVERB_DEFAULT_GAINLF (1.0f) -// -//#define AL_EAXREVERB_MIN_DECAY_TIME (0.1f) -//#define AL_EAXREVERB_MAX_DECAY_TIME (20.0f) -//#define AL_EAXREVERB_DEFAULT_DECAY_TIME (1.49f) -// -//#define AL_EAXREVERB_MIN_DECAY_HFRATIO (0.1f) -//#define AL_EAXREVERB_MAX_DECAY_HFRATIO (2.0f) -//#define AL_EAXREVERB_DEFAULT_DECAY_HFRATIO (0.83f) -// -//#define AL_EAXREVERB_MIN_DECAY_LFRATIO (0.1f) -//#define AL_EAXREVERB_MAX_DECAY_LFRATIO (2.0f) -//#define AL_EAXREVERB_DEFAULT_DECAY_LFRATIO (1.0f) -// -//#define AL_EAXREVERB_MIN_REFLECTIONS_GAIN (0.0f) -//#define AL_EAXREVERB_MAX_REFLECTIONS_GAIN (3.16f) -//#define AL_EAXREVERB_DEFAULT_REFLECTIONS_GAIN (0.05f) -// -//#define AL_EAXREVERB_MIN_REFLECTIONS_DELAY (0.0f) -//#define AL_EAXREVERB_MAX_REFLECTIONS_DELAY (0.3f) -//#define AL_EAXREVERB_DEFAULT_REFLECTIONS_DELAY (0.007f) -// -//#define AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ (0.0f) -// -//#define AL_EAXREVERB_MIN_LATE_REVERB_GAIN (0.0f) -//#define AL_EAXREVERB_MAX_LATE_REVERB_GAIN (10.0f) -//#define AL_EAXREVERB_DEFAULT_LATE_REVERB_GAIN (1.26f) -// -//#define AL_EAXREVERB_MIN_LATE_REVERB_DELAY (0.0f) -//#define AL_EAXREVERB_MAX_LATE_REVERB_DELAY (0.1f) -//#define AL_EAXREVERB_DEFAULT_LATE_REVERB_DELAY (0.011f) -// -//#define AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ (0.0f) -// -//#define AL_EAXREVERB_MIN_ECHO_TIME (0.075f) -//#define AL_EAXREVERB_MAX_ECHO_TIME (0.25f) -//#define AL_EAXREVERB_DEFAULT_ECHO_TIME (0.25f) -// -//#define AL_EAXREVERB_MIN_ECHO_DEPTH (0.0f) -//#define AL_EAXREVERB_MAX_ECHO_DEPTH (1.0f) -//#define AL_EAXREVERB_DEFAULT_ECHO_DEPTH (0.0f) -// -//#define AL_EAXREVERB_MIN_MODULATION_TIME (0.04f) -//#define AL_EAXREVERB_MAX_MODULATION_TIME (4.0f) -//#define AL_EAXREVERB_DEFAULT_MODULATION_TIME (0.25f) -// -//#define AL_EAXREVERB_MIN_MODULATION_DEPTH (0.0f) -//#define AL_EAXREVERB_MAX_MODULATION_DEPTH (1.0f) -//#define AL_EAXREVERB_DEFAULT_MODULATION_DEPTH (0.0f) -// -//#define AL_EAXREVERB_MIN_AIR_ABSORPTION_GAINHF (0.892f) -//#define AL_EAXREVERB_MAX_AIR_ABSORPTION_GAINHF (1.0f) -//#define AL_EAXREVERB_DEFAULT_AIR_ABSORPTION_GAINHF (0.994f) -// -//#define AL_EAXREVERB_MIN_HFREFERENCE (1000.0f) -//#define AL_EAXREVERB_MAX_HFREFERENCE (20000.0f) -//#define AL_EAXREVERB_DEFAULT_HFREFERENCE (5000.0f) -// -//#define AL_EAXREVERB_MIN_LFREFERENCE (20.0f) -//#define AL_EAXREVERB_MAX_LFREFERENCE (1000.0f) -//#define AL_EAXREVERB_DEFAULT_LFREFERENCE (250.0f) -// -//#define AL_EAXREVERB_MIN_ROOM_ROLLOFF_FACTOR (0.0f) -//#define AL_EAXREVERB_MAX_ROOM_ROLLOFF_FACTOR (10.0f) -//#define AL_EAXREVERB_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f) -// -//#define AL_EAXREVERB_MIN_DECAY_HFLIMIT AL_FALSE -//#define AL_EAXREVERB_MAX_DECAY_HFLIMIT AL_TRUE -//#define AL_EAXREVERB_DEFAULT_DECAY_HFLIMIT AL_TRUE -// -///* Chorus effect */ -//#define AL_CHORUS_WAVEFORM_SINUSOID (0) -//#define AL_CHORUS_WAVEFORM_TRIANGLE (1) -// -//#define AL_CHORUS_MIN_WAVEFORM (0) -//#define AL_CHORUS_MAX_WAVEFORM (1) -//#define AL_CHORUS_DEFAULT_WAVEFORM (1) -// -//#define AL_CHORUS_MIN_PHASE (-180) -//#define AL_CHORUS_MAX_PHASE (180) -//#define AL_CHORUS_DEFAULT_PHASE (90) -// -//#define AL_CHORUS_MIN_RATE (0.0f) -//#define AL_CHORUS_MAX_RATE (10.0f) -//#define AL_CHORUS_DEFAULT_RATE (1.1f) -// -//#define AL_CHORUS_MIN_DEPTH (0.0f) -//#define AL_CHORUS_MAX_DEPTH (1.0f) -//#define AL_CHORUS_DEFAULT_DEPTH (0.1f) -// -//#define AL_CHORUS_MIN_FEEDBACK (-1.0f) -//#define AL_CHORUS_MAX_FEEDBACK (1.0f) -//#define AL_CHORUS_DEFAULT_FEEDBACK (0.25f) -// -//#define AL_CHORUS_MIN_DELAY (0.0f) -//#define AL_CHORUS_MAX_DELAY (0.016f) -//#define AL_CHORUS_DEFAULT_DELAY (0.016f) -// -///* Distortion effect */ -//#define AL_DISTORTION_MIN_EDGE (0.0f) -//#define AL_DISTORTION_MAX_EDGE (1.0f) -//#define AL_DISTORTION_DEFAULT_EDGE (0.2f) -// -//#define AL_DISTORTION_MIN_GAIN (0.01f) -//#define AL_DISTORTION_MAX_GAIN (1.0f) -//#define AL_DISTORTION_DEFAULT_GAIN (0.05f) -// -//#define AL_DISTORTION_MIN_LOWPASS_CUTOFF (80.0f) -//#define AL_DISTORTION_MAX_LOWPASS_CUTOFF (24000.0f) -//#define AL_DISTORTION_DEFAULT_LOWPASS_CUTOFF (8000.0f) -// -//#define AL_DISTORTION_MIN_EQCENTER (80.0f) -//#define AL_DISTORTION_MAX_EQCENTER (24000.0f) -//#define AL_DISTORTION_DEFAULT_EQCENTER (3600.0f) -// -//#define AL_DISTORTION_MIN_EQBANDWIDTH (80.0f) -//#define AL_DISTORTION_MAX_EQBANDWIDTH (24000.0f) -//#define AL_DISTORTION_DEFAULT_EQBANDWIDTH (3600.0f) -// -///* Echo effect */ -//#define AL_ECHO_MIN_DELAY (0.0f) -//#define AL_ECHO_MAX_DELAY (0.207f) -//#define AL_ECHO_DEFAULT_DELAY (0.1f) -// -//#define AL_ECHO_MIN_LRDELAY (0.0f) -//#define AL_ECHO_MAX_LRDELAY (0.404f) -//#define AL_ECHO_DEFAULT_LRDELAY (0.1f) -// -//#define AL_ECHO_MIN_DAMPING (0.0f) -//#define AL_ECHO_MAX_DAMPING (0.99f) -//#define AL_ECHO_DEFAULT_DAMPING (0.5f) -// -//#define AL_ECHO_MIN_FEEDBACK (0.0f) -//#define AL_ECHO_MAX_FEEDBACK (1.0f) -//#define AL_ECHO_DEFAULT_FEEDBACK (0.5f) -// -//#define AL_ECHO_MIN_SPREAD (-1.0f) -//#define AL_ECHO_MAX_SPREAD (1.0f) -//#define AL_ECHO_DEFAULT_SPREAD (-1.0f) -// -///* Flanger effect */ -//#define AL_FLANGER_WAVEFORM_SINUSOID (0) -//#define AL_FLANGER_WAVEFORM_TRIANGLE (1) -// -//#define AL_FLANGER_MIN_WAVEFORM (0) -//#define AL_FLANGER_MAX_WAVEFORM (1) -//#define AL_FLANGER_DEFAULT_WAVEFORM (1) -// -//#define AL_FLANGER_MIN_PHASE (-180) -//#define AL_FLANGER_MAX_PHASE (180) -//#define AL_FLANGER_DEFAULT_PHASE (0) -// -//#define AL_FLANGER_MIN_RATE (0.0f) -//#define AL_FLANGER_MAX_RATE (10.0f) -//#define AL_FLANGER_DEFAULT_RATE (0.27f) -// -//#define AL_FLANGER_MIN_DEPTH (0.0f) -//#define AL_FLANGER_MAX_DEPTH (1.0f) -//#define AL_FLANGER_DEFAULT_DEPTH (1.0f) -// -//#define AL_FLANGER_MIN_FEEDBACK (-1.0f) -//#define AL_FLANGER_MAX_FEEDBACK (1.0f) -//#define AL_FLANGER_DEFAULT_FEEDBACK (-0.5f) -// -//#define AL_FLANGER_MIN_DELAY (0.0f) -//#define AL_FLANGER_MAX_DELAY (0.004f) -//#define AL_FLANGER_DEFAULT_DELAY (0.002f) -// -///* Frequency shifter effect */ -//#define AL_FREQUENCY_SHIFTER_MIN_FREQUENCY (0.0f) -//#define AL_FREQUENCY_SHIFTER_MAX_FREQUENCY (24000.0f) -//#define AL_FREQUENCY_SHIFTER_DEFAULT_FREQUENCY (0.0f) -// -//#define AL_FREQUENCY_SHIFTER_MIN_LEFT_DIRECTION (0) -//#define AL_FREQUENCY_SHIFTER_MAX_LEFT_DIRECTION (2) -//#define AL_FREQUENCY_SHIFTER_DEFAULT_LEFT_DIRECTION (0) -// -//#define AL_FREQUENCY_SHIFTER_DIRECTION_DOWN (0) -//#define AL_FREQUENCY_SHIFTER_DIRECTION_UP (1) -//#define AL_FREQUENCY_SHIFTER_DIRECTION_OFF (2) -// -//#define AL_FREQUENCY_SHIFTER_MIN_RIGHT_DIRECTION (0) -//#define AL_FREQUENCY_SHIFTER_MAX_RIGHT_DIRECTION (2) -//#define AL_FREQUENCY_SHIFTER_DEFAULT_RIGHT_DIRECTION (0) -// -///* Vocal morpher effect */ -//#define AL_VOCAL_MORPHER_MIN_PHONEMEA (0) -//#define AL_VOCAL_MORPHER_MAX_PHONEMEA (29) -//#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEA (0) -// -//#define AL_VOCAL_MORPHER_MIN_PHONEMEA_COARSE_TUNING (-24) -//#define AL_VOCAL_MORPHER_MAX_PHONEMEA_COARSE_TUNING (24) -//#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEA_COARSE_TUNING (0) -// -//#define AL_VOCAL_MORPHER_MIN_PHONEMEB (0) -//#define AL_VOCAL_MORPHER_MAX_PHONEMEB (29) -//#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEB (10) -// -//#define AL_VOCAL_MORPHER_MIN_PHONEMEB_COARSE_TUNING (-24) -//#define AL_VOCAL_MORPHER_MAX_PHONEMEB_COARSE_TUNING (24) -//#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEB_COARSE_TUNING (0) -// -//#define AL_VOCAL_MORPHER_PHONEME_A (0) -//#define AL_VOCAL_MORPHER_PHONEME_E (1) -//#define AL_VOCAL_MORPHER_PHONEME_I (2) -//#define AL_VOCAL_MORPHER_PHONEME_O (3) -//#define AL_VOCAL_MORPHER_PHONEME_U (4) -//#define AL_VOCAL_MORPHER_PHONEME_AA (5) -//#define AL_VOCAL_MORPHER_PHONEME_AE (6) -//#define AL_VOCAL_MORPHER_PHONEME_AH (7) -//#define AL_VOCAL_MORPHER_PHONEME_AO (8) -//#define AL_VOCAL_MORPHER_PHONEME_EH (9) -//#define AL_VOCAL_MORPHER_PHONEME_ER (10) -//#define AL_VOCAL_MORPHER_PHONEME_IH (11) -//#define AL_VOCAL_MORPHER_PHONEME_IY (12) -//#define AL_VOCAL_MORPHER_PHONEME_UH (13) -//#define AL_VOCAL_MORPHER_PHONEME_UW (14) -//#define AL_VOCAL_MORPHER_PHONEME_B (15) -//#define AL_VOCAL_MORPHER_PHONEME_D (16) -//#define AL_VOCAL_MORPHER_PHONEME_F (17) -//#define AL_VOCAL_MORPHER_PHONEME_G (18) -//#define AL_VOCAL_MORPHER_PHONEME_J (19) -//#define AL_VOCAL_MORPHER_PHONEME_K (20) -//#define AL_VOCAL_MORPHER_PHONEME_L (21) -//#define AL_VOCAL_MORPHER_PHONEME_M (22) -//#define AL_VOCAL_MORPHER_PHONEME_N (23) -//#define AL_VOCAL_MORPHER_PHONEME_P (24) -//#define AL_VOCAL_MORPHER_PHONEME_R (25) -//#define AL_VOCAL_MORPHER_PHONEME_S (26) -//#define AL_VOCAL_MORPHER_PHONEME_T (27) -//#define AL_VOCAL_MORPHER_PHONEME_V (28) -//#define AL_VOCAL_MORPHER_PHONEME_Z (29) -// -//#define AL_VOCAL_MORPHER_WAVEFORM_SINUSOID (0) -//#define AL_VOCAL_MORPHER_WAVEFORM_TRIANGLE (1) -//#define AL_VOCAL_MORPHER_WAVEFORM_SAWTOOTH (2) -// -//#define AL_VOCAL_MORPHER_MIN_WAVEFORM (0) -//#define AL_VOCAL_MORPHER_MAX_WAVEFORM (2) -//#define AL_VOCAL_MORPHER_DEFAULT_WAVEFORM (0) -// -//#define AL_VOCAL_MORPHER_MIN_RATE (0.0f) -//#define AL_VOCAL_MORPHER_MAX_RATE (10.0f) -//#define AL_VOCAL_MORPHER_DEFAULT_RATE (1.41f) -// -///* Pitch shifter effect */ -//#define AL_PITCH_SHIFTER_MIN_COARSE_TUNE (-12) -//#define AL_PITCH_SHIFTER_MAX_COARSE_TUNE (12) -//#define AL_PITCH_SHIFTER_DEFAULT_COARSE_TUNE (12) -// -//#define AL_PITCH_SHIFTER_MIN_FINE_TUNE (-50) -//#define AL_PITCH_SHIFTER_MAX_FINE_TUNE (50) -//#define AL_PITCH_SHIFTER_DEFAULT_FINE_TUNE (0) -// -///* Ring modulator effect */ -//#define AL_RING_MODULATOR_MIN_FREQUENCY (0.0f) -//#define AL_RING_MODULATOR_MAX_FREQUENCY (8000.0f) -//#define AL_RING_MODULATOR_DEFAULT_FREQUENCY (440.0f) -// -//#define AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF (0.0f) -//#define AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF (24000.0f) -//#define AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF (800.0f) -// -//#define AL_RING_MODULATOR_SINUSOID (0) -//#define AL_RING_MODULATOR_SAWTOOTH (1) -//#define AL_RING_MODULATOR_SQUARE (2) -// -//#define AL_RING_MODULATOR_MIN_WAVEFORM (0) -//#define AL_RING_MODULATOR_MAX_WAVEFORM (2) -//#define AL_RING_MODULATOR_DEFAULT_WAVEFORM (0) -// -///* Autowah effect */ -//#define AL_AUTOWAH_MIN_ATTACK_TIME (0.0001f) -//#define AL_AUTOWAH_MAX_ATTACK_TIME (1.0f) -//#define AL_AUTOWAH_DEFAULT_ATTACK_TIME (0.06f) -// -//#define AL_AUTOWAH_MIN_RELEASE_TIME (0.0001f) -//#define AL_AUTOWAH_MAX_RELEASE_TIME (1.0f) -//#define AL_AUTOWAH_DEFAULT_RELEASE_TIME (0.06f) -// -//#define AL_AUTOWAH_MIN_RESONANCE (2.0f) -//#define AL_AUTOWAH_MAX_RESONANCE (1000.0f) -//#define AL_AUTOWAH_DEFAULT_RESONANCE (1000.0f) -// -//#define AL_AUTOWAH_MIN_PEAK_GAIN (0.00003f) -//#define AL_AUTOWAH_MAX_PEAK_GAIN (31621.0f) -//#define AL_AUTOWAH_DEFAULT_PEAK_GAIN (11.22f) -// -///* Compressor effect */ -//#define AL_COMPRESSOR_MIN_ONOFF (0) -//#define AL_COMPRESSOR_MAX_ONOFF (1) -//#define AL_COMPRESSOR_DEFAULT_ONOFF (1) -// -///* Equalizer effect */ -//#define AL_EQUALIZER_MIN_LOW_GAIN (0.126f) -//#define AL_EQUALIZER_MAX_LOW_GAIN (7.943f) -//#define AL_EQUALIZER_DEFAULT_LOW_GAIN (1.0f) -// -//#define AL_EQUALIZER_MIN_LOW_CUTOFF (50.0f) -//#define AL_EQUALIZER_MAX_LOW_CUTOFF (800.0f) -//#define AL_EQUALIZER_DEFAULT_LOW_CUTOFF (200.0f) -// -//#define AL_EQUALIZER_MIN_MID1_GAIN (0.126f) -//#define AL_EQUALIZER_MAX_MID1_GAIN (7.943f) -//#define AL_EQUALIZER_DEFAULT_MID1_GAIN (1.0f) -// -//#define AL_EQUALIZER_MIN_MID1_CENTER (200.0f) -//#define AL_EQUALIZER_MAX_MID1_CENTER (3000.0f) -//#define AL_EQUALIZER_DEFAULT_MID1_CENTER (500.0f) -// -//#define AL_EQUALIZER_MIN_MID1_WIDTH (0.01f) -//#define AL_EQUALIZER_MAX_MID1_WIDTH (1.0f) -//#define AL_EQUALIZER_DEFAULT_MID1_WIDTH (1.0f) -// -//#define AL_EQUALIZER_MIN_MID2_GAIN (0.126f) -//#define AL_EQUALIZER_MAX_MID2_GAIN (7.943f) -//#define AL_EQUALIZER_DEFAULT_MID2_GAIN (1.0f) -// -//#define AL_EQUALIZER_MIN_MID2_CENTER (1000.0f) -//#define AL_EQUALIZER_MAX_MID2_CENTER (8000.0f) -//#define AL_EQUALIZER_DEFAULT_MID2_CENTER (3000.0f) -// -//#define AL_EQUALIZER_MIN_MID2_WIDTH (0.01f) -//#define AL_EQUALIZER_MAX_MID2_WIDTH (1.0f) -//#define AL_EQUALIZER_DEFAULT_MID2_WIDTH (1.0f) -// -//#define AL_EQUALIZER_MIN_HIGH_GAIN (0.126f) -//#define AL_EQUALIZER_MAX_HIGH_GAIN (7.943f) -//#define AL_EQUALIZER_DEFAULT_HIGH_GAIN (1.0f) -// -//#define AL_EQUALIZER_MIN_HIGH_CUTOFF (4000.0f) -//#define AL_EQUALIZER_MAX_HIGH_CUTOFF (16000.0f) -//#define AL_EQUALIZER_DEFAULT_HIGH_CUTOFF (6000.0f) -// -// -///* Source parameter value ranges and defaults. */ -//#define AL_MIN_AIR_ABSORPTION_FACTOR (0.0f) -//#define AL_MAX_AIR_ABSORPTION_FACTOR (10.0f) -//#define AL_DEFAULT_AIR_ABSORPTION_FACTOR (0.0f) -// -//#define AL_MIN_ROOM_ROLLOFF_FACTOR (0.0f) -//#define AL_MAX_ROOM_ROLLOFF_FACTOR (10.0f) -//#define AL_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f) -// -//#define AL_MIN_CONE_OUTER_GAINHF (0.0f) -//#define AL_MAX_CONE_OUTER_GAINHF (1.0f) -//#define AL_DEFAULT_CONE_OUTER_GAINHF (1.0f) -// -//#define AL_MIN_DIRECT_FILTER_GAINHF_AUTO AL_FALSE -//#define AL_MAX_DIRECT_FILTER_GAINHF_AUTO AL_TRUE -//#define AL_DEFAULT_DIRECT_FILTER_GAINHF_AUTO AL_TRUE -// -//#define AL_MIN_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_FALSE -//#define AL_MAX_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_TRUE -//#define AL_DEFAULT_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_TRUE -// -//#define AL_MIN_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_FALSE -//#define AL_MAX_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_TRUE -//#define AL_DEFAULT_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_TRUE -// + public static final String ALC_EXT_EFX_NAME = "ALC_EXT_EFX"; + public static final int ALC_EFX_MAJOR_VERSION = 0x20001; + public static final int ALC_EFX_MINOR_VERSION = 0x20002; + public static final int ALC_MAX_AUXILIARY_SENDS = 0x20003; + + /* Listener properties. */ + //#define AL_METERS_PER_UNIT 0x20004 + + /* Source properties. */ + public static final int AL_DIRECT_FILTER = 0x20005; + public static final int AL_AUXILIARY_SEND_FILTER = 0x20006; + //#define AL_AIR_ABSORPTION_FACTOR 0x20007 + //#define AL_ROOM_ROLLOFF_FACTOR 0x20008 + //#define AL_CONE_OUTER_GAINHF 0x20009 + + public static final int AL_DIRECT_FILTER_GAINHF_AUTO = 0x2000A; + //#define AL_AUXILIARY_SEND_FILTER_GAIN_AUTO 0x2000B + //#define AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO 0x2000C + + /* Effect properties. */ + + /* Reverb effect parameters */ + public static final int AL_REVERB_DENSITY = 0x0001; + public static final int AL_REVERB_DIFFUSION = 0x0002; + public static final int AL_REVERB_GAIN = 0x0003; + public static final int AL_REVERB_GAINHF = 0x0004; + public static final int AL_REVERB_DECAY_TIME = 0x0005; + public static final int AL_REVERB_DECAY_HFRATIO = 0x0006; + public static final int AL_REVERB_REFLECTIONS_GAIN = 0x0007; + public static final int AL_REVERB_REFLECTIONS_DELAY = 0x0008; + public static final int AL_REVERB_LATE_REVERB_GAIN = 0x0009; + public static final int AL_REVERB_LATE_REVERB_DELAY = 0x000A; + public static final int AL_REVERB_AIR_ABSORPTION_GAINHF = 0x000B; + public static final int AL_REVERB_ROOM_ROLLOFF_FACTOR = 0x000C; + public static final int AL_REVERB_DECAY_HFLIMIT = 0x000D; + + /* EAX Reverb effect parameters */ + //#define AL_EAXREVERB_DENSITY 0x0001 + //#define AL_EAXREVERB_DIFFUSION 0x0002 + //#define AL_EAXREVERB_GAIN 0x0003 + //#define AL_EAXREVERB_GAINHF 0x0004 + //#define AL_EAXREVERB_GAINLF 0x0005 + //#define AL_EAXREVERB_DECAY_TIME 0x0006 + //#define AL_EAXREVERB_DECAY_HFRATIO 0x0007 + //#define AL_EAXREVERB_DECAY_LFRATIO 0x0008 + //#define AL_EAXREVERB_REFLECTIONS_GAIN 0x0009 + //#define AL_EAXREVERB_REFLECTIONS_DELAY 0x000A + //#define AL_EAXREVERB_REFLECTIONS_PAN 0x000B + //#define AL_EAXREVERB_LATE_REVERB_GAIN 0x000C + //#define AL_EAXREVERB_LATE_REVERB_DELAY 0x000D + //#define AL_EAXREVERB_LATE_REVERB_PAN 0x000E + //#define AL_EAXREVERB_ECHO_TIME 0x000F + //#define AL_EAXREVERB_ECHO_DEPTH 0x0010 + //#define AL_EAXREVERB_MODULATION_TIME 0x0011 + //#define AL_EAXREVERB_MODULATION_DEPTH 0x0012 + //#define AL_EAXREVERB_AIR_ABSORPTION_GAINHF 0x0013 + //#define AL_EAXREVERB_HFREFERENCE 0x0014 + //#define AL_EAXREVERB_LFREFERENCE 0x0015 + //#define AL_EAXREVERB_ROOM_ROLLOFF_FACTOR 0x0016 + //#define AL_EAXREVERB_DECAY_HFLIMIT 0x0017 + // + ///* Chorus effect parameters */ + //#define AL_CHORUS_WAVEFORM 0x0001 + //#define AL_CHORUS_PHASE 0x0002 + //#define AL_CHORUS_RATE 0x0003 + //#define AL_CHORUS_DEPTH 0x0004 + //#define AL_CHORUS_FEEDBACK 0x0005 + //#define AL_CHORUS_DELAY 0x0006 + // + ///* Distortion effect parameters */ + //#define AL_DISTORTION_EDGE 0x0001 + //#define AL_DISTORTION_GAIN 0x0002 + //#define AL_DISTORTION_LOWPASS_CUTOFF 0x0003 + //#define AL_DISTORTION_EQCENTER 0x0004 + //#define AL_DISTORTION_EQBANDWIDTH 0x0005 + // + ///* Echo effect parameters */ + //#define AL_ECHO_DELAY 0x0001 + //#define AL_ECHO_LRDELAY 0x0002 + //#define AL_ECHO_DAMPING 0x0003 + //#define AL_ECHO_FEEDBACK 0x0004 + //#define AL_ECHO_SPREAD 0x0005 + // + ///* Flanger effect parameters */ + //#define AL_FLANGER_WAVEFORM 0x0001 + //#define AL_FLANGER_PHASE 0x0002 + //#define AL_FLANGER_RATE 0x0003 + //#define AL_FLANGER_DEPTH 0x0004 + //#define AL_FLANGER_FEEDBACK 0x0005 + //#define AL_FLANGER_DELAY 0x0006 + // + ///* Frequency shifter effect parameters */ + //#define AL_FREQUENCY_SHIFTER_FREQUENCY 0x0001 + //#define AL_FREQUENCY_SHIFTER_LEFT_DIRECTION 0x0002 + //#define AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION 0x0003 + // + ///* Vocal morpher effect parameters */ + //#define AL_VOCAL_MORPHER_PHONEMEA 0x0001 + //#define AL_VOCAL_MORPHER_PHONEMEA_COARSE_TUNING 0x0002 + //#define AL_VOCAL_MORPHER_PHONEMEB 0x0003 + //#define AL_VOCAL_MORPHER_PHONEMEB_COARSE_TUNING 0x0004 + //#define AL_VOCAL_MORPHER_WAVEFORM 0x0005 + //#define AL_VOCAL_MORPHER_RATE 0x0006 + // + ///* Pitchshifter effect parameters */ + //#define AL_PITCH_SHIFTER_COARSE_TUNE 0x0001 + //#define AL_PITCH_SHIFTER_FINE_TUNE 0x0002 + // + ///* Ringmodulator effect parameters */ + //#define AL_RING_MODULATOR_FREQUENCY 0x0001 + //#define AL_RING_MODULATOR_HIGHPASS_CUTOFF 0x0002 + //#define AL_RING_MODULATOR_WAVEFORM 0x0003 + // + ///* Autowah effect parameters */ + //#define AL_AUTOWAH_ATTACK_TIME 0x0001 + //#define AL_AUTOWAH_RELEASE_TIME 0x0002 + //#define AL_AUTOWAH_RESONANCE 0x0003 + //#define AL_AUTOWAH_PEAK_GAIN 0x0004 + // + ///* Compressor effect parameters */ + //#define AL_COMPRESSOR_ONOFF 0x0001 + // + ///* Equalizer effect parameters */ + //#define AL_EQUALIZER_LOW_GAIN 0x0001 + //#define AL_EQUALIZER_LOW_CUTOFF 0x0002 + //#define AL_EQUALIZER_MID1_GAIN 0x0003 + //#define AL_EQUALIZER_MID1_CENTER 0x0004 + //#define AL_EQUALIZER_MID1_WIDTH 0x0005 + //#define AL_EQUALIZER_MID2_GAIN 0x0006 + //#define AL_EQUALIZER_MID2_CENTER 0x0007 + //#define AL_EQUALIZER_MID2_WIDTH 0x0008 + //#define AL_EQUALIZER_HIGH_GAIN 0x0009 + //#define AL_EQUALIZER_HIGH_CUTOFF 0x000A + + /* Effect type */ + //#define AL_EFFECT_FIRST_PARAMETER 0x0000 + //#define AL_EFFECT_LAST_PARAMETER 0x8000 + public static final int AL_EFFECT_TYPE = 0x8001; + + /* Effect types, used with the AL_EFFECT_TYPE property */ + //#define AL_EFFECT_NULL 0x0000 + public static final int AL_EFFECT_REVERB = 0x0001; + //#define AL_EFFECT_CHORUS 0x0002 + //#define AL_EFFECT_DISTORTION 0x0003 + //#define AL_EFFECT_ECHO 0x0004 + //#define AL_EFFECT_FLANGER 0x0005 + //#define AL_EFFECT_FREQUENCY_SHIFTER 0x0006 + //#define AL_EFFECT_VOCAL_MORPHER 0x0007 + //#define AL_EFFECT_PITCH_SHIFTER 0x0008 + //#define AL_EFFECT_RING_MODULATOR 0x0009 + //#define AL_EFFECT_AUTOWAH 0x000A + //#define AL_EFFECT_COMPRESSOR 0x000B + //#define AL_EFFECT_EQUALIZER 0x000C + //#define AL_EFFECT_EAXREVERB 0x8000 + + /* Auxiliary Effect Slot properties. */ + public static final int AL_EFFECTSLOT_EFFECT = 0x0001; + //#define AL_EFFECTSLOT_GAIN 0x0002 + //#define AL_EFFECTSLOT_AUXILIARY_SEND_AUTO 0x0003 + + ///* NULL Auxiliary Slot ID to disable a source send. */ + //#define AL_EFFECTSLOT_NULL 0x0000 + + ///* Filter properties. */ + + /* Lowpass filter parameters */ + public static final int AL_LOWPASS_GAIN = 0x0001; + public static final int AL_LOWPASS_GAINHF = 0x0002; + + ///* Highpass filter parameters */ + //#define AL_HIGHPASS_GAIN 0x0001 + //#define AL_HIGHPASS_GAINLF 0x0002 + + ///* Bandpass filter parameters */ + //#define AL_BANDPASS_GAIN 0x0001 + //#define AL_BANDPASS_GAINLF 0x0002 + //#define AL_BANDPASS_GAINHF 0x0003 + + /* Filter type */ + //#define AL_FILTER_FIRST_PARAMETER 0x0000 + //#define AL_FILTER_LAST_PARAMETER 0x8000 + public static final int AL_FILTER_TYPE = 0x8001; + + /* Filter types, used with the AL_FILTER_TYPE property */ + public static final int AL_FILTER_NULL = 0x0000; + public static final int AL_FILTER_LOWPASS = 0x0001; + public static final int AL_FILTER_HIGHPASS = 0x0002; + //#define AL_FILTER_BANDPASS 0x0003 + + ///* Filter ranges and defaults. */ + // + ///* Lowpass filter */ + //#define AL_LOWPASS_MIN_GAIN (0.0f) + //#define AL_LOWPASS_MAX_GAIN (1.0f) + //#define AL_LOWPASS_DEFAULT_GAIN (1.0f) + // + //#define AL_LOWPASS_MIN_GAINHF (0.0f) + //#define AL_LOWPASS_MAX_GAINHF (1.0f) + //#define AL_LOWPASS_DEFAULT_GAINHF (1.0f) + // + ///* Highpass filter */ + //#define AL_HIGHPASS_MIN_GAIN (0.0f) + //#define AL_HIGHPASS_MAX_GAIN (1.0f) + //#define AL_HIGHPASS_DEFAULT_GAIN (1.0f) + // + //#define AL_HIGHPASS_MIN_GAINLF (0.0f) + //#define AL_HIGHPASS_MAX_GAINLF (1.0f) + //#define AL_HIGHPASS_DEFAULT_GAINLF (1.0f) + // + ///* Bandpass filter */ + //#define AL_BANDPASS_MIN_GAIN (0.0f) + //#define AL_BANDPASS_MAX_GAIN (1.0f) + //#define AL_BANDPASS_DEFAULT_GAIN (1.0f) + // + //#define AL_BANDPASS_MIN_GAINHF (0.0f) + //#define AL_BANDPASS_MAX_GAINHF (1.0f) + //#define AL_BANDPASS_DEFAULT_GAINHF (1.0f) + // + //#define AL_BANDPASS_MIN_GAINLF (0.0f) + //#define AL_BANDPASS_MAX_GAINLF (1.0f) + //#define AL_BANDPASS_DEFAULT_GAINLF (1.0f) + // + // + ///* Effect parameter ranges and defaults. */ + // + ///* Standard reverb effect */ + //#define AL_REVERB_MIN_DENSITY (0.0f) + //#define AL_REVERB_MAX_DENSITY (1.0f) + //#define AL_REVERB_DEFAULT_DENSITY (1.0f) + // + //#define AL_REVERB_MIN_DIFFUSION (0.0f) + //#define AL_REVERB_MAX_DIFFUSION (1.0f) + //#define AL_REVERB_DEFAULT_DIFFUSION (1.0f) + // + //#define AL_REVERB_MIN_GAIN (0.0f) + //#define AL_REVERB_MAX_GAIN (1.0f) + //#define AL_REVERB_DEFAULT_GAIN (0.32f) + // + //#define AL_REVERB_MIN_GAINHF (0.0f) + //#define AL_REVERB_MAX_GAINHF (1.0f) + //#define AL_REVERB_DEFAULT_GAINHF (0.89f) + // + //#define AL_REVERB_MIN_DECAY_TIME (0.1f) + //#define AL_REVERB_MAX_DECAY_TIME (20.0f) + //#define AL_REVERB_DEFAULT_DECAY_TIME (1.49f) + // + //#define AL_REVERB_MIN_DECAY_HFRATIO (0.1f) + //#define AL_REVERB_MAX_DECAY_HFRATIO (2.0f) + //#define AL_REVERB_DEFAULT_DECAY_HFRATIO (0.83f) + // + //#define AL_REVERB_MIN_REFLECTIONS_GAIN (0.0f) + //#define AL_REVERB_MAX_REFLECTIONS_GAIN (3.16f) + //#define AL_REVERB_DEFAULT_REFLECTIONS_GAIN (0.05f) + // + //#define AL_REVERB_MIN_REFLECTIONS_DELAY (0.0f) + //#define AL_REVERB_MAX_REFLECTIONS_DELAY (0.3f) + //#define AL_REVERB_DEFAULT_REFLECTIONS_DELAY (0.007f) + // + //#define AL_REVERB_MIN_LATE_REVERB_GAIN (0.0f) + //#define AL_REVERB_MAX_LATE_REVERB_GAIN (10.0f) + //#define AL_REVERB_DEFAULT_LATE_REVERB_GAIN (1.26f) + // + //#define AL_REVERB_MIN_LATE_REVERB_DELAY (0.0f) + //#define AL_REVERB_MAX_LATE_REVERB_DELAY (0.1f) + //#define AL_REVERB_DEFAULT_LATE_REVERB_DELAY (0.011f) + // + //#define AL_REVERB_MIN_AIR_ABSORPTION_GAINHF (0.892f) + //#define AL_REVERB_MAX_AIR_ABSORPTION_GAINHF (1.0f) + //#define AL_REVERB_DEFAULT_AIR_ABSORPTION_GAINHF (0.994f) + // + //#define AL_REVERB_MIN_ROOM_ROLLOFF_FACTOR (0.0f) + //#define AL_REVERB_MAX_ROOM_ROLLOFF_FACTOR (10.0f) + //#define AL_REVERB_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f) + // + //#define AL_REVERB_MIN_DECAY_HFLIMIT AL_FALSE + //#define AL_REVERB_MAX_DECAY_HFLIMIT AL_TRUE + //#define AL_REVERB_DEFAULT_DECAY_HFLIMIT AL_TRUE + // + ///* EAX reverb effect */ + //#define AL_EAXREVERB_MIN_DENSITY (0.0f) + //#define AL_EAXREVERB_MAX_DENSITY (1.0f) + //#define AL_EAXREVERB_DEFAULT_DENSITY (1.0f) + // + //#define AL_EAXREVERB_MIN_DIFFUSION (0.0f) + //#define AL_EAXREVERB_MAX_DIFFUSION (1.0f) + //#define AL_EAXREVERB_DEFAULT_DIFFUSION (1.0f) + // + //#define AL_EAXREVERB_MIN_GAIN (0.0f) + //#define AL_EAXREVERB_MAX_GAIN (1.0f) + //#define AL_EAXREVERB_DEFAULT_GAIN (0.32f) + // + //#define AL_EAXREVERB_MIN_GAINHF (0.0f) + //#define AL_EAXREVERB_MAX_GAINHF (1.0f) + //#define AL_EAXREVERB_DEFAULT_GAINHF (0.89f) + // + //#define AL_EAXREVERB_MIN_GAINLF (0.0f) + //#define AL_EAXREVERB_MAX_GAINLF (1.0f) + //#define AL_EAXREVERB_DEFAULT_GAINLF (1.0f) + // + //#define AL_EAXREVERB_MIN_DECAY_TIME (0.1f) + //#define AL_EAXREVERB_MAX_DECAY_TIME (20.0f) + //#define AL_EAXREVERB_DEFAULT_DECAY_TIME (1.49f) + // + //#define AL_EAXREVERB_MIN_DECAY_HFRATIO (0.1f) + //#define AL_EAXREVERB_MAX_DECAY_HFRATIO (2.0f) + //#define AL_EAXREVERB_DEFAULT_DECAY_HFRATIO (0.83f) + // + //#define AL_EAXREVERB_MIN_DECAY_LFRATIO (0.1f) + //#define AL_EAXREVERB_MAX_DECAY_LFRATIO (2.0f) + //#define AL_EAXREVERB_DEFAULT_DECAY_LFRATIO (1.0f) + // + //#define AL_EAXREVERB_MIN_REFLECTIONS_GAIN (0.0f) + //#define AL_EAXREVERB_MAX_REFLECTIONS_GAIN (3.16f) + //#define AL_EAXREVERB_DEFAULT_REFLECTIONS_GAIN (0.05f) + // + //#define AL_EAXREVERB_MIN_REFLECTIONS_DELAY (0.0f) + //#define AL_EAXREVERB_MAX_REFLECTIONS_DELAY (0.3f) + //#define AL_EAXREVERB_DEFAULT_REFLECTIONS_DELAY (0.007f) + // + //#define AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ (0.0f) + // + //#define AL_EAXREVERB_MIN_LATE_REVERB_GAIN (0.0f) + //#define AL_EAXREVERB_MAX_LATE_REVERB_GAIN (10.0f) + //#define AL_EAXREVERB_DEFAULT_LATE_REVERB_GAIN (1.26f) + // + //#define AL_EAXREVERB_MIN_LATE_REVERB_DELAY (0.0f) + //#define AL_EAXREVERB_MAX_LATE_REVERB_DELAY (0.1f) + //#define AL_EAXREVERB_DEFAULT_LATE_REVERB_DELAY (0.011f) + // + //#define AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ (0.0f) + // + //#define AL_EAXREVERB_MIN_ECHO_TIME (0.075f) + //#define AL_EAXREVERB_MAX_ECHO_TIME (0.25f) + //#define AL_EAXREVERB_DEFAULT_ECHO_TIME (0.25f) + // + //#define AL_EAXREVERB_MIN_ECHO_DEPTH (0.0f) + //#define AL_EAXREVERB_MAX_ECHO_DEPTH (1.0f) + //#define AL_EAXREVERB_DEFAULT_ECHO_DEPTH (0.0f) + // + //#define AL_EAXREVERB_MIN_MODULATION_TIME (0.04f) + //#define AL_EAXREVERB_MAX_MODULATION_TIME (4.0f) + //#define AL_EAXREVERB_DEFAULT_MODULATION_TIME (0.25f) + // + //#define AL_EAXREVERB_MIN_MODULATION_DEPTH (0.0f) + //#define AL_EAXREVERB_MAX_MODULATION_DEPTH (1.0f) + //#define AL_EAXREVERB_DEFAULT_MODULATION_DEPTH (0.0f) + // + //#define AL_EAXREVERB_MIN_AIR_ABSORPTION_GAINHF (0.892f) + //#define AL_EAXREVERB_MAX_AIR_ABSORPTION_GAINHF (1.0f) + //#define AL_EAXREVERB_DEFAULT_AIR_ABSORPTION_GAINHF (0.994f) + // + //#define AL_EAXREVERB_MIN_HFREFERENCE (1000.0f) + //#define AL_EAXREVERB_MAX_HFREFERENCE (20000.0f) + //#define AL_EAXREVERB_DEFAULT_HFREFERENCE (5000.0f) + // + //#define AL_EAXREVERB_MIN_LFREFERENCE (20.0f) + //#define AL_EAXREVERB_MAX_LFREFERENCE (1000.0f) + //#define AL_EAXREVERB_DEFAULT_LFREFERENCE (250.0f) + // + //#define AL_EAXREVERB_MIN_ROOM_ROLLOFF_FACTOR (0.0f) + //#define AL_EAXREVERB_MAX_ROOM_ROLLOFF_FACTOR (10.0f) + //#define AL_EAXREVERB_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f) + // + //#define AL_EAXREVERB_MIN_DECAY_HFLIMIT AL_FALSE + //#define AL_EAXREVERB_MAX_DECAY_HFLIMIT AL_TRUE + //#define AL_EAXREVERB_DEFAULT_DECAY_HFLIMIT AL_TRUE + // + ///* Chorus effect */ + //#define AL_CHORUS_WAVEFORM_SINUSOID (0) + //#define AL_CHORUS_WAVEFORM_TRIANGLE (1) + // + //#define AL_CHORUS_MIN_WAVEFORM (0) + //#define AL_CHORUS_MAX_WAVEFORM (1) + //#define AL_CHORUS_DEFAULT_WAVEFORM (1) + // + //#define AL_CHORUS_MIN_PHASE (-180) + //#define AL_CHORUS_MAX_PHASE (180) + //#define AL_CHORUS_DEFAULT_PHASE (90) + // + //#define AL_CHORUS_MIN_RATE (0.0f) + //#define AL_CHORUS_MAX_RATE (10.0f) + //#define AL_CHORUS_DEFAULT_RATE (1.1f) + // + //#define AL_CHORUS_MIN_DEPTH (0.0f) + //#define AL_CHORUS_MAX_DEPTH (1.0f) + //#define AL_CHORUS_DEFAULT_DEPTH (0.1f) + // + //#define AL_CHORUS_MIN_FEEDBACK (-1.0f) + //#define AL_CHORUS_MAX_FEEDBACK (1.0f) + //#define AL_CHORUS_DEFAULT_FEEDBACK (0.25f) + // + //#define AL_CHORUS_MIN_DELAY (0.0f) + //#define AL_CHORUS_MAX_DELAY (0.016f) + //#define AL_CHORUS_DEFAULT_DELAY (0.016f) + // + ///* Distortion effect */ + //#define AL_DISTORTION_MIN_EDGE (0.0f) + //#define AL_DISTORTION_MAX_EDGE (1.0f) + //#define AL_DISTORTION_DEFAULT_EDGE (0.2f) + // + //#define AL_DISTORTION_MIN_GAIN (0.01f) + //#define AL_DISTORTION_MAX_GAIN (1.0f) + //#define AL_DISTORTION_DEFAULT_GAIN (0.05f) + // + //#define AL_DISTORTION_MIN_LOWPASS_CUTOFF (80.0f) + //#define AL_DISTORTION_MAX_LOWPASS_CUTOFF (24000.0f) + //#define AL_DISTORTION_DEFAULT_LOWPASS_CUTOFF (8000.0f) + // + //#define AL_DISTORTION_MIN_EQCENTER (80.0f) + //#define AL_DISTORTION_MAX_EQCENTER (24000.0f) + //#define AL_DISTORTION_DEFAULT_EQCENTER (3600.0f) + // + //#define AL_DISTORTION_MIN_EQBANDWIDTH (80.0f) + //#define AL_DISTORTION_MAX_EQBANDWIDTH (24000.0f) + //#define AL_DISTORTION_DEFAULT_EQBANDWIDTH (3600.0f) + // + ///* Echo effect */ + //#define AL_ECHO_MIN_DELAY (0.0f) + //#define AL_ECHO_MAX_DELAY (0.207f) + //#define AL_ECHO_DEFAULT_DELAY (0.1f) + // + //#define AL_ECHO_MIN_LRDELAY (0.0f) + //#define AL_ECHO_MAX_LRDELAY (0.404f) + //#define AL_ECHO_DEFAULT_LRDELAY (0.1f) + // + //#define AL_ECHO_MIN_DAMPING (0.0f) + //#define AL_ECHO_MAX_DAMPING (0.99f) + //#define AL_ECHO_DEFAULT_DAMPING (0.5f) + // + //#define AL_ECHO_MIN_FEEDBACK (0.0f) + //#define AL_ECHO_MAX_FEEDBACK (1.0f) + //#define AL_ECHO_DEFAULT_FEEDBACK (0.5f) + // + //#define AL_ECHO_MIN_SPREAD (-1.0f) + //#define AL_ECHO_MAX_SPREAD (1.0f) + //#define AL_ECHO_DEFAULT_SPREAD (-1.0f) + // + ///* Flanger effect */ + //#define AL_FLANGER_WAVEFORM_SINUSOID (0) + //#define AL_FLANGER_WAVEFORM_TRIANGLE (1) + // + //#define AL_FLANGER_MIN_WAVEFORM (0) + //#define AL_FLANGER_MAX_WAVEFORM (1) + //#define AL_FLANGER_DEFAULT_WAVEFORM (1) + // + //#define AL_FLANGER_MIN_PHASE (-180) + //#define AL_FLANGER_MAX_PHASE (180) + //#define AL_FLANGER_DEFAULT_PHASE (0) + // + //#define AL_FLANGER_MIN_RATE (0.0f) + //#define AL_FLANGER_MAX_RATE (10.0f) + //#define AL_FLANGER_DEFAULT_RATE (0.27f) + // + //#define AL_FLANGER_MIN_DEPTH (0.0f) + //#define AL_FLANGER_MAX_DEPTH (1.0f) + //#define AL_FLANGER_DEFAULT_DEPTH (1.0f) + // + //#define AL_FLANGER_MIN_FEEDBACK (-1.0f) + //#define AL_FLANGER_MAX_FEEDBACK (1.0f) + //#define AL_FLANGER_DEFAULT_FEEDBACK (-0.5f) + // + //#define AL_FLANGER_MIN_DELAY (0.0f) + //#define AL_FLANGER_MAX_DELAY (0.004f) + //#define AL_FLANGER_DEFAULT_DELAY (0.002f) + // + ///* Frequency shifter effect */ + //#define AL_FREQUENCY_SHIFTER_MIN_FREQUENCY (0.0f) + //#define AL_FREQUENCY_SHIFTER_MAX_FREQUENCY (24000.0f) + //#define AL_FREQUENCY_SHIFTER_DEFAULT_FREQUENCY (0.0f) + // + //#define AL_FREQUENCY_SHIFTER_MIN_LEFT_DIRECTION (0) + //#define AL_FREQUENCY_SHIFTER_MAX_LEFT_DIRECTION (2) + //#define AL_FREQUENCY_SHIFTER_DEFAULT_LEFT_DIRECTION (0) + // + //#define AL_FREQUENCY_SHIFTER_DIRECTION_DOWN (0) + //#define AL_FREQUENCY_SHIFTER_DIRECTION_UP (1) + //#define AL_FREQUENCY_SHIFTER_DIRECTION_OFF (2) + // + //#define AL_FREQUENCY_SHIFTER_MIN_RIGHT_DIRECTION (0) + //#define AL_FREQUENCY_SHIFTER_MAX_RIGHT_DIRECTION (2) + //#define AL_FREQUENCY_SHIFTER_DEFAULT_RIGHT_DIRECTION (0) + // + ///* Vocal morpher effect */ + //#define AL_VOCAL_MORPHER_MIN_PHONEMEA (0) + //#define AL_VOCAL_MORPHER_MAX_PHONEMEA (29) + //#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEA (0) + // + //#define AL_VOCAL_MORPHER_MIN_PHONEMEA_COARSE_TUNING (-24) + //#define AL_VOCAL_MORPHER_MAX_PHONEMEA_COARSE_TUNING (24) + //#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEA_COARSE_TUNING (0) + // + //#define AL_VOCAL_MORPHER_MIN_PHONEMEB (0) + //#define AL_VOCAL_MORPHER_MAX_PHONEMEB (29) + //#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEB (10) + // + //#define AL_VOCAL_MORPHER_MIN_PHONEMEB_COARSE_TUNING (-24) + //#define AL_VOCAL_MORPHER_MAX_PHONEMEB_COARSE_TUNING (24) + //#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEB_COARSE_TUNING (0) + // + //#define AL_VOCAL_MORPHER_PHONEME_A (0) + //#define AL_VOCAL_MORPHER_PHONEME_E (1) + //#define AL_VOCAL_MORPHER_PHONEME_I (2) + //#define AL_VOCAL_MORPHER_PHONEME_O (3) + //#define AL_VOCAL_MORPHER_PHONEME_U (4) + //#define AL_VOCAL_MORPHER_PHONEME_AA (5) + //#define AL_VOCAL_MORPHER_PHONEME_AE (6) + //#define AL_VOCAL_MORPHER_PHONEME_AH (7) + //#define AL_VOCAL_MORPHER_PHONEME_AO (8) + //#define AL_VOCAL_MORPHER_PHONEME_EH (9) + //#define AL_VOCAL_MORPHER_PHONEME_ER (10) + //#define AL_VOCAL_MORPHER_PHONEME_IH (11) + //#define AL_VOCAL_MORPHER_PHONEME_IY (12) + //#define AL_VOCAL_MORPHER_PHONEME_UH (13) + //#define AL_VOCAL_MORPHER_PHONEME_UW (14) + //#define AL_VOCAL_MORPHER_PHONEME_B (15) + //#define AL_VOCAL_MORPHER_PHONEME_D (16) + //#define AL_VOCAL_MORPHER_PHONEME_F (17) + //#define AL_VOCAL_MORPHER_PHONEME_G (18) + //#define AL_VOCAL_MORPHER_PHONEME_J (19) + //#define AL_VOCAL_MORPHER_PHONEME_K (20) + //#define AL_VOCAL_MORPHER_PHONEME_L (21) + //#define AL_VOCAL_MORPHER_PHONEME_M (22) + //#define AL_VOCAL_MORPHER_PHONEME_N (23) + //#define AL_VOCAL_MORPHER_PHONEME_P (24) + //#define AL_VOCAL_MORPHER_PHONEME_R (25) + //#define AL_VOCAL_MORPHER_PHONEME_S (26) + //#define AL_VOCAL_MORPHER_PHONEME_T (27) + //#define AL_VOCAL_MORPHER_PHONEME_V (28) + //#define AL_VOCAL_MORPHER_PHONEME_Z (29) + // + //#define AL_VOCAL_MORPHER_WAVEFORM_SINUSOID (0) + //#define AL_VOCAL_MORPHER_WAVEFORM_TRIANGLE (1) + //#define AL_VOCAL_MORPHER_WAVEFORM_SAWTOOTH (2) + // + //#define AL_VOCAL_MORPHER_MIN_WAVEFORM (0) + //#define AL_VOCAL_MORPHER_MAX_WAVEFORM (2) + //#define AL_VOCAL_MORPHER_DEFAULT_WAVEFORM (0) + // + //#define AL_VOCAL_MORPHER_MIN_RATE (0.0f) + //#define AL_VOCAL_MORPHER_MAX_RATE (10.0f) + //#define AL_VOCAL_MORPHER_DEFAULT_RATE (1.41f) + // + ///* Pitch shifter effect */ + //#define AL_PITCH_SHIFTER_MIN_COARSE_TUNE (-12) + //#define AL_PITCH_SHIFTER_MAX_COARSE_TUNE (12) + //#define AL_PITCH_SHIFTER_DEFAULT_COARSE_TUNE (12) + // + //#define AL_PITCH_SHIFTER_MIN_FINE_TUNE (-50) + //#define AL_PITCH_SHIFTER_MAX_FINE_TUNE (50) + //#define AL_PITCH_SHIFTER_DEFAULT_FINE_TUNE (0) + // + ///* Ring modulator effect */ + //#define AL_RING_MODULATOR_MIN_FREQUENCY (0.0f) + //#define AL_RING_MODULATOR_MAX_FREQUENCY (8000.0f) + //#define AL_RING_MODULATOR_DEFAULT_FREQUENCY (440.0f) + // + //#define AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF (0.0f) + //#define AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF (24000.0f) + //#define AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF (800.0f) + // + //#define AL_RING_MODULATOR_SINUSOID (0) + //#define AL_RING_MODULATOR_SAWTOOTH (1) + //#define AL_RING_MODULATOR_SQUARE (2) + // + //#define AL_RING_MODULATOR_MIN_WAVEFORM (0) + //#define AL_RING_MODULATOR_MAX_WAVEFORM (2) + //#define AL_RING_MODULATOR_DEFAULT_WAVEFORM (0) + // + ///* Autowah effect */ + //#define AL_AUTOWAH_MIN_ATTACK_TIME (0.0001f) + //#define AL_AUTOWAH_MAX_ATTACK_TIME (1.0f) + //#define AL_AUTOWAH_DEFAULT_ATTACK_TIME (0.06f) + // + //#define AL_AUTOWAH_MIN_RELEASE_TIME (0.0001f) + //#define AL_AUTOWAH_MAX_RELEASE_TIME (1.0f) + //#define AL_AUTOWAH_DEFAULT_RELEASE_TIME (0.06f) + // + //#define AL_AUTOWAH_MIN_RESONANCE (2.0f) + //#define AL_AUTOWAH_MAX_RESONANCE (1000.0f) + //#define AL_AUTOWAH_DEFAULT_RESONANCE (1000.0f) + // + //#define AL_AUTOWAH_MIN_PEAK_GAIN (0.00003f) + //#define AL_AUTOWAH_MAX_PEAK_GAIN (31621.0f) + //#define AL_AUTOWAH_DEFAULT_PEAK_GAIN (11.22f) + // + ///* Compressor effect */ + //#define AL_COMPRESSOR_MIN_ONOFF (0) + //#define AL_COMPRESSOR_MAX_ONOFF (1) + //#define AL_COMPRESSOR_DEFAULT_ONOFF (1) + // + ///* Equalizer effect */ + //#define AL_EQUALIZER_MIN_LOW_GAIN (0.126f) + //#define AL_EQUALIZER_MAX_LOW_GAIN (7.943f) + //#define AL_EQUALIZER_DEFAULT_LOW_GAIN (1.0f) + // + //#define AL_EQUALIZER_MIN_LOW_CUTOFF (50.0f) + //#define AL_EQUALIZER_MAX_LOW_CUTOFF (800.0f) + //#define AL_EQUALIZER_DEFAULT_LOW_CUTOFF (200.0f) + // + //#define AL_EQUALIZER_MIN_MID1_GAIN (0.126f) + //#define AL_EQUALIZER_MAX_MID1_GAIN (7.943f) + //#define AL_EQUALIZER_DEFAULT_MID1_GAIN (1.0f) + // + //#define AL_EQUALIZER_MIN_MID1_CENTER (200.0f) + //#define AL_EQUALIZER_MAX_MID1_CENTER (3000.0f) + //#define AL_EQUALIZER_DEFAULT_MID1_CENTER (500.0f) + // + //#define AL_EQUALIZER_MIN_MID1_WIDTH (0.01f) + //#define AL_EQUALIZER_MAX_MID1_WIDTH (1.0f) + //#define AL_EQUALIZER_DEFAULT_MID1_WIDTH (1.0f) + // + //#define AL_EQUALIZER_MIN_MID2_GAIN (0.126f) + //#define AL_EQUALIZER_MAX_MID2_GAIN (7.943f) + //#define AL_EQUALIZER_DEFAULT_MID2_GAIN (1.0f) + // + //#define AL_EQUALIZER_MIN_MID2_CENTER (1000.0f) + //#define AL_EQUALIZER_MAX_MID2_CENTER (8000.0f) + //#define AL_EQUALIZER_DEFAULT_MID2_CENTER (3000.0f) + // + //#define AL_EQUALIZER_MIN_MID2_WIDTH (0.01f) + //#define AL_EQUALIZER_MAX_MID2_WIDTH (1.0f) + //#define AL_EQUALIZER_DEFAULT_MID2_WIDTH (1.0f) + // + //#define AL_EQUALIZER_MIN_HIGH_GAIN (0.126f) + //#define AL_EQUALIZER_MAX_HIGH_GAIN (7.943f) + //#define AL_EQUALIZER_DEFAULT_HIGH_GAIN (1.0f) + // + //#define AL_EQUALIZER_MIN_HIGH_CUTOFF (4000.0f) + //#define AL_EQUALIZER_MAX_HIGH_CUTOFF (16000.0f) + //#define AL_EQUALIZER_DEFAULT_HIGH_CUTOFF (6000.0f) + // + // + ///* Source parameter value ranges and defaults. */ + //#define AL_MIN_AIR_ABSORPTION_FACTOR (0.0f) + //#define AL_MAX_AIR_ABSORPTION_FACTOR (10.0f) + //#define AL_DEFAULT_AIR_ABSORPTION_FACTOR (0.0f) + // + //#define AL_MIN_ROOM_ROLLOFF_FACTOR (0.0f) + //#define AL_MAX_ROOM_ROLLOFF_FACTOR (10.0f) + //#define AL_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f) + // + //#define AL_MIN_CONE_OUTER_GAINHF (0.0f) + //#define AL_MAX_CONE_OUTER_GAINHF (1.0f) + //#define AL_DEFAULT_CONE_OUTER_GAINHF (1.0f) + // + //#define AL_MIN_DIRECT_FILTER_GAINHF_AUTO AL_FALSE + //#define AL_MAX_DIRECT_FILTER_GAINHF_AUTO AL_TRUE + //#define AL_DEFAULT_DIRECT_FILTER_GAINHF_AUTO AL_TRUE + // + //#define AL_MIN_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_FALSE + //#define AL_MAX_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_TRUE + //#define AL_DEFAULT_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_TRUE + // + //#define AL_MIN_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_FALSE + //#define AL_MAX_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_TRUE + //#define AL_DEFAULT_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_TRUE + + /** + * Requests a number of effect slots. + * + * @param numSlots the slots count. + * @param buffers the buffer that will receive the effect slots. + */ public void alGenAuxiliaryEffectSlots(int numSlots, IntBuffer buffers); + + /** + * Requests a number of effects. + * + * @param numEffects the effects count. + * @param buffers the buffer that will receive the effects. + */ public void alGenEffects(int numEffects, IntBuffer buffers); + + /** + * Sets the integer value of an effect parameter. + * + * @param effect the effect to modify. + * @param param the parameter to modify. + * @param value the parameter value. + */ public void alEffecti(int effect, int param, int value); + + /** + * Sets the integer value of an effect slot parameter. + * + * @param effectSlot the effect slot to modify. + * @param param the parameter to modify. + * @param value the parameter value. + */ public void alAuxiliaryEffectSloti(int effectSlot, int param, int value); + + /** + * Deletes a number of effects. + * + * @param numEffects the effects count. + * @param buffers the effect to delete. + */ public void alDeleteEffects(int numEffects, IntBuffer buffers); + + /** + * Deletes a number of effect slots. + * + * @param numEffectSlots the effect slots count. + * @param buffers the effect slots to delete. + */ public void alDeleteAuxiliaryEffectSlots(int numEffectSlots, IntBuffer buffers); + + /** + * Requests a number of filters. + * + * @param numFilters the filters count. + * @param buffers the buffer that will receive the filters. + */ public void alGenFilters(int numFilters, IntBuffer buffers); + + /** + * Sets the integer value of a filter parameter. + * + * @param filter the filter to modify. + * @param param the parameter to modify. + * @param value the parameter value. + */ public void alFilteri(int filter, int param, int value); + + /** + * Sets the float value of a filter parameter. + * + * @param filter the filter to modify. + * @param param the parameter to modify. + * @param value the parameter value. + */ public void alFilterf(int filter, int param, float value); + + /** + * Deletes a number of filters. + * + * @param numFilters the filters count. + * @param buffers the filter to delete. + */ public void alDeleteFilters(int numFilters, IntBuffer buffers); + + /** + * Sets the float value of an effect parameter. + * + * @param effect the effect to modify. + * @param param the parameter to modify. + * @param value the parameter value. + */ public void alEffectf(int effect, int param, float value); - } diff --git a/jme3-core/src/main/java/com/jme3/renderer/opengl/GL.java b/jme3-core/src/main/java/com/jme3/renderer/opengl/GL.java index 19bdfffff..e0a1975c1 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/opengl/GL.java +++ b/jme3-core/src/main/java/com/jme3/renderer/opengl/GL.java @@ -38,251 +38,1264 @@ import java.nio.ShortBuffer; /** * Baseline GL methods that must be available on all platforms. - * + *

* This is the subset of vanilla desktop OpenGL 2 and OpenGL ES 2. - * + * * @author Kirill Vainer */ public interface GL { - public static final int GL_ALPHA = 0x1906; - public static final int GL_ALWAYS = 0x207; - public static final int GL_ARRAY_BUFFER = 0x8892; - public static final int GL_BACK = 0x405; - public static final int GL_BLEND = 0xBE2; - public static final int GL_BLUE = 0x1905; - public static final int GL_BYTE = 0x1400; - public static final int GL_CLAMP_TO_EDGE = 0x812F; - public static final int GL_COLOR_BUFFER_BIT = 0x4000; - public static final int GL_COMPILE_STATUS = 0x8B81; - public static final int GL_CULL_FACE = 0xB44; - public static final int GL_DECR = 0x1E03; - public static final int GL_DECR_WRAP = 0x8508; - public static final int GL_DEPTH_BUFFER_BIT = 0x100; - public static final int GL_DEPTH_COMPONENT = 0x1902; - public static final int GL_DEPTH_COMPONENT16 = 0x81A5; - public static final int GL_DEPTH_TEST = 0xB71; - public static final int GL_DOUBLE = 0x140A; - public static final int GL_DST_ALPHA = 0x0304; - public static final int GL_DST_COLOR = 0x306; - public static final int GL_DYNAMIC_DRAW = 0x88E8; - public static final int GL_ELEMENT_ARRAY_BUFFER = 0x8893; - public static final int GL_EQUAL = 0x202; - public static final int GL_EXTENSIONS = 0x1F03; - public static final int GL_FALSE = 0x0; - public static final int GL_FLOAT = 0x1406; - public static final int GL_FRAGMENT_SHADER = 0x8B30; - public static final int GL_FRONT = 0x404; - public static final int GL_FUNC_ADD = 0x8006; - public static final int GL_FUNC_SUBTRACT = 0x800A; - public static final int GL_FUNC_REVERSE_SUBTRACT = 0x800B; - public static final int GL_FRONT_AND_BACK = 0x408; - public static final int GL_GEQUAL = 0x206; - public static final int GL_GREATER = 0x204; - public static final int GL_GREEN = 0x1904; - public static final int GL_INCR = 0x1E02; - public static final int GL_INCR_WRAP = 0x8507; - public static final int GL_INFO_LOG_LENGTH = 0x8B84; - public static final int GL_INT = 0x1404; - public static final int GL_INVALID_ENUM = 0x500; - public static final int GL_INVALID_VALUE = 0x501; - public static final int GL_INVALID_OPERATION = 0x502; - public static final int GL_INVERT = 0x150A; - public static final int GL_KEEP = 0x1E00; - public static final int GL_LEQUAL = 0x203; - public static final int GL_LESS = 0x201; - public static final int GL_LINEAR = 0x2601; - public static final int GL_LINEAR_MIPMAP_LINEAR = 0x2703; - public static final int GL_LINEAR_MIPMAP_NEAREST = 0x2701; - public static final int GL_LINES = 0x1; - public static final int GL_LINE_LOOP = 0x2; - public static final int GL_LINE_STRIP = 0x3; - public static final int GL_LINK_STATUS = 0x8B82; - public static final int GL_LUMINANCE = 0x1909; - public static final int GL_LUMINANCE_ALPHA = 0x190A; - public static final int GL_MAX = 0x8008; - public static final int GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C; - public static final int GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49; - public static final int GL_MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD; - public static final int GL_MAX_TEXTURE_IMAGE_UNITS = 0x8872; - public static final int GL_MAX_TEXTURE_SIZE = 0xD33; - public static final int GL_MAX_VERTEX_ATTRIBS = 0x8869; - public static final int GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C; - public static final int GL_MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A; - public static final int GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB; - public static final int GL_MIRRORED_REPEAT = 0x8370; - public static final int GL_MIN = 0x8007; - public static final int GL_NEAREST = 0x2600; - public static final int GL_NEAREST_MIPMAP_LINEAR = 0x2702; - public static final int GL_NEAREST_MIPMAP_NEAREST = 0x2700; - public static final int GL_NEVER = 0x200; - public static final int GL_NO_ERROR = 0x0; - public static final int GL_NONE = 0x0; - public static final int GL_NOTEQUAL = 0x205; - public static final int GL_ONE = 0x1; - public static final int GL_ONE_MINUS_DST_ALPHA = 0x0305; - public static final int GL_ONE_MINUS_DST_COLOR = 0x307; - public static final int GL_ONE_MINUS_SRC_ALPHA = 0x303; - public static final int GL_ONE_MINUS_SRC_COLOR = 0x301; - public static final int GL_OUT_OF_MEMORY = 0x505; - public static final int GL_POINTS = 0x0; - public static final int GL_POLYGON_OFFSET_FILL = 0x8037; - public static final int GL_QUERY_RESULT = 0x8866; - public static final int GL_QUERY_RESULT_AVAILABLE = 0x8867; - public static final int GL_RED = 0x1903; - public static final int GL_RENDERER = 0x1F01; - public static final int GL_REPEAT = 0x2901; - public static final int GL_REPLACE = 0x1E01; - public static final int GL_RGB = 0x1907; - public static final int GL_RGB565 = 0x8D62; - public static final int GL_RGB5_A1 = 0x8057; - public static final int GL_RGBA = 0x1908; - public static final int GL_RGBA4 = 0x8056; - public static final int GL_SCISSOR_TEST = 0xC11; - public static final int GL_SHADING_LANGUAGE_VERSION = 0x8B8C; - public static final int GL_SHORT = 0x1402; - public static final int GL_SRC_ALPHA = 0x302; - public static final int GL_SRC_ALPHA_SATURATE = 0x0308; - public static final int GL_SRC_COLOR = 0x300; - public static final int GL_STATIC_DRAW = 0x88E4; - public static final int GL_STENCIL_BUFFER_BIT = 0x400; - public static final int GL_STENCIL_TEST = 0xB90; - public static final int GL_STREAM_DRAW = 0x88E0; - public static final int GL_STREAM_READ = 0x88E1; - public static final int GL_TEXTURE = 0x1702; - public static final int GL_TEXTURE0 = 0x84C0; - public static final int GL_TEXTURE1 = 0x84C1; - public static final int GL_TEXTURE2 = 0x84C2; - public static final int GL_TEXTURE3 = 0x84C3; - public static final int GL_TEXTURE4 = 0x84C4; - public static final int GL_TEXTURE5 = 0x84C5; - public static final int GL_TEXTURE6 = 0x84C6; - public static final int GL_TEXTURE7 = 0x84C7; - public static final int GL_TEXTURE8 = 0x84C8; - public static final int GL_TEXTURE9 = 0x84C9; - public static final int GL_TEXTURE10 = 0x84CA; - public static final int GL_TEXTURE11 = 0x84CB; - public static final int GL_TEXTURE12 = 0x84CC; - public static final int GL_TEXTURE13 = 0x84CD; - public static final int GL_TEXTURE14 = 0x84CE; - public static final int GL_TEXTURE15 = 0x84CF; - public static final int GL_TEXTURE_2D = 0xDE1; - public static final int GL_TEXTURE_CUBE_MAP = 0x8513; - public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515; - public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516; - public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517; - public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518; - public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519; - public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A; - public static final int GL_TEXTURE_MAG_FILTER = 0x2800; - public static final int GL_TEXTURE_MIN_FILTER = 0x2801; - public static final int GL_TEXTURE_WRAP_S = 0x2802; - public static final int GL_TEXTURE_WRAP_T = 0x2803; - public static final int GL_TIME_ELAPSED = 0x88BF; - public static final int GL_TRIANGLES = 0x4; - public static final int GL_TRIANGLE_FAN = 0x6; - public static final int GL_TRIANGLE_STRIP = 0x5; - public static final int GL_TRUE = 0x1; - public static final int GL_UNPACK_ALIGNMENT = 0xCF5; - public static final int GL_UNSIGNED_BYTE = 0x1401; - public static final int GL_UNSIGNED_INT = 0x1405; - public static final int GL_UNSIGNED_SHORT = 0x1403; - public static final int GL_UNSIGNED_SHORT_5_6_5 = 0x8363; - public static final int GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034; - public static final int GL_VENDOR = 0x1F00; - public static final int GL_VERSION = 0x1F02; - public static final int GL_VERTEX_SHADER = 0x8B31; - public static final int GL_ZERO = 0x0; - - public void resetStats(); - - public void glActiveTexture(int texture); - public void glAttachShader(int program, int shader); - public void glBeginQuery(int target, int query); - public void glBindBuffer(int target, int buffer); - public void glBindTexture(int target, int texture); - public void glBlendEquationSeparate(int colorMode, int alphaMode); - public void glBlendFunc(int sfactor, int dfactor); - public void glBlendFuncSeparate(int sfactorRGB, int dfactorRGB, int sfactorAlpha, int dfactorAlpha); - public void glBufferData(int target, long data_size, int usage); - public void glBufferData(int target, FloatBuffer data, int usage); - public void glBufferData(int target, ShortBuffer data, int usage); - public void glBufferData(int target, ByteBuffer data, int usage); - public void glBufferSubData(int target, long offset, FloatBuffer data); - public void glBufferSubData(int target, long offset, ShortBuffer data); - public void glBufferSubData(int target, long offset, ByteBuffer data); - public void glClear(int mask); - public void glClearColor(float red, float green, float blue, float alpha); - public void glColorMask(boolean red, boolean green, boolean blue, boolean alpha); - public void glCompileShader(int shader); - public void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, ByteBuffer data); - public void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, ByteBuffer data); - public int glCreateProgram(); - public int glCreateShader(int shaderType); - public void glCullFace(int mode); - public void glDeleteBuffers(IntBuffer buffers); - public void glDeleteProgram(int program); - public void glDeleteShader(int shader); - public void glDeleteTextures(IntBuffer textures); - public void glDepthFunc(int func); - public void glDepthMask(boolean flag); - public void glDepthRange(double nearVal, double farVal); - public void glDetachShader(int program, int shader); - public void glDisable(int cap); - public void glDisableVertexAttribArray(int index); - public void glDrawArrays(int mode, int first, int count); - - public void glDrawRangeElements(int mode, int start, int end, int count, int type, long indices); /// GL2+ - public void glEnable(int cap); - public void glEnableVertexAttribArray(int index); - public void glEndQuery(int target); - public void glGenBuffers(IntBuffer buffers); - public void glGenTextures(IntBuffer textures); - public void glGenQueries(int number, IntBuffer ids); - public int glGetAttribLocation(int program, String name); - public void glGetBoolean(int pname, ByteBuffer params); - public void glGetBufferSubData(int target, long offset, ByteBuffer data); - public int glGetError(); - public void glGetInteger(int pname, IntBuffer params); - public void glGetProgram(int program, int pname, IntBuffer params); - public String glGetProgramInfoLog(int program, int maxSize); - public long glGetQueryObjectui64(int query, int pname); - public int glGetQueryObjectiv(int query, int pname); - public void glGetShader(int shader, int pname, IntBuffer params); - public String glGetShaderInfoLog(int shader, int maxSize); - public String glGetString(int name); - public int glGetUniformLocation(int program, String name); - public boolean glIsEnabled(int cap); - public void glLineWidth(float width); - public void glLinkProgram(int program); - public void glPixelStorei(int pname, int param); - public void glPolygonOffset(float factor, float units); - public void glReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer data); - public void glReadPixels(int x, int y, int width, int height, int format, int type, long offset); - public void glScissor(int x, int y, int width, int height); - public void glShaderSource(int shader, String[] string, IntBuffer length); - public void glStencilFuncSeparate(int face, int func, int ref, int mask); - public void glStencilOpSeparate(int face, int sfail, int dpfail, int dppass); - public void glTexImage2D(int target, int level, int internalFormat, int width, int height, int border, int format, int type, ByteBuffer data); - public void glTexParameterf(int target, int pname, float param); - public void glTexParameteri(int target, int pname, int param); - public void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ByteBuffer data); - public void glUniform1(int location, FloatBuffer value); - public void glUniform1(int location, IntBuffer value); - public void glUniform1f(int location, float v0); - public void glUniform1i(int location, int v0); - public void glUniform2(int location, IntBuffer value); - public void glUniform2(int location, FloatBuffer value); - public void glUniform2f(int location, float v0, float v1); - public void glUniform3(int location, IntBuffer value); - public void glUniform3(int location, FloatBuffer value); - public void glUniform3f(int location, float v0, float v1, float v2); - public void glUniform4(int location, FloatBuffer value); - public void glUniform4(int location, IntBuffer value); - public void glUniform4f(int location, float v0, float v1, float v2, float v3); - public void glUniformMatrix3(int location, boolean transpose, FloatBuffer value); - public void glUniformMatrix4(int location, boolean transpose, FloatBuffer value); - public void glUseProgram(int program); - public void glVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, long pointer); - public void glViewport(int x, int y, int width, int height); + static final int GL_ALPHA = 0x1906; + static final int GL_ALWAYS = 0x207; + static final int GL_ARRAY_BUFFER = 0x8892; + static final int GL_BACK = 0x405; + static final int GL_BLEND = 0xBE2; + static final int GL_BLUE = 0x1905; + static final int GL_BYTE = 0x1400; + static final int GL_CLAMP_TO_EDGE = 0x812F; + static final int GL_COLOR_BUFFER_BIT = 0x4000; + static final int GL_COMPILE_STATUS = 0x8B81; + static final int GL_CULL_FACE = 0xB44; + static final int GL_DECR = 0x1E03; + static final int GL_DECR_WRAP = 0x8508; + static final int GL_DEPTH_BUFFER_BIT = 0x100; + static final int GL_DEPTH_COMPONENT = 0x1902; + static final int GL_DEPTH_COMPONENT16 = 0x81A5; + static final int GL_DEPTH_TEST = 0xB71; + static final int GL_DOUBLE = 0x140A; + static final int GL_DST_ALPHA = 0x0304; + static final int GL_DST_COLOR = 0x306; + static final int GL_DYNAMIC_DRAW = 0x88E8; + static final int GL_ELEMENT_ARRAY_BUFFER = 0x8893; + static final int GL_EQUAL = 0x202; + static final int GL_EXTENSIONS = 0x1F03; + static final int GL_FALSE = 0x0; + static final int GL_FLOAT = 0x1406; + static final int GL_FRAGMENT_SHADER = 0x8B30; + static final int GL_FRONT = 0x404; + static final int GL_FUNC_ADD = 0x8006; + static final int GL_FUNC_SUBTRACT = 0x800A; + static final int GL_FUNC_REVERSE_SUBTRACT = 0x800B; + static final int GL_FRONT_AND_BACK = 0x408; + static final int GL_GEQUAL = 0x206; + static final int GL_GREATER = 0x204; + static final int GL_GREEN = 0x1904; + static final int GL_INCR = 0x1E02; + static final int GL_INCR_WRAP = 0x8507; + static final int GL_INFO_LOG_LENGTH = 0x8B84; + static final int GL_INT = 0x1404; + static final int GL_INVALID_ENUM = 0x500; + static final int GL_INVALID_VALUE = 0x501; + static final int GL_INVALID_OPERATION = 0x502; + static final int GL_INVERT = 0x150A; + static final int GL_KEEP = 0x1E00; + static final int GL_LEQUAL = 0x203; + static final int GL_LESS = 0x201; + static final int GL_LINEAR = 0x2601; + static final int GL_LINEAR_MIPMAP_LINEAR = 0x2703; + static final int GL_LINEAR_MIPMAP_NEAREST = 0x2701; + static final int GL_LINES = 0x1; + static final int GL_LINE_LOOP = 0x2; + static final int GL_LINE_STRIP = 0x3; + static final int GL_LINK_STATUS = 0x8B82; + static final int GL_LUMINANCE = 0x1909; + static final int GL_LUMINANCE_ALPHA = 0x190A; + static final int GL_MAX = 0x8008; + static final int GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C; + static final int GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49; + static final int GL_MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD; + static final int GL_MAX_TEXTURE_IMAGE_UNITS = 0x8872; + static final int GL_MAX_TEXTURE_SIZE = 0xD33; + static final int GL_MAX_VERTEX_ATTRIBS = 0x8869; + static final int GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C; + static final int GL_MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A; + static final int GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB; + static final int GL_MIRRORED_REPEAT = 0x8370; + static final int GL_MIN = 0x8007; + static final int GL_NEAREST = 0x2600; + static final int GL_NEAREST_MIPMAP_LINEAR = 0x2702; + static final int GL_NEAREST_MIPMAP_NEAREST = 0x2700; + static final int GL_NEVER = 0x200; + static final int GL_NO_ERROR = 0x0; + static final int GL_NONE = 0x0; + static final int GL_NOTEQUAL = 0x205; + static final int GL_ONE = 0x1; + static final int GL_ONE_MINUS_DST_ALPHA = 0x0305; + static final int GL_ONE_MINUS_DST_COLOR = 0x307; + static final int GL_ONE_MINUS_SRC_ALPHA = 0x303; + static final int GL_ONE_MINUS_SRC_COLOR = 0x301; + static final int GL_OUT_OF_MEMORY = 0x505; + static final int GL_POINTS = 0x0; + static final int GL_POLYGON_OFFSET_FILL = 0x8037; + static final int GL_QUERY_RESULT = 0x8866; + static final int GL_QUERY_RESULT_AVAILABLE = 0x8867; + static final int GL_RED = 0x1903; + static final int GL_RENDERER = 0x1F01; + static final int GL_REPEAT = 0x2901; + static final int GL_REPLACE = 0x1E01; + static final int GL_RGB = 0x1907; + static final int GL_RGB565 = 0x8D62; + static final int GL_RGB5_A1 = 0x8057; + static final int GL_RGBA = 0x1908; + static final int GL_RGBA4 = 0x8056; + static final int GL_SCISSOR_TEST = 0xC11; + static final int GL_SHADING_LANGUAGE_VERSION = 0x8B8C; + static final int GL_SHORT = 0x1402; + static final int GL_SRC_ALPHA = 0x302; + static final int GL_SRC_ALPHA_SATURATE = 0x0308; + static final int GL_SRC_COLOR = 0x300; + static final int GL_STATIC_DRAW = 0x88E4; + static final int GL_STENCIL_BUFFER_BIT = 0x400; + static final int GL_STENCIL_TEST = 0xB90; + static final int GL_STREAM_DRAW = 0x88E0; + static final int GL_STREAM_READ = 0x88E1; + static final int GL_TEXTURE = 0x1702; + static final int GL_TEXTURE0 = 0x84C0; + static final int GL_TEXTURE1 = 0x84C1; + static final int GL_TEXTURE2 = 0x84C2; + static final int GL_TEXTURE3 = 0x84C3; + static final int GL_TEXTURE4 = 0x84C4; + static final int GL_TEXTURE5 = 0x84C5; + static final int GL_TEXTURE6 = 0x84C6; + static final int GL_TEXTURE7 = 0x84C7; + static final int GL_TEXTURE8 = 0x84C8; + static final int GL_TEXTURE9 = 0x84C9; + static final int GL_TEXTURE10 = 0x84CA; + static final int GL_TEXTURE11 = 0x84CB; + static final int GL_TEXTURE12 = 0x84CC; + static final int GL_TEXTURE13 = 0x84CD; + static final int GL_TEXTURE14 = 0x84CE; + static final int GL_TEXTURE15 = 0x84CF; + static final int GL_TEXTURE_2D = 0xDE1; + static final int GL_TEXTURE_CUBE_MAP = 0x8513; + static final int GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515; + static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516; + static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517; + static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518; + static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519; + static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A; + static final int GL_TEXTURE_MAG_FILTER = 0x2800; + static final int GL_TEXTURE_MIN_FILTER = 0x2801; + static final int GL_TEXTURE_WRAP_S = 0x2802; + static final int GL_TEXTURE_WRAP_T = 0x2803; + static final int GL_TIME_ELAPSED = 0x88BF; + static final int GL_TRIANGLES = 0x4; + static final int GL_TRIANGLE_FAN = 0x6; + static final int GL_TRIANGLE_STRIP = 0x5; + static final int GL_TRUE = 0x1; + static final int GL_UNPACK_ALIGNMENT = 0xCF5; + static final int GL_UNSIGNED_BYTE = 0x1401; + static final int GL_UNSIGNED_INT = 0x1405; + static final int GL_UNSIGNED_SHORT = 0x1403; + static final int GL_UNSIGNED_SHORT_5_6_5 = 0x8363; + static final int GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034; + static final int GL_VENDOR = 0x1F00; + static final int GL_VERSION = 0x1F02; + static final int GL_VERTEX_SHADER = 0x8B31; + static final int GL_ZERO = 0x0; + + void resetStats(); + + /** + *

Reference Page

+ *

+ * Selects which texture unit subsequent texture state calls will affect. The number of texture units an implementation supports is implementation + * dependent. + * + * @param texture which texture unit to make active. One of:
{@link #GL_TEXTURE0 TEXTURE0}GL_TEXTURE[1-31]
+ */ + void glActiveTexture(int texture); + + /** + *

Reference Page

+ *

+ * Attaches a shader object to a program object. + *

+ *

In order to create a complete shader program, there must be a way to specify the list of things that will be linked together. Program objects provide + * this mechanism. Shaders that are to be linked together in a program object must first be attached to that program object. glAttachShader attaches the + * shader object specified by shader to the program object specified by program. This indicates that shader will be included in link operations that will + * be performed on program.

+ *

+ *

All operations that can be performed on a shader object are valid whether or not the shader object is attached to a program object. It is permissible to + * attach a shader object to a program object before source code has been loaded into the shader object or before the shader object has been compiled. It + * is permissible to attach multiple shader objects of the same type because each may contain a portion of the complete shader. It is also permissible to + * attach a shader object to more than one program object. If a shader object is deleted while it is attached to a program object, it will be flagged for + * deletion, and deletion will not occur until glDetachShader is called to detach it from all program objects to which it is attached.

+ * + * @param program the program object to which a shader object will be attached. + * @param shader the shader object that is to be attached. + */ + void glAttachShader(int program, int shader); + + /** + *

Reference Page

+ *

+ * Creates a query object and makes it active. + * + * @param target the target type of query object established. + * @param query the name of a query object. + */ + void glBeginQuery(int target, int query); + + /** + *

Reference Page

+ *

+ * Binds a named buffer object. + * + * @param target the target to which the buffer object is bound. + * @param buffer the name of a buffer object. + */ + void glBindBuffer(int target, int buffer); + + /** + *

Reference Page

+ *

+ * Binds the a texture to a texture target. + *

+ *

While a texture object is bound, GL operations on the target to which it is bound affect the bound object, and queries of the target to which it is + * bound return state from the bound object. If texture mapping of the dimensionality of the target to which a texture object is bound is enabled, the + * state of the bound texture object directs the texturing operation.

+ * + * @param target the texture target. + * @param texture the texture object to bind. + */ + void glBindTexture(int target, int texture); + + /** + *

Reference Page

+ *

+ * Sets the RGB blend equation and the alpha blend equation separately. + * + * @param colorMode the RGB blend equation, how the red, green, and blue components of the source and destination colors are combined. + * @param alphaMode the alpha blend equation, how the alpha component of the source and destination colors are combined + */ + void glBlendEquationSeparate(int colorMode, int alphaMode); + + /** + *

Reference Page

+ *

+ * Specifies the weighting factors used by the blend equation, for both RGB and alpha functions and for all draw buffers. + * + * @param sfactor the source weighting factor. + * @param dfactor the destination weighting factor. + */ + void glBlendFunc(int sfactor, int dfactor); + + /** + *

Reference Page

+ *

+ * Specifies pixel arithmetic for RGB and alpha components separately. + * + * @param sfactorRGB how the red, green, and blue blending factors are computed. The initial value is GL_ONE. + * @param dfactorRGB how the red, green, and blue destination blending factors are computed. The initial value is GL_ZERO. + * @param sfactorAlpha how the alpha source blending factor is computed. The initial value is GL_ONE. + * @param dfactorAlpha how the alpha destination blending factor is computed. The initial value is GL_ZERO. + */ + void glBlendFuncSeparate(int sfactorRGB, int dfactorRGB, int sfactorAlpha, int dfactorAlpha); + + /** + *

Reference Page

+ *

+ * Creates and initializes a buffer object's data store. + *

+ *

{@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make + * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. + * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The + * frequency of access may be one of these:

+ *

+ *

+ *

+ *

The nature of access may be one of these:

+ *

+ *

+ * + * @param target the target buffer object. + * @param dataSize the size in bytes of the buffer object's new data store + * @param usage the expected usage pattern of the data store. + */ + void glBufferData(int target, long dataSize, int usage); + + /** + *

Reference Page

+ *

+ * Creates and initializes a buffer object's data store. + *

+ *

{@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make + * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. + * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The + * frequency of access may be one of these:

+ *

+ *

+ *

+ *

The nature of access may be one of these:

+ *

+ *

+ * + * @param target the target buffer object. + * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied. + * @param usage the expected usage pattern of the data store. + */ + void glBufferData(int target, FloatBuffer data, int usage); + + /** + *

Reference Page

+ *

+ * Creates and initializes a buffer object's data store. + *

+ *

{@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make + * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. + * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The + * frequency of access may be one of these:

+ *

+ *

+ *

+ *

The nature of access may be one of these:

+ *

+ *

+ * + * @param target the target buffer object. + * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied + * @param usage the expected usage pattern of the data store. + */ + void glBufferData(int target, ShortBuffer data, int usage); + + /** + *

Reference Page

+ *

+ * Creates and initializes a buffer object's data store. + *

+ *

{@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make + * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. + * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The + * frequency of access may be one of these:

+ *

+ *

+ *

+ *

The nature of access may be one of these:

+ *

+ *

+ * + * @param target the target buffer object. + * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied. + * @param usage the expected usage pattern of the data store. + */ + void glBufferData(int target, ByteBuffer data, int usage); + + /** + *

Reference Page

+ *

+ * Updates a subset of a buffer object's data store. + * + * @param target the target buffer object. + * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes. + * @param data a pointer to the new data that will be copied into the data store. + */ + void glBufferSubData(int target, long offset, FloatBuffer data); + + /** + *

Reference Page

+ *

+ * Updates a subset of a buffer object's data store. + * + * @param target the target buffer object. + * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes. + * @param data a pointer to the new data that will be copied into the data store. + */ + void glBufferSubData(int target, long offset, ShortBuffer data); + + /** + *

Reference Page

+ *

+ * Updates a subset of a buffer object's data store. + * + * @param target the target buffer object. + * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes. + * @param data a pointer to the new data that will be copied into the data store. + */ + void glBufferSubData(int target, long offset, ByteBuffer data); + + /** + *

Reference Page

+ *

+ * Sets portions of every pixel in a particular buffer to the same value. The value to which each buffer is cleared depends on the setting of the clear + * value for that buffer. + * + * @param mask Zero or the bitwise OR of one or more values indicating which buffers are to be cleared. + */ + void glClear(int mask); + + /** + *

Reference Page

+ * + * Sets the clear value for fixed-point and floating-point color buffers in RGBA mode. The specified components are stored as floating-point values. + * + * @param red the value to which to clear the R channel of the color buffer. + * @param green the value to which to clear the G channel of the color buffer. + * @param blue the value to which to clear the B channel of the color buffer. + * @param alpha the value to which to clear the A channel of the color buffer. + */ + void glClearColor(float red, float green, float blue, float alpha); + + /** + *

Reference Page

+ * + * Masks the writing of R, G, B and A values to all draw buffers. In the initial state, all color values are enabled for writing for all draw buffers. + * + * @param red whether R values are written or not. + * @param green whether G values are written or not. + * @param blue whether B values are written or not. + * @param alpha whether A values are written or not. + */ + void glColorMask(boolean red, boolean green, boolean blue, boolean alpha); + + /** + *

Reference Page

+ *

+ * Compiles a shader object. + * + * @param shader the shader object to be compiled. + */ + void glCompileShader(int shader); + + /** + *

Reference Page

+ *

+ * Specifies a two-dimensional texture image in a compressed format. + * + * @param target the target texture. + * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. + * @param internalFormat the format of the compressed image data. + * @param width the width of the texture image + * @param height the height of the texture image + * @param border must be 0 + * @param data a pointer to the compressed image data + */ + void glCompressedTexImage2D(int target, int level, int internalFormat, int width, int height, int border, + ByteBuffer data); + + /** + *

Reference Page

+ *

+ * Respecifies only a rectangular subregion of an existing 2D texel array, with incoming data stored in a specific compressed image format. + * + * @param target the target texture. + * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. + * @param xoffset a texel offset in the x direction within the texture array. + * @param yoffset a texel offset in the y direction within the texture array. + * @param width the width of the texture subimage. + * @param height the height of the texture subimage. + * @param format the format of the compressed image data stored at address {@code data}. + * @param data a pointer to the compressed image data. + */ + void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, + ByteBuffer data); + + /** + *

Reference Page

+ *

+ * Creates a program object. + */ + int glCreateProgram(); + + /** + *

Reference Page

+ *

+ * Creates a shader object. + * + * @param shaderType the type of shader to be created. One of:
{@link #GL_VERTEX_SHADER VERTEX_SHADER}{@link #GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL3#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL4#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
{@link GL4#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
+ */ + int glCreateShader(int shaderType); + + /** + *

Reference Page

+ *

+ * Specifies which polygon faces are culled if {@link #GL_CULL_FACE CULL_FACE} is enabled. Front-facing polygons are rasterized if either culling is disabled or the + * CullFace mode is {@link #GL_BACK BACK} while back-facing polygons are rasterized only if either culling is disabled or the CullFace mode is + * {@link #GL_FRONT FRONT}. The initial setting of the CullFace mode is {@link #GL_BACK BACK}. Initially, culling is disabled. + * + * @param mode the CullFace mode. One of:
{@link #GL_FRONT FRONT}{@link #GL_BACK BACK}{@link #GL_FRONT_AND_BACK FRONT_AND_BACK}
+ */ + void glCullFace(int mode); + + /** + *

Reference Page

+ *

+ * Deletes named buffer objects. + * + * @param buffers an array of buffer objects to be deleted. + */ + void glDeleteBuffers(IntBuffer buffers); + + /** + *

Reference Page

+ *

+ * Deletes a program object. + * + * @param program the program object to be deleted. + */ + void glDeleteProgram(int program); + + /** + *

Reference Page

+ *

+ * Deletes a shader object. + * + * @param shader the shader object to be deleted. + */ + void glDeleteShader(int shader); + + /** + *

Reference Page

+ *

+ * Deletes texture objects. After a texture object is deleted, it has no contents or dimensionality, and its name is again unused. If a texture that is + * currently bound to any of the target bindings of {@link #glBindTexture BindTexture} is deleted, it is as though {@link #glBindTexture BindTexture} had been executed with the + * same target and texture zero. Additionally, special care must be taken when deleting a texture if any of the images of the texture are attached to a + * framebuffer object. + *

+ *

Unused names in textures that have been marked as used for the purposes of {@link #glGenTextures GenTextures} are marked as unused again. Unused names in textures are + * silently ignored, as is the name zero.

+ * + * @param textures contains {@code n} names of texture objects to be deleted. + */ + void glDeleteTextures(IntBuffer textures); + + /** + *

Reference Page

+ *

+ * Specifies the comparison that takes place during the depth buffer test (when {@link #GL_DEPTH_TEST DEPTH_TEST} is enabled). + * + * @param func the depth test comparison. One of:
{@link #GL_NEVER NEVER}{@link #GL_ALWAYS ALWAYS}{@link #GL_LESS LESS}{@link #GL_LEQUAL LEQUAL}{@link #GL_EQUAL EQUAL}{@link #GL_GREATER GREATER}{@link #GL_GEQUAL GEQUAL}{@link #GL_NOTEQUAL NOTEQUAL}
+ */ + void glDepthFunc(int func); + + /** + *

Reference Page

+ *

+ * Masks the writing of depth values to the depth buffer. In the initial state, the depth buffer is enabled for writing. + * + * @param flag whether depth values are written or not. + */ + void glDepthMask(boolean flag); + + /** + *

Reference Page

+ *

+ * Sets the depth range for all viewports to the same values. + * + * @param nearVal the near depth range. + * @param farVal the far depth range. + */ + void glDepthRange(double nearVal, double farVal); + + /** + *

Reference Page

+ *

+ * Detaches a shader object from a program object to which it is attached. + * + * @param program the program object from which to detach the shader object. + * @param shader the shader object to be detached. + */ + void glDetachShader(int program, int shader); + + /** + *

Reference Page

+ *

+ * Disables the specified OpenGL state. + * + * @param cap the OpenGL state to disable. + */ + void glDisable(int cap); + + /** + *

Reference Page

+ *

+ * Disables a generic vertex attribute array. + * + * @param index the index of the generic vertex attribute to be disabled. + */ + void glDisableVertexAttribArray(int index); + + /** + *

Reference Page

+ *

+ * Constructs a sequence of geometric primitives by successively transferring elements for {@code count} vertices. Elements {@code first} through + * first + count – 1 of each enabled non-instanced array are transferred to the GL. + *

+ *

If an array corresponding to an attribute required by a vertex shader is not enabled, then the corresponding element is taken from the current attribute + * state. If an array is enabled, the corresponding current vertex attribute value is unaffected by the execution of this function.

+ * + * @param mode the kind of primitives being constructed. + * @param first the first vertex to transfer to the GL. + * @param count the number of vertices after {@code first} to transfer to the GL. + */ + void glDrawArrays(int mode, int first, int count); + + /** + *

Reference Page

+ *

+ *

Implementations denote recommended maximum amounts of vertex and index data, which may be queried by calling glGet with argument + * {@link GL2#GL_MAX_ELEMENTS_VERTICES MAX_ELEMENTS_VERTICES} and {@link GL2#GL_MAX_ELEMENTS_INDICES MAX_ELEMENTS_INDICES}. If end - start + 1 is greater than the value of GL_MAX_ELEMENTS_VERTICES, or if + * count is greater than the value of GL_MAX_ELEMENTS_INDICES, then the call may operate at reduced performance. There is no requirement that all vertices + * in the range start end be referenced. However, the implementation may partially process unused vertices, reducing performance from what could be + * achieved with an optimal index set.

+ *

+ *

When glDrawRangeElements is called, it uses count sequential elements from an enabled array, starting at start to construct a sequence of geometric + * primitives. mode specifies what kind of primitives are constructed, and how the array elements construct these primitives. If more than one array is + * enabled, each is used.

+ *

+ *

Vertex attributes that are modified by glDrawRangeElements have an unspecified value after glDrawRangeElements returns. Attributes that aren't modified + * maintain their previous values.

+ *

+ *

Errors
+ *

+ *

It is an error for indices to lie outside the range start end, but implementations may not check for this situation. Such indices cause + * implementation-dependent behavior.

+ *

+ *

+ * + * @param mode the kind of primitives to render. + * @param start the minimum array index contained in {@code indices}. + * @param end the maximum array index contained in {@code indices}. + * @param count the number of elements to be rendered. + * @param type the type of the values in {@code indices}. + * @param indices a pointer to the location where the indices are stored. + */ + void glDrawRangeElements(int mode, int start, int end, int count, int type, long indices); /// GL2+ + + /** + *

Reference Page

+ *

+ * Enables the specified OpenGL state. + * + * @param cap the OpenGL state to enable. + */ + void glEnable(int cap); + + /** + *

Reference Page

+ *

+ * Enables a generic vertex attribute array. + * + * @param index the index of the generic vertex attribute to be enabled. + */ + void glEnableVertexAttribArray(int index); + + /** + *

Reference Page

+ *

+ * Marks the end of the sequence of commands to be tracked for the active query specified by {@code target}. + * + * @param target the query object target. + */ + void glEndQuery(int target); + + /** + *

Reference Page

+ *

+ * Generates buffer object names. + * + * @param buffers a buffer in which the generated buffer object names are stored. + */ + void glGenBuffers(IntBuffer buffers); + + /** + *

Reference Page

+ *

+ * Returns n previously unused texture names in textures. These names are marked as used, for the purposes of GenTextures only, but they acquire texture + * state and a dimensionality only when they are first bound, just as if they were unused. + * + * @param textures a scalar or buffer in which to place the returned texture names. + */ + void glGenTextures(IntBuffer textures); + + /** + *

Reference Page

+ *

+ * Generates query object names. + * + * @param ids a buffer in which the generated query object names are stored. + */ + void glGenQueries(int number, IntBuffer ids); + + /** + *

Reference Page

+ *

+ * Returns the location of an attribute variable. + * + * @param program the program object to be queried. + * @param name a null terminated string containing the name of the attribute variable whose location is to be queried. + */ + int glGetAttribLocation(int program, String name); + + /** + *

Reference Page

+ *

+ * Returns the current boolean value of the specified state variable. + *

+ *

LWJGL note: The state that corresponds to the state variable may be a single value or an array of values. In the case of an array of values, + * LWJGL will not validate if {@code params} has enough space to store that array. Doing so would introduce significant overhead, as the + * OpenGL state variables are too many. It is the user's responsibility to avoid JVM crashes by ensuring enough space for the returned values.

+ * + * @param pname the state variable. + * @param params a scalar or buffer in which to place the returned data. + */ + void glGetBoolean(int pname, ByteBuffer params); + + /** + *

Reference Page

+ *

+ * Returns a subset of a buffer object's data store. + * + * @param target the target buffer object. + * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes. + * @param data a pointer to the location where buffer object data is returned. + */ + void glGetBufferSubData(int target, long offset, ByteBuffer data); + + /** + *

Reference Page

+ *

+ * Returns error information. Each detectable error is assigned a numeric code. When an error is detected, a flag is set and the code is recorded. Further + * errors, if they occur, do not affect this recorded code. When {@code GetError} is called, the code is returned and the flag is cleared, so that a + * further error will again record its code. If a call to {@code GetError} returns {@link #GL_NO_ERROR NO_ERROR}, then there has been no detectable error since + * the last call to {@code GetError} (or since the GL was initialized). + */ + int glGetError(); + + /** + *

Reference Page

+ *

+ * Returns the current integer value of the specified state variable. + *

+ *

LWJGL note: The state that corresponds to the state variable may be a single value or an array of values. In the case of an array of values, + * LWJGL will not validate if {@code params} has enough space to store that array. Doing so would introduce significant overhead, as the + * OpenGL state variables are too many. It is the user's responsibility to avoid JVM crashes by ensuring enough space for the returned values.

+ * + * @param pname the state variable. + * @param params a scalar or buffer in which to place the returned data. + */ + void glGetInteger(int pname, IntBuffer params); + + /** + *

Reference Page

+ *

+ * Returns a parameter from a program object. + * + * @param program the program object to be queried. + * @param pname the object parameter. + * @param params the requested object parameter. + */ + void glGetProgram(int program, int pname, IntBuffer params); + + /** + *

Reference Page

+ *

+ * Returns the information log for a program object. + * + * @param program the program object whose information log is to be queried. + * @param maxSize the size of the character buffer for storing the returned information log. + */ + String glGetProgramInfoLog(int program, int maxSize); + + /** + * Unsigned version. + * + * @param query the name of a query object + * @param pname the symbolic name of a query object parameter + */ + long glGetQueryObjectui64(int query, int pname); + + /** + *

Reference Page

+ *

+ * Returns the integer value of a query object parameter. + * + * @param query the name of a query object + * @param pname the symbolic name of a query object parameter. One of:
{@link #GL_QUERY_RESULT QUERY_RESULT}{@link #GL_QUERY_RESULT_AVAILABLE QUERY_RESULT_AVAILABLE}
+ */ + int glGetQueryObjectiv(int query, int pname); + + /** + *

Reference Page

+ *

+ * Returns a parameter from a shader object. + * + * @param shader the shader object to be queried. + * @param pname the object parameter. + * @param params the requested object parameter. + */ + void glGetShader(int shader, int pname, IntBuffer params); + + /** + *

Reference Page

+ *

+ * Returns the information log for a shader object. + * + * @param shader the shader object whose information log is to be queried. + * @param maxSize the size of the character buffer for storing the returned information log. + */ + String glGetShaderInfoLog(int shader, int maxSize); + + /** + *

Reference Page

+ *

+ * Return strings describing properties of the current GL context. + * + * @param name the property to query. One of:
{@link #GL_RENDERER RENDERER}{@link #GL_VENDOR VENDOR}{@link #GL_EXTENSIONS EXTENSIONS}{@link #GL_VERSION VERSION}{@link GL2#GL_SHADING_LANGUAGE_VERSION SHADING_LANGUAGE_VERSION}
+ */ + String glGetString(int name); + + /** + *

Reference Page

+ *

+ * Returns the location of a uniform variable. + * + * @param program the program object to be queried. + * @param name a null terminated string containing the name of the uniform variable whose location is to be queried. + */ + int glGetUniformLocation(int program, String name); + + /** + *

Reference Page

+ *

+ * Determines if {@code cap} is currently enabled (as with {@link #glEnable Enable}) or disabled. + * + * @param cap the enable state to query. + */ + boolean glIsEnabled(int cap); + + /** + *

Reference Page

+ * + * Sets the width of rasterized line segments. The default width is 1.0. + * + * @param width the line width. + */ + void glLineWidth(float width); + + /** + *

Reference Page

+ * + * Links a program object. + * + * @param program the program object to be linked. + */ + void glLinkProgram(int program); + + /** + *

Reference Page

+ *

+ * Sets the integer value of a pixel store parameter. + * + * @param pname the pixel store parameter to set. + * @param param the parameter value + */ + void glPixelStorei(int pname, int param); + + /** + *

Reference Page

+ *

+ * The depth values of all fragments generated by the rasterization of a polygon may be offset by a single value that is computed for that polygon. This + * function determines that value. + *

+ *

{@code factor} scales the maximum depth slope of the polygon, and {@code units} scales an implementation-dependent constant that relates to the usable + * resolution of the depth buffer. The resulting values are summed to produce the polygon offset value.

+ * + * @param factor the maximum depth slope factor. + * @param units the constant scale. + */ + void glPolygonOffset(float factor, float units); + + /** + *

Reference Page

+ *

+ * ReadPixels obtains values from the selected read buffer from each pixel with lower left hand corner at {@code (x + i, y + j)} for {@code 0 <= i < width} + * and {@code 0 <= j < height}; this pixel is said to be the ith pixel in the jth row. If any of these pixels lies outside of the + * window allocated to the current GL context, or outside of the image attached to the currently bound read framebuffer object, then the values obtained + * for those pixels are undefined. When {@link GLFbo#GL_READ_FRAMEBUFFER_BINDING_EXT READ_FRAMEBUFFER_BINDING} is zero, values are also undefined for individual pixels that are not owned by + * the current context. Otherwise, {@code ReadPixels} obtains values from the selected buffer, regardless of how those values were placed there. + * + * @param x the left pixel coordinate + * @param y the lower pixel coordinate + * @param width the number of pixels to read in the x-dimension + * @param height the number of pixels to read in the y-dimension + * @param format the pixel format. + * @param type the pixel type. + * @param data a buffer in which to place the returned pixel data. + */ + void glReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer data); + + + /** + *

Reference Page

+ *

+ * ReadPixels obtains values from the selected read buffer from each pixel with lower left hand corner at {@code (x + i, y + j)} for {@code 0 <= i < width} + * and {@code 0 <= j < height}; this pixel is said to be the ith pixel in the jth row. If any of these pixels lies outside of the + * window allocated to the current GL context, or outside of the image attached to the currently bound read framebuffer object, then the values obtained + * for those pixels are undefined. When {@link GLFbo#GL_READ_FRAMEBUFFER_BINDING_EXT READ_FRAMEBUFFER_BINDING} is zero, values are also undefined for individual pixels that are not owned by + * the current context. Otherwise, {@code ReadPixels} obtains values from the selected buffer, regardless of how those values were placed there. + * + * @param x the left pixel coordinate + * @param y the lower pixel coordinate + * @param width the number of pixels to read in the x-dimension + * @param height the number of pixels to read in the y-dimension + * @param format the pixel format. + * @param type the pixel type. + * @param offset a buffer in which to place the returned pixel data/ + */ + void glReadPixels(int x, int y, int width, int height, int format, int type, long offset); + + /** + *

Reference Page

+ *

+ * Defines the scissor rectangle for all viewports. The scissor test is enabled or disabled for all viewports using {@link #glEnable Enable} or {@link #glDisable Disable} + * with the symbolic constant {@link #GL_SCISSOR_TEST SCISSOR_TEST}. When disabled, it is as if the scissor test always passes. When enabled, if + * left <= xw < left + width and bottom <= yw < bottom + height for the scissor rectangle, then the scissor + * test passes. Otherwise, the test fails and the fragment is discarded. + * + * @param x the left scissor rectangle coordinate. + * @param y the bottom scissor rectangle coordinate. + * @param width the scissor rectangle width. + * @param height the scissor rectangle height. + */ + void glScissor(int x, int y, int width, int height); + + /** + *

Reference Page

+ *

+ * Sets the source code in {@code shader} to the source code in the array of strings specified by {@code strings}. Any source code previously stored in the + * shader object is completely replaced. The number of strings in the array is specified by {@code count}. If {@code length} is {@code NULL}, each string is + * assumed to be null terminated. If {@code length} is a value other than {@code NULL}, it points to an array containing a string length for each of the + * corresponding elements of {@code strings}. Each element in the length array may contain the length of the corresponding string (the null character is not + * counted as part of the string length) or a value less than 0 to indicate that the string is null terminated. The source code strings are not scanned or + * parsed at this time; they are simply copied into the specified shader object. + * + * @param shader the shader object whose source code is to be replaced, + * @param strings an array of pointers to strings containing the source code to be loaded into the shader + */ + void glShaderSource(int shader, String[] strings, IntBuffer length); + + /** + *

Reference Page

+ *

+ * Sets front and/or back function and reference value for stencil testing. + * + * @param face whether front and/or back stencil state is updated. One of:
{@link GL#GL_FRONT FRONT}{@link GL#GL_BACK BACK}{@link GL#GL_FRONT_AND_BACK FRONT_AND_BACK}
+ * @param func the test function. The initial value is GL_ALWAYS. One of:
{@link GL#GL_NEVER NEVER}{@link GL#GL_LESS LESS}{@link GL#GL_LEQUAL LEQUAL}{@link GL#GL_GREATER GREATER}{@link GL#GL_GEQUAL GEQUAL}{@link GL#GL_EQUAL EQUAL}{@link GL#GL_NOTEQUAL NOTEQUAL}{@link GL#GL_ALWAYS ALWAYS}
+ * @param ref the reference value for the stencil test. {@code ref} is clamped to the range [0, 2n – 1], where {@code n} is the number of bitplanes in the stencil + * buffer. The initial value is 0. + * @param mask a mask that is ANDed with both the reference value and the stored stencil value when the test is done. The initial value is all 1's. + */ + void glStencilFuncSeparate(int face, int func, int ref, int mask); + + /** + *

Reference Page

+ *

+ * Sets front and/or back stencil test actions. + * + * @param face whether front and/or back stencil state is updated. One of:
{@link GL#GL_FRONT FRONT}{@link GL#GL_BACK BACK}{@link GL#GL_FRONT_AND_BACK FRONT_AND_BACK}
+ * @param sfail the action to take when the stencil test fails. The initial value is GL_KEEP. One of:
{@link GL#GL_KEEP KEEP}{@link GL#GL_ZERO ZERO}{@link GL#GL_REPLACE REPLACE}{@link GL#GL_INCR INCR}{@link GL#GL_INCR_WRAP INCR_WRAP}{@link GL#GL_DECR DECR}{@link GL#GL_DECR_WRAP DECR_WRAP}{@link GL#GL_INVERT INVERT}
+ * @param dpfail the stencil action when the stencil test passes, but the depth test fails. The initial value is GL_KEEP. + * @param dppass the stencil action when both the stencil test and the depth test pass, or when the stencil test passes and either there is no depth buffer or depth + * testing is not enabled. The initial value is GL_KEEP. + */ + void glStencilOpSeparate(int face, int sfail, int dpfail, int dppass); + + /** + *

Reference Page

+ *

+ * Specifies a two-dimensional texture image. + * + * @param target the texture target. + * @param level the level-of-detail number. + * @param internalFormat the texture internal format. + * @param width the texture width. + * @param height the texture height. + * @param border the texture border width. + * @param format the texel data format. + * @param type the texel data type. + * @param data the texel data. + */ + void glTexImage2D(int target, int level, int internalFormat, int width, int height, int border, int format, + int type, ByteBuffer data); + + /** + *

Reference Page

+ *

+ * Float version of {@link #glTexParameteri TexParameteri}. + * + * @param target the texture target. + * @param pname the parameter to set. + * @param param the parameter value. + */ + void glTexParameterf(int target, int pname, float param); + + /** + *

Reference Page

+ *

+ * Sets the integer value of a texture parameter, which controls how the texel array is treated when specified or changed, and when applied to a fragment. + * + * @param target the texture target. + * @param pname the parameter to set. + * @param param the parameter value. + */ + void glTexParameteri(int target, int pname, int param); + + /** + *

Reference Page

+ *

+ * Respecifies a rectangular subregion of an existing texel array. No change is made to the internalformat, width, height, depth, or border parameters of + * the specified texel array, nor is any change made to texel values outside the specified subregion. + * + * @param target the texture target. + * @param level the level-of-detail-number + * @param xoffset the left coordinate of the texel subregion + * @param yoffset the bottom coordinate of the texel subregion + * @param width the subregion width + * @param height the subregion height + * @param format the pixel data format. + * @param type the pixel data type. + * @param data the pixel data. + */ + void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, + ByteBuffer data); + + /** + *

Reference Page

+ *

+ * Specifies the value of a single float uniform variable or a float uniform variable array for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable. + */ + void glUniform1(int location, FloatBuffer value); + + /** + *

Reference Page

+ *

+ * Specifies the value of a single int uniform variable or a int uniform variable array for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable. + */ + void glUniform1(int location, IntBuffer value); + + /** + *

Reference Page

+ *

+ * Specifies the value of a float uniform variable for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param v0 the uniform value. + */ + void glUniform1f(int location, float v0); + + /** + *

Reference Page

+ *

+ * Specifies the value of an int uniform variable for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param v0 the uniform value. + */ + void glUniform1i(int location, int v0); + + /** + *

Reference Page

+ *

+ * Specifies the value of a single ivec2 uniform variable or an ivec2 uniform variable array for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable. + */ + void glUniform2(int location, IntBuffer value); + + /** + *

Reference Page

+ *

+ * Specifies the value of a single vec2 uniform variable or a vec2 uniform variable array for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable. + */ + void glUniform2(int location, FloatBuffer value); + + /** + *

Reference Page

+ *

+ * Specifies the value of a vec2 uniform variable for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param v0 the uniform x value. + * @param v1 the uniform y value. + */ + void glUniform2f(int location, float v0, float v1); + + /** + *

Reference Page

+ *

+ * Specifies the value of a single ivec3 uniform variable or an ivec3 uniform variable array for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable. + */ + void glUniform3(int location, IntBuffer value); + + /** + *

Reference Page

+ *

+ * Specifies the value of a single vec3 uniform variable or a vec3 uniform variable array for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable. + */ + void glUniform3(int location, FloatBuffer value); + + /** + *

Reference Page

+ *

+ * Specifies the value of a vec3 uniform variable for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param v0 the uniform x value. + * @param v1 the uniform y value. + * @param v2 the uniform z value. + */ + void glUniform3f(int location, float v0, float v1, float v2); + + /** + *

Reference Page

+ *

+ * Specifies the value of a single vec4 uniform variable or a vec4 uniform variable array for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable. + */ + void glUniform4(int location, FloatBuffer value); + + /** + *

Reference Page

+ *

+ * Specifies the value of a single ivec4 uniform variable or an ivec4 uniform variable array for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable. + */ + void glUniform4(int location, IntBuffer value); + + /** + *

Reference Page

+ *

+ * Specifies the value of a vec4 uniform variable for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param v0 the uniform x value. + * @param v1 the uniform y value. + * @param v2 the uniform z value. + * @param v3 the uniform w value. + */ + void glUniform4f(int location, float v0, float v1, float v2, float v3); + + /** + *

Reference Page

+ *

+ * Specifies the value of a single mat3 uniform variable or a mat3 uniform variable array for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable. + * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable. + */ + void glUniformMatrix3(int location, boolean transpose, FloatBuffer value); + + /** + *

Reference Page

+ *

+ * Specifies the value of a single mat4 uniform variable or a mat4 uniform variable array for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable. + * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable. + */ + void glUniformMatrix4(int location, boolean transpose, FloatBuffer value); + + /** + *

Reference Page

+ *

+ * Installs a program object as part of current rendering state. + * + * @param program the program object whose executables are to be used as part of current rendering state. + */ + void glUseProgram(int program); + + /** + *

Reference Page

+ *

+ * Specifies the location and organization of a vertex attribute array. + * + * @param index the index of the generic vertex attribute to be modified + * @param size the number of values per vertex that are stored in the array. + * @param type the data type of each component in the array. The initial value is GL_FLOAT. + * @param normalized whether fixed-point data values should be normalized or converted directly as fixed-point values when they are accessed + * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in + * the array. The initial value is 0. + * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer + * currently bound to the {@link GL#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. + */ + void glVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, long pointer); + + /** + *

Reference Page

+ *

+ * Specifies the viewport transformation parameters for all viewports. + *

+ *

In the initial state, {@code width} and {@code height} for each viewport are set to the width and height, respectively, of the window into which the GL is to do + * its rendering. If the default framebuffer is bound but no default framebuffer is associated with the GL context, then {@code width} and {@code height} are + * initially set to zero.

+ * + * @param x the left viewport coordinate. + * @param y the bottom viewport coordinate. + * @param width the viewport width. + * @param height the viewport height. + */ + void glViewport(int x, int y, int width, int height); } diff --git a/jme3-core/src/main/java/com/jme3/renderer/opengl/GL2.java b/jme3-core/src/main/java/com/jme3/renderer/opengl/GL2.java index 8f7bb2f84..fbd6e088d 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/opengl/GL2.java +++ b/jme3-core/src/main/java/com/jme3/renderer/opengl/GL2.java @@ -35,11 +35,11 @@ import java.nio.ByteBuffer; /** * GL functions only available on vanilla desktop OpenGL 2. - * + * * @author Kirill Vainer */ public interface GL2 extends GL { - + public static final int GL_ALPHA8 = 0x803C; public static final int GL_ALPHA_TEST = 0xBC0; public static final int GL_BGR = 0x80E0; @@ -50,10 +50,11 @@ public interface GL2 extends GL { public static final int GL_DEPTH_TEXTURE_MODE = 0x884B; public static final int GL_DOUBLEBUFFER = 0xC32; public static final int GL_DRAW_BUFFER = 0xC01; + public static final int GL_POINT = 0x1B00; + public static final int GL_LINE = 0x1B01; public static final int GL_FILL = 0x1B02; public static final int GL_GENERATE_MIPMAP = 0x8191; public static final int GL_INTENSITY = 0x8049; - public static final int GL_LINE = 0x1B01; public static final int GL_LUMINANCE8 = 0x8040; public static final int GL_LUMINANCE8_ALPHA8 = 0x8045; public static final int GL_MAX_ELEMENTS_INDICES = 0x80E9; @@ -73,14 +74,133 @@ public interface GL2 extends GL { public static final int GL_TEXTURE_WRAP_R = 0x8072; public static final int GL_VERTEX_PROGRAM_POINT_SIZE = 0x8642; public static final int GL_UNSIGNED_INT_8_8_8_8 = 0x8035; - + + /** + *

Reference Page - This function is deprecated and unavailable in the Core profile

+ * + * The alpha test discards a fragment conditionally based on the outcome of a comparison between the incoming fragment’s alpha value and a constant value. + * The comparison is enabled or disabled with the generic {@link #glEnable Enable} and {@link #glDisable Disable} commands using the symbolic constant {@link #GL_ALPHA_TEST ALPHA_TEST}. + * When disabled, it is as if the comparison always passes. The test is controlled with this method. + * + * @param func a symbolic constant indicating the alpha test function. One of:
{@link #GL_NEVER NEVER}{@link #GL_ALWAYS ALWAYS}{@link #GL_LESS LESS}{@link #GL_LEQUAL LEQUAL}{@link #GL_EQUAL EQUAL}{@link #GL_GEQUAL GEQUAL}{@link #GL_GREATER GREATER}{@link #GL_NOTEQUAL NOTEQUAL}
+ * @param ref a reference value clamped to the range [0, 1]. When performing the alpha test, the GL will convert the reference value to the same representation as the fragment's alpha value (floating-point or fixed-point). + */ public void glAlphaFunc(int func, float ref); + + /** + *

Reference Page

+ *

+ * Controls the rasterization of points if no vertex, tessellation control, tessellation evaluation, or geometry shader is active. The default point size is 1.0. + * + * @param size the request size of a point. + */ public void glPointSize(float size); + + /** + *

Reference Page

+ * + * Controls the interpretation of polygons for rasterization. + * + *

{@link #GL_FILL FILL} is the default mode of polygon rasterization. Note that these modes affect only the final rasterization of polygons: in particular, a + * polygon's vertices are lit, and the polygon is clipped and possibly culled before these modes are applied. Polygon antialiasing applies only to the + * {@link #GL_FILL FILL} state of PolygonMode. For {@link #GL_POINT POINT} or {@link #GL_LINE LINE}, point antialiasing or line segment antialiasing, respectively, apply.

+ * + * @param face the face for which to set the rasterizing method. One of:
{@link #GL_FRONT FRONT}{@link #GL_BACK BACK}{@link #GL_FRONT_AND_BACK FRONT_AND_BACK}
+ * @param mode the rasterization mode. One of:
{@link #GL_POINT POINT}{@link #GL_LINE LINE}{@link #GL_FILL FILL}
+ */ public void glPolygonMode(int face, int mode); + + /** + *

Reference Page

+ *

+ * Defines the color buffer to which fragment color zero is written. + * + * @param mode the color buffer to draw to. + */ public void glDrawBuffer(int mode); + + /** + *

Reference Page

+ *

+ * Defines the color buffer from which values are obtained. + * + * @param mode the color buffer to read from. + */ public void glReadBuffer(int mode); - public void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, ByteBuffer data); - public void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, ByteBuffer data); - public void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, ByteBuffer data); - public void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ByteBuffer data); + + /** + *

Reference Page

+ *

+ * Specifies a three-dimensional texture image in a compressed format. + * + * @param target the target texture. + * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. + * @param internalFormat the format of the compressed image data. + * @param width the width of the texture image + * @param height the height of the texture image + * @param depth the depth of the texture image + * @param border must be 0 + * @param data a pointer to the compressed image data + */ + public void glCompressedTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, + int border, ByteBuffer data); + + /** + *

Reference Page

+ *

+ * Respecifies only a cubic subregion of an existing 3D texel array, with incoming data stored in a specific compressed image format. + * + * @param target the target texture. + * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. + * @param xoffset a texel offset in the x direction within the texture array. + * @param yoffset a texel offset in the y direction within the texture array. + * @param zoffset a texel offset in the z direction within the texture array. + * @param width the width of the texture subimage. + * @param height the height of the texture subimage. + * @param depth the depth of the texture subimage. + * @param format the format of the compressed image data stored at address {@code data}. + * @param data a pointer to the compressed image data. + */ + public void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, ByteBuffer data); + + /** + *

Reference Page

+ *

+ * Specifies a three-dimensional texture image. + * + * @param target the texture target. + * @param level the level-of-detail number. + * @param internalFormat the texture internal format. + * @param width the texture width. + * @param height the texture height. + * @param depth the texture depth. + * @param border the texture border width. + * @param format the texel data format. + * @param type the texel data type. + * @param data the texel data. + */ + public void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, + int format, int type, ByteBuffer data); + + /** + *

Reference Page

+ *

+ * Respecifies a cubic subregion of an existing 3D texel array. No change is made to the internalformat, width, height, depth, or border parameters of + * the specified texel array, nor is any change made to texel values outside the specified subregion. + * + * @param target the texture target. + * @param level the level-of-detail-number. + * @param xoffset the x coordinate of the texel subregion. + * @param yoffset the y coordinate of the texel subregion. + * @param zoffset the z coordinate of the texel subregion. + * @param width the subregion width. + * @param height the subregion height. + * @param depth the subregion depth. + * @param format the pixel data format. + * @param type the pixel data type. + * @param data the pixel data. + */ + public void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, + int depth, int format, int type, ByteBuffer data); } diff --git a/jme3-core/src/main/java/com/jme3/renderer/opengl/GL3.java b/jme3-core/src/main/java/com/jme3/renderer/opengl/GL3.java index b3e112545..595f5ff85 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/opengl/GL3.java +++ b/jme3-core/src/main/java/com/jme3/renderer/opengl/GL3.java @@ -65,7 +65,7 @@ public interface GL3 extends GL2 { public static final int GL_RG16I = 33337; public static final int GL_RG16UI = 33338; public static final int GL_RG32I = 33339; - public static final int GL_RG32UI = 33340; + public static final int GL_RG32UI = 33340; public static final int GL_RGBA32UI = 36208; public static final int GL_RGB32UI = 36209; public static final int GL_RGBA16UI = 36214; @@ -82,10 +82,50 @@ public interface GL3 extends GL2 { public static final int GL_RG_INTEGER = 33320; public static final int GL_RGB_INTEGER = 36248; public static final int GL_RGBA_INTEGER = 36249; - - public void glBindFragDataLocation(int param1, int param2, String param3); /// GL3+ - public void glBindVertexArray(int param1); /// GL3+ + + /** + *

Reference Page

+ *

+ * Binds a user-defined varying out variable to a fragment shader color number. + * + * @param program the name of the program containing varying out variable whose binding to modify. + * @param colorNumber the color number to bind the user-defined varying out variable to. + * @param name the name of the user-defined varying out variable whose binding to modify. + */ + public void glBindFragDataLocation(int program, int colorNumber, String name); /// GL3+ + + /** + *

Reference Page

+ *

+ * Binds a vertex array object + * + * @param array the name of the vertex array to bind. + */ + public void glBindVertexArray(int array); /// GL3+ + + /** + * Deletes vertex array objects. + * + * @param arrays an array containing the n names of the objects to be deleted. + */ public void glDeleteVertexArrays(IntBuffer arrays); /// GL3+ - public void glGenVertexArrays(IntBuffer param1); /// GL3+ - public String glGetString(int param1, int param2); /// GL3+ + + /** + *

Reference Page

+ * + * Generates vertex array object names. + * + * @param arrays a buffer in which the generated vertex array object names are stored. + */ + public void glGenVertexArrays(IntBuffer arrays); /// GL3+ + + /** + *

Reference Page

+ *

+ * Queries indexed string state. + * + * @param name the indexed state to query. One of:
{@link GL#GL_EXTENSIONS EXTENSIONS}{@link GL2#GL_SHADING_LANGUAGE_VERSION SHADING_LANGUAGE_VERSION}
+ * @param index the index of the particular element being queried. + */ + public String glGetString(int name, int index); /// GL3+ } diff --git a/jme3-core/src/main/java/com/jme3/renderer/opengl/GL4.java b/jme3-core/src/main/java/com/jme3/renderer/opengl/GL4.java index 058bc00ec..9afe4755b 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/opengl/GL4.java +++ b/jme3-core/src/main/java/com/jme3/renderer/opengl/GL4.java @@ -31,16 +31,23 @@ */ package com.jme3.renderer.opengl; -import java.nio.IntBuffer; - /** * GL functions only available on vanilla desktop OpenGL 4.0. * * @author Kirill Vainer */ public interface GL4 extends GL3 { - public static final int GL_TESS_CONTROL_SHADER=0x8E88; - public static final int GL_TESS_EVALUATION_SHADER=0x8E87; - public static final int GL_PATCHES=0xE; + + public static final int GL_TESS_CONTROL_SHADER = 0x8E88; + public static final int GL_TESS_EVALUATION_SHADER = 0x8E87; + public static final int GL_PATCHES = 0xE; + + /** + *

Reference Page

+ *

+ * Specifies the integer value of the specified parameter for patch primitives. + * + * @param count the new value for the parameter given by {@code pname} + */ public void glPatchParameter(int count); } diff --git a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLExt.java b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLExt.java index c6d420cc7..642ac0c71 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLExt.java +++ b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLExt.java @@ -36,81 +36,200 @@ import java.nio.IntBuffer; /** * GL functions provided by extensions. - * + *

* Always must check against a renderer capability prior to using those. - * + * * @author Kirill Vainer */ public interface GLExt { - public static final int GL_ALREADY_SIGNALED = 0x911A; - public static final int GL_COMPRESSED_RGB8_ETC2 = 0x9274; - public static final int GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1; - public static final int GL_COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2; - public static final int GL_COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3; - public static final int GL_COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0; - public static final int GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = 0x8C4D; - public static final int GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT = 0x8C4E; - public static final int GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = 0x8C4F; - public static final int GL_COMPRESSED_SRGB_S3TC_DXT1_EXT = 0x8C4C; - public static final int GL_CONDITION_SATISFIED = 0x911C; - public static final int GL_DEPTH_COMPONENT32F = 0x8CAC; - public static final int GL_DEPTH24_STENCIL8_EXT = 0x88F0; - public static final int GL_DEPTH_STENCIL_EXT = 0x84F9; - public static final int GL_ETC1_RGB8_OES = 0x8D64; - public static final int GL_FRAMEBUFFER_SRGB_CAPABLE_EXT = 0x8DBA; - public static final int GL_FRAMEBUFFER_SRGB_EXT = 0x8DB9; - public static final int GL_HALF_FLOAT_ARB = 0x140B; - public static final int GL_HALF_FLOAT_OES = 0x8D61; - public static final int GL_LUMINANCE16F_ARB = 0x881E; - public static final int GL_LUMINANCE32F_ARB = 0x8818; - public static final int GL_LUMINANCE_ALPHA16F_ARB = 0x881F; - public static final int GL_MAX_COLOR_TEXTURE_SAMPLES = 0x910E; - public static final int GL_MAX_DEPTH_TEXTURE_SAMPLES = 0x910F; - public static final int GL_MAX_DRAW_BUFFERS_ARB = 0x8824; - public static final int GL_MAX_SAMPLES_EXT = 0x8D57; - public static final int GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF; - public static final int GL_MULTISAMPLE_ARB = 0x809D; - public static final int GL_NUM_PROGRAM_BINARY_FORMATS = 0x87FE; - public static final int GL_PIXEL_PACK_BUFFER_ARB = 0x88EB; - public static final int GL_PIXEL_UNPACK_BUFFER_ARB = 0x88EC; - public static final int GL_R11F_G11F_B10F_EXT = 0x8C3A; - public static final int GL_RGBA8 = 0x8058; - public static final int GL_RGB16F_ARB = 0x881B; - public static final int GL_RGB32F_ARB = 0x8815; - public static final int GL_RGB9_E5_EXT = 0x8C3D; - public static final int GL_RGBA16F_ARB = 0x881A; - public static final int GL_RGBA32F_ARB = 0x8814; - public static final int GL_SAMPLES_ARB = 0x80A9; - public static final int GL_SAMPLE_ALPHA_TO_COVERAGE_ARB = 0x809E; - public static final int GL_SAMPLE_BUFFERS_ARB = 0x80A8; - public static final int GL_SAMPLE_POSITION = 0x8E50; - public static final int GL_SLUMINANCE8_ALPHA8_EXT = 0x8C45; - public static final int GL_SLUMINANCE8_EXT = 0x8C47; - public static final int GL_SRGB8_ALPHA8_EXT = 0x8C43; - public static final int GL_SRGB8_EXT = 0x8C41; - public static final int GL_SYNC_FLUSH_COMMANDS_BIT = 0x1; - public static final int GL_SYNC_GPU_COMMANDS_COMPLETE = 0x9117; - public static final int GL_TEXTURE_2D_ARRAY_EXT = 0x8C1A; - public static final int GL_TEXTURE_2D_MULTISAMPLE = 0x9100; - public static final int GL_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9102; - public static final int GL_TEXTURE_CUBE_MAP_SEAMLESS = 0x884F; - public static final int GL_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE; - public static final int GL_TIMEOUT_EXPIRED = 0x911B; - public static final int GL_UNSIGNED_INT_10F_11F_11F_REV_EXT = 0x8C3B; - public static final int GL_UNSIGNED_INT_24_8_EXT = 0x84FA; - public static final int GL_UNSIGNED_INT_5_9_9_9_REV_EXT = 0x8C3E; - public static final int GL_WAIT_FAILED = 0x911D; + public static final int GL_ALREADY_SIGNALED = 0x911A; + public static final int GL_COMPRESSED_RGB8_ETC2 = 0x9274; + public static final int GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1; + public static final int GL_COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2; + public static final int GL_COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3; + public static final int GL_COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0; + public static final int GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = 0x8C4D; + public static final int GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT = 0x8C4E; + public static final int GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = 0x8C4F; + public static final int GL_COMPRESSED_SRGB_S3TC_DXT1_EXT = 0x8C4C; + public static final int GL_CONDITION_SATISFIED = 0x911C; + public static final int GL_DEPTH_COMPONENT32F = 0x8CAC; + public static final int GL_DEPTH24_STENCIL8_EXT = 0x88F0; + public static final int GL_DEPTH_STENCIL_EXT = 0x84F9; + public static final int GL_ETC1_RGB8_OES = 0x8D64; + public static final int GL_FRAMEBUFFER_SRGB_CAPABLE_EXT = 0x8DBA; + public static final int GL_FRAMEBUFFER_SRGB_EXT = 0x8DB9; + public static final int GL_HALF_FLOAT_ARB = 0x140B; + public static final int GL_HALF_FLOAT_OES = 0x8D61; + public static final int GL_LUMINANCE16F_ARB = 0x881E; + public static final int GL_LUMINANCE32F_ARB = 0x8818; + public static final int GL_LUMINANCE_ALPHA16F_ARB = 0x881F; + public static final int GL_MAX_COLOR_TEXTURE_SAMPLES = 0x910E; + public static final int GL_MAX_DEPTH_TEXTURE_SAMPLES = 0x910F; + public static final int GL_MAX_DRAW_BUFFERS_ARB = 0x8824; + public static final int GL_MAX_SAMPLES_EXT = 0x8D57; + public static final int GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF; + public static final int GL_MULTISAMPLE_ARB = 0x809D; + public static final int GL_NUM_PROGRAM_BINARY_FORMATS = 0x87FE; + public static final int GL_PIXEL_PACK_BUFFER_ARB = 0x88EB; + public static final int GL_PIXEL_UNPACK_BUFFER_ARB = 0x88EC; + public static final int GL_R11F_G11F_B10F_EXT = 0x8C3A; + public static final int GL_RGBA8 = 0x8058; + public static final int GL_RGB16F_ARB = 0x881B; + public static final int GL_RGB32F_ARB = 0x8815; + public static final int GL_RGB9_E5_EXT = 0x8C3D; + public static final int GL_RGBA16F_ARB = 0x881A; + public static final int GL_RGBA32F_ARB = 0x8814; + public static final int GL_SAMPLES_ARB = 0x80A9; + public static final int GL_SAMPLE_ALPHA_TO_COVERAGE_ARB = 0x809E; + public static final int GL_SAMPLE_BUFFERS_ARB = 0x80A8; + public static final int GL_SAMPLE_POSITION = 0x8E50; + public static final int GL_SLUMINANCE8_ALPHA8_EXT = 0x8C45; + public static final int GL_SLUMINANCE8_EXT = 0x8C47; + public static final int GL_SRGB8_ALPHA8_EXT = 0x8C43; + public static final int GL_SRGB8_EXT = 0x8C41; + public static final int GL_SYNC_FLUSH_COMMANDS_BIT = 0x1; + public static final int GL_SYNC_GPU_COMMANDS_COMPLETE = 0x9117; + public static final int GL_TEXTURE_2D_ARRAY_EXT = 0x8C1A; + public static final int GL_TEXTURE_2D_MULTISAMPLE = 0x9100; + public static final int GL_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9102; + public static final int GL_TEXTURE_CUBE_MAP_SEAMLESS = 0x884F; + public static final int GL_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE; + public static final int GL_TIMEOUT_EXPIRED = 0x911B; + public static final int GL_UNSIGNED_INT_10F_11F_11F_REV_EXT = 0x8C3B; + public static final int GL_UNSIGNED_INT_24_8_EXT = 0x84FA; + public static final int GL_UNSIGNED_INT_5_9_9_9_REV_EXT = 0x8C3E; + public static final int GL_WAIT_FAILED = 0x911D; + + /** + *

Reference Page

+ *

+ * Creates and initializes a buffer object's data store. + *

+ *

{@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make + * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. + * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The + * frequency of access may be one of these:

+ *

+ *

+ *

+ *

The nature of access may be one of these:

+ *

+ *

+ * + * @param target the target buffer object. + * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied. + * @param usage the expected usage pattern of the data store. + */ + public void glBufferData(int target, IntBuffer data, int usage); + + /** + *

Reference Page

+ *

+ * Updates a subset of a buffer object's data store. + * + * @param target the target buffer object. + * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes. + * @param data a pointer to the new data that will be copied into the data store. + */ + public void glBufferSubData(int target, long offset, IntBuffer data); + + /** + * Causes the client to block and wait for a sync object to become signaled. If {@code sync} is signaled when {@code glClientWaitSync} is called, + * {@code glClientWaitSync} returns immediately, otherwise it will block and wait for up to timeout nanoseconds for {@code sync} to become signaled. + * + * @param sync the sync object whose status to wait on. + * @param flags a bitfield controlling the command flushing behavior. + * @param timeout the timeout, specified in nanoseconds, for which the implementation should wait for {@code sync} to become signaled. + * @return the status is one of ALREADY_SIGNALED, TIMEOUT_EXPIRED, CONDITION_SATISFIED or WAIT_FAILED. + */ + public int glClientWaitSync(Object sync, int flags, long timeout); + + /** + * Deletes a sync object. + * + * @param sync the sync object to be deleted. + */ + public void glDeleteSync(Object sync); + + /** + * Draw multiple instances of a range of elements. + * + * @param mode the kind of primitives to render. + * @param first the starting index in the enabled arrays. + * @param count the number of indices to be rendered. + * @param primCount the number of instances of the specified range of indices to be rendered. + */ + public void glDrawArraysInstancedARB(int mode, int first, int count, int primCount); + + /** + *

Reference Page

+ *

+ * Specifies a list of color buffers to be drawn into. + * + * @param bufs an array of symbolic constants specifying the buffers into which fragment colors or data values will be written. + */ + public void glDrawBuffers(IntBuffer bufs); + + /** + * Draws multiple instances of a set of elements. + * + * @param mode the kind of primitives to render. + * @param indicesCount the number of elements to be rendered. + * @param type the type of the values in {@code indices}. + * @param indicesBufferOffset a pointer to the location where the indices are stored. + * @param primCount the number of instances of the specified range of indices to be rendered. + */ + public void glDrawElementsInstancedARB(int mode, int indicesCount, int type, long indicesBufferOffset, int primCount); + + /** + * Creates a new sync object and inserts it into the GL command stream. + * + * @param condition the condition that must be met to set the sync object's state to signaled. + * @param flags a bitwise combination of flags controlling the behavior of the sync object. No flags are presently defined for this operation and {@code flags} must be zero. + */ + public Object glFenceSync(int condition, int flags); + + /** + * Retrieves the location of a sample. + * + * @param pname the sample parameter name. + * @param index the index of the sample whose position to query. + * @param val an array to receive the position of the sample. + */ + public void glGetMultisample(int pname, int index, FloatBuffer val); + + /** + * Establishes the data storage, format, dimensions, and number of samples of a 2D multisample texture's image. + * + * @param target the target of the operation. + * @param samples the number of samples in the multisample texture's image + * @param internalFormat the internal format to be used to store the multisample texture's image. {@code internalformat} must specify a color-renderable, depth-renderable, + * or stencil-renderable format. + * @param width the width of the multisample texture's image, in texels + * @param height the height of the multisample texture's image, in texels + * @param fixedSampleLocations whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not + * depend on the internal format or size of the image + */ + public void glTexImage2DMultisample(int target, int samples, int internalFormat, int width, int height, + boolean fixedSampleLocations); - public void glBufferData(int target, IntBuffer data, int usage); - public void glBufferSubData(int target, long offset, IntBuffer data); - public int glClientWaitSync(Object sync, int flags, long timeout); - public void glDeleteSync(Object sync); - public void glDrawArraysInstancedARB(int mode, int first, int count, int primcount); - public void glDrawBuffers(IntBuffer bufs); - public void glDrawElementsInstancedARB(int mode, int indices_count, int type, long indices_buffer_offset, int primcount); - public Object glFenceSync(int condition, int flags); - public void glGetMultisample(int pname, int index, FloatBuffer val); - public void glTexImage2DMultisample(int target, int samples, int internalformat, int width, int height, boolean fixedsamplelocations); - public void glVertexAttribDivisorARB(int index, int divisor); + /** + * Modifies the rate at which generic vertex attributes advance when rendering multiple instances of primitives in a single draw call. If {@code divisor} + * is zero, the attribute at slot {@code index} advances once per vertex. If {@code divisor} is non-zero, the attribute advances once per {@code divisor} + * instances of the set(s) of vertices being rendered. An attribute is referred to as {@code instanced} if its {@code divisor} value is non-zero. + * + * @param index the attribute index. + * @param divisor the divisor value. + */ + public void glVertexAttribDivisorARB(int index, int divisor); } diff --git a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLFbo.java b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLFbo.java index 97a579203..e049f7dfc 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLFbo.java +++ b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLFbo.java @@ -34,15 +34,15 @@ package com.jme3.renderer.opengl; import java.nio.IntBuffer; /** - * Framebuffer object functions. - * - * Available by default in OpenGL ES 2, but on desktop GL 2 + * Framebuffer object functions. + *

+ * Available by default in OpenGL ES 2, but on desktop GL 2 * an extension is required. - * + * * @author Kirill Vainer */ public interface GLFbo { - + public static final int GL_COLOR_ATTACHMENT0_EXT = 0x8CE0; public static final int GL_COLOR_ATTACHMENT1_EXT = 0x8CE1; public static final int GL_COLOR_ATTACHMENT2_EXT = 0x8CE2; @@ -80,19 +80,33 @@ public interface GLFbo { public static final int GL_READ_FRAMEBUFFER_BINDING_EXT = 0x8CAA; public static final int GL_READ_FRAMEBUFFER_EXT = 0x8CA8; public static final int GL_RENDERBUFFER_EXT = 0x8D41; - - public void glBindFramebufferEXT(int param1, int param2); - public void glBindRenderbufferEXT(int param1, int param2); - public void glBlitFramebufferEXT(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, int mask, int filter); - public int glCheckFramebufferStatusEXT(int param1); - public void glDeleteFramebuffersEXT(IntBuffer param1); - public void glDeleteRenderbuffersEXT(IntBuffer param1); - public void glFramebufferRenderbufferEXT(int param1, int param2, int param3, int param4); - public void glFramebufferTexture2DEXT(int param1, int param2, int param3, int param4, int param5); + + public void glBindFramebufferEXT(int target, int frameBuffer); + + public void glBindRenderbufferEXT(int target, int renderBuffer); + + public void glBlitFramebufferEXT(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, + int dstY1, int mask, int filter); + + public int glCheckFramebufferStatusEXT(int target); + + public void glDeleteFramebuffersEXT(IntBuffer frameBuffers); + + public void glDeleteRenderbuffersEXT(IntBuffer renderBuffers); + + public void glFramebufferRenderbufferEXT(int target, int attachment, int renderBufferTarget, int renderBuffer); + + public void glFramebufferTexture2DEXT(int target, int attachment, int texTarget, int texture, int level); + public void glFramebufferTextureLayerEXT(int target, int attachment, int texture, int level, int layer); - public void glGenFramebuffersEXT(IntBuffer param1); - public void glGenRenderbuffersEXT(IntBuffer param1); - public void glGenerateMipmapEXT(int param1); - public void glRenderbufferStorageEXT(int param1, int param2, int param3, int param4); - public void glRenderbufferStorageMultisampleEXT(int target, int samples, int internalformat, int width, int height); + + public void glGenFramebuffersEXT(IntBuffer frameBuffers); + + public void glGenRenderbuffersEXT(IntBuffer renderBuffers); + + public void glGenerateMipmapEXT(int target); + + public void glRenderbufferStorageEXT(int target, int internalFormat, int width, int height); + + public void glRenderbufferStorageMultisampleEXT(int target, int samples, int internalFormat, int width, int height); }