refactored core interfaces.

monkanim
javasabr 7 years ago committed by Rémy Bouquet
parent f40ba25a56
commit 28353cf747
  1. 325
      jme3-core/src/main/java/com/jme3/audio/openal/AL.java
  2. 89
      jme3-core/src/main/java/com/jme3/audio/openal/ALC.java
  3. 1398
      jme3-core/src/main/java/com/jme3/audio/openal/EFX.java
  4. 1495
      jme3-core/src/main/java/com/jme3/renderer/opengl/GL.java
  5. 130
      jme3-core/src/main/java/com/jme3/renderer/opengl/GL2.java
  6. 48
      jme3-core/src/main/java/com/jme3/renderer/opengl/GL3.java
  7. 17
      jme3-core/src/main/java/com/jme3/renderer/opengl/GL4.java
  8. 259
      jme3-core/src/main/java/com/jme3/renderer/opengl/GLExt.java
  9. 42
      jme3-core/src/main/java/com/jme3/renderer/opengl/GLFbo.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.
* <p>
* <p>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).</p>
* <p>
* <p>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.</p>
*/
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.
* <p>
* <p>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.</p>
*
* @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.
* <p>
* <p>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.</p>
* <p>
* <p>8-bit data is expressed as an unsigned value over the range 0 to 255, 128 being an audio output level of zero.</p>
* <p>
* <p>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.</p>
* <p>
* <p>Stereo data is expressed in an interleaved format, left channel sample followed by the right channel sample.</p>
* <p>
* <p>Buffers containing audio data with more than one channel will be played without 3D spatialization features these formats are normally used for
* background music.</p>
*
* @param buffer the buffer to modify.
* @param format the data format. One of:<br><table><tr><td>{@link #AL_FORMAT_MONO8 FORMAT_MONO8}</td><td>{@link #AL_FORMAT_MONO16 FORMAT_MONO16}</td><td>{@link #AL_FORMAT_STEREO8 FORMAT_STEREO8}</td><td>{@link #AL_FORMAT_STEREO16 FORMAT_STEREO16}</td></tr></table>
* @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.
* <p>
* <p>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.</p>
*
* @param source the source to play.
*/
public void alSourcePlay(int source);
/**
* Sets the source state to AL_PAUSED.
* <p>
* <p>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.</p>
*
* @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:<br><table><tr><td>{@link #AL_CONE_INNER_ANGLE CONE_INNER_ANGLE}</td><td>{@link #AL_CONE_OUTER_ANGLE CONE_OUTER_ANGLE}</td><td>{@link #AL_PITCH PITCH}</td><td>{@link #AL_DIRECTION DIRECTION}</td><td>{@link #AL_LOOPING LOOPING}</td><td>{@link #AL_BUFFER BUFFER}</td><td>{@link #AL_SOURCE_STATE SOURCE_STATE}</td></tr><tr><td>{@link #AL_CONE_OUTER_GAIN CONE_OUTER_GAIN}</td><td>{@link #AL_SOURCE_TYPE SOURCE_TYPE}</td><td>{@link #AL_POSITION POSITION}</td><td>{@link #AL_VELOCITY VELOCITY}</td><td>{@link #AL_GAIN GAIN}</td><td>{@link #AL_REFERENCE_DISTANCE REFERENCE_DISTANCE}</td><td>{@link #AL_ROLLOFF_FACTOR ROLLOFF_FACTOR}</td></tr><tr><td>{@link #AL_MAX_DISTANCE MAX_DISTANCE}</td></tr></table>
* @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:<br><table><tr><td>{@link #AL_CONE_INNER_ANGLE CONE_INNER_ANGLE}</td><td>{@link #AL_CONE_OUTER_ANGLE CONE_OUTER_ANGLE}</td><td>{@link #AL_PITCH PITCH}</td><td>{@link #AL_DIRECTION DIRECTION}</td><td>{@link #AL_LOOPING LOOPING}</td><td>{@link #AL_BUFFER BUFFER}</td><td>{@link #AL_SOURCE_STATE SOURCE_STATE}</td></tr><tr><td>{@link #AL_CONE_OUTER_GAIN CONE_OUTER_GAIN}</td><td>{@link #AL_SOURCE_TYPE SOURCE_TYPE}</td><td>{@link #AL_POSITION POSITION}</td><td>{@link #AL_VELOCITY VELOCITY}</td><td>{@link #AL_GAIN GAIN}</td><td>{@link #AL_REFERENCE_DISTANCE REFERENCE_DISTANCE}</td><td>{@link #AL_ROLLOFF_FACTOR ROLLOFF_FACTOR}</td></tr><tr><td>{@link #AL_MAX_DISTANCE MAX_DISTANCE}</td></tr></table>
* @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:<br><table><tr><td>{@link #AL_CONE_INNER_ANGLE CONE_INNER_ANGLE}</td><td>{@link #AL_CONE_OUTER_ANGLE CONE_OUTER_ANGLE}</td><td>{@link #AL_PITCH PITCH}</td><td>{@link #AL_DIRECTION DIRECTION}</td><td>{@link #AL_LOOPING LOOPING}</td><td>{@link #AL_BUFFER BUFFER}</td><td>{@link #AL_SOURCE_STATE SOURCE_STATE}</td></tr><tr><td>{@link #AL_CONE_OUTER_GAIN CONE_OUTER_GAIN}</td><td>{@link #AL_SOURCE_TYPE SOURCE_TYPE}</td><td>{@link #AL_POSITION POSITION}</td><td>{@link #AL_VELOCITY VELOCITY}</td><td>{@link #AL_GAIN GAIN}</td><td>{@link #AL_REFERENCE_DISTANCE REFERENCE_DISTANCE}</td><td>{@link #AL_ROLLOFF_FACTOR ROLLOFF_FACTOR}</td></tr><tr><td>{@link #AL_MAX_DISTANCE MAX_DISTANCE}</td></tr></table>
*/
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.
* <p>
* <p>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).</p>
*
* @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.
* <p>
* <p>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.</p>
*
* @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:<br><table><tr><td>{@link #AL_ORIENTATION ORIENTATION}</td><td>{@link #AL_POSITION POSITION}</td><td>{@link #AL_VELOCITY VELOCITY}</td><td>{@link #AL_GAIN GAIN}</td></tr></table>
* @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:<br><table><tr><td>{@link #AL_ORIENTATION ORIENTATION}</td><td>{@link #AL_POSITION POSITION}</td><td>{@link #AL_VELOCITY VELOCITY}</td><td>{@link #AL_GAIN GAIN}</td></tr></table>
* @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);
}

