dreamcast build compiled and somewhat running (required patching kernel/arch/dreamcast/hardware/cdrom.c), also fixed GUI elements not rendering under opengl
This commit is contained in:
parent
c49dfb9b8c
commit
aeb648595f
2
Makefile
2
Makefile
@ -76,7 +76,7 @@ ifneq (,$(findstring win64,$(ARCH)))
|
||||
INCS := -I./dep/master/include $(INCS)
|
||||
else ifneq (,$(findstring dreamcast,$(ARCH)))
|
||||
FLAGS += -DUF_ENV_DREAMCAST
|
||||
REQ_DEPS += simd opengl gldc json:nlohmann png zlib ctti reactphysics lua freetype fmt imgui openal aldc ogg wav gltf # bullet meshoptimizer draco luajit ultralight-ux ncurses curl openvr discord
|
||||
REQ_DEPS += simd opengl gldc json:nlohmann png zlib ctti reactphysics lua freetype fmt imgui openal aldc ogg wav # gltf bullet meshoptimizer draco luajit ultralight-ux ncurses curl openvr discord
|
||||
INCS := -I./dep/dreamcast/include $(INCS)
|
||||
endif
|
||||
ifneq (,$(findstring vulkan,$(REQ_DEPS)))
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"engine": {
|
||||
"scenes": {
|
||||
"start": "SourceEngine",
|
||||
"start": "StartMenu",
|
||||
"matrix": { "reverseInfinite": true },
|
||||
"meshes": { "interleaved": false },
|
||||
"lights": { "enabled": true,
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"assets": [
|
||||
// { "filename": "./models/ss2_medsci1.glb" }
|
||||
// { "filename": "./models/ss2_medsci1/graph.json" }
|
||||
{ "filename": "./models/ss2_medsci1_small/graph.json" }
|
||||
{ "filename": "./models/ss2_medsci1_smallish/graph.json" }
|
||||
],
|
||||
"metadata": {
|
||||
"graph": {
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
},
|
||||
"bgm": {
|
||||
"tracks": {
|
||||
"/ui/tmrwah.ogg": {}
|
||||
"/ui/tmrwah.wav": {}
|
||||
// "/ui/main menu.ogg": {},
|
||||
// "/ui/tainted.ogg": {
|
||||
// "intro": "/ui/tainted_intro.ogg",
|
||||
|
||||
@ -1,25 +1,12 @@
|
||||
{
|
||||
"engine": {
|
||||
"scenes": {
|
||||
"start": "SourceEngine",
|
||||
"start": "StartMenu",
|
||||
"matrix": { "reverseInfinite": true },
|
||||
"meshes": { "interleaved": false },
|
||||
"lights": { "enabled": true,
|
||||
"useLightmaps": true,
|
||||
"max": 1,
|
||||
"shadows": {
|
||||
"enabled": false,
|
||||
"update": 4,
|
||||
"max": 8,
|
||||
"samples": 4
|
||||
},
|
||||
"bloom": {
|
||||
"scale": 1.0,
|
||||
"strength": 0.125,
|
||||
"sigma": 0.8,
|
||||
"samples": 5,
|
||||
"threshold": 1.0
|
||||
}
|
||||
"useLightmaps": false,
|
||||
"max": 1
|
||||
},
|
||||
"textures": {
|
||||
"max": {
|
||||
@ -34,7 +21,7 @@
|
||||
},
|
||||
"ext": {
|
||||
"opengl": {
|
||||
"validation": { "enabled": false },
|
||||
"validation": { "enabled": true },
|
||||
"framebuffer": { "size": 1, "msaa": 1 },
|
||||
"pipelines": {
|
||||
"culling": true
|
||||
@ -65,12 +52,6 @@
|
||||
"imgui": {
|
||||
"enabled": false
|
||||
},
|
||||
"fsr": {
|
||||
"enabled": true,
|
||||
"sharpness": 1,
|
||||
"jitter scale": 0.0625,
|
||||
"preset": "native" // native (1x), quality (1.5x), balanced (1.7x), performance (2.0x), ultra (3.0x)
|
||||
},
|
||||
"reactphysics": {
|
||||
"timescale": 0.01666666666,
|
||||
"interpolate": false,
|
||||
@ -84,16 +65,7 @@
|
||||
"layer": "",
|
||||
"rate": 0.0125
|
||||
}
|
||||
},
|
||||
"vr" : {
|
||||
"enable" : false,
|
||||
"manifest": "./data/openvr_manifest.json",
|
||||
"swap eyes": false,
|
||||
"dominant eye": 0,
|
||||
"scale": 1.0
|
||||
},
|
||||
"ultralight": { "enabled": true, "scale": 1.5 },
|
||||
"discord": { "enabled": false }
|
||||
}
|
||||
},
|
||||
"audio": {
|
||||
"mute": false,
|
||||
|
||||
@ -1 +1 @@
|
||||
vulkan
|
||||
opengl
|
||||
582
dep/dreamcast/include/ALdc/al.h
Normal file
582
dep/dreamcast/include/ALdc/al.h
Normal file
@ -0,0 +1,582 @@
|
||||
#ifndef AL_AL_H
|
||||
#define AL_AL_H
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef AL_API
|
||||
#if defined(AL_LIBTYPE_STATIC)
|
||||
#define AL_API
|
||||
#elif defined(_WIN32)
|
||||
#define AL_API __declspec(dllimport)
|
||||
#else
|
||||
#define AL_API extern
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
#define AL_APIENTRY __cdecl
|
||||
#else
|
||||
#define AL_APIENTRY
|
||||
#endif
|
||||
|
||||
|
||||
/** Deprecated macro. */
|
||||
#define OPENAL
|
||||
#define ALAPI AL_API
|
||||
#define ALAPIENTRY AL_APIENTRY
|
||||
#define AL_INVALID (-1)
|
||||
#define AL_ILLEGAL_ENUM AL_INVALID_ENUM
|
||||
#define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION
|
||||
|
||||
/** Supported AL version. */
|
||||
#define AL_VERSION_1_0
|
||||
#define AL_VERSION_1_1
|
||||
|
||||
/** 8-bit boolean */
|
||||
typedef char ALboolean;
|
||||
|
||||
/** character */
|
||||
typedef char ALchar;
|
||||
|
||||
/** signed 8-bit 2's complement integer */
|
||||
typedef signed char ALbyte;
|
||||
|
||||
/** unsigned 8-bit integer */
|
||||
typedef unsigned char ALubyte;
|
||||
|
||||
/** signed 16-bit 2's complement integer */
|
||||
typedef short ALshort;
|
||||
|
||||
/** unsigned 16-bit integer */
|
||||
typedef unsigned short ALushort;
|
||||
|
||||
/** signed 32-bit 2's complement integer */
|
||||
typedef int ALint;
|
||||
|
||||
/** unsigned 32-bit integer */
|
||||
typedef unsigned int ALuint;
|
||||
|
||||
/** non-negative 32-bit binary integer size */
|
||||
typedef int ALsizei;
|
||||
|
||||
/** enumerated 32-bit value */
|
||||
typedef int ALenum;
|
||||
|
||||
/** 32-bit IEEE754 floating-point */
|
||||
typedef float ALfloat;
|
||||
|
||||
/** 64-bit IEEE754 floating-point */
|
||||
typedef double ALdouble;
|
||||
|
||||
/** void type (for opaque pointers only) */
|
||||
typedef void ALvoid;
|
||||
|
||||
|
||||
/* Enumerant values begin at column 50. No tabs. */
|
||||
|
||||
/** "no distance model" or "no buffer" */
|
||||
#define AL_NONE 0
|
||||
|
||||
/** Boolean False. */
|
||||
#define AL_FALSE 0
|
||||
|
||||
/** Boolean True. */
|
||||
#define AL_TRUE 1
|
||||
|
||||
|
||||
/**
|
||||
* Relative source.
|
||||
* Type: ALboolean
|
||||
* Range: [AL_TRUE, AL_FALSE]
|
||||
* Default: AL_FALSE
|
||||
*
|
||||
* Specifies if the Source has relative coordinates.
|
||||
*/
|
||||
#define AL_SOURCE_RELATIVE 0x202
|
||||
|
||||
|
||||
/**
|
||||
* Inner cone angle, in degrees.
|
||||
* Type: ALint, ALfloat
|
||||
* Range: [0 - 360]
|
||||
* Default: 360
|
||||
*
|
||||
* The angle covered by the inner cone, where the source will not attenuate.
|
||||
*/
|
||||
#define AL_CONE_INNER_ANGLE 0x1001
|
||||
|
||||
/**
|
||||
* Outer cone angle, in degrees.
|
||||
* Range: [0 - 360]
|
||||
* Default: 360
|
||||
*
|
||||
* The angle covered by the outer cone, where the source will be fully
|
||||
* attenuated.
|
||||
*/
|
||||
#define AL_CONE_OUTER_ANGLE 0x1002
|
||||
|
||||
/**
|
||||
* Source pitch.
|
||||
* Type: ALfloat
|
||||
* Range: [0.5 - 2.0]
|
||||
* Default: 1.0
|
||||
*
|
||||
* A multiplier for the frequency (sample rate) of the source's buffer.
|
||||
*/
|
||||
#define AL_PITCH 0x1003
|
||||
|
||||
/**
|
||||
* Source or listener position.
|
||||
* Type: ALfloat[3], ALint[3]
|
||||
* Default: {0, 0, 0}
|
||||
*
|
||||
* The source or listener location in three dimensional space.
|
||||
*
|
||||
* OpenAL, like OpenGL, uses a right handed coordinate system, where in a
|
||||
* frontal default view X (thumb) points right, Y points up (index finger), and
|
||||
* Z points towards the viewer/camera (middle finger).
|
||||
*
|
||||
* To switch from a left handed coordinate system, flip the sign on the Z
|
||||
* coordinate.
|
||||
*/
|
||||
#define AL_POSITION 0x1004
|
||||
|
||||
/**
|
||||
* Source direction.
|
||||
* Type: ALfloat[3], ALint[3]
|
||||
* Default: {0, 0, 0}
|
||||
*
|
||||
* Specifies the current direction in local space.
|
||||
* A zero-length vector specifies an omni-directional source (cone is ignored).
|
||||
*/
|
||||
#define AL_DIRECTION 0x1005
|
||||
|
||||
/**
|
||||
* Source or listener velocity.
|
||||
* Type: ALfloat[3], ALint[3]
|
||||
* Default: {0, 0, 0}
|
||||
*
|
||||
* Specifies the current velocity in local space.
|
||||
*/
|
||||
#define AL_VELOCITY 0x1006
|
||||
|
||||
/**
|
||||
* Source looping.
|
||||
* Type: ALboolean
|
||||
* Range: [AL_TRUE, AL_FALSE]
|
||||
* Default: AL_FALSE
|
||||
*
|
||||
* Specifies whether source is looping.
|
||||
*/
|
||||
#define AL_LOOPING 0x1007
|
||||
|
||||
/**
|
||||
* Source buffer.
|
||||
* Type: ALuint
|
||||
* Range: any valid Buffer.
|
||||
*
|
||||
* Specifies the buffer to provide sound samples.
|
||||
*/
|
||||
#define AL_BUFFER 0x1009
|
||||
|
||||
/**
|
||||
* Source or listener gain.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - ]
|
||||
*
|
||||
* A value of 1.0 means unattenuated. Each division by 2 equals an attenuation
|
||||
* of about -6dB. Each multiplicaton by 2 equals an amplification of about
|
||||
* +6dB.
|
||||
*
|
||||
* A value of 0.0 is meaningless with respect to a logarithmic scale; it is
|
||||
* silent.
|
||||
*/
|
||||
#define AL_GAIN 0x100A
|
||||
|
||||
/**
|
||||
* Minimum source gain.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - 1.0]
|
||||
*
|
||||
* The minimum gain allowed for a source, after distance and cone attenation is
|
||||
* applied (if applicable).
|
||||
*/
|
||||
#define AL_MIN_GAIN 0x100D
|
||||
|
||||
/**
|
||||
* Maximum source gain.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - 1.0]
|
||||
*
|
||||
* The maximum gain allowed for a source, after distance and cone attenation is
|
||||
* applied (if applicable).
|
||||
*/
|
||||
#define AL_MAX_GAIN 0x100E
|
||||
|
||||
/**
|
||||
* Listener orientation.
|
||||
* Type: ALfloat[6]
|
||||
* Default: {0.0, 0.0, -1.0, 0.0, 1.0, 0.0}
|
||||
*
|
||||
* Effectively two three dimensional vectors. The first vector is the front (or
|
||||
* "at") and the second is the top (or "up").
|
||||
*
|
||||
* Both vectors are in local space.
|
||||
*/
|
||||
#define AL_ORIENTATION 0x100F
|
||||
|
||||
/**
|
||||
* Source state (query only).
|
||||
* Type: ALint
|
||||
* Range: [AL_INITIAL, AL_PLAYING, AL_PAUSED, AL_STOPPED]
|
||||
*/
|
||||
#define AL_SOURCE_STATE 0x1010
|
||||
|
||||
/** Source state value. */
|
||||
#define AL_INITIAL 0x1011
|
||||
#define AL_PLAYING 0x1012
|
||||
#define AL_PAUSED 0x1013
|
||||
#define AL_STOPPED 0x1014
|
||||
|
||||
/**
|
||||
* Source Buffer Queue size (query only).
|
||||
* Type: ALint
|
||||
*
|
||||
* The number of buffers queued using alSourceQueueBuffers, minus the buffers
|
||||
* removed with alSourceUnqueueBuffers.
|
||||
*/
|
||||
#define AL_BUFFERS_QUEUED 0x1015
|
||||
|
||||
/**
|
||||
* Source Buffer Queue processed count (query only).
|
||||
* Type: ALint
|
||||
*
|
||||
* The number of queued buffers that have been fully processed, and can be
|
||||
* removed with alSourceUnqueueBuffers.
|
||||
*
|
||||
* Looping sources will never fully process buffers because they will be set to
|
||||
* play again for when the source loops.
|
||||
*/
|
||||
#define AL_BUFFERS_PROCESSED 0x1016
|
||||
|
||||
/**
|
||||
* Source reference distance.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - ]
|
||||
* Default: 1.0
|
||||
*
|
||||
* The distance in units that no attenuation occurs.
|
||||
*
|
||||
* At 0.0, no distance attenuation ever occurs on non-linear attenuation models.
|
||||
*/
|
||||
#define AL_REFERENCE_DISTANCE 0x1020
|
||||
|
||||
/**
|
||||
* Source rolloff factor.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - ]
|
||||
* Default: 1.0
|
||||
*
|
||||
* Multiplier to exaggerate or diminish distance attenuation.
|
||||
*
|
||||
* At 0.0, no distance attenuation ever occurs.
|
||||
*/
|
||||
#define AL_ROLLOFF_FACTOR 0x1021
|
||||
|
||||
/**
|
||||
* Outer cone gain.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - 1.0]
|
||||
* Default: 0.0
|
||||
*
|
||||
* The gain attenuation applied when the listener is outside of the source's
|
||||
* outer cone.
|
||||
*/
|
||||
#define AL_CONE_OUTER_GAIN 0x1022
|
||||
|
||||
/**
|
||||
* Source maximum distance.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - ]
|
||||
* Default: +inf
|
||||
*
|
||||
* The distance above which the source is not attenuated any further with a
|
||||
* clamped distance model, or where attenuation reaches 0.0 gain for linear
|
||||
* distance models with a default rolloff factor.
|
||||
*/
|
||||
#define AL_MAX_DISTANCE 0x1023
|
||||
|
||||
/** Source buffer position, in seconds */
|
||||
#define AL_SEC_OFFSET 0x1024
|
||||
/** Source buffer position, in sample frames */
|
||||
#define AL_SAMPLE_OFFSET 0x1025
|
||||
/** Source buffer position, in bytes */
|
||||
#define AL_BYTE_OFFSET 0x1026
|
||||
|
||||
/**
|
||||
* Source type (query only).
|
||||
* Type: ALint
|
||||
* Range: [AL_STATIC, AL_STREAMING, AL_UNDETERMINED]
|
||||
*
|
||||
* A Source is Static if a Buffer has been attached using AL_BUFFER.
|
||||
*
|
||||
* A Source is Streaming if one or more Buffers have been attached using
|
||||
* alSourceQueueBuffers.
|
||||
*
|
||||
* A Source is Undetermined when it has the NULL buffer attached using
|
||||
* AL_BUFFER.
|
||||
*/
|
||||
#define AL_SOURCE_TYPE 0x1027
|
||||
|
||||
/** Source type value. */
|
||||
#define AL_STATIC 0x1028
|
||||
#define AL_STREAMING 0x1029
|
||||
#define AL_UNDETERMINED 0x1030
|
||||
|
||||
/** Buffer format specifier. */
|
||||
#define AL_FORMAT_MONO8 0x1100
|
||||
#define AL_FORMAT_MONO16 0x1101
|
||||
#define AL_FORMAT_STEREO8 0x1102
|
||||
#define AL_FORMAT_STEREO16 0x1103
|
||||
|
||||
/** Buffer frequency (query only). */
|
||||
#define AL_FREQUENCY 0x2001
|
||||
/** Buffer bits per sample (query only). */
|
||||
#define AL_BITS 0x2002
|
||||
/** Buffer channel count (query only). */
|
||||
#define AL_CHANNELS 0x2003
|
||||
/** Buffer data size (query only). */
|
||||
#define AL_SIZE 0x2004
|
||||
|
||||
/**
|
||||
* Buffer state.
|
||||
*
|
||||
* Not for public use.
|
||||
*/
|
||||
#define AL_UNUSED 0x2010
|
||||
#define AL_PENDING 0x2011
|
||||
#define AL_PROCESSED 0x2012
|
||||
|
||||
|
||||
/** No error. */
|
||||
#define AL_NO_ERROR 0
|
||||
|
||||
/** Invalid name paramater passed to AL call. */
|
||||
#define AL_INVALID_NAME 0xA001
|
||||
|
||||
/** Invalid enum parameter passed to AL call. */
|
||||
#define AL_INVALID_ENUM 0xA002
|
||||
|
||||
/** Invalid value parameter passed to AL call. */
|
||||
#define AL_INVALID_VALUE 0xA003
|
||||
|
||||
/** Illegal AL call. */
|
||||
#define AL_INVALID_OPERATION 0xA004
|
||||
|
||||
/** Not enough memory. */
|
||||
#define AL_OUT_OF_MEMORY 0xA005
|
||||
|
||||
|
||||
/** Context string: Vendor ID. */
|
||||
#define AL_VENDOR 0xB001
|
||||
/** Context string: Version. */
|
||||
#define AL_VERSION 0xB002
|
||||
/** Context string: Renderer ID. */
|
||||
#define AL_RENDERER 0xB003
|
||||
/** Context string: Space-separated extension list. */
|
||||
#define AL_EXTENSIONS 0xB004
|
||||
|
||||
|
||||
/**
|
||||
* Doppler scale.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - ]
|
||||
* Default: 1.0
|
||||
*
|
||||
* Scale for source and listener velocities.
|
||||
*/
|
||||
#define AL_DOPPLER_FACTOR 0xC000
|
||||
AL_API void AL_APIENTRY alDopplerFactor(ALfloat value);
|
||||
|
||||
/**
|
||||
* Doppler velocity (deprecated).
|
||||
*
|
||||
* A multiplier applied to the Speed of Sound.
|
||||
*/
|
||||
#define AL_DOPPLER_VELOCITY 0xC001
|
||||
AL_API void AL_APIENTRY alDopplerVelocity(ALfloat value);
|
||||
|
||||
/**
|
||||
* Speed of Sound, in units per second.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0001 - ]
|
||||
* Default: 343.3
|
||||
*
|
||||
* The speed at which sound waves are assumed to travel, when calculating the
|
||||
* doppler effect.
|
||||
*/
|
||||
#define AL_SPEED_OF_SOUND 0xC003
|
||||
AL_API void AL_APIENTRY alSpeedOfSound(ALfloat value);
|
||||
|
||||
/**
|
||||
* Distance attenuation model.
|
||||
* Type: ALint
|
||||
* Range: [AL_NONE, AL_INVERSE_DISTANCE, AL_INVERSE_DISTANCE_CLAMPED,
|
||||
* AL_LINEAR_DISTANCE, AL_LINEAR_DISTANCE_CLAMPED,
|
||||
* AL_EXPONENT_DISTANCE, AL_EXPONENT_DISTANCE_CLAMPED]
|
||||
* Default: AL_INVERSE_DISTANCE_CLAMPED
|
||||
*
|
||||
* The model by which sources attenuate with distance.
|
||||
*
|
||||
* None - No distance attenuation.
|
||||
* Inverse - Doubling the distance halves the source gain.
|
||||
* Linear - Linear gain scaling between the reference and max distances.
|
||||
* Exponent - Exponential gain dropoff.
|
||||
*
|
||||
* Clamped variations work like the non-clamped counterparts, except the
|
||||
* distance calculated is clamped between the reference and max distances.
|
||||
*/
|
||||
#define AL_DISTANCE_MODEL 0xD000
|
||||
AL_API void AL_APIENTRY alDistanceModel(ALenum distanceModel);
|
||||
|
||||
/** Distance model value. */
|
||||
#define AL_INVERSE_DISTANCE 0xD001
|
||||
#define AL_INVERSE_DISTANCE_CLAMPED 0xD002
|
||||
#define AL_LINEAR_DISTANCE 0xD003
|
||||
#define AL_LINEAR_DISTANCE_CLAMPED 0xD004
|
||||
#define AL_EXPONENT_DISTANCE 0xD005
|
||||
#define AL_EXPONENT_DISTANCE_CLAMPED 0xD006
|
||||
|
||||
/** Renderer State management. */
|
||||
AL_API void AL_APIENTRY alEnable(ALenum capability);
|
||||
AL_API void AL_APIENTRY alDisable(ALenum capability);
|
||||
AL_API ALboolean AL_APIENTRY alIsEnabled(ALenum capability);
|
||||
|
||||
/** State retrieval. */
|
||||
AL_API const ALchar* AL_APIENTRY alGetString(ALenum param);
|
||||
AL_API void AL_APIENTRY alGetBooleanv(ALenum param, ALboolean *values);
|
||||
AL_API void AL_APIENTRY alGetIntegerv(ALenum param, ALint *values);
|
||||
AL_API void AL_APIENTRY alGetFloatv(ALenum param, ALfloat *values);
|
||||
AL_API void AL_APIENTRY alGetDoublev(ALenum param, ALdouble *values);
|
||||
AL_API ALboolean AL_APIENTRY alGetBoolean(ALenum param);
|
||||
AL_API ALint AL_APIENTRY alGetInteger(ALenum param);
|
||||
AL_API ALfloat AL_APIENTRY alGetFloat(ALenum param);
|
||||
AL_API ALdouble AL_APIENTRY alGetDouble(ALenum param);
|
||||
|
||||
/**
|
||||
* Error retrieval.
|
||||
*
|
||||
* Obtain the first error generated in the AL context since the last check.
|
||||
*/
|
||||
AL_API ALenum AL_APIENTRY alGetError(void);
|
||||
|
||||
/**
|
||||
* Extension support.
|
||||
*
|
||||
* Query for the presence of an extension, and obtain any appropriate function
|
||||
* pointers and enum values.
|
||||
*/
|
||||
AL_API ALboolean AL_APIENTRY alIsExtensionPresent(const ALchar *extname);
|
||||
AL_API void* AL_APIENTRY alGetProcAddress(const ALchar *fname);
|
||||
AL_API ALenum AL_APIENTRY alGetEnumValue(const ALchar *ename);
|
||||
|
||||
|
||||
/** Set Listener parameters */
|
||||
AL_API void AL_APIENTRY alListenerf(ALenum param, ALfloat value);
|
||||
AL_API void AL_APIENTRY alListener3f(ALenum param, ALfloat value1, ALfloat value2, ALfloat value3);
|
||||
AL_API void AL_APIENTRY alListenerfv(ALenum param, const ALfloat *values);
|
||||
AL_API void AL_APIENTRY alListeneri(ALenum param, ALint value);
|
||||
AL_API void AL_APIENTRY alListener3i(ALenum param, ALint value1, ALint value2, ALint value3);
|
||||
AL_API void AL_APIENTRY alListeneriv(ALenum param, const ALint *values);
|
||||
|
||||
/** Get Listener parameters */
|
||||
AL_API void AL_APIENTRY alGetListenerf(ALenum param, ALfloat *value);
|
||||
AL_API void AL_APIENTRY alGetListener3f(ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3);
|
||||
AL_API void AL_APIENTRY alGetListenerfv(ALenum param, ALfloat *values);
|
||||
AL_API void AL_APIENTRY alGetListeneri(ALenum param, ALint *value);
|
||||
AL_API void AL_APIENTRY alGetListener3i(ALenum param, ALint *value1, ALint *value2, ALint *value3);
|
||||
AL_API void AL_APIENTRY alGetListeneriv(ALenum param, ALint *values);
|
||||
|
||||
|
||||
/** Create Source objects. */
|
||||
AL_API void AL_APIENTRY alGenSources(ALsizei n, ALuint *sources);
|
||||
/** Delete Source objects. */
|
||||
AL_API void AL_APIENTRY alDeleteSources(ALsizei n, const ALuint *sources);
|
||||
/** Verify a handle is a valid Source. */
|
||||
AL_API ALboolean AL_APIENTRY alIsSource(ALuint source);
|
||||
|
||||
/** Set Source parameters. */
|
||||
AL_API void AL_APIENTRY alSourcef(ALuint source, ALenum param, ALfloat value);
|
||||
AL_API void AL_APIENTRY alSource3f(ALuint source, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3);
|
||||
AL_API void AL_APIENTRY alSourcefv(ALuint source, ALenum param, const ALfloat *values);
|
||||
AL_API void AL_APIENTRY alSourcei(ALuint source, ALenum param, ALint value);
|
||||
AL_API void AL_APIENTRY alSource3i(ALuint source, ALenum param, ALint value1, ALint value2, ALint value3);
|
||||
AL_API void AL_APIENTRY alSourceiv(ALuint source, ALenum param, const ALint *values);
|
||||
|
||||
/** Get Source parameters. */
|
||||
AL_API void AL_APIENTRY alGetSourcef(ALuint source, ALenum param, ALfloat *value);
|
||||
AL_API void AL_APIENTRY alGetSource3f(ALuint source, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3);
|
||||
AL_API void AL_APIENTRY alGetSourcefv(ALuint source, ALenum param, ALfloat *values);
|
||||
AL_API void AL_APIENTRY alGetSourcei(ALuint source, ALenum param, ALint *value);
|
||||
AL_API void AL_APIENTRY alGetSource3i(ALuint source, ALenum param, ALint *value1, ALint *value2, ALint *value3);
|
||||
AL_API void AL_APIENTRY alGetSourceiv(ALuint source, ALenum param, ALint *values);
|
||||
|
||||
|
||||
/** Play, replay, or resume (if paused) a list of Sources */
|
||||
AL_API void AL_APIENTRY alSourcePlayv(ALsizei n, const ALuint *sources);
|
||||
/** Stop a list of Sources */
|
||||
AL_API void AL_APIENTRY alSourceStopv(ALsizei n, const ALuint *sources);
|
||||
/** Rewind a list of Sources */
|
||||
AL_API void AL_APIENTRY alSourceRewindv(ALsizei n, const ALuint *sources);
|
||||
/** Pause a list of Sources */
|
||||
AL_API void AL_APIENTRY alSourcePausev(ALsizei n, const ALuint *sources);
|
||||
|
||||
/** Play, replay, or resume a Source */
|
||||
AL_API void AL_APIENTRY alSourcePlay(ALuint source);
|
||||
/** Stop a Source */
|
||||
AL_API void AL_APIENTRY alSourceStop(ALuint source);
|
||||
/** Rewind a Source (set playback postiton to beginning) */
|
||||
AL_API void AL_APIENTRY alSourceRewind(ALuint source);
|
||||
/** Pause a Source */
|
||||
AL_API void AL_APIENTRY alSourcePause(ALuint source);
|
||||
|
||||
/** Queue buffers onto a source */
|
||||
AL_API void AL_APIENTRY alSourceQueueBuffers(ALuint source, ALsizei nb, const ALuint *buffers);
|
||||
/** Unqueue processed buffers from a source */
|
||||
AL_API void AL_APIENTRY alSourceUnqueueBuffers(ALuint source, ALsizei nb, ALuint *buffers);
|
||||
|
||||
|
||||
/** Create Buffer objects */
|
||||
AL_API void AL_APIENTRY alGenBuffers(ALsizei n, ALuint *buffers);
|
||||
/** Delete Buffer objects */
|
||||
AL_API void AL_APIENTRY alDeleteBuffers(ALsizei n, const ALuint *buffers);
|
||||
/** Verify a handle is a valid Buffer */
|
||||
AL_API ALboolean AL_APIENTRY alIsBuffer(ALuint buffer);
|
||||
|
||||
/** Specifies the data to be copied into a buffer */
|
||||
AL_API void AL_APIENTRY alBufferData(ALuint buffer, ALenum format, const ALvoid *data, ALsizei size, ALsizei freq);
|
||||
|
||||
/** Set Buffer parameters, */
|
||||
AL_API void AL_APIENTRY alBufferf(ALuint buffer, ALenum param, ALfloat value);
|
||||
AL_API void AL_APIENTRY alBuffer3f(ALuint buffer, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3);
|
||||
AL_API void AL_APIENTRY alBufferfv(ALuint buffer, ALenum param, const ALfloat *values);
|
||||
AL_API void AL_APIENTRY alBufferi(ALuint buffer, ALenum param, ALint value);
|
||||
AL_API void AL_APIENTRY alBuffer3i(ALuint buffer, ALenum param, ALint value1, ALint value2, ALint value3);
|
||||
AL_API void AL_APIENTRY alBufferiv(ALuint buffer, ALenum param, const ALint *values);
|
||||
|
||||
/** Get Buffer parameters. */
|
||||
AL_API void AL_APIENTRY alGetBufferf(ALuint buffer, ALenum param, ALfloat *value);
|
||||
AL_API void AL_APIENTRY alGetBuffer3f(ALuint buffer, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3);
|
||||
AL_API void AL_APIENTRY alGetBufferfv(ALuint buffer, ALenum param, ALfloat *values);
|
||||
AL_API void AL_APIENTRY alGetBufferi(ALuint buffer, ALenum param, ALint *value);
|
||||
AL_API void AL_APIENTRY alGetBuffer3i(ALuint buffer, ALenum param, ALint *value1, ALint *value2, ALint *value3);
|
||||
AL_API void AL_APIENTRY alGetBufferiv(ALuint buffer, ALenum param, ALint *values);
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* AL_AL_H */
|
||||
237
dep/dreamcast/include/ALdc/alc.h
Normal file
237
dep/dreamcast/include/ALdc/alc.h
Normal file
@ -0,0 +1,237 @@
|
||||
#ifndef AL_ALC_H
|
||||
#define AL_ALC_H
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef ALC_API
|
||||
#if defined(AL_LIBTYPE_STATIC)
|
||||
#define ALC_API
|
||||
#elif defined(_WIN32)
|
||||
#define ALC_API __declspec(dllimport)
|
||||
#else
|
||||
#define ALC_API extern
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
#define ALC_APIENTRY __cdecl
|
||||
#else
|
||||
#define ALC_APIENTRY
|
||||
#endif
|
||||
|
||||
|
||||
/** Deprecated macro. */
|
||||
#define ALCAPI ALC_API
|
||||
#define ALCAPIENTRY ALC_APIENTRY
|
||||
#define ALC_INVALID 0
|
||||
|
||||
/** Supported ALC version? */
|
||||
#define ALC_VERSION_0_1 1
|
||||
|
||||
/** Opaque device handle */
|
||||
typedef struct ALCdevice_struct ALCdevice;
|
||||
/** Opaque context handle */
|
||||
typedef struct ALCcontext_struct ALCcontext;
|
||||
|
||||
/** 8-bit boolean */
|
||||
typedef char ALCboolean;
|
||||
|
||||
/** character */
|
||||
typedef char ALCchar;
|
||||
|
||||
/** signed 8-bit 2's complement integer */
|
||||
typedef signed char ALCbyte;
|
||||
|
||||
/** unsigned 8-bit integer */
|
||||
typedef unsigned char ALCubyte;
|
||||
|
||||
/** signed 16-bit 2's complement integer */
|
||||
typedef short ALCshort;
|
||||
|
||||
/** unsigned 16-bit integer */
|
||||
typedef unsigned short ALCushort;
|
||||
|
||||
/** signed 32-bit 2's complement integer */
|
||||
typedef int ALCint;
|
||||
|
||||
/** unsigned 32-bit integer */
|
||||
typedef unsigned int ALCuint;
|
||||
|
||||
/** non-negative 32-bit binary integer size */
|
||||
typedef int ALCsizei;
|
||||
|
||||
/** enumerated 32-bit value */
|
||||
typedef int ALCenum;
|
||||
|
||||
/** 32-bit IEEE754 floating-point */
|
||||
typedef float ALCfloat;
|
||||
|
||||
/** 64-bit IEEE754 floating-point */
|
||||
typedef double ALCdouble;
|
||||
|
||||
/** void type (for opaque pointers only) */
|
||||
typedef void ALCvoid;
|
||||
|
||||
|
||||
/* Enumerant values begin at column 50. No tabs. */
|
||||
|
||||
/** Boolean False. */
|
||||
#define ALC_FALSE 0
|
||||
|
||||
/** Boolean True. */
|
||||
#define ALC_TRUE 1
|
||||
|
||||
/** Context attribute: <int> Hz. */
|
||||
#define ALC_FREQUENCY 0x1007
|
||||
|
||||
/** Context attribute: <int> Hz. */
|
||||
#define ALC_REFRESH 0x1008
|
||||
|
||||
/** Context attribute: AL_TRUE or AL_FALSE. */
|
||||
#define ALC_SYNC 0x1009
|
||||
|
||||
/** Context attribute: <int> requested Mono (3D) Sources. */
|
||||
#define ALC_MONO_SOURCES 0x1010
|
||||
|
||||
/** Context attribute: <int> requested Stereo Sources. */
|
||||
#define ALC_STEREO_SOURCES 0x1011
|
||||
|
||||
/** No error. */
|
||||
#define ALC_NO_ERROR 0
|
||||
|
||||
/** Invalid device handle. */
|
||||
#define ALC_INVALID_DEVICE 0xA001
|
||||
|
||||
/** Invalid context handle. */
|
||||
#define ALC_INVALID_CONTEXT 0xA002
|
||||
|
||||
/** Invalid enum parameter passed to an ALC call. */
|
||||
#define ALC_INVALID_ENUM 0xA003
|
||||
|
||||
/** Invalid value parameter passed to an ALC call. */
|
||||
#define ALC_INVALID_VALUE 0xA004
|
||||
|
||||
/** Out of memory. */
|
||||
#define ALC_OUT_OF_MEMORY 0xA005
|
||||
|
||||
|
||||
/** Runtime ALC version. */
|
||||
#define ALC_MAJOR_VERSION 0x1000
|
||||
#define ALC_MINOR_VERSION 0x1001
|
||||
|
||||
/** Context attribute list properties. */
|
||||
#define ALC_ATTRIBUTES_SIZE 0x1002
|
||||
#define ALC_ALL_ATTRIBUTES 0x1003
|
||||
|
||||
/** String for the default device specifier. */
|
||||
#define ALC_DEFAULT_DEVICE_SPECIFIER 0x1004
|
||||
/**
|
||||
* String for the given device's specifier.
|
||||
*
|
||||
* If device handle is NULL, it is instead a null-char separated list of
|
||||
* strings of known device specifiers (list ends with an empty string).
|
||||
*/
|
||||
#define ALC_DEVICE_SPECIFIER 0x1005
|
||||
/** String for space-separated list of ALC extensions. */
|
||||
#define ALC_EXTENSIONS 0x1006
|
||||
|
||||
|
||||
/** Capture extension */
|
||||
#define ALC_EXT_CAPTURE 1
|
||||
/**
|
||||
* String for the given capture device's specifier.
|
||||
*
|
||||
* If device handle is NULL, it is instead a null-char separated list of
|
||||
* strings of known capture device specifiers (list ends with an empty string).
|
||||
*/
|
||||
#define ALC_CAPTURE_DEVICE_SPECIFIER 0x310
|
||||
/** String for the default capture device specifier. */
|
||||
#define ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER 0x311
|
||||
/** Number of sample frames available for capture. */
|
||||
#define ALC_CAPTURE_SAMPLES 0x312
|
||||
|
||||
|
||||
/** Enumerate All extension */
|
||||
#define ALC_ENUMERATE_ALL_EXT 1
|
||||
/** String for the default extended device specifier. */
|
||||
#define ALC_DEFAULT_ALL_DEVICES_SPECIFIER 0x1012
|
||||
/**
|
||||
* String for the given extended device's specifier.
|
||||
*
|
||||
* If device handle is NULL, it is instead a null-char separated list of
|
||||
* strings of known extended device specifiers (list ends with an empty string).
|
||||
*/
|
||||
#define ALC_ALL_DEVICES_SPECIFIER 0x1013
|
||||
|
||||
|
||||
/** Context management. */
|
||||
ALC_API ALCcontext* ALC_APIENTRY alcCreateContext(ALCdevice *device, const ALCint* attrlist);
|
||||
ALC_API ALCboolean ALC_APIENTRY alcMakeContextCurrent(ALCcontext *context);
|
||||
ALC_API void ALC_APIENTRY alcProcessContext(ALCcontext *context);
|
||||
ALC_API void ALC_APIENTRY alcSuspendContext(ALCcontext *context);
|
||||
ALC_API void ALC_APIENTRY alcDestroyContext(ALCcontext *context);
|
||||
ALC_API ALCcontext* ALC_APIENTRY alcGetCurrentContext(void);
|
||||
ALC_API ALCdevice* ALC_APIENTRY alcGetContextsDevice(ALCcontext *context);
|
||||
|
||||
/** Device management. */
|
||||
ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *devicename);
|
||||
ALC_API ALCboolean ALC_APIENTRY alcCloseDevice(ALCdevice *device);
|
||||
|
||||
|
||||
/**
|
||||
* Error support.
|
||||
*
|
||||
* Obtain the most recent Device error.
|
||||
*/
|
||||
ALC_API ALCenum ALC_APIENTRY alcGetError(ALCdevice *device);
|
||||
|
||||
/**
|
||||
* Extension support.
|
||||
*
|
||||
* Query for the presence of an extension, and obtain any appropriate
|
||||
* function pointers and enum values.
|
||||
*/
|
||||
ALC_API ALCboolean ALC_APIENTRY alcIsExtensionPresent(ALCdevice *device, const ALCchar *extname);
|
||||
ALC_API void* ALC_APIENTRY alcGetProcAddress(ALCdevice *device, const ALCchar *funcname);
|
||||
ALC_API ALCenum ALC_APIENTRY alcGetEnumValue(ALCdevice *device, const ALCchar *enumname);
|
||||
|
||||
/** Query function. */
|
||||
ALC_API const ALCchar* ALC_APIENTRY alcGetString(ALCdevice *device, ALCenum param);
|
||||
ALC_API void ALC_APIENTRY alcGetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALCint *values);
|
||||
|
||||
/** Capture function. */
|
||||
ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize);
|
||||
ALC_API ALCboolean ALC_APIENTRY alcCaptureCloseDevice(ALCdevice *device);
|
||||
ALC_API void ALC_APIENTRY alcCaptureStart(ALCdevice *device);
|
||||
ALC_API void ALC_APIENTRY alcCaptureStop(ALCdevice *device);
|
||||
ALC_API void ALC_APIENTRY alcCaptureSamples(ALCdevice *device, ALCvoid *buffer, ALCsizei samples);
|
||||
|
||||
/** Pointer-to-function type, useful for dynamically getting ALC entry points. */
|
||||
typedef ALCcontext* (ALC_APIENTRY *LPALCCREATECONTEXT)(ALCdevice *device, const ALCint *attrlist);
|
||||
typedef ALCboolean (ALC_APIENTRY *LPALCMAKECONTEXTCURRENT)(ALCcontext *context);
|
||||
typedef void (ALC_APIENTRY *LPALCPROCESSCONTEXT)(ALCcontext *context);
|
||||
typedef void (ALC_APIENTRY *LPALCSUSPENDCONTEXT)(ALCcontext *context);
|
||||
typedef void (ALC_APIENTRY *LPALCDESTROYCONTEXT)(ALCcontext *context);
|
||||
typedef ALCcontext* (ALC_APIENTRY *LPALCGETCURRENTCONTEXT)(void);
|
||||
typedef ALCdevice* (ALC_APIENTRY *LPALCGETCONTEXTSDEVICE)(ALCcontext *context);
|
||||
typedef ALCdevice* (ALC_APIENTRY *LPALCOPENDEVICE)(const ALCchar *devicename);
|
||||
typedef ALCboolean (ALC_APIENTRY *LPALCCLOSEDEVICE)(ALCdevice *device);
|
||||
typedef ALCenum (ALC_APIENTRY *LPALCGETERROR)(ALCdevice *device);
|
||||
typedef ALCboolean (ALC_APIENTRY *LPALCISEXTENSIONPRESENT)(ALCdevice *device, const ALCchar *extname);
|
||||
typedef void* (ALC_APIENTRY *LPALCGETPROCADDRESS)(ALCdevice *device, const ALCchar *funcname);
|
||||
typedef ALCenum (ALC_APIENTRY *LPALCGETENUMVALUE)(ALCdevice *device, const ALCchar *enumname);
|
||||
typedef const ALCchar* (ALC_APIENTRY *LPALCGETSTRING)(ALCdevice *device, ALCenum param);
|
||||
typedef void (ALC_APIENTRY *LPALCGETINTEGERV)(ALCdevice *device, ALCenum param, ALCsizei size, ALCint *values);
|
||||
typedef ALCdevice* (ALC_APIENTRY *LPALCCAPTUREOPENDEVICE)(const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize);
|
||||
typedef ALCboolean (ALC_APIENTRY *LPALCCAPTURECLOSEDEVICE)(ALCdevice *device);
|
||||
typedef void (ALC_APIENTRY *LPALCCAPTURESTART)(ALCdevice *device);
|
||||
typedef void (ALC_APIENTRY *LPALCCAPTURESTOP)(ALCdevice *device);
|
||||
typedef void (ALC_APIENTRY *LPALCCAPTURESAMPLES)(ALCdevice *device, ALCvoid *buffer, ALCsizei samples);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* AL_ALC_H */
|
||||
52
dep/dreamcast/include/ALdc/alut.h
Normal file
52
dep/dreamcast/include/ALdc/alut.h
Normal file
@ -0,0 +1,52 @@
|
||||
#pragma once
|
||||
|
||||
#include "al.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ALUT_API_MAJOR_VERSION 1
|
||||
#define ALUT_API_MINOR_VERSION 1
|
||||
|
||||
#define ALUT_ERROR_NO_ERROR 0
|
||||
#define ALUT_ERROR_OUT_OF_MEMORY 0x200
|
||||
#define ALUT_ERROR_INVALID_ENUM 0x201
|
||||
#define ALUT_ERROR_INVALID_VALUE 0x202
|
||||
#define ALUT_ERROR_INVALID_OPERATION 0x203
|
||||
#define ALUT_ERROR_NO_CURRENT_CONTEXT 0x204
|
||||
#define ALUT_ERROR_AL_ERROR_ON_ENTRY 0x205
|
||||
#define ALUT_ERROR_ALC_ERROR_ON_ENTRY 0x206
|
||||
#define ALUT_ERROR_OPEN_DEVICE 0x207
|
||||
#define ALUT_ERROR_CLOSE_DEVICE 0x208
|
||||
#define ALUT_ERROR_CREATE_CONTEXT 0x209
|
||||
#define ALUT_ERROR_MAKE_CONTEXT_CURRENT 0x20A
|
||||
#define ALUT_ERROR_DESTROY_CONTEXT 0x20B
|
||||
#define ALUT_ERROR_GEN_BUFFERS 0x20C
|
||||
#define ALUT_ERROR_BUFFER_DATA 0x20D
|
||||
#define ALUT_ERROR_IO_ERROR 0x20E
|
||||
#define ALUT_ERROR_UNSUPPORTED_FILE_TYPE 0x20F
|
||||
#define ALUT_ERROR_UNSUPPORTED_FILE_SUBTYPE 0x210
|
||||
#define ALUT_ERROR_CORRUPT_OR_TRUNCATED_DATA 0x211
|
||||
|
||||
AL_API ALboolean AL_APIENTRY alutInit(int *argcp, char **argv);
|
||||
AL_API ALboolean AL_APIENTRY alutInitWithoutContext(int *argcp, char **argv);
|
||||
AL_API ALboolean AL_APIENTRY alutExit(void);
|
||||
|
||||
AL_API ALenum AL_APIENTRY alutGetError();
|
||||
AL_API const ALchar* AL_APIENTRY alutGetErrorString(ALenum error);
|
||||
|
||||
AL_API void AL_APIENTRY alutLoadWAVFile (
|
||||
ALchar *filename,
|
||||
ALenum *format,
|
||||
ALvoid **data,
|
||||
ALsizei *size,
|
||||
ALsizei *frequency,
|
||||
ALboolean* loop
|
||||
);
|
||||
|
||||
AL_API void AL_APIENTRY alutUnloadWAV (ALenum format, ALvoid *data, ALsizei size, ALsizei frequency);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
764
dep/dreamcast/include/GLdc/gl.h
Normal file
764
dep/dreamcast/include/GLdc/gl.h
Normal file
@ -0,0 +1,764 @@
|
||||
/* KallistiGL for KallistiOS ##version##
|
||||
|
||||
libgl/gl.h
|
||||
Copyright (C) 2013-2014 Josh "PH3NOM" Pearson
|
||||
Copyright (C) 2014, 2016 Lawrence Sebald
|
||||
|
||||
Some functionality adapted from the original KOS libgl:
|
||||
Copyright (C) 2001 Dan Potter
|
||||
Copyright (C) 2002 Benoit Miller
|
||||
|
||||
This API implements much but not all of the OpenGL 1.1 for KallistiOS.
|
||||
*/
|
||||
|
||||
#ifndef __GL_GL_H
|
||||
#define __GL_GL_H
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__BEGIN_DECLS
|
||||
|
||||
#include <math.h>
|
||||
|
||||
/* Primitive Types taken from GL for compatability */
|
||||
/* Not all types are implemented in Open GL DC V.1.0 */
|
||||
#define GL_POINTS 0x0000
|
||||
#define GL_LINES 0x0001
|
||||
#define GL_LINE_LOOP 0x0002
|
||||
#define GL_LINE_STRIP 0x0003
|
||||
#define GL_TRIANGLES 0x0004
|
||||
#define GL_TRIANGLE_STRIP 0x0005
|
||||
#define GL_TRIANGLE_FAN 0x0006
|
||||
#define GL_QUADS 0x0007
|
||||
#define GL_QUAD_STRIP 0x0008
|
||||
#define GL_POLYGON 0x0009
|
||||
|
||||
/* FrontFaceDirection */
|
||||
#define GL_CW 0x0900
|
||||
#define GL_CCW 0x0901
|
||||
|
||||
#define GL_NONE 0
|
||||
#define GL_FRONT_LEFT 0x0400
|
||||
#define GL_FRONT_RIGHT 0x0401
|
||||
#define GL_BACK_LEFT 0x0402
|
||||
#define GL_BACK_RIGHT 0x0403
|
||||
#define GL_FRONT 0x0404
|
||||
#define GL_BACK 0x0405
|
||||
#define GL_LEFT 0x0406
|
||||
#define GL_RIGHT 0x0407
|
||||
#define GL_FRONT_AND_BACK 0x0408
|
||||
#define GL_AUX0 0x0409
|
||||
#define GL_AUX1 0x040A
|
||||
#define GL_AUX2 0x040B
|
||||
#define GL_AUX3 0x040C
|
||||
#define GL_CULL_FACE 0x0B44
|
||||
#define GL_CULL_FACE_MODE 0x0B45
|
||||
#define GL_FRONT_FACE 0x0B46
|
||||
|
||||
/* Scissor box */
|
||||
#define GL_SCISSOR_TEST 0x0C11
|
||||
#define GL_SCISSOR_BOX 0x0C10
|
||||
|
||||
/* Stencil actions */
|
||||
#define GL_KEEP 0x1E00
|
||||
#define GL_INCR 0x1E02
|
||||
#define GL_DECR 0x1E03
|
||||
#define GL_INVERT 0x150A
|
||||
|
||||
/* Matrix modes */
|
||||
#define GL_MATRIX_MODE 0x0BA0
|
||||
#define GL_MODELVIEW 0x1700
|
||||
#define GL_PROJECTION 0x1701
|
||||
#define GL_TEXTURE 0x1702
|
||||
#define GL_COLOR 0x1703 /* NOTE: Not the usual value */
|
||||
|
||||
#define GL_MODELVIEW_MATRIX 0x0BA6
|
||||
#define GL_PROJECTION_MATRIX 0x0BA7
|
||||
#define GL_TEXTURE_MATRIX 0x0BA8
|
||||
#define GL_COLOR_MATRIX 0x80B1
|
||||
|
||||
/* Depth buffer */
|
||||
#define GL_NEVER 0x0200
|
||||
#define GL_LESS 0x0201
|
||||
#define GL_EQUAL 0x0202
|
||||
#define GL_LEQUAL 0x0203
|
||||
#define GL_GREATER 0x0204
|
||||
#define GL_NOTEQUAL 0x0205
|
||||
#define GL_GEQUAL 0x0206
|
||||
#define GL_ALWAYS 0x0207
|
||||
#define GL_DEPTH_TEST 0x0B71
|
||||
#define GL_DEPTH_BITS 0x0D56
|
||||
#define GL_DEPTH_CLEAR_VALUE 0x0B73
|
||||
#define GL_DEPTH_FUNC 0x0B74
|
||||
#define GL_DEPTH_RANGE 0x0B70
|
||||
#define GL_DEPTH_WRITEMASK 0x0B72
|
||||
#define GL_DEPTH_COMPONENT 0x1902
|
||||
|
||||
/* Blending: Simply Need to Map GL constants to PVR constants */
|
||||
#define GL_BLEND_DST 0x0BE0
|
||||
#define GL_BLEND_SRC 0x0BE1
|
||||
#define GL_BLEND 0x0BE2 /* capability bit */
|
||||
|
||||
#define GL_ZERO 0x0
|
||||
#define GL_ONE 0x1
|
||||
#define GL_SRC_COLOR 0x0300
|
||||
#define GL_ONE_MINUS_SRC_COLOR 0x0301
|
||||
#define GL_SRC_ALPHA 0x0302
|
||||
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
|
||||
#define GL_DST_ALPHA 0x0304
|
||||
#define GL_ONE_MINUS_DST_ALPHA 0x0305
|
||||
#define GL_DST_COLOR 0x0306
|
||||
#define GL_ONE_MINUS_DST_COLOR 0x0307
|
||||
#define GL_SRC_ALPHA_SATURATE 0x0308
|
||||
|
||||
/* Misc texture constants */
|
||||
#define GL_TEXTURE_2D 0x0DE1
|
||||
#define GL_TEXTURE_WRAP_S 0x2802
|
||||
#define GL_TEXTURE_WRAP_T 0x2803
|
||||
#define GL_TEXTURE_MAG_FILTER 0x2800
|
||||
#define GL_TEXTURE_MIN_FILTER 0x2801
|
||||
#define GL_MIRRORED_REPEAT 0x2902
|
||||
#define GL_REPEAT 0x2901
|
||||
#define GL_CLAMP 0x2900
|
||||
|
||||
/* Texture Environment */
|
||||
#define GL_TEXTURE_ENV_MODE 0x2200
|
||||
#define GL_REPLACE 0x1E01
|
||||
#define GL_MODULATE 0x2100
|
||||
#define GL_DECAL 0x2101
|
||||
|
||||
/* TextureMagFilter */
|
||||
#define GL_NEAREST 0x2600
|
||||
#define GL_LINEAR 0x2601
|
||||
|
||||
/* Texture mapping */
|
||||
#define GL_TEXTURE_ENV 0x2300
|
||||
#define GL_TEXTURE_ENV_COLOR 0x2201
|
||||
#define GL_NEAREST_MIPMAP_NEAREST 0x2700
|
||||
#define GL_NEAREST_MIPMAP_LINEAR 0x2702
|
||||
#define GL_LINEAR_MIPMAP_NEAREST 0x2701
|
||||
#define GL_LINEAR_MIPMAP_LINEAR 0x2703
|
||||
|
||||
#define GL_TEXTURE_BINDING_2D 0x8069
|
||||
|
||||
/* TextureUnit */
|
||||
#define GL_TEXTURE0 0x84C0
|
||||
#define GL_TEXTURE1 0x84C1
|
||||
#define GL_TEXTURE2 0x84C2
|
||||
#define GL_TEXTURE3 0x84C3
|
||||
#define GL_TEXTURE4 0x84C4
|
||||
#define GL_TEXTURE5 0x84C5
|
||||
#define GL_TEXTURE6 0x84C6
|
||||
#define GL_TEXTURE7 0x84C7
|
||||
#define GL_TEXTURE8 0x84C8
|
||||
#define GL_TEXTURE9 0x84C9
|
||||
#define GL_TEXTURE10 0x84CA
|
||||
#define GL_TEXTURE11 0x84CB
|
||||
#define GL_TEXTURE12 0x84CC
|
||||
#define GL_TEXTURE13 0x84CD
|
||||
#define GL_TEXTURE14 0x84CE
|
||||
#define GL_TEXTURE15 0x84CF
|
||||
#define GL_TEXTURE16 0x84D0
|
||||
#define GL_TEXTURE17 0x84D1
|
||||
#define GL_TEXTURE18 0x84D2
|
||||
#define GL_TEXTURE19 0x84D3
|
||||
#define GL_TEXTURE20 0x84D4
|
||||
#define GL_TEXTURE21 0x84D5
|
||||
#define GL_TEXTURE22 0x84D6
|
||||
#define GL_TEXTURE23 0x84D7
|
||||
#define GL_TEXTURE24 0x84D8
|
||||
#define GL_TEXTURE25 0x84D9
|
||||
#define GL_TEXTURE26 0x84DA
|
||||
#define GL_TEXTURE27 0x84DB
|
||||
#define GL_TEXTURE28 0x84DC
|
||||
#define GL_TEXTURE29 0x84DD
|
||||
#define GL_TEXTURE30 0x84DE
|
||||
#define GL_TEXTURE31 0x84DF
|
||||
#define GL_ACTIVE_TEXTURE 0x84E0
|
||||
#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
|
||||
|
||||
#define GL_CURRENT_BIT 0x00000001
|
||||
#define GL_POINT_BIT 0x00000002
|
||||
#define GL_LINE_BIT 0x00000004
|
||||
#define GL_POLYGON_BIT 0x00000008
|
||||
#define GL_POLYGON_STIPPLE_BIT 0x00000010
|
||||
#define GL_PIXEL_MODE_BIT 0x00000020
|
||||
#define GL_LIGHTING_BIT 0x00000040
|
||||
#define GL_FOG_BIT 0x00000080
|
||||
#define GL_DEPTH_BUFFER_BIT 0x00000100
|
||||
#define GL_ACCUM_BUFFER_BIT 0x00000200
|
||||
#define GL_STENCIL_BUFFER_BIT 0x00000400
|
||||
#define GL_VIEWPORT_BIT 0x00000800
|
||||
#define GL_TRANSFORM_BIT 0x00001000
|
||||
#define GL_ENABLE_BIT 0x00002000
|
||||
#define GL_COLOR_BUFFER_BIT 0x00004000
|
||||
#define GL_HINT_BIT 0x00008000
|
||||
#define GL_EVAL_BIT 0x00010000
|
||||
#define GL_LIST_BIT 0x00020000
|
||||
#define GL_TEXTURE_BIT 0x00040000
|
||||
#define GL_SCISSOR_BIT 0x00080000
|
||||
#define GL_ALL_ATTRIB_BITS 0x000FFFFF
|
||||
|
||||
/* Clip planes */
|
||||
#define GL_CLIP_PLANE0 0x3000
|
||||
#define GL_CLIP_PLANE1 0x3001
|
||||
#define GL_CLIP_PLANE2 0x3002
|
||||
#define GL_CLIP_PLANE3 0x3003
|
||||
#define GL_CLIP_PLANE4 0x3004
|
||||
#define GL_CLIP_PLANE5 0x3005
|
||||
|
||||
/* Fog */
|
||||
#define GL_FOG 0x0B60
|
||||
#define GL_FOG_MODE 0x0B65
|
||||
#define GL_FOG_DENSITY 0x0B62
|
||||
#define GL_FOG_COLOR 0x0B66
|
||||
#define GL_FOG_INDEX 0x0B61
|
||||
#define GL_FOG_START 0x0B63
|
||||
#define GL_FOG_END 0x0B64
|
||||
#define GL_LINEAR 0x2601
|
||||
#define GL_EXP 0x0800
|
||||
#define GL_EXP2 0x0801
|
||||
|
||||
/* Hints - Not used by the API, only here for compatibility */
|
||||
#define GL_DONT_CARE 0x1100
|
||||
#define GL_FASTEST 0x1101
|
||||
#define GL_NICEST 0x1102
|
||||
#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
|
||||
#define GL_POINT_SMOOTH_HINT 0x0C51
|
||||
#define GL_LINE_SMOOTH_HINT 0x0C52
|
||||
#define GL_POLYGON_SMOOTH_HINT 0x0C53
|
||||
#define GL_FOG_HINT 0x0C54
|
||||
|
||||
/* Lighting constants */
|
||||
#define GL_LIGHTING 0x0b50
|
||||
|
||||
#define GL_LIGHT0 0x4000
|
||||
#define GL_LIGHT1 0x4001
|
||||
#define GL_LIGHT2 0x4002
|
||||
#define GL_LIGHT3 0x4003
|
||||
#define GL_LIGHT4 0x4004
|
||||
#define GL_LIGHT5 0x4005
|
||||
#define GL_LIGHT6 0x4006
|
||||
#define GL_LIGHT7 0x4007
|
||||
#define GL_LIGHT8 0x4008
|
||||
#define GL_LIGHT9 0x4009
|
||||
#define GL_LIGHT10 0x400A
|
||||
#define GL_LIGHT11 0x400B
|
||||
#define GL_LIGHT12 0x400C
|
||||
#define GL_LIGHT13 0x400D
|
||||
#define GL_LIGHT14 0x400E
|
||||
#define GL_LIGHT15 0x400F
|
||||
|
||||
/* EXT_separate_specular_color.txt */
|
||||
#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
|
||||
#define GL_SINGLE_COLOR 0x81F9
|
||||
#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
|
||||
|
||||
/* glPolygonOffset */
|
||||
#define GL_POLYGON_OFFSET_FACTOR 0x8038
|
||||
#define GL_POLYGON_OFFSET_UNITS 0x2A00
|
||||
#define GL_POLYGON_OFFSET_POINT 0x2A01
|
||||
#define GL_POLYGON_OFFSET_LINE 0x2A02
|
||||
#define GL_POLYGON_OFFSET_FILL 0x8037
|
||||
|
||||
/* Client state caps */
|
||||
#define GL_VERTEX_ARRAY 0x8074
|
||||
#define GL_NORMAL_ARRAY 0x8075
|
||||
#define GL_COLOR_ARRAY 0x8076
|
||||
#define GL_INDEX_ARRAY 0x8077
|
||||
#define GL_TEXTURE_COORD_ARRAY 0x8078
|
||||
|
||||
/* LightParameter */
|
||||
#define GL_AMBIENT 0x1200
|
||||
#define GL_DIFFUSE 0x1201
|
||||
#define GL_SPECULAR 0x1202
|
||||
#define GL_POSITION 0x1203
|
||||
#define GL_SPOT_DIRECTION 0x1204
|
||||
#define GL_SPOT_EXPONENT 0x1205
|
||||
#define GL_SPOT_CUTOFF 0x1206
|
||||
#define GL_CONSTANT_ATTENUATION 0x1207
|
||||
#define GL_LINEAR_ATTENUATION 0x1208
|
||||
#define GL_QUADRATIC_ATTENUATION 0x1209
|
||||
|
||||
/* MaterialParameter */
|
||||
#define GL_EMISSION 0x1600
|
||||
#define GL_SHININESS 0x1601
|
||||
#define GL_AMBIENT_AND_DIFFUSE 0x1602
|
||||
#define GL_COLOR_INDEXES 0x1603
|
||||
#define GL_COLOR_MATERIAL 0x0B57
|
||||
#define GL_COLOR_MATERIAL_FACE 0x0B55
|
||||
#define GL_COLOR_MATERIAL_PARAMETER 0x0B56
|
||||
#define GL_NORMALIZE 0x0BA1
|
||||
#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
|
||||
#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
|
||||
#define GL_LIGHT_MODEL_AMBIENT 0x0B53
|
||||
#define GL_FRONT_AND_BACK 0x0408
|
||||
#define GL_FRONT 0x0404
|
||||
#define GL_BACK 0x0405
|
||||
|
||||
#define GL_SHADE_MODEL 0x0b54
|
||||
#define GL_FLAT 0x1d00
|
||||
#define GL_SMOOTH 0x1d01
|
||||
|
||||
/* Data types */
|
||||
#define GL_BYTE 0x1400
|
||||
#define GL_UNSIGNED_BYTE 0x1401
|
||||
#define GL_SHORT 0x1402
|
||||
#define GL_UNSIGNED_SHORT 0x1403
|
||||
#define GL_INT 0x1404
|
||||
#define GL_UNSIGNED_INT 0x1405
|
||||
#define GL_FLOAT 0x1406
|
||||
#define GL_DOUBLE 0x140A
|
||||
#define GL_2_BYTES 0x1407
|
||||
#define GL_3_BYTES 0x1408
|
||||
#define GL_4_BYTES 0x1409
|
||||
|
||||
/* ErrorCode */
|
||||
#define GL_NO_ERROR ((GLenum) 0)
|
||||
#define GL_INVALID_ENUM 0x0500
|
||||
#define GL_INVALID_VALUE 0x0501
|
||||
#define GL_INVALID_OPERATION 0x0502
|
||||
#define GL_STACK_OVERFLOW 0x0503
|
||||
#define GL_STACK_UNDERFLOW 0x0504
|
||||
#define GL_OUT_OF_MEMORY 0x0505
|
||||
|
||||
/* GetPName */
|
||||
#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
|
||||
#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
|
||||
#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
|
||||
#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
|
||||
#define GL_MAX_LIGHTS 0x0D31
|
||||
#define GL_MAX_TEXTURE_SIZE 0x0D33
|
||||
#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
|
||||
#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
|
||||
#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
|
||||
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
|
||||
#define GL_MAX_ELEMENTS_VERTICES 0x80E8
|
||||
#define GL_MAX_ELEMENTS_INDICES 0x80E9
|
||||
#define GL_MAX_TEXTURE_UNITS 0x84E2
|
||||
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
|
||||
#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
|
||||
#define GL_SUBPIXEL_BITS 0x0D50
|
||||
#define GL_RED_BITS 0x0D52
|
||||
#define GL_GREEN_BITS 0x0D53
|
||||
#define GL_BLUE_BITS 0x0D54
|
||||
#define GL_ALPHA_BITS 0x0D55
|
||||
#define GL_DEPTH_BITS 0x0D56
|
||||
#define GL_STENCIL_BITS 0x0D57
|
||||
|
||||
/* StringName */
|
||||
#define GL_VENDOR 0x1F00
|
||||
#define GL_RENDERER 0x1F01
|
||||
#define GL_VERSION 0x1F02
|
||||
#define GL_EXTENSIONS 0x1F03
|
||||
|
||||
/* GL KOS Texture Matrix Enable Bit */
|
||||
#define GL_KOS_TEXTURE_MATRIX 0x002F
|
||||
|
||||
#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
|
||||
#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
|
||||
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
|
||||
#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
|
||||
#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
|
||||
#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
|
||||
#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
|
||||
#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
|
||||
|
||||
#define GL_COLOR_INDEX 0x1900
|
||||
#define GL_RED 0x1903
|
||||
#define GL_GREEN 0x1904
|
||||
#define GL_BLUE 0x1905
|
||||
#define GL_ALPHA 0x1906
|
||||
#define GL_RGB 0x1907
|
||||
#define GL_RGBA 0x1908
|
||||
#define GL_LUMINANCE 0x1909
|
||||
#define GL_LUMINANCE_ALPHA 0x190A
|
||||
|
||||
#define GL_R3_G3_B2 0x2A10
|
||||
|
||||
#define GL_ALPHA4 0x803B
|
||||
#define GL_ALPHA8 0x803C
|
||||
#define GL_ALPHA12 0x803D
|
||||
#define GL_ALPHA16 0x803E
|
||||
|
||||
#define GL_LUMINANCE4 0x803F
|
||||
#define GL_LUMINANCE8 0x8040
|
||||
#define GL_LUMINANCE12 0x8041
|
||||
#define GL_LUMINANCE16 0x8042
|
||||
|
||||
#define GL_LUMINANCE4_ALPHA4 0x8043
|
||||
#define GL_LUMINANCE6_ALPHA2 0x8044
|
||||
#define GL_LUMINANCE8_ALPHA8 0x8045
|
||||
#define GL_LUMINANCE12_ALPHA4 0x8046
|
||||
#define GL_LUMINANCE12_ALPHA12 0x8047
|
||||
#define GL_LUMINANCE16_ALPHA16 0x8048
|
||||
|
||||
#define GL_INTENSITY4 0x804A
|
||||
#define GL_INTENSITY8 0x804B
|
||||
#define GL_INTENSITY12 0x804C
|
||||
#define GL_INTENSITY16 0x804D
|
||||
|
||||
#define GL_BGR 0x80E0
|
||||
#define GL_BGRA 0x80E1
|
||||
#define GL_INTENSITY 0x8049
|
||||
#define GL_RGB4 0x804F
|
||||
#define GL_RGB5 0x8050
|
||||
#define GL_RGB8 0x8051
|
||||
#define GL_RGB10 0x8052
|
||||
#define GL_RGB12 0x8053
|
||||
#define GL_RGB16 0x8054
|
||||
#define GL_RGBA2 0x8055
|
||||
#define GL_RGBA4 0x8056
|
||||
#define GL_RGB5_A1 0x8057
|
||||
#define GL_RGBA8 0x8058
|
||||
#define GL_RGB10_A2 0x8059
|
||||
#define GL_RGBA12 0x805A
|
||||
#define GL_RGBA16 0x805B
|
||||
|
||||
#define GL_R8 0x8229
|
||||
#define GL_RG8 0x822B
|
||||
#define GL_RG 0x8227
|
||||
#define GL_R16 0x822A
|
||||
#define GL_RG16 0x822C
|
||||
#define GL_COMPRESSED_RED 0x8225
|
||||
#define GL_COMPRESSED_RG 0x8226
|
||||
|
||||
/* Polygons */
|
||||
#define GL_POINT 0x1B00
|
||||
#define GL_LINE 0x1B01
|
||||
#define GL_FILL 0x1B02
|
||||
#define GL_CW 0x0900
|
||||
#define GL_CCW 0x0901
|
||||
#define GL_FRONT 0x0404
|
||||
#define GL_BACK 0x0405
|
||||
#define GL_POLYGON_MODE 0x0B40
|
||||
#define GL_POLYGON_SMOOTH 0x0B41
|
||||
#define GL_POLYGON_STIPPLE 0x0B42
|
||||
#define GL_EDGE_FLAG 0x0B43
|
||||
#define GL_CULL_FACE 0x0B44
|
||||
#define GL_CULL_FACE_MODE 0x0B45
|
||||
#define GL_FRONT_FACE 0x0B46
|
||||
#define GL_POLYGON_OFFSET_FACTOR 0x8038
|
||||
#define GL_POLYGON_OFFSET_UNITS 0x2A00
|
||||
#define GL_POLYGON_OFFSET_POINT 0x2A01
|
||||
#define GL_POLYGON_OFFSET_LINE 0x2A02
|
||||
#define GL_POLYGON_OFFSET_FILL 0x8037
|
||||
|
||||
#define GLbyte char
|
||||
#define GLshort short
|
||||
#define GLint int
|
||||
#define GLfloat float
|
||||
#define GLdouble double
|
||||
#define GLvoid void
|
||||
#define GLushort unsigned short
|
||||
#define GLuint unsigned int
|
||||
#define GLenum unsigned int
|
||||
#define GLsizei unsigned int
|
||||
#define GLfixed const unsigned int
|
||||
#define GLclampf float
|
||||
#define GLclampd double
|
||||
#define GLubyte unsigned char
|
||||
#define GLbitfield unsigned int
|
||||
#define GLboolean unsigned char
|
||||
#define GL_FALSE 0
|
||||
#define GL_TRUE 1
|
||||
|
||||
/* Stubs for portability */
|
||||
#define GL_LINE_SMOOTH 0x0B20
|
||||
#define GL_ALPHA_TEST 0x0BC0
|
||||
#define GL_STENCIL_TEST 0x0B90
|
||||
#define GL_STENCIL_WRITEMASK 0x0B98
|
||||
#define GL_INDEX_WRITEMASK 0x0C21
|
||||
#define GL_COLOR_WRITEMASK 0x0C23
|
||||
#define GL_UNPACK_SWAP_BYTES 0x0CF0
|
||||
#define GL_UNPACK_LSB_FIRST 0x0CF1
|
||||
#define GL_UNPACK_ROW_LENGTH 0x0CF2
|
||||
#define GL_UNPACK_SKIP_ROWS 0x0CF3
|
||||
#define GL_UNPACK_SKIP_PIXELS 0x0CF4
|
||||
#define GL_UNPACK_ALIGNMENT 0x0CF5
|
||||
#define GL_PACK_SWAP_BYTES 0x0D00
|
||||
#define GL_PACK_LSB_FIRST 0x0D01
|
||||
#define GL_PACK_ROW_LENGTH 0x0D02
|
||||
#define GL_PACK_SKIP_ROWS 0x0D03
|
||||
#define GL_PACK_SKIP_PIXELS 0x0D04
|
||||
#define GL_PACK_ALIGNMENT 0x0D05
|
||||
|
||||
#define GL_MULTISAMPLE 0x809D
|
||||
#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
|
||||
#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
|
||||
#define GL_SAMPLE_COVERAGE 0x80A0
|
||||
#define GL_SAMPLE_BUFFERS 0x80A8
|
||||
#define GL_SAMPLES 0x80A9
|
||||
#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
|
||||
#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
|
||||
#define GL_MULTISAMPLE_BIT 0x20000000
|
||||
|
||||
#define GLAPI extern
|
||||
#define APIENTRY
|
||||
|
||||
GLAPI void APIENTRY glFlush(void);
|
||||
GLAPI void APIENTRY glFinish(void);
|
||||
|
||||
/* Start Submission of Primitive Data */
|
||||
/* Currently Supported Primitive Types:
|
||||
-GL_POINTS ( does NOT work with glDrawArrays )( ZClipping NOT supported )
|
||||
-GL_TRIANGLES ( works with glDrawArrays )( ZClipping supported )
|
||||
-GL_TRIANLGLE_STRIP ( works with glDrawArrays )( ZClipping supported )
|
||||
-GL_QUADS ( works with glDrawArrays )( ZClipping supported )
|
||||
**/
|
||||
GLAPI void APIENTRY glBegin(GLenum mode);
|
||||
|
||||
/* Finish Submission of Primitive Data */
|
||||
GLAPI void APIENTRY glEnd(void);
|
||||
|
||||
/* Primitive Texture Coordinate Submission */
|
||||
GLAPI void APIENTRY glTexCoord1f(GLfloat u);
|
||||
GLAPI void APIENTRY glTexCoord1fv(const GLfloat *u);
|
||||
GLAPI void APIENTRY glTexCoord2f(GLfloat u, GLfloat v);
|
||||
GLAPI void APIENTRY glTexCoord2fv(const GLfloat *uv);
|
||||
|
||||
/* Primitive Color Submission */
|
||||
GLAPI void APIENTRY glColor1ui(GLuint argb);
|
||||
GLAPI void APIENTRY glColor4ub(GLubyte r, GLubyte g, GLubyte b, GLubyte a);
|
||||
GLAPI void APIENTRY glColor4ubv(const GLubyte *v);
|
||||
GLAPI void APIENTRY glColor3f(GLfloat r, GLfloat g, GLfloat b);
|
||||
GLAPI void APIENTRY glColor3ub(GLubyte r, GLubyte g, GLubyte b);
|
||||
GLAPI void APIENTRY glColor3ubv(const GLubyte *v);
|
||||
GLAPI void APIENTRY glColor3fv(const GLfloat *rgb);
|
||||
GLAPI void APIENTRY glColor4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a);
|
||||
GLAPI void APIENTRY glColor4fv(const GLfloat *rgba);
|
||||
|
||||
/* Primitive Normal Submission */
|
||||
GLAPI void APIENTRY glNormal3f(GLfloat x, GLfloat y, GLfloat z);
|
||||
#define glNormal3i glNormal3f
|
||||
GLAPI void APIENTRY glNormal3fv(const GLfloat *xyz);
|
||||
#define glNormal3iv glNormal3fv
|
||||
|
||||
/* Primitive 2D Position Submission */
|
||||
GLAPI void APIENTRY glVertex2f(GLfloat x, GLfloat y);
|
||||
#define glVertex2i glVertex2f
|
||||
GLAPI void APIENTRY glVertex2fv(const GLfloat *xy);
|
||||
#define glVertex2iv glVertex2fv
|
||||
|
||||
/* Primitive 3D Position Submission */
|
||||
GLAPI void APIENTRY glVertex3f(GLfloat, GLfloat, GLfloat);
|
||||
GLAPI void APIENTRY glVertex3fv(const GLfloat *);
|
||||
|
||||
/* 2D Non-Textured Rectangle Submission */
|
||||
GLAPI GLvoid APIENTRY glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
|
||||
#define glRectd glRectf
|
||||
GLAPI GLvoid APIENTRY glRectfv(const GLfloat *v1, const GLfloat *v2);
|
||||
#define glRectdv glRectfv
|
||||
GLAPI GLvoid APIENTRY glRecti(GLint x1, GLint y1, GLint x2, GLint y2);
|
||||
#define glRects glRecti
|
||||
GLAPI GLvoid APIENTRY glRectiv(const GLint *v1, const GLint *v2);
|
||||
#define glRectsv glRectiv
|
||||
|
||||
/* Primitive configuration */
|
||||
GLAPI void APIENTRY glLineWidth(GLfloat width);
|
||||
GLAPI void APIENTRY glPointSize(GLfloat size);
|
||||
|
||||
/* Enable / Disable Capability */
|
||||
/* Currently Supported Capabilities:
|
||||
GL_TEXTURE_2D
|
||||
GL_BLEND
|
||||
GL_DEPTH_TEST
|
||||
GL_LIGHTING
|
||||
GL_SCISSOR_TEST
|
||||
GL_FOG
|
||||
GL_CULL_FACE
|
||||
GL_KOS_NEARZ_CLIPPING
|
||||
GL_KOS_TEXTURE_MATRIX
|
||||
*/
|
||||
GLAPI void APIENTRY glEnable(GLenum cap);
|
||||
GLAPI void APIENTRY glDisable(GLenum cap);
|
||||
|
||||
/* Clear Caps */
|
||||
GLAPI void APIENTRY glClear(GLuint mode);
|
||||
GLAPI void APIENTRY glClearColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a);
|
||||
|
||||
GLAPI void APIENTRY glReadBuffer(GLenum mode);
|
||||
GLAPI void APIENTRY glDrawBuffer(GLenum mode);
|
||||
|
||||
/* Depth Testing */
|
||||
GLAPI void APIENTRY glClearDepth(GLdouble depth);
|
||||
GLAPI void APIENTRY glClearDepthf(GLfloat depth);
|
||||
GLAPI void APIENTRY glDepthMask(GLboolean flag);
|
||||
GLAPI void APIENTRY glDepthFunc(GLenum func);
|
||||
GLAPI void APIENTRY glDepthRange(GLdouble n, GLdouble f);
|
||||
GLAPI void APIENTRY glDepthRangef(GLfloat n, GLfloat f);
|
||||
|
||||
/* Hints */
|
||||
/* Currently Supported Capabilities:
|
||||
GL_PERSPECTIVE_CORRECTION_HINT - This will Enable Texture Super-Sampling on the PVR */
|
||||
GLAPI void APIENTRY glHint(GLenum target, GLenum mode);
|
||||
|
||||
/* Culling */
|
||||
GLAPI void APIENTRY glFrontFace(GLenum mode);
|
||||
GLAPI void APIENTRY glCullFace(GLenum mode);
|
||||
|
||||
/* Shading - Flat or Goraud */
|
||||
GLAPI void APIENTRY glShadeModel(GLenum mode);
|
||||
|
||||
/* Blending */
|
||||
GLAPI void APIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor);
|
||||
|
||||
/* Texturing */
|
||||
GLAPI void APIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param);
|
||||
GLAPI void APIENTRY glTexParameterf(GLenum target, GLenum pname, GLfloat param);
|
||||
GLAPI void APIENTRY glTexEnvi(GLenum target, GLenum pname, GLint param);
|
||||
GLAPI void APIENTRY glTexEnvf(GLenum target, GLenum pname, GLfloat param);
|
||||
|
||||
GLAPI GLboolean APIENTRY glIsTexture(GLuint texture);
|
||||
GLAPI void APIENTRY glGenTextures(GLsizei n, GLuint *textures);
|
||||
GLAPI void APIENTRY glDeleteTextures(GLsizei n, GLuint *textures);
|
||||
GLAPI void APIENTRY glBindTexture(GLenum target, GLuint texture);
|
||||
|
||||
/* Loads texture from SH4 RAM into PVR VRAM applying color conversion if needed */
|
||||
/* internalformat must be one of the following constants:
|
||||
GL_RGB
|
||||
GL_RGBA
|
||||
|
||||
format must be the same as internalformat
|
||||
|
||||
if internal format is GL_RGB, type must be one of the following constants:
|
||||
GL_BYTE
|
||||
GL_UNSIGNED_BYTE
|
||||
GL_SHORT
|
||||
GL_UNSIGNED_SHORT
|
||||
GL_FLOAT
|
||||
GL_UNSIGNED_SHORT_5_6_5
|
||||
GL_UNSIGNED_SHORT_5_6_5_TWID
|
||||
|
||||
if internal format is GL_RGBA, type must be one of the following constants:
|
||||
GL_BYTE
|
||||
GL_UNSIGNED_BYTE
|
||||
GL_SHORT
|
||||
GL_UNSIGNED_SHORT
|
||||
GL_FLOAT
|
||||
GL_UNSIGNED_SHORT_4_4_4_4
|
||||
GL_UNSIGNED_SHORT_4_4_4_4_TWID
|
||||
GL_UNSIGNED_SHORT_1_5_5_5
|
||||
GL_UNSIGNED_SHORT_1_5_5_5_TWID
|
||||
*/
|
||||
GLAPI void APIENTRY glTexImage2D(GLenum target, GLint level, GLint internalFormat,
|
||||
GLsizei width, GLsizei height, GLint border,
|
||||
GLenum format, GLenum type, const GLvoid *data);
|
||||
|
||||
GLAPI void APIENTRY glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
|
||||
GLAPI void APIENTRY glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GLAPI void APIENTRY glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
|
||||
GLAPI void APIENTRY glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
||||
GLAPI void APIENTRY glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
|
||||
GLAPI void APIENTRY glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
|
||||
|
||||
|
||||
/* GL Array API - Only GL_TRIANGLES, GL_TRIANGLE_STRIP, and GL_QUADS are supported */
|
||||
GLAPI void APIENTRY glVertexPointer(GLint size, GLenum type,
|
||||
GLsizei stride, const GLvoid *pointer);
|
||||
|
||||
GLAPI void APIENTRY glTexCoordPointer(GLint size, GLenum type,
|
||||
GLsizei stride, const GLvoid *pointer);
|
||||
|
||||
/* If a Normal Pointer is set and GL Lighting has been enabled,
|
||||
Vertex Lighting will be used instead of glColorPointer */
|
||||
GLAPI void APIENTRY glNormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
|
||||
/* Use either this OR glNormalPointer to color vertices, NOT both */
|
||||
GLAPI void APIENTRY glColorPointer(GLint size, GLenum type,
|
||||
GLsizei stride, const GLvoid *pointer);
|
||||
|
||||
/* Array Data Submission */
|
||||
GLAPI void APIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count);
|
||||
GLAPI void APIENTRY glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
|
||||
|
||||
GLAPI void APIENTRY glEnableClientState(GLenum cap);
|
||||
GLAPI void APIENTRY glDisableClientState(GLenum cap);
|
||||
|
||||
/* Transformation / Matrix Functions */
|
||||
|
||||
GLAPI void APIENTRY glMatrixMode(GLenum mode);
|
||||
|
||||
GLAPI void APIENTRY glLoadIdentity(void);
|
||||
|
||||
GLAPI void APIENTRY glLoadMatrixf(const GLfloat *m);
|
||||
GLAPI void APIENTRY glLoadTransposeMatrixf(const GLfloat *m);
|
||||
GLAPI void APIENTRY glMultMatrixf(const GLfloat *m);
|
||||
GLAPI void APIENTRY glMultTransposeMatrixf(const GLfloat *m);
|
||||
|
||||
GLAPI void APIENTRY glPushMatrix(void);
|
||||
GLAPI void APIENTRY glPopMatrix(void);
|
||||
|
||||
GLAPI void APIENTRY glTranslatef(GLfloat x, GLfloat y, GLfloat z);
|
||||
#define glTranslated glTranslatef
|
||||
|
||||
GLAPI void APIENTRY glScalef(GLfloat x, GLfloat y, GLfloat z);
|
||||
#define glScaled glScalef
|
||||
|
||||
GLAPI void APIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
|
||||
#define glRotated glRotatef
|
||||
|
||||
GLAPI void APIENTRY glOrtho(GLdouble left, GLdouble right,
|
||||
GLdouble bottom, GLdouble top,
|
||||
GLdouble znear, GLdouble zfar);
|
||||
|
||||
GLAPI void APIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
GLAPI void APIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
GLAPI void APIENTRY glKosGetMatrix(GLenum mode, GLfloat *params);
|
||||
|
||||
GLAPI void APIENTRY glFrustum(GLdouble left, GLdouble right,
|
||||
GLdouble bottom, GLdouble top,
|
||||
GLdouble znear, GLdouble zfar);
|
||||
|
||||
/* Fog Functions - client must enable GL_FOG for this to take effect */
|
||||
GLAPI void APIENTRY glFogi(GLenum pname, GLint param);
|
||||
GLAPI void APIENTRY glFogf(GLenum pname, GLfloat param);
|
||||
GLAPI void APIENTRY glFogiv(GLenum pname, const GLint* params);
|
||||
GLAPI void APIENTRY glFogfv(GLenum pname, const GLfloat *params);
|
||||
|
||||
/* Lighting Functions - client must enable GL_LIGHTING for this to take effect */
|
||||
|
||||
/* Set Individual Light Parameters */
|
||||
GLAPI void APIENTRY glLightfv(GLenum light, GLenum pname, const GLfloat *params);
|
||||
GLAPI void APIENTRY glLightf(GLenum light, GLenum pname, GLfloat param);
|
||||
|
||||
GLAPI void APIENTRY glLightModelf(GLenum pname, const GLfloat param);
|
||||
GLAPI void APIENTRY glLightModeli(GLenum pname, const GLint param);
|
||||
GLAPI void APIENTRY glLightModelfv(GLenum pname, const GLfloat *params);
|
||||
GLAPI void APIENTRY glLightModeliv(GLenum pname, const GLint *params);
|
||||
|
||||
|
||||
/* Set Global Material Parameters */
|
||||
GLAPI void APIENTRY glMateriali(GLenum face, GLenum pname, const GLint param);
|
||||
GLAPI void APIENTRY glMaterialf(GLenum face, GLenum pname, const GLfloat param);
|
||||
GLAPI void APIENTRY glMaterialfv(GLenum face, GLenum pname, const GLfloat *params);
|
||||
GLAPI void APIENTRY glColorMaterial(GLenum face, GLenum mode);
|
||||
|
||||
/* glGet Functions */
|
||||
GLAPI void APIENTRY glGetBooleanv(GLenum pname, GLboolean* params);
|
||||
GLAPI void APIENTRY glGetIntegerv(GLenum pname, GLint *params);
|
||||
GLAPI void APIENTRY glGetFloatv(GLenum pname, GLfloat *params);
|
||||
GLAPI GLboolean APIENTRY glIsEnabled(GLenum cap);
|
||||
GLAPI const GLubyte* APIENTRY glGetString(GLenum name);
|
||||
|
||||
/* Error handling */
|
||||
GLAPI GLenum APIENTRY glGetError(void);
|
||||
|
||||
/* Non Operational Stubs for portability */
|
||||
GLAPI void APIENTRY glAlphaFunc(GLenum func, GLclampf ref);
|
||||
GLAPI void APIENTRY glPolygonMode(GLenum face, GLenum mode);
|
||||
GLAPI void APIENTRY glPolygonOffset(GLfloat factor, GLfloat units);
|
||||
GLAPI void APIENTRY glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params);
|
||||
GLAPI void APIENTRY glGetTexParameteriv(GLenum target, GLenum pname, GLint *params);
|
||||
GLAPI void APIENTRY glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||
GLAPI void APIENTRY glPixelStorei(GLenum pname, GLint param);
|
||||
GLAPI void APIENTRY glStencilFunc(GLenum func, GLint ref, GLuint mask);
|
||||
GLAPI void APIENTRY glStencilOp(GLenum sfail, GLenum dpfail, GLenum dppass);
|
||||
GLAPI void APIENTRY glGetTexImage(GLenum tex, GLint lod, GLenum format, GLenum type, GLvoid* img);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !__GL_GL_H */
|
||||
231
dep/dreamcast/include/GLdc/glext.h
Normal file
231
dep/dreamcast/include/GLdc/glext.h
Normal file
@ -0,0 +1,231 @@
|
||||
/* KallistiGL for KallistiOS ##version##
|
||||
|
||||
libgl/glext.h
|
||||
Copyright (C) 2014 Josh Pearson
|
||||
Copyright (c) 2007-2013 The Khronos Group Inc.
|
||||
*/
|
||||
|
||||
#ifndef __GL_GLEXT_H
|
||||
#define __GL_GLEXT_H
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__BEGIN_DECLS
|
||||
|
||||
#define GL_TEXTURE0_ARB 0x84C0
|
||||
#define GL_TEXTURE1_ARB 0x84C1
|
||||
#define GL_TEXTURE2_ARB 0x84C2
|
||||
#define GL_TEXTURE3_ARB 0x84C3
|
||||
#define GL_TEXTURE4_ARB 0x84C4
|
||||
#define GL_TEXTURE5_ARB 0x84C5
|
||||
#define GL_TEXTURE6_ARB 0x84C6
|
||||
#define GL_TEXTURE7_ARB 0x84C7
|
||||
#define GL_TEXTURE8_ARB 0x84C8
|
||||
#define GL_TEXTURE9_ARB 0x84C9
|
||||
#define GL_TEXTURE10_ARB 0x84CA
|
||||
#define GL_TEXTURE11_ARB 0x84CB
|
||||
#define GL_TEXTURE12_ARB 0x84CC
|
||||
#define GL_TEXTURE13_ARB 0x84CD
|
||||
#define GL_TEXTURE14_ARB 0x84CE
|
||||
#define GL_TEXTURE15_ARB 0x84CF
|
||||
#define GL_TEXTURE16_ARB 0x84D0
|
||||
#define GL_TEXTURE17_ARB 0x84D1
|
||||
#define GL_TEXTURE18_ARB 0x84D2
|
||||
#define GL_TEXTURE19_ARB 0x84D3
|
||||
#define GL_TEXTURE20_ARB 0x84D4
|
||||
#define GL_TEXTURE21_ARB 0x84D5
|
||||
#define GL_TEXTURE22_ARB 0x84D6
|
||||
#define GL_TEXTURE23_ARB 0x84D7
|
||||
#define GL_TEXTURE24_ARB 0x84D8
|
||||
#define GL_TEXTURE25_ARB 0x84D9
|
||||
#define GL_TEXTURE26_ARB 0x84DA
|
||||
#define GL_TEXTURE27_ARB 0x84DB
|
||||
#define GL_TEXTURE28_ARB 0x84DC
|
||||
#define GL_TEXTURE29_ARB 0x84DD
|
||||
#define GL_TEXTURE30_ARB 0x84DE
|
||||
#define GL_TEXTURE31_ARB 0x84DF
|
||||
#define GL_ACTIVE_TEXTURE_ARB 0x84E0
|
||||
#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
|
||||
#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
|
||||
|
||||
#define GL_CLAMP_TO_EDGE 0x812F
|
||||
|
||||
#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
|
||||
#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
|
||||
#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5
|
||||
#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6
|
||||
|
||||
#define GL_NORMAL_MAP_ARB 0x8511
|
||||
#define GL_REFLECTION_MAP_ARB 0x8512
|
||||
#define GL_TEXTURE_CUBE_MAP_ARB 0x8513
|
||||
#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
|
||||
#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
|
||||
#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
|
||||
|
||||
#define GL_COMPRESSED_ALPHA_ARB 0x84E9
|
||||
#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA
|
||||
#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
|
||||
#define GL_COMPRESSED_INTENSITY_ARB 0x84EC
|
||||
#define GL_COMPRESSED_RGB_ARB 0x84ED
|
||||
#define GL_COMPRESSED_RGBA_ARB 0x84EE
|
||||
#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
|
||||
#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
|
||||
#define GL_TEXTURE_COMPRESSED_ARB 0x86A1
|
||||
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
|
||||
#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
|
||||
|
||||
#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
|
||||
#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
|
||||
#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
|
||||
#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
|
||||
#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
|
||||
#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
|
||||
#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
|
||||
#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
|
||||
#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
|
||||
#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
|
||||
#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
|
||||
#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
|
||||
#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
|
||||
#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
|
||||
#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
|
||||
#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
|
||||
#define GL_DEPTH_ATTACHMENT_EXT 0x8D00
|
||||
#define GL_STENCIL_ATTACHMENT_EXT 0x8D20
|
||||
#define GL_FRAMEBUFFER_EXT 0x8D40
|
||||
#define GL_RENDERBUFFER_EXT 0x8D41
|
||||
#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
|
||||
#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
|
||||
#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
|
||||
|
||||
#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
|
||||
#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
|
||||
#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
|
||||
|
||||
/* Multitexture extensions */
|
||||
GLAPI void APIENTRY glActiveTextureARB(GLenum texture);
|
||||
GLAPI void APIENTRY glClientActiveTextureARB(GLenum texture);
|
||||
GLAPI void APIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);
|
||||
|
||||
GLAPI void APIENTRY glGenFramebuffersEXT(GLsizei n, GLuint* framebuffers);
|
||||
GLAPI void APIENTRY glDeleteFramebuffersEXT(GLsizei n, const GLuint* framebuffers);
|
||||
GLAPI void APIENTRY glBindFramebufferEXT(GLenum target, GLuint framebuffer);
|
||||
GLAPI void APIENTRY glFramebufferTexture2DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
GLAPI void APIENTRY glGenerateMipmap(GLenum target);
|
||||
GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT(GLenum target);
|
||||
GLAPI GLboolean APIENTRY glIsFramebufferEXT(GLuint framebuffer);
|
||||
|
||||
/* ext_paletted_texture */
|
||||
#define GL_COLOR_INDEX1_EXT 0x80E2
|
||||
#define GL_COLOR_INDEX2_EXT 0x80E3
|
||||
#define GL_COLOR_INDEX4_EXT 0x80E4
|
||||
#define GL_COLOR_INDEX8_EXT 0x80E5
|
||||
#define GL_COLOR_INDEX12_EXT 0x80E6
|
||||
#define GL_COLOR_INDEX16_EXT 0x80E7
|
||||
|
||||
#define GL_COLOR_TABLE_FORMAT_EXT 0x80D8
|
||||
#define GL_COLOR_TABLE_WIDTH_EXT 0x80D9
|
||||
#define GL_COLOR_TABLE_RED_SIZE_EXT 0x80DA
|
||||
#define GL_COLOR_TABLE_GREEN_SIZE_EXT 0x80DB
|
||||
#define GL_COLOR_TABLE_BLUE_SIZE_EXT 0x80DC
|
||||
#define GL_COLOR_TABLE_ALPHA_SIZE_EXT 0x80DD
|
||||
#define GL_COLOR_TABLE_LUMINANCE_SIZE_EXT 0x80DE
|
||||
#define GL_COLOR_TABLE_INTENSITY_SIZE_EXT 0x80DF
|
||||
|
||||
#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
|
||||
|
||||
#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB
|
||||
|
||||
GLAPI void APIENTRY glColorTableEXT(GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *data);
|
||||
GLAPI void APIENTRY glColorSubTableEXT(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
|
||||
GLAPI void APIENTRY glGetColorTableEXT(GLenum target, GLenum format, GLenum type, GLvoid *data);
|
||||
GLAPI void APIENTRY glGetColorTableParameterivEXT(GLenum target, GLenum pname, GLint *params);
|
||||
GLAPI void APIENTRY glGetColorTableParameterfvEXT(GLenum target, GLenum pname, GLfloat *params);
|
||||
|
||||
/* ext OES_compressed_paletted_texture */
|
||||
|
||||
/* PixelInternalFormat */
|
||||
//Ozzy: used MesaGL definitions please adjust if it causes probs.
|
||||
#define GL_PALETTE4_RGB8_OES 0x8B90
|
||||
#define GL_PALETTE4_RGBA8_OES 0x8B91
|
||||
#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
|
||||
#define GL_PALETTE4_RGBA4_OES 0x8B93
|
||||
#define GL_PALETTE4_RGB5_A1_OES 0x8B94
|
||||
#define GL_PALETTE8_RGB8_OES 0x8B95
|
||||
#define GL_PALETTE8_RGBA8_OES 0x8B96
|
||||
#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
|
||||
#define GL_PALETTE8_RGBA4_OES 0x8B98
|
||||
#define GL_PALETTE8_RGB5_A1_OES 0x8B99
|
||||
|
||||
|
||||
/* Loads VQ compressed texture from SH4 RAM into PVR VRAM */
|
||||
/* internalformat must be one of the following constants:
|
||||
GL_UNSIGNED_SHORT_5_6_5_VQ
|
||||
GL_UNSIGNED_SHORT_5_6_5_VQ_TWID
|
||||
GL_UNSIGNED_SHORT_4_4_4_4_VQ
|
||||
GL_UNSIGNED_SHORT_4_4_4_4_VQ_TWID
|
||||
GL_UNSIGNED_SHORT_1_5_5_5_VQ
|
||||
GL_UNSIGNED_SHORT_1_5_5_5_VQ_TWID
|
||||
*/
|
||||
GLAPI void APIENTRY glCompressedTexImage2DARB(GLenum target,
|
||||
GLint level,
|
||||
GLenum internalformat,
|
||||
GLsizei width,
|
||||
GLsizei height,
|
||||
GLint border,
|
||||
GLsizei imageSize,
|
||||
const GLvoid *data);
|
||||
|
||||
GLAPI void APIENTRY glCompressedTexSubImage2DARB(GLenum target,
|
||||
GLint level,
|
||||
GLint xoffset,
|
||||
GLint yoffset,
|
||||
GLsizei width,
|
||||
GLsizei height,
|
||||
GLenum format,
|
||||
GLsizei imageSize,
|
||||
const GLvoid *data);
|
||||
|
||||
/* Core aliases */
|
||||
#define GL_INVALID_FRAMEBUFFER_OPERATION GL_INVALID_FRAMEBUFFER_OPERATION_EXT
|
||||
|
||||
#define glActiveTexture glActiveTextureARB
|
||||
#define glClientActiveTexture glClientActiveTextureARB
|
||||
#define glMultiTexCoord2f glMultiTexCoord2fARB
|
||||
|
||||
#define glGenerateMipmapEXT glGenerateMipmap
|
||||
#define glCompressedTexImage2D glCompressedTexImage2DARB
|
||||
#define glCompressedTexSubImage2D glCompressedTexSubImage2DARB
|
||||
|
||||
#ifndef GL_VERSION_1_4
|
||||
#define GL_VERSION_1_4 1
|
||||
#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
|
||||
#define GL_TEXTURE_LOD_BIAS 0x8501
|
||||
#define GL_MAX_TEXTURE_LOD_BIAS_DEFAULT 7
|
||||
#define GL_KOS_INTERNAL_DEFAULT_MIPMAP_LOD_BIAS 4
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_texture_lod_bias
|
||||
#define GL_EXT_texture_lod_bias 1
|
||||
#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
|
||||
#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
|
||||
#define GL_TEXTURE_LOD_BIAS_EXT 0x8501
|
||||
#endif /* GL_EXT_texture_lod_bias */
|
||||
|
||||
/* ATI_meminfo */
|
||||
#define GL_VBO_FREE_MEMORY_ATI 0x87FB
|
||||
#define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC
|
||||
#define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !__GL_GLEXT_H */
|
||||
218
dep/dreamcast/include/GLdc/glkos.h
Normal file
218
dep/dreamcast/include/GLdc/glkos.h
Normal file
@ -0,0 +1,218 @@
|
||||
#pragma once
|
||||
|
||||
#include "gl.h"
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
extern const char* GLDC_VERSION;
|
||||
|
||||
|
||||
/*
|
||||
* Dreamcast specific compressed + twiddled formats.
|
||||
* We use constants from the range 0xEEE0 onwards
|
||||
* to avoid trampling any real GL constants (this is in the middle of the
|
||||
* any_vendor_future_use range defined in the GL enum.spec file.
|
||||
*/
|
||||
#define GL_UNSIGNED_SHORT_5_6_5_TWID_KOS 0xEEE0
|
||||
#define GL_UNSIGNED_SHORT_1_5_5_5_REV_TWID_KOS 0xEEE2
|
||||
#define GL_UNSIGNED_SHORT_4_4_4_4_REV_TWID_KOS 0xEEE3
|
||||
|
||||
#define GL_COMPRESSED_RGB_565_VQ_KOS 0xEEE4
|
||||
#define GL_COMPRESSED_ARGB_1555_VQ_KOS 0xEEE6
|
||||
#define GL_COMPRESSED_ARGB_4444_VQ_KOS 0xEEE7
|
||||
|
||||
#define GL_COMPRESSED_RGB_565_VQ_TWID_KOS 0xEEE8
|
||||
#define GL_COMPRESSED_ARGB_1555_VQ_TWID_KOS 0xEEEA
|
||||
#define GL_COMPRESSED_ARGB_4444_VQ_TWID_KOS 0xEEEB
|
||||
|
||||
#define GL_COMPRESSED_RGB_565_VQ_MIPMAP_KOS 0xEEEC
|
||||
#define GL_COMPRESSED_ARGB_1555_VQ_MIPMAP_KOS 0xEEED
|
||||
#define GL_COMPRESSED_ARGB_4444_VQ_MIPMAP_KOS 0xEEEE
|
||||
|
||||
#define GL_COMPRESSED_RGB_565_VQ_MIPMAP_TWID_KOS 0xEEEF
|
||||
#define GL_COMPRESSED_ARGB_1555_VQ_MIPMAP_TWID_KOS 0xEEF0
|
||||
#define GL_COMPRESSED_ARGB_4444_VQ_MIPMAP_TWID_KOS 0xEEF1
|
||||
|
||||
#define GL_NEARZ_CLIPPING_KOS 0xEEFA
|
||||
|
||||
|
||||
/* Initialize the GL pipeline. GL will initialize the PVR. */
|
||||
GLAPI void APIENTRY glKosInit();
|
||||
|
||||
typedef struct {
|
||||
/* If GL_TRUE, enables pvr autosorting, this *will* break glDepthFunc/glDepthTest */
|
||||
GLboolean autosort_enabled;
|
||||
|
||||
/* If GL_TRUE, enables the PVR FSAA */
|
||||
GLboolean fsaa_enabled;
|
||||
|
||||
/* The internal format for paletted textures, must be GL_RGBA4 (default) or GL_RGBA8 */
|
||||
GLenum internal_palette_format;
|
||||
|
||||
/* Initial capacity of each of the OP, TR and PT lists in vertices */
|
||||
GLuint initial_op_capacity;
|
||||
GLuint initial_tr_capacity;
|
||||
GLuint initial_pt_capacity;
|
||||
GLuint initial_immediate_capacity;
|
||||
|
||||
/* Default: True
|
||||
*
|
||||
* Whether glTexImage should automatically twiddle textures
|
||||
* if the internal format is a generic format (e.g. GL_RGB).
|
||||
* this is the same as calling glEnable(GL_TEXTURE_TWIDDLE_KOS)
|
||||
* on boot */
|
||||
GLboolean texture_twiddle;
|
||||
} GLdcConfig;
|
||||
|
||||
|
||||
typedef struct {
|
||||
GLuint padding0;
|
||||
GLfloat x;
|
||||
GLfloat y;
|
||||
GLfloat z;
|
||||
GLfloat u;
|
||||
GLfloat v;
|
||||
GLubyte bgra[4];
|
||||
GLuint padding1;
|
||||
} GLVertexKOS;
|
||||
|
||||
GLAPI void APIENTRY glVertexPackColor3fKOS(GLVertexKOS* vertex, float r, float g, float b);
|
||||
GLAPI void APIENTRY glVertexPackColor4fKOS(GLVertexKOS* vertex, float r, float g, float b, float a);
|
||||
|
||||
GLAPI void APIENTRY glKosInitConfig(GLdcConfig* config);
|
||||
|
||||
/* Usage:
|
||||
*
|
||||
* GLdcConfig config;
|
||||
* glKosInitConfig(&config);
|
||||
*
|
||||
* config.autosort_enabled = GL_TRUE;
|
||||
*
|
||||
* glKosInitEx(&config);
|
||||
*/
|
||||
GLAPI void APIENTRY glKosInitEx(GLdcConfig* config);
|
||||
GLAPI void APIENTRY glKosSwapBuffers();
|
||||
GLAPI void APIENTRY glKosShutdown();
|
||||
|
||||
/*
|
||||
* CUSTOM EXTENSION multiple_shared_palette_KOS
|
||||
*
|
||||
* This extension allows using up to 4 different shared palettes
|
||||
* with ColorTableEXT. The following constants are provided
|
||||
* to use as targets for ColorTableExt:
|
||||
*
|
||||
* - SHARED_TEXTURE_PALETTE_0_KOS
|
||||
* - SHARED_TEXTURE_PALETTE_1_KOS
|
||||
* - SHARED_TEXTURE_PALETTE_2_KOS
|
||||
* - SHARED_TEXTURE_PALETTE_3_KOS
|
||||
*
|
||||
* In this use case SHARED_TEXTURE_PALETTE_0_KOS is interchangable with SHARED_TEXTURE_PALETTE_EXT
|
||||
* (both refer to the first shared palette).
|
||||
*
|
||||
* To select which palette a texture uses, a new pname is accepted by TexParameteri: SHARED_TEXTURE_BANK_KOS
|
||||
* by default textures use shared palette 0.
|
||||
*/
|
||||
|
||||
|
||||
#define GL_SHARED_TEXTURE_PALETTE_0_KOS 0xEEFC
|
||||
#define GL_SHARED_TEXTURE_PALETTE_1_KOS 0xEEFD
|
||||
#define GL_SHARED_TEXTURE_PALETTE_2_KOS 0xEEFE
|
||||
#define GL_SHARED_TEXTURE_PALETTE_3_KOS 0xEEFF
|
||||
#define GL_SHARED_TEXTURE_PALETTE_4_KOS 0xEF00
|
||||
#define GL_SHARED_TEXTURE_PALETTE_5_KOS 0xEF01
|
||||
#define GL_SHARED_TEXTURE_PALETTE_6_KOS 0xEF02
|
||||
#define GL_SHARED_TEXTURE_PALETTE_7_KOS 0xEF03
|
||||
#define GL_SHARED_TEXTURE_PALETTE_8_KOS 0xEF04
|
||||
#define GL_SHARED_TEXTURE_PALETTE_9_KOS 0xEF05
|
||||
|
||||
#define GL_SHARED_TEXTURE_PALETTE_10_KOS 0xEF06
|
||||
#define GL_SHARED_TEXTURE_PALETTE_11_KOS 0xEF07
|
||||
#define GL_SHARED_TEXTURE_PALETTE_12_KOS 0xEF08
|
||||
#define GL_SHARED_TEXTURE_PALETTE_13_KOS 0xEF09
|
||||
#define GL_SHARED_TEXTURE_PALETTE_14_KOS 0xEF0A
|
||||
#define GL_SHARED_TEXTURE_PALETTE_15_KOS 0xEF0B
|
||||
#define GL_SHARED_TEXTURE_PALETTE_16_KOS 0xEF0C
|
||||
#define GL_SHARED_TEXTURE_PALETTE_17_KOS 0xEF0D
|
||||
#define GL_SHARED_TEXTURE_PALETTE_18_KOS 0xEF0E
|
||||
#define GL_SHARED_TEXTURE_PALETTE_19_KOS 0xEF0F
|
||||
|
||||
#define GL_SHARED_TEXTURE_PALETTE_20_KOS 0xEF10
|
||||
#define GL_SHARED_TEXTURE_PALETTE_21_KOS 0xEF11
|
||||
#define GL_SHARED_TEXTURE_PALETTE_22_KOS 0xEF12
|
||||
#define GL_SHARED_TEXTURE_PALETTE_23_KOS 0xEF13
|
||||
#define GL_SHARED_TEXTURE_PALETTE_24_KOS 0xEF14
|
||||
#define GL_SHARED_TEXTURE_PALETTE_25_KOS 0xEF15
|
||||
#define GL_SHARED_TEXTURE_PALETTE_26_KOS 0xEF16
|
||||
#define GL_SHARED_TEXTURE_PALETTE_27_KOS 0xEF17
|
||||
#define GL_SHARED_TEXTURE_PALETTE_28_KOS 0xEF18
|
||||
#define GL_SHARED_TEXTURE_PALETTE_29_KOS 0xEF19
|
||||
|
||||
#define GL_SHARED_TEXTURE_PALETTE_30_KOS 0xEF1A
|
||||
#define GL_SHARED_TEXTURE_PALETTE_31_KOS 0xEF1B
|
||||
#define GL_SHARED_TEXTURE_PALETTE_32_KOS 0xEF1C
|
||||
#define GL_SHARED_TEXTURE_PALETTE_33_KOS 0xEF1D
|
||||
#define GL_SHARED_TEXTURE_PALETTE_34_KOS 0xEF1E
|
||||
#define GL_SHARED_TEXTURE_PALETTE_35_KOS 0xEF1F
|
||||
#define GL_SHARED_TEXTURE_PALETTE_36_KOS 0xEF20
|
||||
#define GL_SHARED_TEXTURE_PALETTE_37_KOS 0xEF21
|
||||
#define GL_SHARED_TEXTURE_PALETTE_38_KOS 0xEF22
|
||||
#define GL_SHARED_TEXTURE_PALETTE_39_KOS 0xEF23
|
||||
|
||||
#define GL_SHARED_TEXTURE_PALETTE_40_KOS 0xEF24
|
||||
#define GL_SHARED_TEXTURE_PALETTE_41_KOS 0xEF25
|
||||
#define GL_SHARED_TEXTURE_PALETTE_42_KOS 0xEF26
|
||||
#define GL_SHARED_TEXTURE_PALETTE_43_KOS 0xEF27
|
||||
#define GL_SHARED_TEXTURE_PALETTE_44_KOS 0xEF28
|
||||
#define GL_SHARED_TEXTURE_PALETTE_45_KOS 0xEF29
|
||||
#define GL_SHARED_TEXTURE_PALETTE_46_KOS 0xEF2A
|
||||
#define GL_SHARED_TEXTURE_PALETTE_47_KOS 0xEF2B
|
||||
#define GL_SHARED_TEXTURE_PALETTE_48_KOS 0xEF2C
|
||||
#define GL_SHARED_TEXTURE_PALETTE_49_KOS 0xEF2D
|
||||
|
||||
#define GL_SHARED_TEXTURE_PALETTE_50_KOS 0xEF2E
|
||||
#define GL_SHARED_TEXTURE_PALETTE_51_KOS 0xEF2F
|
||||
#define GL_SHARED_TEXTURE_PALETTE_52_KOS 0xEF30
|
||||
#define GL_SHARED_TEXTURE_PALETTE_53_KOS 0xEF31
|
||||
#define GL_SHARED_TEXTURE_PALETTE_54_KOS 0xEF32
|
||||
#define GL_SHARED_TEXTURE_PALETTE_55_KOS 0xEF33
|
||||
#define GL_SHARED_TEXTURE_PALETTE_56_KOS 0xEF34
|
||||
#define GL_SHARED_TEXTURE_PALETTE_57_KOS 0xEF35
|
||||
#define GL_SHARED_TEXTURE_PALETTE_58_KOS 0xEF36
|
||||
#define GL_SHARED_TEXTURE_PALETTE_59_KOS 0xEF37
|
||||
|
||||
#define GL_SHARED_TEXTURE_PALETTE_60_KOS 0xEF38
|
||||
#define GL_SHARED_TEXTURE_PALETTE_61_KOS 0xEF39
|
||||
#define GL_SHARED_TEXTURE_PALETTE_62_KOS 0xEF3A
|
||||
#define GL_SHARED_TEXTURE_PALETTE_63_KOS 0xEF3B
|
||||
|
||||
/* Pass to glTexParameteri to set the shared bank */
|
||||
#define GL_SHARED_TEXTURE_BANK_KOS 0xEF3C
|
||||
|
||||
/* Memory allocation extension (GL_KOS_texture_memory_management) */
|
||||
GLAPI GLvoid APIENTRY glDefragmentTextureMemory_KOS(void);
|
||||
|
||||
/* glGet extensions */
|
||||
#define GL_FREE_TEXTURE_MEMORY_KOS 0xEF3D
|
||||
#define GL_USED_TEXTURE_MEMORY_KOS 0xEF3E
|
||||
#define GL_FREE_CONTIGUOUS_TEXTURE_MEMORY_KOS 0xEF3F
|
||||
|
||||
//for palette internal format (glfcConfig)
|
||||
#define GL_RGB565_KOS 0xEF40
|
||||
#define GL_ARGB4444_KOS 0xEF41
|
||||
#define GL_ARGB1555_KOS 0xEF42
|
||||
#define GL_RGB565_TWID_KOS 0xEF43
|
||||
#define GL_ARGB4444_TWID_KOS 0xEF44
|
||||
#define GL_ARGB1555_TWID_KOS 0xEF45
|
||||
#define GL_COLOR_INDEX8_TWID_KOS 0xEF46
|
||||
#define GL_COLOR_INDEX4_TWID_KOS 0xEF47
|
||||
#define GL_RGB_TWID_KOS 0xEF48
|
||||
#define GL_RGBA_TWID_KOS 0xEF49
|
||||
|
||||
/* glGet extensions */
|
||||
#define GL_TEXTURE_INTERNAL_FORMAT_KOS 0xEF50
|
||||
|
||||
/* If enabled, will twiddle texture uploads where possible */
|
||||
#define GL_TEXTURE_TWIDDLE_KOS 0xEF51
|
||||
|
||||
__END_DECLS
|
||||
|
||||
46
dep/dreamcast/include/GLdc/glu.h
Normal file
46
dep/dreamcast/include/GLdc/glu.h
Normal file
@ -0,0 +1,46 @@
|
||||
/* KallistiGL for KallistiOS ##version##
|
||||
|
||||
libgl/glu.h
|
||||
Copyright (C) 2013-2014 Josh "PH3NOM" Pearson
|
||||
Copyright (C) 2016 Lawrence Sebald
|
||||
|
||||
Some functionality adapted from the original KOS libgl:
|
||||
Copyright (C) 2001 Dan Potter
|
||||
Copyright (C) 2002 Benoit Miller
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __GL_GLU_H
|
||||
#define __GL_GLU_H
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__BEGIN_DECLS
|
||||
|
||||
#ifndef BUILD_LIBGL
|
||||
#include "gl.h"
|
||||
#endif
|
||||
|
||||
#define GLU_FALSE 0
|
||||
#define GLU_TRUE 1
|
||||
|
||||
GLAPI void APIENTRY gluOrtho2D(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
|
||||
|
||||
/* gluPerspective - Set the Perspective for Rendering. */
|
||||
GLAPI void APIENTRY gluPerspective(GLdouble fovy, GLdouble aspect,
|
||||
GLdouble zNear, GLdouble zFar);
|
||||
|
||||
/* gluLookAt - Set Camera Position for Rendering. */
|
||||
GLAPI void APIENTRY gluLookAt(GLdouble eyex, GLdouble eyey, GLdouble eyez,
|
||||
GLdouble centerx, GLdouble centery, GLdouble centerz,
|
||||
GLdouble upx, GLdouble upy, GLdouble upz);
|
||||
|
||||
/* generate mipmaps for any image provided by the user and then pass them to OpenGL */
|
||||
GLAPI GLint APIENTRY gluBuild2DMipmaps(GLenum target, GLint internalFormat,
|
||||
GLsizei width, GLsizei height,
|
||||
GLenum format, GLenum type, const void *data);
|
||||
|
||||
GLAPI const GLubyte* APIENTRY gluErrorString(GLenum error);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !__GL_GLU_H */
|
||||
@ -58,8 +58,12 @@
|
||||
#define GL_SILENCE_DEPRECATION
|
||||
#include <OpenGL/gl.h>
|
||||
#else
|
||||
#if UF_ENV_DREAMCAST
|
||||
#include <GLdc/gl.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
struct ImGui_ImplOpenGL2_Data
|
||||
{
|
||||
|
||||
@ -325,7 +325,9 @@ void ext::opengl::CommandBuffer::drawIndexed( const ext::opengl::CommandBuffer::
|
||||
case uf::renderer::enums::Type::SHORT: vertexType = GL_SHORT; break;
|
||||
case uf::renderer::enums::Type::USHORT: vertexType = GL_UNSIGNED_SHORT; break;
|
||||
|
||||
#if GL_HALF_FLOAT
|
||||
case uf::renderer::enums::Type::HALF: vertexType = GL_HALF_FLOAT; break;
|
||||
#endif
|
||||
// case uf::renderer::enums::Type::BFLOAT: vertexType = GL_HALF_FLOAT; break; //
|
||||
case uf::renderer::enums::Type::FLOAT: vertexType = GL_FLOAT; break;
|
||||
}
|
||||
@ -335,7 +337,9 @@ void ext::opengl::CommandBuffer::drawIndexed( const ext::opengl::CommandBuffer::
|
||||
case uf::renderer::enums::Type::SHORT: normalType = GL_SHORT; break;
|
||||
case uf::renderer::enums::Type::USHORT: normalType = GL_UNSIGNED_SHORT; break;
|
||||
|
||||
#if GL_HALF_FLOAT
|
||||
case uf::renderer::enums::Type::HALF: normalType = GL_HALF_FLOAT; break;
|
||||
#endif
|
||||
// case uf::renderer::enums::Type::BFLOAT: normalType = GL_HALF_FLOAT; break; //
|
||||
case uf::renderer::enums::Type::FLOAT: normalType = GL_FLOAT; break;
|
||||
}
|
||||
@ -345,7 +349,9 @@ void ext::opengl::CommandBuffer::drawIndexed( const ext::opengl::CommandBuffer::
|
||||
case uf::renderer::enums::Type::SHORT: uvType = GL_SHORT; break;
|
||||
case uf::renderer::enums::Type::USHORT: uvType = GL_UNSIGNED_SHORT; break;
|
||||
|
||||
#if GL_HALF_FLOAT
|
||||
case uf::renderer::enums::Type::HALF: uvType = GL_HALF_FLOAT; break;
|
||||
#endif
|
||||
// case uf::renderer::enums::Type::BFLOAT: uvType = GL_HALF_FLOAT; break; //
|
||||
case uf::renderer::enums::Type::FLOAT: uvType = GL_FLOAT; break;
|
||||
}
|
||||
@ -354,8 +360,9 @@ void ext::opengl::CommandBuffer::drawIndexed( const ext::opengl::CommandBuffer::
|
||||
switch ( drawInfo.attributes.st.descriptor.type ) {
|
||||
case uf::renderer::enums::Type::SHORT: stType = GL_SHORT; break;
|
||||
case uf::renderer::enums::Type::USHORT: stType = GL_UNSIGNED_SHORT; break;
|
||||
|
||||
#if GL_HALF_FLOAT
|
||||
case uf::renderer::enums::Type::HALF: stType = GL_HALF_FLOAT; break;
|
||||
#endif
|
||||
// case uf::renderer::enums::Type::BFLOAT: stType = GL_HALF_FLOAT; break; //
|
||||
case uf::renderer::enums::Type::FLOAT: stType = GL_FLOAT; break;
|
||||
}
|
||||
|
||||
@ -327,8 +327,6 @@ void spec::dreamcast::Window::create( const spec::dreamcast::Window::vector_t& _
|
||||
|
||||
this->setSize(_size);
|
||||
|
||||
UF_MSG_DEBUG("DBL_MEM: {}", DBL_MEM);
|
||||
|
||||
#if UF_USE_OPENGL && UF_OPENGL_CONTEXT_IN_WINDOW
|
||||
this->m_context = (void*) spec::uni::Context::create( settings, *this );
|
||||
#endif
|
||||
|
||||
@ -171,9 +171,14 @@ uf::stl::string uf::io::hash( const uf::stl::string& filename ) {
|
||||
return uf::string::sha256( uf::io::readAsBuffer( filename ) );
|
||||
}
|
||||
bool uf::io::exists( const uf::stl::string& _filename ) {
|
||||
#if UF_ENV_DREAMCAST
|
||||
// to-do: actually fix this
|
||||
return true;
|
||||
#else
|
||||
uf::stl::string filename = sanitize(_filename);
|
||||
static struct stat buffer;
|
||||
return stat(filename.c_str(), &buffer) == 0;
|
||||
#endif
|
||||
}
|
||||
size_t uf::io::mtime( const uf::stl::string& _filename ) {
|
||||
uf::stl::string filename = sanitize(_filename);
|
||||
@ -217,6 +222,7 @@ uf::stl::string uf::io::resolveURI( const uf::stl::string& filename, const uf::s
|
||||
else if ( extension == "gltf" || extensions == "gltf.gz" ) root = uf::io::root + "/models/";
|
||||
else if ( extension == "graph" || extensions == "graph.gz" ) root = uf::io::root + "/models/";
|
||||
else if ( extension == "ogg" || extensions == "ogg.gz" ) root = uf::io::root + "/audio/";
|
||||
else if ( extension == "wav" || extensions == "wav.gz" ) root = uf::io::root + "/audio/";
|
||||
else if ( extension == "spv" || extensions == "spv.gz" ) root = uf::io::root + "/shaders/";
|
||||
else if ( extension == "lua" || extensions == "lua.gz" ) root = uf::io::root + "/scripts/";
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ uf::stl::vector<uf::stl::string> uf::string::split( const uf::stl::string& str,
|
||||
prev = pos + delim.length();
|
||||
} while (pos < str.length() && prev < str.length());
|
||||
if ( tokens.empty() ) tokens.emplace_back(str);
|
||||
return tokens;
|
||||
return tokens;
|
||||
/*
|
||||
uf::stl::vector<uf::stl::string> cont;
|
||||
size_t last = 0, next = 0;
|
||||
@ -108,71 +108,38 @@ bool uf::string::contains( const uf::stl::string& string, const uf::stl::string&
|
||||
return string.find(search) != uf::stl::string::npos;
|
||||
}
|
||||
uf::stl::string uf::string::si( double value, const uf::stl::string& unit, size_t precision ) {
|
||||
int power = floor(std::log10( value ));
|
||||
double base = value / std::pow( 10, power );
|
||||
static const struct {
|
||||
int exp;
|
||||
const char* prefix;
|
||||
} SI[] = {
|
||||
{24, "Y"}, {21, "Z"}, {18, "E"}, {15, "P"}, {12, "T"},
|
||||
{ 9, "G"}, { 6, "M"}, { 3, "k"}, { 0, "" },
|
||||
{-3, "m"}, {-6, "μ"}, {-9, "n"}, {-12, "p"}
|
||||
};
|
||||
|
||||
// std::cout << base << " x 10^" << power << " -> ";
|
||||
if (value == 0.0) {
|
||||
return "0" + unit;
|
||||
}
|
||||
|
||||
size_t pValue = -1;
|
||||
#define REDUCE(VAL)\
|
||||
while ( pValue > power && power > VAL ) {\
|
||||
--power;\
|
||||
base *= 10;\
|
||||
}\
|
||||
pValue = VAL;
|
||||
#define INCREASE(VAL)\
|
||||
if ( pValue < power && power < VAL ) std::cout << " (increasing (" << pValue << ", " << VAL << ")) ";\
|
||||
while ( pValue < power && power < VAL ) {\
|
||||
++power;\
|
||||
base /= 10;\
|
||||
}\
|
||||
pValue = VAL;
|
||||
|
||||
REDUCE(24)
|
||||
REDUCE(21)
|
||||
REDUCE(18)
|
||||
REDUCE(15)
|
||||
REDUCE(12)
|
||||
REDUCE( 9)
|
||||
REDUCE( 6)
|
||||
REDUCE( 3)
|
||||
// REDUCE( 2)
|
||||
// REDUCE( 1)
|
||||
REDUCE( 0)
|
||||
/*
|
||||
// INCREASE(-1)
|
||||
INCREASE(-2)
|
||||
INCREASE(-3)
|
||||
INCREASE(-6)
|
||||
INCREASE(-9)
|
||||
INCREASE(-12)
|
||||
*/
|
||||
int exp = static_cast<int>(std::floor(std::log10(std::fabs(value))));
|
||||
int exp3 = exp / 3 * 3; // Round down to nearest multiple of 3
|
||||
|
||||
// std::cout << base << " x 10^" << power << std::endl;
|
||||
// Clamp to available SI prefixes
|
||||
if (exp3 > 24) exp3 = 24;
|
||||
if (exp3 < -12) exp3 = -12;
|
||||
|
||||
// Find matching SI prefix
|
||||
const char* prefix = "";
|
||||
for (const auto& si : SI) {
|
||||
if (exp3 == si.exp) {
|
||||
prefix = si.prefix;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
double scaled = value / std::pow(10, exp3);
|
||||
|
||||
uf::stl::stringstream ss;
|
||||
ss << std::fixed << std::setprecision(precision) << base;
|
||||
uf::stl::string string = ss.str();
|
||||
|
||||
switch ( power ) {
|
||||
case 24: string += "Y"; break;
|
||||
case 21: string += "Z"; break;
|
||||
case 18: string += "E"; break;
|
||||
case 15: string += "P"; break;
|
||||
case 12: string += "T"; break;
|
||||
case 9: string += "G"; break;
|
||||
case 6: string += "M"; break;
|
||||
case 3: string += "k"; break;
|
||||
// case 2: string += "h"; break;
|
||||
// case 1: string += "da"; break;
|
||||
case 0: string += ""; break;
|
||||
// case -1: string += "d"; break;
|
||||
case -2: string += "c"; break;
|
||||
case -3: string += "m"; break;
|
||||
case -6: string += "μ"; break;
|
||||
case -9: string += "n"; break;
|
||||
case-12: string += "p"; break;
|
||||
}
|
||||
string += unit;
|
||||
return string;
|
||||
ss << std::fixed << std::setprecision(precision) << scaled << prefix << unit;
|
||||
return ss.str();
|
||||
}
|
||||
@ -168,6 +168,12 @@ void ext::GuiBehavior::initialize( uf::Object& self ) {
|
||||
// for ( auto& v : vertices ) v.position.z = metadata.depth;
|
||||
}
|
||||
*/
|
||||
#if UF_USE_OPENGL
|
||||
// for some reason things break and this is needed, but only for OpenGL
|
||||
metadataJson["cull mode"] = "none";
|
||||
#else
|
||||
if ( ext::json::isNull(metadataJson["cull mode"]) ) metadataJson["cull mode"] = "back";
|
||||
#endif
|
||||
graphic.descriptor.parse( metadataJson );
|
||||
|
||||
|
||||
@ -208,7 +214,6 @@ void ext::GuiBehavior::initialize( uf::Object& self ) {
|
||||
}
|
||||
|
||||
#if UF_USE_OPENGL
|
||||
if ( ext::json::isNull(metadataJson["cull mode"]) ) metadataJson["cull mode"] = "front";
|
||||
if ( uf::matrix::reverseInfiniteProjection ) metadata.depth = 1 - metadata.depth;
|
||||
// transform.position.z = metadata.depth;
|
||||
#else
|
||||
@ -284,8 +289,6 @@ void ext::GuiBehavior::initialize( uf::Object& self ) {
|
||||
|
||||
// generate default mesh
|
||||
::generateMesh( mesh, metadata.color );
|
||||
|
||||
if ( ext::json::isNull(metadataJson["cull mode"]) ) metadataJson["cull mode"] = "front";
|
||||
|
||||
{
|
||||
ext::payloads::GuiInitializationPayload payload;
|
||||
@ -318,9 +321,6 @@ void ext::GuiBehavior::initialize( uf::Object& self ) {
|
||||
|
||||
click.x = (click.x * 2.0f) - 1.0f;
|
||||
click.y = (click.y * 2.0f) - 1.0f;
|
||||
#if UF_USE_OPENGL
|
||||
click.y = -click.y;
|
||||
#endif
|
||||
|
||||
float x = click.x;
|
||||
float y = click.y;
|
||||
@ -396,9 +396,7 @@ void ext::GuiBehavior::initialize( uf::Object& self ) {
|
||||
|
||||
click.x = (click.x * 2.0f) - 1.0f;
|
||||
click.y = (click.y * 2.0f) - 1.0f;
|
||||
#if UF_USE_OPENGL
|
||||
click.y = -click.y;
|
||||
#endif
|
||||
|
||||
float x = click.x;
|
||||
float y = click.y;
|
||||
|
||||
@ -484,8 +482,10 @@ void ext::GuiBehavior::tick( uf::Object& self ) {
|
||||
// bind UBO
|
||||
#if UF_USE_OPENGL
|
||||
{
|
||||
// "flip" the viewport because I can't be assed to do it within the rendermode
|
||||
if ( metadata.mode == 0 ) {
|
||||
transform.position.y = -transform.position.y;
|
||||
flatten.scale.y = -flatten.scale.y;
|
||||
flatten.position.y = -flatten.position.y;
|
||||
}
|
||||
model = uf::transform::model( transform );
|
||||
auto& shader = graphic.material.getShader("vertex");
|
||||
|
||||
@ -25,7 +25,11 @@
|
||||
#include "../behavior.h"
|
||||
#include "../manager/behavior.h"
|
||||
|
||||
#if UF_USE_OPENGL
|
||||
#define EXT_COLOR_FLOATS 0
|
||||
#else
|
||||
#define EXT_COLOR_FLOATS 1
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
struct Mesh {
|
||||
|
||||
@ -108,11 +108,7 @@ namespace {
|
||||
}
|
||||
|
||||
void EXT_API ext::load() {
|
||||
#if UF_ENV_DREAMCAST
|
||||
ext::config.readFromFile("/cd/data/config.json");
|
||||
#else
|
||||
ext::config.readFromFile(uf::io::root+"/config.json");
|
||||
#endif
|
||||
ext::config.readFromFile(uf::io::root+"config.json");
|
||||
}
|
||||
void EXT_API ext::load( ext::json::Value& json ) {
|
||||
::config.engine.gc.enabled = json["engine"]["debug"]["garbage collection"]["enabled"].as(::config.engine.gc.enabled);
|
||||
|
||||
@ -6,6 +6,6 @@ RENDERER = opengl
|
||||
TARGET_EXTENSION = elf
|
||||
OPTIMIZATIONS = -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -fstrict-aliasing -ffast-math -fno-unroll-all-loops -fno-optimize-sibling-calls -fschedule-insns2 -fomit-frame-pointer -DUF_NO_EXCEPTIONS -fno-exceptions # -g # -flto
|
||||
WARNINGS = -Wno-attributes -Wno-conversion-null
|
||||
FLAGS += $(KOS_CPPFLAGS) -m4-single-only -std=c++17 $(OPTIMIZATIONS) $(WARNINGS) -fdiagnostics-color=always
|
||||
FLAGS += $(KOS_CPPFLAGS) -m4-single -std=c++17 $(OPTIMIZATIONS) $(WARNINGS) -fdiagnostics-color=always
|
||||
INCS += $(KOS_INC_PATHS) -I/opt/dreamcast/sh-elf/sh-elf/include
|
||||
LIBS += $(KOS_LIB_PATHS) -L/opt/dreamcast/sh-elf/sh-elf/lib
|
||||
Loading…
Reference in New Issue
Block a user