@ -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:<br><table><tr><td>{@link #ALC_DEFAULT_DEVICE_SPECIFIER DEFAULT_DEVICE_SPECIFIER}</td><td>{@link #ALC_DEVICE_SPECIFIER DEVICE_SPECIFIER}</td><td>{@link #ALC_EXTENSIONS EXTENSIONS}</td></tr><tr><td>{@link #ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER CAPTURE_DEFAULT_DEVICE_SPECIFIER}</td><td>{@link #ALC_CAPTURE_DEVICE_SPECIFIER CAPTURE_DEVICE_SPECIFIER}</td></tr></table>
*/
public String alcGetString(int parameter);
/**
* Verifies that a given extension is available for the current context and the device it is associated with.
* <p>
* <p>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).</p>
*
* @param extension the extension name.
*/
public boolean alcIsExtensionPresent(String extension);
/**
* Obtains integer value(s) from ALC.
*
* @param param the information to query. One of:<br><table><tr><td>{@link #ALC_MAJOR_VERSION MAJOR_VERSION}</td><td>{@link #ALC_MINOR_VERSION MINOR_VERSION}</td><td>{@link #ALC_ATTRIBUTES_SIZE ATTRIBUTES_SIZE}</td><td>{@link #ALC_ALL_ATTRIBUTES ALL_ATTRIBUTES}</td><td>{@link #ALC_CAPTURE_SAMPLES CAPTURE_SAMPLES}</td></tr></table>
* @param buffer the destination buffer.
* @param size the buffer size.
*/
public void alcGetInteger(int param, IntBuffer buffer, int size);
/**
* Pauses a playback device.
* <p>
* <p>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.</p>
*/
public void alcDevicePauseSOFT();
/**
* Resumes playback of a paused device.
* <p>
* <p>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.</p>
* <p>
* <p>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.</p>
*/
public void alcDeviceResumeSOFT();
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -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;
@ -74,13 +75,132 @@ public interface GL2 extends GL {
public static final int GL_VERTEX_PROGRAM_POINT_SIZE = 0x8642;
public static final int GL_UNSIGNED_INT_8_8_8_8 = 0x8035;
/**
* <p><a target="_blank" href="http://docs.gl/gl3/glAlphaFunc">Reference Page</a> - <em>This function is deprecated and unavailable in the Core profile</em></p>
*
* The alpha test discards a fragment conditionally based on the outcome of a comparison between the incoming fragments 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:<br><table><tr><td>{@link #GL_NEVER NEVER}</td><td>{@link #GL_ALWAYS ALWAYS}</td><td>{@link #GL_LESS LESS}</td><td>{@link #GL_LEQUAL LEQUAL}</td><td>{@link #GL_EQUAL EQUAL}</td><td>{@link #GL_GEQUAL GEQUAL}</td><td>{@link #GL_GREATER GREATER}</td><td>{@link #GL_NOTEQUAL NOTEQUAL}</td></tr></table>
* @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);
/**
* <p><a target="_blank" href="http://docs.gl/gl4/glPointSize">Reference Page</a></p>
* <p>
* 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);
/**
* <p><a target="_blank" href="http://docs.gl/gl4/glPolygonMode">Reference Page</a></p>
*
* Controls the interpretation of polygons for rasterization.
*
* <p>{@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.</p>
*
* @param face the face for which to set the rasterizing method. One of:<br><table><tr><td>{@link #GL_FRONT FRONT}</td><td>{@link #GL_BACK BACK}</td><td>{@link #GL_FRONT_AND_BACK FRONT_AND_BACK}</td></tr></table>
* @param mode the rasterization mode. One of:<br><table><tr><td>{@link #GL_POINT POINT}</td><td>{@link #GL_LINE LINE}</td><td>{@link #GL_FILL FILL}</td></tr></table>
*/
public void glPolygonMode(int face, int mode);
/**
* <p><a target="_blank" href="http://docs.gl/gl4/glDrawBuffer">Reference Page</a></p>
* <p>
* Defines the color buffer to which fragment color zero is written.
*
* @param mode the color buffer to draw to.
*/
public void glDrawBuffer(int mode);
/**
* <p><a target="_blank" href="http://docs.gl/gl4/glReadBuffer">Reference Page</a></p>
* <p>
* 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);
/**
* <p><a target="_blank" href="http://docs.gl/gl4/glCompressedTexImage3D">Reference Page</a></p>
* <p>
* 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);
/**
* <p><a target="_blank" href="http://docs.gl/gl4/glCompressedTexSubImage3D">Reference Page</a></p>
* <p>
* 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);
/**
* <p><a target="_blank" href="http://docs.gl/gl4/glTexImage3D">Reference Page</a></p>
* <p>
* 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);
/**
* <p><a target="_blank" href="http://docs.gl/gl4/glTexSubImage3D">Reference Page</a></p>
* <p>
* 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);
}

@ -83,9 +83,49 @@ public interface GL3 extends GL2 {
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+
/**
* <p><a target="_blank" href="http://docs.gl/gl4/glBindFragDataLocation">Reference Page</a></p>
* <p>
* 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+
/**
* <p><a target="_blank" href="http://docs.gl/gl4/glBindVertexArray">Reference Page</a></p>
* <p>
* 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+
/**
* <p><a target="_blank" href="http://docs.gl/gl4/glGenVertexArrays">Reference Page</a></p>
*
* 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+
/**
* <p><a target="_blank" href="http://docs.gl/gl4/glGetStringi">Reference Page</a></p>
* <p>
* Queries indexed string state.
*
* @param name the indexed state to query. One of:<br><table><tr><td>{@link GL#GL_EXTENSIONS EXTENSIONS}</td><td>{@link GL2#GL_SHADING_LANGUAGE_VERSION SHADING_LANGUAGE_VERSION}</td></tr></table>
* @param index the index of the particular element being queried.
*/
public String glGetString(int name, int index); /// GL3+
}

@ -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;
/**
* <p><a target="_blank" href="http://docs.gl/gl4/glPatchParameteri">Reference Page</a></p>
* <p>
* 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);
}

@ -36,81 +36,200 @@ import java.nio.IntBuffer;
/**
* GL functions provided by extensions.
*
* <p>
* 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;
/**
* <p><a target="_blank" href="http://docs.gl/gl4/glBufferData">Reference Page</a></p>
* <p>
* Creates and initializes a buffer object's data store.
* <p>
* <p>{@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:</p>
* <p>
* <ul>
* <li><em>STREAM</em> - The data store contents will be modified once and used at most a few times.</li>
* <li><em>STATIC</em> - The data store contents will be modified once and used many times.</li>
* <li><em>DYNAMIC</em> - The data store contents will be modified repeatedly and used many times.</li>
* </ul>
* <p>
* <p>The nature of access may be one of these:</p>
* <p>
* <ul>
* <li><em>DRAW</em> - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.</li>
* <li><em>READ</em> - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.</li>
* <li><em>COPY</em> - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.</li>
* </ul>
*
* @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);
/**
* <p><a target="_blank" href="http://docs.gl/gl4/glBufferSubData">Reference Page</a></p>
* <p>
* 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);
/**
* <p><a target="_blank" href="http://docs.gl/gl4/glDrawBuffers">Reference Page</a></p>
* <p>
* 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);
}

@ -35,7 +35,7 @@ import java.nio.IntBuffer;
/**
* Framebuffer object functions.
*
* <p>
* Available by default in OpenGL ES 2, but on desktop GL 2
* an extension is required.
*
@ -81,18 +81,32 @@ public interface GLFbo {
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);
}

Loading…
Cancel
Save