build: Merge submodules into repo
This commit is contained in:
parent
540a30f719
commit
4c64279f90
422 changed files with 106715 additions and 8 deletions
120
src/minarch/libretro-common/include/array/rbuf.h
Normal file
120
src/minarch/libretro-common/include/array/rbuf.h
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (rbuf.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_ARRAY_RBUF_H__
|
||||
#define __LIBRETRO_SDK_ARRAY_RBUF_H__
|
||||
|
||||
/*
|
||||
* This file implements stretchy buffers as invented (?) by Sean Barrett.
|
||||
* Based on the implementation from the public domain Bitwise project
|
||||
* by Per Vognsen - https://github.com/pervognsen/bitwise
|
||||
*
|
||||
* It's a super simple type safe dynamic array for C with no need
|
||||
* to predeclare any type or anything.
|
||||
* The first time an element is added, memory for 16 elements are allocated.
|
||||
* Then every time length is about to exceed capacity, capacity is doubled.
|
||||
*
|
||||
* Be careful not to supply modifying statements to the macro arguments.
|
||||
* Something like RBUF_REMOVE(buf, i--); would have unintended results.
|
||||
*
|
||||
* Sample usage:
|
||||
*
|
||||
* mytype_t* buf = NULL;
|
||||
* RBUF_PUSH(buf, some_element);
|
||||
* RBUF_PUSH(buf, other_element);
|
||||
* -- now RBUF_LEN(buf) == 2, buf[0] == some_element, buf[1] == other_element
|
||||
*
|
||||
* -- Free allocated memory:
|
||||
* RBUF_FREE(buf);
|
||||
* -- now buf == NULL, RBUF_LEN(buf) == 0, RBUF_CAP(buf) == 0
|
||||
*
|
||||
* -- Explicitly increase allocated memory and set capacity:
|
||||
* RBUF_FIT(buf, 100);
|
||||
* -- now RBUF_LEN(buf) == 0, RBUF_CAP(buf) == 100
|
||||
*
|
||||
* -- Resize buffer (does not initialize or zero memory!)
|
||||
* RBUF_RESIZE(buf, 200);
|
||||
* -- now RBUF_LEN(buf) == 200, RBUF_CAP(buf) == 200
|
||||
*
|
||||
* -- To handle running out of memory:
|
||||
* bool ran_out_of_memory = !RBUF_TRYFIT(buf, 1000);
|
||||
* -- before RESIZE or PUSH. When out of memory, buf will stay unmodified.
|
||||
*/
|
||||
|
||||
#include <retro_math.h> /* for MAX */
|
||||
#include <stdlib.h> /* for malloc, realloc */
|
||||
|
||||
#define RBUF__HDR(b) (((struct rbuf__hdr *)(b))-1)
|
||||
|
||||
#define RBUF_LEN(b) ((b) ? RBUF__HDR(b)->len : 0)
|
||||
#define RBUF_CAP(b) ((b) ? RBUF__HDR(b)->cap : 0)
|
||||
#define RBUF_END(b) ((b) + RBUF_LEN(b))
|
||||
#define RBUF_SIZEOF(b) ((b) ? RBUF_LEN(b)*sizeof(*b) : 0)
|
||||
|
||||
#define RBUF_FREE(b) ((b) ? (free(RBUF__HDR(b)), (b) = NULL) : 0)
|
||||
#define RBUF_FIT(b, n) ((size_t)(n) <= RBUF_CAP(b) ? 0 : (*(void**)(&(b)) = rbuf__grow((b), (n), sizeof(*(b)))))
|
||||
#define RBUF_PUSH(b, val) (RBUF_FIT((b), 1 + RBUF_LEN(b)), (b)[RBUF__HDR(b)->len++] = (val))
|
||||
#define RBUF_POP(b) (b)[--RBUF__HDR(b)->len]
|
||||
#define RBUF_RESIZE(b, sz) (RBUF_FIT((b), (sz)), ((b) ? RBUF__HDR(b)->len = (sz) : 0))
|
||||
#define RBUF_CLEAR(b) ((b) ? RBUF__HDR(b)->len = 0 : 0)
|
||||
#define RBUF_TRYFIT(b, n) (RBUF_FIT((b), (n)), (((b) && RBUF_CAP(b) >= (size_t)(n)) || !(n)))
|
||||
#define RBUF_REMOVE(b, idx) memmove((b) + (idx), (b) + (idx) + 1, (--RBUF__HDR(b)->len - (idx)) * sizeof(*(b)))
|
||||
|
||||
struct rbuf__hdr
|
||||
{
|
||||
size_t len;
|
||||
size_t cap;
|
||||
};
|
||||
|
||||
#ifdef __GNUC__
|
||||
__attribute__((__unused__))
|
||||
#elif defined(_MSC_VER)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4505) //unreferenced local function has been removed
|
||||
#endif
|
||||
static void *rbuf__grow(void *buf,
|
||||
size_t new_len, size_t elem_size)
|
||||
{
|
||||
struct rbuf__hdr *new_hdr;
|
||||
size_t new_cap = MAX(2 * RBUF_CAP(buf), MAX(new_len, 16));
|
||||
size_t new_size = sizeof(struct rbuf__hdr) + new_cap*elem_size;
|
||||
if (buf)
|
||||
{
|
||||
new_hdr = (struct rbuf__hdr *)realloc(RBUF__HDR(buf), new_size);
|
||||
if (!new_hdr)
|
||||
return buf; /* out of memory, return unchanged */
|
||||
}
|
||||
else
|
||||
{
|
||||
new_hdr = (struct rbuf__hdr *)malloc(new_size);
|
||||
if (!new_hdr)
|
||||
return NULL; /* out of memory */
|
||||
new_hdr->len = 0;
|
||||
}
|
||||
new_hdr->cap = new_cap;
|
||||
return new_hdr + 1;
|
||||
}
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
285
src/minarch/libretro-common/include/array/rhmap.h
Normal file
285
src/minarch/libretro-common/include/array/rhmap.h
Normal file
|
|
@ -0,0 +1,285 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (rhmap.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_ARRAY_RHMAP_H__
|
||||
#define __LIBRETRO_SDK_ARRAY_RHMAP_H__
|
||||
|
||||
/*
|
||||
* This file implements a hash map with 32-bit keys.
|
||||
* Based on the implementation from the public domain Bitwise project
|
||||
* by Per Vognsen - https://github.com/pervognsen/bitwise
|
||||
*
|
||||
* It's a super simple type safe hash map for C with no need
|
||||
* to predeclare any type or anything.
|
||||
* Will always allocate memory for twice the amount of max elements
|
||||
* so larger structs should be stored as pointers or indices to an array.
|
||||
* Can be used in C++ with POD types (without any constructor/destructor).
|
||||
*
|
||||
* Be careful not to supply modifying statements to the macro arguments.
|
||||
* Something like RHMAP_FIT(map, i++); would have unintended results.
|
||||
*
|
||||
* Sample usage:
|
||||
*
|
||||
* -- Set 2 elements with string keys and mytype_t values:
|
||||
* mytype_t* map = NULL;
|
||||
* RHMAP_SET_STR(map, "foo", foo_element);
|
||||
* RHMAP_SET_STR(map, "bar", bar_element);
|
||||
* -- now RHMAP_LEN(map) == 2, RHMAP_GET_STR(map, "foo") == foo_element
|
||||
*
|
||||
* -- Check if keys exist:
|
||||
* bool has_foo = RHMAP_HAS_STR(map, "foo");
|
||||
* bool has_baz = RHMAP_HAS_STR(map, "baz");
|
||||
* -- now has_foo == true, has_baz == false
|
||||
*
|
||||
* -- Removing a key:
|
||||
* bool removed = RHMAP_DEL_STR(map, "bar");
|
||||
* bool removed_again = RHMAP_DEL_STR(map, "bar");
|
||||
* -- now RHMAP_LEN(map) == 1, removed == true, removed_again == false
|
||||
*
|
||||
* -- Add/modify via pointer:
|
||||
* mytype_t* p_elem = RHMAP_PTR_STR(map, "qux");
|
||||
* p_elem->a = 123;
|
||||
* -- New keys initially have memory uninitialized
|
||||
* -- Pointers can get invalidated when a key is added/removed
|
||||
*
|
||||
* -- Looking up the index for a given key:
|
||||
* ptrdiff_t idx_foo = RHMAP_IDX_STR(map, "foo");
|
||||
* ptrdiff_t idx_invalid = RHMAP_IDX_STR(map, "invalid");
|
||||
* -- now idx_foo >= 0, idx_invalid == -1, map[idx_foo] == foo_element
|
||||
* -- Indices can change when a key is added/removed
|
||||
*
|
||||
* -- Clear all elements (keep memory allocated):
|
||||
* RHMAP_CLEAR(map);
|
||||
* -- now RHMAP_LEN(map) == 0, RHMAP_CAP(map) == 16
|
||||
*
|
||||
* -- Reserve memory for at least N elements:
|
||||
* RHMAP_FIT(map, 30);
|
||||
* -- now RHMAP_LEN(map) == 0, RHMAP_CAP(map) == 64
|
||||
*
|
||||
* -- Add elements with custom hash keys:
|
||||
* RHMAP_SET(map, my_uint32_hash(key1), some_element);
|
||||
* RHMAP_SET(map, my_uint32_hash(key2), other_element);
|
||||
* -- now RHMAP_LEN(map) == 2, _GET/_HAS/_DEL/_PTR/_IDX also exist
|
||||
*
|
||||
* -- Iterate elements (random order, order can change on insert):
|
||||
* for (size_t i = 0, cap = RHMAP_CAP(map); i != cap, i++)
|
||||
* if (RHMAP_KEY(map, i))
|
||||
* ------ here map[i] is the value of key RHMAP_KEY(map, i)
|
||||
*
|
||||
* -- Set a custom null value (is zeroed by default):
|
||||
* RHMAP_SETNULLVAL(map, map_null);
|
||||
* -- now RHMAP_GET_STR(map, "invalid") == map_null
|
||||
*
|
||||
* -- Free allocated memory:
|
||||
* RHMAP_FREE(map);
|
||||
* -- now map == NULL, RHMAP_LEN(map) == 0, RHMAP_CAP(map) == 0
|
||||
*
|
||||
* -- To handle running out of memory:
|
||||
* bool ran_out_of_memory = !RHMAP_TRYFIT(map, 1000);
|
||||
* -- before setting an element (with SET, PTR or NULLVAL).
|
||||
* -- When out of memory, map will stay unmodified.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdlib.h> /* for malloc, realloc */
|
||||
#include <string.h> /* for memcpy, memset */
|
||||
#include <stddef.h> /* for ptrdiff_t, size_t */
|
||||
#include <stdint.h> /* for uint32_t */
|
||||
|
||||
#define RHMAP_LEN(b) ((b) ? RHMAP__HDR(b)->len : 0)
|
||||
#define RHMAP_MAX(b) ((b) ? RHMAP__HDR(b)->maxlen : 0)
|
||||
#define RHMAP_CAP(b) ((b) ? RHMAP__HDR(b)->maxlen + 1 : 0)
|
||||
#define RHMAP_KEY(b, idx) (RHMAP__HDR(b)->keys[idx])
|
||||
#define RHMAP_KEY_STR(b, idx) (RHMAP__HDR(b)->key_strs[idx])
|
||||
#define RHMAP_SETNULLVAL(b, val) (RHMAP__FIT1(b), b[-1] = (val))
|
||||
#define RHMAP_CLEAR(b) ((b) ? (memset(RHMAP__HDR(b)->keys, 0, RHMAP_CAP(b) * sizeof(uint32_t)), RHMAP__HDR(b)->len = 0) : 0)
|
||||
#define RHMAP_FREE(b) ((b) ? (rhmap__free(RHMAP__HDR(b)), (b) = NULL) : 0)
|
||||
#define RHMAP_FIT(b, n) ((!(n) || ((b) && (size_t)(n) * 2 <= RHMAP_MAX(b))) ? 0 : RHMAP__GROW(b, n))
|
||||
#define RHMAP_TRYFIT(b, n) (RHMAP_FIT((b), (n)), (!(n) || ((b) && (size_t)(n) * 2 <= RHMAP_MAX(b))))
|
||||
|
||||
#define RHMAP_SET(b, key, val) RHMAP_SET_FULL(b, key, NULL, val)
|
||||
#define RHMAP_GET(b, key) RHMAP_GET_FULL(b, key, NULL)
|
||||
#define RHMAP_HAS(b, key) RHMAP_HAS_FULL(b, key, NULL)
|
||||
#define RHMAP_DEL(b, key) RHMAP_DEL_FULL(b, key, NULL)
|
||||
#define RHMAP_PTR(b, key) RHMAP_PTR_FULL(b, key, NULL)
|
||||
#define RHMAP_IDX(b, key) RHMAP_IDX_FULL(b, key, NULL)
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define RHMAP__UNUSED __attribute__((__unused__))
|
||||
#else
|
||||
#define RHMAP__UNUSED
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4505) //unreferenced local function has been removed
|
||||
#endif
|
||||
|
||||
#define RHMAP_SET_FULL(b, key, str, val) (RHMAP__FIT1(b), b[rhmap__idx(RHMAP__HDR(b), (key), (str), 1, 0)] = (val))
|
||||
#define RHMAP_GET_FULL(b, key, str) (RHMAP__FIT1(b), b[rhmap__idx(RHMAP__HDR(b), (key), (str), 0, 0)])
|
||||
#define RHMAP_HAS_FULL(b, key, str) ((b) ? rhmap__idx(RHMAP__HDR(b), (key), (str), 0, 0) != -1 : 0)
|
||||
#define RHMAP_DEL_FULL(b, key, str) ((b) ? rhmap__idx(RHMAP__HDR(b), (key), (str), 0, sizeof(*(b))) != -1 : 0)
|
||||
#define RHMAP_PTR_FULL(b, key, str) (RHMAP__FIT1(b), &b[rhmap__idx(RHMAP__HDR(b), (key), (str), 1, 0)])
|
||||
#define RHMAP_IDX_FULL(b, key, str) ((b) ? rhmap__idx(RHMAP__HDR(b), (key), (str), 0, 0) : -1)
|
||||
|
||||
#define RHMAP_SET_STR(b, string_key, val) RHMAP_SET_FULL(b, rhmap_hash_string(string_key), string_key, val)
|
||||
#define RHMAP_GET_STR(b, string_key) RHMAP_GET_FULL(b, rhmap_hash_string(string_key), string_key)
|
||||
#define RHMAP_HAS_STR(b, string_key) RHMAP_HAS_FULL(b, rhmap_hash_string(string_key), string_key)
|
||||
#define RHMAP_DEL_STR(b, string_key) RHMAP_DEL_FULL(b, rhmap_hash_string(string_key), string_key)
|
||||
#define RHMAP_PTR_STR(b, string_key) RHMAP_PTR_FULL(b, rhmap_hash_string(string_key), string_key)
|
||||
#define RHMAP_IDX_STR(b, string_key) RHMAP_IDX_FULL(b, rhmap_hash_string(string_key), string_key)
|
||||
|
||||
RHMAP__UNUSED static uint32_t rhmap_hash_string(const char* str)
|
||||
{
|
||||
unsigned char c;
|
||||
uint32_t hash = (uint32_t)0x811c9dc5;
|
||||
while ((c = (unsigned char)*(str++)) != '\0')
|
||||
hash = ((hash * (uint32_t)0x01000193) ^ (uint32_t)c);
|
||||
return (hash ? hash : 1);
|
||||
}
|
||||
|
||||
struct rhmap__hdr { size_t len, maxlen; uint32_t *keys; char** key_strs; };
|
||||
#define RHMAP__HDR(b) (((struct rhmap__hdr *)&(b)[-1])-1)
|
||||
#define RHMAP__GROW(b, n) (*(void**)(&(b)) = rhmap__grow((void*)(b), sizeof(*(b)), (size_t)(n)))
|
||||
#define RHMAP__FIT1(b) ((b) && RHMAP_LEN(b) * 2 <= RHMAP_MAX(b) ? 0 : RHMAP__GROW(b, 0))
|
||||
|
||||
RHMAP__UNUSED static void* rhmap__grow(void* old_ptr, size_t elem_size, size_t reserve)
|
||||
{
|
||||
struct rhmap__hdr *old_hdr = (old_ptr ? ((struct rhmap__hdr *)((char*)old_ptr-elem_size))-1 : NULL);
|
||||
struct rhmap__hdr *new_hdr;
|
||||
char *new_vals;
|
||||
size_t new_max = (old_ptr ? old_hdr->maxlen * 2 + 1 : 15);
|
||||
for (; new_max / 2 <= reserve; new_max = new_max * 2 + 1)
|
||||
if (new_max == (size_t)-1)
|
||||
return old_ptr; /* overflow */
|
||||
|
||||
new_hdr = (struct rhmap__hdr *)malloc(sizeof(struct rhmap__hdr) + (new_max + 2) * elem_size);
|
||||
if (!new_hdr)
|
||||
return old_ptr; /* out of memory */
|
||||
|
||||
new_hdr->maxlen = new_max;
|
||||
new_hdr->keys = (uint32_t *)calloc(new_max + 1, sizeof(uint32_t));
|
||||
if (!new_hdr->keys)
|
||||
{
|
||||
/* out of memory */
|
||||
free(new_hdr);
|
||||
return old_ptr;
|
||||
}
|
||||
new_hdr->key_strs = (char**)calloc(new_max + 1, sizeof(char*));
|
||||
if (!new_hdr->key_strs)
|
||||
{
|
||||
/* out of memory */
|
||||
free(new_hdr->keys);
|
||||
free(new_hdr);
|
||||
return old_ptr;
|
||||
}
|
||||
|
||||
new_vals = ((char*)(new_hdr + 1)) + elem_size;
|
||||
if (old_ptr)
|
||||
{
|
||||
size_t i;
|
||||
char* old_vals = ((char*)(old_hdr + 1)) + elem_size;
|
||||
for (i = 0; i <= old_hdr->maxlen; i++)
|
||||
{
|
||||
uint32_t key, j;
|
||||
if (!old_hdr->keys[i])
|
||||
continue;
|
||||
for (key = old_hdr->keys[i], j = key;; j++)
|
||||
{
|
||||
if (!new_hdr->keys[j &= new_hdr->maxlen])
|
||||
{
|
||||
new_hdr->keys[j] = key;
|
||||
new_hdr->key_strs[j] = old_hdr->key_strs[i];
|
||||
memcpy(new_vals + j * elem_size, old_vals + i * elem_size, elem_size);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
memcpy(new_vals - elem_size, old_vals - elem_size, elem_size);
|
||||
new_hdr->len = old_hdr->len;
|
||||
free(old_hdr->keys);
|
||||
free(old_hdr->key_strs);
|
||||
free(old_hdr);
|
||||
}
|
||||
else
|
||||
{
|
||||
memset(new_vals - elem_size, 0, elem_size);
|
||||
new_hdr->len = 0;
|
||||
}
|
||||
return new_vals;
|
||||
}
|
||||
|
||||
RHMAP__UNUSED static ptrdiff_t rhmap__idx(struct rhmap__hdr* hdr, uint32_t key, const char * str, int add, size_t del)
|
||||
{
|
||||
uint32_t i;
|
||||
|
||||
if (!key)
|
||||
return (ptrdiff_t)-1;
|
||||
|
||||
for (i = key;; i++)
|
||||
{
|
||||
if (hdr->keys[i &= hdr->maxlen] == key && (!hdr->key_strs[i] || !str || !strcmp(hdr->key_strs[i], str)))
|
||||
{
|
||||
if (del)
|
||||
{
|
||||
hdr->len--;
|
||||
hdr->keys[i] = 0;
|
||||
free(hdr->key_strs[i]);
|
||||
hdr->key_strs[i] = NULL;
|
||||
while ((key = hdr->keys[i = (i + 1) & hdr->maxlen]) != 0)
|
||||
{
|
||||
if ((key = (uint32_t)rhmap__idx(hdr, key, hdr->key_strs[i], 1, 0)) == i) continue;
|
||||
hdr->len--;
|
||||
hdr->keys[i] = 0;
|
||||
free(hdr->key_strs[i]);
|
||||
hdr->key_strs[i] = NULL;
|
||||
memcpy(((char*)(hdr + 1)) + (key + 1) * del,
|
||||
((char*)(hdr + 1)) + (i + 1) * del, del);
|
||||
}
|
||||
}
|
||||
return (ptrdiff_t)i;
|
||||
}
|
||||
if (!hdr->keys[i])
|
||||
{
|
||||
if (add) { hdr->len++; hdr->keys[i] = key; if (str) hdr->key_strs[i] = strdup(str); return (ptrdiff_t)i; }
|
||||
return (ptrdiff_t)-1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RHMAP__UNUSED static void rhmap__free(struct rhmap__hdr* hdr)
|
||||
{
|
||||
size_t i;
|
||||
for (i=0;i<hdr->maxlen+1;i++)
|
||||
{
|
||||
free(hdr->key_strs[i]);
|
||||
}
|
||||
free(hdr->key_strs);
|
||||
free(hdr->keys);
|
||||
free(hdr);
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
94
src/minarch/libretro-common/include/audio/audio_mix.h
Normal file
94
src/minarch/libretro-common/include/audio/audio_mix.h
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (audio_mix.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_AUDIO_MIX_H__
|
||||
#define __LIBRETRO_SDK_AUDIO_MIX_H__
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#ifdef _WIN32
|
||||
#include <direct.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <formats/rwav.h>
|
||||
#include <audio/audio_resampler.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct
|
||||
{
|
||||
double ratio;
|
||||
void *buf;
|
||||
int16_t *upsample_buf;
|
||||
float *float_buf;
|
||||
float *float_resample_buf;
|
||||
int16_t *resample_buf;
|
||||
const retro_resampler_t *resampler;
|
||||
void *resampler_data;
|
||||
rwav_t *rwav;
|
||||
ssize_t len;
|
||||
size_t resample_len;
|
||||
int sample_rate;
|
||||
bool resample;
|
||||
} audio_chunk_t;
|
||||
|
||||
#if defined(__SSE2__)
|
||||
#define audio_mix_volume audio_mix_volume_SSE2
|
||||
|
||||
void audio_mix_volume_SSE2(float *out,
|
||||
const float *in, float vol, size_t samples);
|
||||
#else
|
||||
#define audio_mix_volume audio_mix_volume_C
|
||||
#endif
|
||||
|
||||
void audio_mix_volume_C(float *dst, const float *src, float vol, size_t samples);
|
||||
|
||||
void audio_mix_free_chunk(audio_chunk_t *chunk);
|
||||
|
||||
audio_chunk_t* audio_mix_load_wav_file(const char *path, int sample_rate,
|
||||
const char *resampler_ident, enum resampler_quality quality);
|
||||
|
||||
size_t audio_mix_get_chunk_num_samples(audio_chunk_t *chunk);
|
||||
|
||||
/**
|
||||
* audio_mix_get_chunk_sample:
|
||||
* @chunk : audio chunk instance
|
||||
* @channel : channel of the sample (0=left, 1=right)
|
||||
* @index : index of the sample
|
||||
*
|
||||
* Get a sample from an audio chunk.
|
||||
*
|
||||
* Returns: A signed 16-bit audio sample, (if necessary) resampled into the desired output rate.
|
||||
**/
|
||||
int16_t audio_mix_get_chunk_sample(audio_chunk_t *chunk, unsigned channel, size_t sample);
|
||||
|
||||
int16_t* audio_mix_get_chunk_samples(audio_chunk_t *chunk);
|
||||
|
||||
int audio_mix_get_chunk_num_channels(audio_chunk_t *chunk);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
90
src/minarch/libretro-common/include/audio/audio_mixer.h
Normal file
90
src/minarch/libretro-common/include/audio/audio_mixer.h
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (audio_mixer.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_AUDIO_MIXER__H
|
||||
#define __LIBRETRO_SDK_AUDIO_MIXER__H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <boolean.h>
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include <audio/audio_resampler.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
enum audio_mixer_type
|
||||
{
|
||||
AUDIO_MIXER_TYPE_NONE = 0,
|
||||
AUDIO_MIXER_TYPE_WAV,
|
||||
AUDIO_MIXER_TYPE_OGG,
|
||||
AUDIO_MIXER_TYPE_MOD,
|
||||
AUDIO_MIXER_TYPE_FLAC,
|
||||
AUDIO_MIXER_TYPE_MP3
|
||||
};
|
||||
|
||||
typedef struct audio_mixer_sound audio_mixer_sound_t;
|
||||
typedef struct audio_mixer_voice audio_mixer_voice_t;
|
||||
|
||||
typedef void (*audio_mixer_stop_cb_t)(audio_mixer_sound_t* sound, unsigned reason);
|
||||
|
||||
/* Reasons passed to the stop callback. */
|
||||
#define AUDIO_MIXER_SOUND_FINISHED 0
|
||||
#define AUDIO_MIXER_SOUND_STOPPED 1
|
||||
#define AUDIO_MIXER_SOUND_REPEATED 2
|
||||
|
||||
void audio_mixer_init(unsigned rate);
|
||||
|
||||
void audio_mixer_done(void);
|
||||
|
||||
audio_mixer_sound_t* audio_mixer_load_wav(void *buffer, int32_t size,
|
||||
const char *resampler_ident, enum resampler_quality quality);
|
||||
audio_mixer_sound_t* audio_mixer_load_ogg(void *buffer, int32_t size);
|
||||
audio_mixer_sound_t* audio_mixer_load_mod(void *buffer, int32_t size);
|
||||
audio_mixer_sound_t* audio_mixer_load_flac(void *buffer, int32_t size);
|
||||
audio_mixer_sound_t* audio_mixer_load_mp3(void *buffer, int32_t size);
|
||||
|
||||
void audio_mixer_destroy(audio_mixer_sound_t* sound);
|
||||
|
||||
audio_mixer_voice_t* audio_mixer_play(audio_mixer_sound_t* sound,
|
||||
bool repeat, float volume,
|
||||
const char *resampler_ident,
|
||||
enum resampler_quality quality,
|
||||
audio_mixer_stop_cb_t stop_cb);
|
||||
|
||||
void audio_mixer_stop(audio_mixer_voice_t* voice);
|
||||
|
||||
float audio_mixer_voice_get_volume(audio_mixer_voice_t *voice);
|
||||
|
||||
void audio_mixer_voice_set_volume(audio_mixer_voice_t *voice, float val);
|
||||
|
||||
void audio_mixer_mix(float* buffer, size_t num_frames, float volume_override, bool override);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
194
src/minarch/libretro-common/include/audio/audio_resampler.h
Normal file
194
src/minarch/libretro-common/include/audio/audio_resampler.h
Normal file
|
|
@ -0,0 +1,194 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (audio_resampler.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_AUDIO_RESAMPLER_DRIVER_H
|
||||
#define __LIBRETRO_SDK_AUDIO_RESAMPLER_DRIVER_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <boolean.h>
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
#define RESAMPLER_SIMD_SSE (1 << 0)
|
||||
#define RESAMPLER_SIMD_SSE2 (1 << 1)
|
||||
#define RESAMPLER_SIMD_VMX (1 << 2)
|
||||
#define RESAMPLER_SIMD_VMX128 (1 << 3)
|
||||
#define RESAMPLER_SIMD_AVX (1 << 4)
|
||||
#define RESAMPLER_SIMD_NEON (1 << 5)
|
||||
#define RESAMPLER_SIMD_SSE3 (1 << 6)
|
||||
#define RESAMPLER_SIMD_SSSE3 (1 << 7)
|
||||
#define RESAMPLER_SIMD_MMX (1 << 8)
|
||||
#define RESAMPLER_SIMD_MMXEXT (1 << 9)
|
||||
#define RESAMPLER_SIMD_SSE4 (1 << 10)
|
||||
#define RESAMPLER_SIMD_SSE42 (1 << 11)
|
||||
#define RESAMPLER_SIMD_AVX2 (1 << 12)
|
||||
#define RESAMPLER_SIMD_VFPU (1 << 13)
|
||||
#define RESAMPLER_SIMD_PS (1 << 14)
|
||||
|
||||
enum resampler_quality
|
||||
{
|
||||
RESAMPLER_QUALITY_DONTCARE = 0,
|
||||
RESAMPLER_QUALITY_LOWEST,
|
||||
RESAMPLER_QUALITY_LOWER,
|
||||
RESAMPLER_QUALITY_NORMAL,
|
||||
RESAMPLER_QUALITY_HIGHER,
|
||||
RESAMPLER_QUALITY_HIGHEST
|
||||
};
|
||||
|
||||
/* A bit-mask of all supported SIMD instruction sets.
|
||||
* Allows an implementation to pick different
|
||||
* resampler_implementation structs.
|
||||
*/
|
||||
typedef unsigned resampler_simd_mask_t;
|
||||
|
||||
#define RESAMPLER_API_VERSION 1
|
||||
|
||||
struct resampler_data
|
||||
{
|
||||
const float *data_in;
|
||||
float *data_out;
|
||||
|
||||
size_t input_frames;
|
||||
size_t output_frames;
|
||||
|
||||
double ratio;
|
||||
};
|
||||
|
||||
/* Returns true if config key was found. Otherwise,
|
||||
* returns false, and sets value to default value.
|
||||
*/
|
||||
typedef int (*resampler_config_get_float_t)(void *userdata,
|
||||
const char *key, float *value, float default_value);
|
||||
|
||||
typedef int (*resampler_config_get_int_t)(void *userdata,
|
||||
const char *key, int *value, int default_value);
|
||||
|
||||
/* Allocates an array with values. free() with resampler_config_free_t. */
|
||||
typedef int (*resampler_config_get_float_array_t)(void *userdata,
|
||||
const char *key, float **values, unsigned *out_num_values,
|
||||
const float *default_values, unsigned num_default_values);
|
||||
|
||||
typedef int (*resampler_config_get_int_array_t)(void *userdata,
|
||||
const char *key, int **values, unsigned *out_num_values,
|
||||
const int *default_values, unsigned num_default_values);
|
||||
|
||||
typedef int (*resampler_config_get_string_t)(void *userdata,
|
||||
const char *key, char **output, const char *default_output);
|
||||
|
||||
/* Calls free() in host runtime. Sometimes needed on Windows.
|
||||
* free() on NULL is fine. */
|
||||
typedef void (*resampler_config_free_t)(void *ptr);
|
||||
|
||||
struct resampler_config
|
||||
{
|
||||
resampler_config_get_float_t get_float;
|
||||
resampler_config_get_int_t get_int;
|
||||
|
||||
resampler_config_get_float_array_t get_float_array;
|
||||
resampler_config_get_int_array_t get_int_array;
|
||||
|
||||
resampler_config_get_string_t get_string;
|
||||
/* Avoid problems where resampler plug and host are
|
||||
* linked against different C runtimes. */
|
||||
resampler_config_free_t free;
|
||||
};
|
||||
|
||||
/* Bandwidth factor. Will be < 1.0 for downsampling, > 1.0 for upsampling.
|
||||
* Corresponds to expected resampling ratio. */
|
||||
typedef void *(*resampler_init_t)(const struct resampler_config *config,
|
||||
double bandwidth_mod, enum resampler_quality quality,
|
||||
resampler_simd_mask_t mask);
|
||||
|
||||
/* Frees the handle. */
|
||||
typedef void (*resampler_free_t)(void *data);
|
||||
|
||||
/* Processes input data. */
|
||||
typedef void (*resampler_process_t)(void *_data, struct resampler_data *data);
|
||||
|
||||
typedef struct retro_resampler
|
||||
{
|
||||
resampler_init_t init;
|
||||
resampler_process_t process;
|
||||
resampler_free_t free;
|
||||
|
||||
/* Must be RESAMPLER_API_VERSION */
|
||||
unsigned api_version;
|
||||
|
||||
/* Human readable identifier of implementation. */
|
||||
const char *ident;
|
||||
|
||||
/* Computer-friendly short version of ident.
|
||||
* Lower case, no spaces and special characters, etc. */
|
||||
const char *short_ident;
|
||||
} retro_resampler_t;
|
||||
|
||||
typedef struct audio_frame_float
|
||||
{
|
||||
float l;
|
||||
float r;
|
||||
} audio_frame_float_t;
|
||||
|
||||
extern retro_resampler_t sinc_resampler;
|
||||
#ifdef HAVE_CC_RESAMPLER
|
||||
extern retro_resampler_t CC_resampler;
|
||||
#endif
|
||||
extern retro_resampler_t nearest_resampler;
|
||||
|
||||
/**
|
||||
* audio_resampler_driver_find_handle:
|
||||
* @index : index of driver to get handle to.
|
||||
*
|
||||
* Returns: handle to audio resampler driver at index. Can be NULL
|
||||
* if nothing found.
|
||||
**/
|
||||
const void *audio_resampler_driver_find_handle(int index);
|
||||
|
||||
/**
|
||||
* audio_resampler_driver_find_ident:
|
||||
* @index : index of driver to get handle to.
|
||||
*
|
||||
* Returns: Human-readable identifier of audio resampler driver at index.
|
||||
* Can be NULL if nothing found.
|
||||
**/
|
||||
const char *audio_resampler_driver_find_ident(int index);
|
||||
|
||||
/**
|
||||
* retro_resampler_realloc:
|
||||
* @re : Resampler handle
|
||||
* @backend : Resampler backend that is about to be set.
|
||||
* @ident : Identifier name for resampler we want.
|
||||
* @bw_ratio : Bandwidth ratio.
|
||||
*
|
||||
* Reallocates resampler. Will free previous handle before
|
||||
* allocating a new one. If ident is NULL, first resampler will be used.
|
||||
*
|
||||
* Returns: true (1) if successful, otherwise false (0).
|
||||
**/
|
||||
bool retro_resampler_realloc(void **re, const retro_resampler_t **backend,
|
||||
const char *ident, enum resampler_quality quality, double bw_ratio);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
/* Copyright (C) 2010-2021 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (float_to_s16.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_CONVERSION_FLOAT_TO_S16_H__
|
||||
#define __LIBRETRO_SDK_CONVERSION_FLOAT_TO_S16_H__
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
/**
|
||||
* convert_float_to_s16:
|
||||
* @out : output buffer
|
||||
* @in : input buffer
|
||||
* @samples : size of samples to be converted
|
||||
*
|
||||
* Converts floating point
|
||||
* to signed integer 16-bit.
|
||||
**/
|
||||
void convert_float_to_s16(int16_t *out,
|
||||
const float *in, size_t samples);
|
||||
|
||||
/**
|
||||
* convert_float_to_s16_init_simd:
|
||||
*
|
||||
* Sets up function pointers for conversion
|
||||
* functions based on CPU features.
|
||||
**/
|
||||
void convert_float_to_s16_init_simd(void);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
/* Copyright (C) 2010-2021 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (s16_to_float.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifndef __LIBRETRO_SDK_CONVERSION_S16_TO_FLOAT_H__
|
||||
#define __LIBRETRO_SDK_CONVERSION_S16_TO_FLOAT_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* convert_s16_to_float:
|
||||
* @out : output buffer
|
||||
* @in : input buffer
|
||||
* @samples : size of samples to be converted
|
||||
* @gain : gain applied (.e.g. audio volume)
|
||||
*
|
||||
* Converts from signed integer 16-bit
|
||||
* to floating point.
|
||||
**/
|
||||
void convert_s16_to_float(float *out,
|
||||
const int16_t *in, size_t samples, float gain);
|
||||
|
||||
/**
|
||||
* convert_s16_to_float_init_simd:
|
||||
*
|
||||
* Sets up function pointers for conversion
|
||||
* functions based on CPU features.
|
||||
**/
|
||||
void convert_s16_to_float_init_simd(void);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
52
src/minarch/libretro-common/include/audio/dsp_filter.h
Normal file
52
src/minarch/libretro-common/include/audio/dsp_filter.h
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (dsp_filter.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_AUDIO_DSP_FILTER_H
|
||||
#define __LIBRETRO_SDK_AUDIO_DSP_FILTER_H
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct retro_dsp_filter retro_dsp_filter_t;
|
||||
|
||||
retro_dsp_filter_t *retro_dsp_filter_new(const char *filter_config,
|
||||
void *string_data, float sample_rate);
|
||||
|
||||
void retro_dsp_filter_free(retro_dsp_filter_t *dsp);
|
||||
|
||||
struct retro_dsp_data
|
||||
{
|
||||
float *input;
|
||||
unsigned input_frames;
|
||||
|
||||
/* Set by retro_dsp_filter_process(). */
|
||||
float *output;
|
||||
unsigned output_frames;
|
||||
};
|
||||
|
||||
void retro_dsp_filter_process(retro_dsp_filter_t *dsp,
|
||||
struct retro_dsp_data *data);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
39
src/minarch/libretro-common/include/boolean.h
Normal file
39
src/minarch/libretro-common/include/boolean.h
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (boolean.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_BOOLEAN_H
|
||||
#define __LIBRETRO_SDK_BOOLEAN_H
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1800 && !defined(SN_TARGET_PS3)
|
||||
/* Hack applied for MSVC when compiling in C89 mode as it isn't C99 compliant. */
|
||||
#define bool unsigned char
|
||||
#define true 1
|
||||
#define false 0
|
||||
#else
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
125
src/minarch/libretro-common/include/cdrom/cdrom.h
Normal file
125
src/minarch/libretro-common/include/cdrom/cdrom.h
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (cdrom.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_CDROM_H
|
||||
#define __LIBRETRO_SDK_CDROM_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <vfs/vfs.h>
|
||||
#include <libretro.h>
|
||||
#include <retro_common_api.h>
|
||||
#include <retro_inline.h>
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
struct string_list;
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned short g1_timeout;
|
||||
unsigned short g2_timeout;
|
||||
unsigned short g3_timeout;
|
||||
} cdrom_group_timeouts_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned lba_start; /* start of pregap */
|
||||
unsigned lba; /* start of data */
|
||||
unsigned track_size; /* in LBAs */
|
||||
unsigned track_bytes;
|
||||
unsigned char track_num;
|
||||
unsigned char min; /* start of data */
|
||||
unsigned char sec;
|
||||
unsigned char frame;
|
||||
unsigned char mode;
|
||||
bool audio;
|
||||
} cdrom_track_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
cdrom_track_t track[99]; /* unsigned alignment */
|
||||
cdrom_group_timeouts_t timeouts; /* unsigned short alignment */
|
||||
unsigned char num_tracks;
|
||||
char drive;
|
||||
} cdrom_toc_t;
|
||||
|
||||
void cdrom_lba_to_msf(unsigned lba, unsigned char *min, unsigned char *sec, unsigned char *frame);
|
||||
|
||||
unsigned cdrom_msf_to_lba(unsigned char min, unsigned char sec, unsigned char frame);
|
||||
|
||||
void increment_msf(unsigned char *min, unsigned char *sec, unsigned char *frame);
|
||||
|
||||
int cdrom_read_subq(libretro_vfs_implementation_file *stream, unsigned char *buf, size_t len);
|
||||
|
||||
int cdrom_write_cue(libretro_vfs_implementation_file *stream, char **out_buf, size_t *out_len, char cdrom_drive, unsigned char *num_tracks, cdrom_toc_t *toc);
|
||||
|
||||
/* needs 32 bytes for full vendor, product and version */
|
||||
int cdrom_get_inquiry(libretro_vfs_implementation_file *stream, char *model, int len, bool *is_cdrom);
|
||||
|
||||
int cdrom_read(libretro_vfs_implementation_file *stream, cdrom_group_timeouts_t *timeouts, unsigned char min, unsigned char sec, unsigned char frame, void *s, size_t len, size_t skip);
|
||||
|
||||
int cdrom_set_read_speed(libretro_vfs_implementation_file *stream, unsigned speed);
|
||||
|
||||
int cdrom_stop(libretro_vfs_implementation_file *stream);
|
||||
|
||||
int cdrom_unlock(libretro_vfs_implementation_file *stream);
|
||||
|
||||
int cdrom_open_tray(libretro_vfs_implementation_file *stream);
|
||||
|
||||
int cdrom_close_tray(libretro_vfs_implementation_file *stream);
|
||||
|
||||
/* must be freed by the caller */
|
||||
struct string_list* cdrom_get_available_drives(void);
|
||||
|
||||
bool cdrom_is_media_inserted(libretro_vfs_implementation_file *stream);
|
||||
|
||||
bool cdrom_drive_has_media(const char drive);
|
||||
|
||||
void cdrom_get_current_config_core(libretro_vfs_implementation_file *stream);
|
||||
|
||||
void cdrom_get_current_config_profiles(libretro_vfs_implementation_file *stream);
|
||||
|
||||
void cdrom_get_current_config_cdread(libretro_vfs_implementation_file *stream);
|
||||
|
||||
void cdrom_get_current_config_multiread(libretro_vfs_implementation_file *stream);
|
||||
|
||||
void cdrom_get_current_config_random_readable(libretro_vfs_implementation_file *stream);
|
||||
|
||||
int cdrom_get_sense(libretro_vfs_implementation_file *stream, unsigned char *sense, size_t len);
|
||||
|
||||
bool cdrom_set_read_cache(libretro_vfs_implementation_file *stream, bool enabled);
|
||||
|
||||
bool cdrom_get_timeouts(libretro_vfs_implementation_file *stream, cdrom_group_timeouts_t *timeouts);
|
||||
|
||||
bool cdrom_has_atip(libretro_vfs_implementation_file *stream);
|
||||
|
||||
void cdrom_device_fillpath(char *path, size_t len, char drive, unsigned char track, bool is_cue);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
65
src/minarch/libretro-common/include/clamping.h
Normal file
65
src/minarch/libretro-common/include/clamping.h
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (clamping.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _LIBRETRO_SDK_CLAMPING_H
|
||||
#define _LIBRETRO_SDK_CLAMPING_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <retro_inline.h>
|
||||
|
||||
/**
|
||||
* clamp_float:
|
||||
* @val : initial value
|
||||
* @lower : lower limit that value should be clamped against
|
||||
* @upper : upper limit that value should be clamped against
|
||||
*
|
||||
* Clamps a floating point value.
|
||||
*
|
||||
* Returns: a clamped value of initial float value @val.
|
||||
*/
|
||||
static INLINE float clamp_float(float val, float lower, float upper)
|
||||
{
|
||||
if (val < lower)
|
||||
return lower;
|
||||
if (val > upper)
|
||||
return upper;
|
||||
return val;
|
||||
}
|
||||
|
||||
/**
|
||||
* clamp_8bit:
|
||||
* @val : initial value
|
||||
*
|
||||
* Clamps an unsigned 8-bit value.
|
||||
*
|
||||
* Returns: a clamped value of initial unsigned 8-bit value @val.
|
||||
*/
|
||||
static INLINE uint8_t clamp_8bit(int val)
|
||||
{
|
||||
if (val > 255)
|
||||
return 255;
|
||||
if (val < 0)
|
||||
return 0;
|
||||
return (uint8_t)val;
|
||||
}
|
||||
|
||||
#endif
|
||||
84
src/minarch/libretro-common/include/compat/apple_compat.h
Normal file
84
src/minarch/libretro-common/include/compat/apple_compat.h
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (apple_compat.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __APPLE_COMPAT_H
|
||||
#define __APPLE_COMPAT_H
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <AvailabilityMacros.h>
|
||||
#endif
|
||||
|
||||
#ifdef __OBJC__
|
||||
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4)
|
||||
typedef int NSInteger;
|
||||
typedef unsigned NSUInteger;
|
||||
typedef float CGFloat;
|
||||
#endif
|
||||
|
||||
#ifndef __has_feature
|
||||
/* Compatibility with non-Clang compilers. */
|
||||
#define __has_feature(x) 0
|
||||
#endif
|
||||
|
||||
#ifndef CF_RETURNS_RETAINED
|
||||
#if __has_feature(attribute_cf_returns_retained)
|
||||
#define CF_RETURNS_RETAINED __attribute__((cf_returns_retained))
|
||||
#else
|
||||
#define CF_RETURNS_RETAINED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef NS_INLINE
|
||||
#define NS_INLINE inline
|
||||
#endif
|
||||
|
||||
NS_INLINE CF_RETURNS_RETAINED CFTypeRef CFBridgingRetainCompat(id X)
|
||||
{
|
||||
#if __has_feature(objc_arc)
|
||||
return (__bridge_retained CFTypeRef)X;
|
||||
#else
|
||||
return X;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef IOS
|
||||
#ifndef __IPHONE_5_0
|
||||
#warning "This project uses features only available in iOS SDK 5.0 and later."
|
||||
#endif
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <GLKit/GLKit.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#ifdef __OBJC__
|
||||
#include <objc/objc-runtime.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
30
src/minarch/libretro-common/include/compat/fnmatch.h
Normal file
30
src/minarch/libretro-common/include/compat/fnmatch.h
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (fnmatch.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_COMPAT_FNMATCH_H__
|
||||
#define __LIBRETRO_SDK_COMPAT_FNMATCH_H__
|
||||
|
||||
#define FNM_NOMATCH 1
|
||||
|
||||
int rl_fnmatch(const char *pattern, const char *string, int flags);
|
||||
|
||||
#endif
|
||||
34
src/minarch/libretro-common/include/compat/fopen_utf8.h
Normal file
34
src/minarch/libretro-common/include/compat/fopen_utf8.h
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (fopen_utf8.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_COMPAT_FOPEN_UTF8_H
|
||||
#define __LIBRETRO_SDK_COMPAT_FOPEN_UTF8_H
|
||||
|
||||
#ifdef _WIN32
|
||||
/* Defined to error rather than fopen_utf8, to make it clear to everyone reading the code that not worrying about utf16 is fine */
|
||||
/* TODO: enable */
|
||||
/* #define fopen (use fopen_utf8 instead) */
|
||||
void *fopen_utf8(const char * filename, const char * mode);
|
||||
#else
|
||||
#define fopen_utf8 fopen
|
||||
#endif
|
||||
#endif
|
||||
74
src/minarch/libretro-common/include/compat/getopt.h
Normal file
74
src/minarch/libretro-common/include/compat/getopt.h
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (getopt.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_COMPAT_GETOPT_H
|
||||
#define __LIBRETRO_SDK_COMPAT_GETOPT_H
|
||||
|
||||
#if defined(RARCH_INTERNAL) && defined(HAVE_CONFIG_H)
|
||||
#include "../../../config.h"
|
||||
#endif
|
||||
|
||||
/* Custom implementation of the GNU getopt_long for portability.
|
||||
* Not designed to be fully compatible, but compatible with
|
||||
* the features RetroArch uses. */
|
||||
|
||||
#ifdef HAVE_GETOPT_LONG
|
||||
#include <getopt.h>
|
||||
#else
|
||||
/* Avoid possible naming collisions during link since we
|
||||
* prefer to use the actual name. */
|
||||
#define getopt_long(argc, argv, optstring, longopts, longindex) __getopt_long_retro(argc, argv, optstring, longopts, longindex)
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
struct option
|
||||
{
|
||||
const char *name;
|
||||
int has_arg;
|
||||
int *flag;
|
||||
int val;
|
||||
};
|
||||
|
||||
/* argv[] is declared with char * const argv[] in GNU,
|
||||
* but this makes no sense, as non-POSIX getopt_long
|
||||
* mutates argv (non-opts are moved to the end). */
|
||||
int getopt_long(int argc, char *argv[],
|
||||
const char *optstring, const struct option *longopts, int *longindex);
|
||||
extern char *optarg;
|
||||
extern int optind, opterr, optopt;
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
/* If these are variously #defined, then we have bigger problems */
|
||||
#ifndef no_argument
|
||||
#define no_argument 0
|
||||
#define required_argument 1
|
||||
#define optional_argument 2
|
||||
#endif
|
||||
|
||||
/* HAVE_GETOPT_LONG */
|
||||
#endif
|
||||
|
||||
/* pragma once */
|
||||
#endif
|
||||
53
src/minarch/libretro-common/include/compat/ifaddrs.h
Normal file
53
src/minarch/libretro-common/include/compat/ifaddrs.h
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 1999
|
||||
* Berkeley Software Design, Inc. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp
|
||||
*/
|
||||
|
||||
#ifndef _IFADDRS_H_
|
||||
#define _IFADDRS_H_
|
||||
|
||||
struct ifaddrs
|
||||
{
|
||||
struct ifaddrs *ifa_next;
|
||||
char *ifa_name;
|
||||
unsigned int ifa_flags;
|
||||
struct sockaddr *ifa_addr;
|
||||
struct sockaddr *ifa_netmask;
|
||||
struct sockaddr *ifa_dstaddr;
|
||||
void *ifa_data;
|
||||
};
|
||||
|
||||
/*
|
||||
* This may have been defined in <net/if.h>. Note that if <net/if.h> is
|
||||
* to be included it must be included before this header file.
|
||||
*/
|
||||
#ifndef ifa_broadaddr
|
||||
#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */
|
||||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
extern int getifaddrs(struct ifaddrs **ifap);
|
||||
extern void freeifaddrs(struct ifaddrs *ifa);
|
||||
|
||||
#endif
|
||||
99
src/minarch/libretro-common/include/compat/intrinsics.h
Normal file
99
src/minarch/libretro-common/include/compat/intrinsics.h
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (intrinsics.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_COMPAT_INTRINSICS_H
|
||||
#define __LIBRETRO_SDK_COMPAT_INTRINSICS_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
#include <retro_inline.h>
|
||||
|
||||
#if defined(_MSC_VER) && !defined(_XBOX)
|
||||
#if (_MSC_VER > 1310)
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
/* Count Leading Zero, unsigned 16bit input value */
|
||||
static INLINE unsigned compat_clz_u16(uint16_t val)
|
||||
{
|
||||
#if defined(__GNUC__)
|
||||
return __builtin_clz(val << 16 | 0x8000);
|
||||
#else
|
||||
unsigned ret = 0;
|
||||
|
||||
while(!(val & 0x8000) && ret < 16)
|
||||
{
|
||||
val <<= 1;
|
||||
ret++;
|
||||
}
|
||||
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Count Trailing Zero */
|
||||
static INLINE int compat_ctz(unsigned x)
|
||||
{
|
||||
#if defined(__GNUC__) && !defined(RARCH_CONSOLE)
|
||||
return __builtin_ctz(x);
|
||||
#elif _MSC_VER >= 1400 && !defined(_XBOX) && !defined(__WINRT__)
|
||||
unsigned long r = 0;
|
||||
_BitScanForward((unsigned long*)&r, x);
|
||||
return (int)r;
|
||||
#else
|
||||
int count = 0;
|
||||
if (!(x & 0xffff))
|
||||
{
|
||||
x >>= 16;
|
||||
count |= 16;
|
||||
}
|
||||
if (!(x & 0xff))
|
||||
{
|
||||
x >>= 8;
|
||||
count |= 8;
|
||||
}
|
||||
if (!(x & 0xf))
|
||||
{
|
||||
x >>= 4;
|
||||
count |= 4;
|
||||
}
|
||||
if (!(x & 0x3))
|
||||
{
|
||||
x >>= 2;
|
||||
count |= 2;
|
||||
}
|
||||
if (!(x & 0x1))
|
||||
count |= 1;
|
||||
|
||||
return count;
|
||||
#endif
|
||||
}
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
126
src/minarch/libretro-common/include/compat/msvc.h
Normal file
126
src/minarch/libretro-common/include/compat/msvc.h
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (msvc.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_COMPAT_MSVC_H
|
||||
#define __LIBRETRO_SDK_COMPAT_MSVC_H
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Pre-MSVC 2015 compilers don't implement snprintf, vsnprintf in a cross-platform manner. */
|
||||
#if _MSC_VER < 1900
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef snprintf
|
||||
#define snprintf c99_snprintf_retro__
|
||||
#endif
|
||||
int c99_snprintf_retro__(char *outBuf, size_t size, const char *format, ...);
|
||||
|
||||
#ifndef vsnprintf
|
||||
#define vsnprintf c99_vsnprintf_retro__
|
||||
#endif
|
||||
int c99_vsnprintf_retro__(char *outBuf, size_t size, const char *format, va_list ap);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef UNICODE /* Do not bother with UNICODE at this time. */
|
||||
#include <direct.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <math.h>
|
||||
|
||||
/* Python headers defines ssize_t and sets HAVE_SSIZE_T.
|
||||
* Cannot duplicate these efforts.
|
||||
*/
|
||||
#ifndef HAVE_SSIZE_T
|
||||
#if defined(_WIN64)
|
||||
typedef __int64 ssize_t;
|
||||
#elif defined(_WIN32)
|
||||
typedef int ssize_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define mkdir(dirname, unused) _mkdir(dirname)
|
||||
#define strtoull _strtoui64
|
||||
#undef strcasecmp
|
||||
#define strcasecmp _stricmp
|
||||
#undef strncasecmp
|
||||
#define strncasecmp _strnicmp
|
||||
|
||||
/* Disable some of the annoying warnings. */
|
||||
#pragma warning(disable : 4800)
|
||||
#pragma warning(disable : 4805)
|
||||
#pragma warning(disable : 4244)
|
||||
#pragma warning(disable : 4305)
|
||||
#pragma warning(disable : 4146)
|
||||
#pragma warning(disable : 4267)
|
||||
#pragma warning(disable : 4723)
|
||||
#pragma warning(disable : 4996)
|
||||
|
||||
/* roundf and va_copy is available since MSVC 2013 */
|
||||
#if _MSC_VER < 1800
|
||||
#define roundf(in) (in >= 0.0f ? floorf(in + 0.5f) : ceilf(in - 0.5f))
|
||||
#define va_copy(x, y) ((x) = (y))
|
||||
#endif
|
||||
|
||||
#if _MSC_VER <= 1310
|
||||
#ifndef __cplusplus
|
||||
/* VC6 math.h doesn't define some functions when in C mode.
|
||||
* Trying to define a prototype gives "undefined reference".
|
||||
* But providing an implementation then gives "function already has body".
|
||||
* So the equivalent of the implementations from math.h are used as
|
||||
* defines here instead, and it seems to work.
|
||||
*/
|
||||
#define cosf(x) ((float)cos((double)x))
|
||||
#define powf(x, y) ((float)pow((double)x, (double)y))
|
||||
#define sinf(x) ((float)sin((double)x))
|
||||
#define ceilf(x) ((float)ceil((double)x))
|
||||
#define floorf(x) ((float)floor((double)x))
|
||||
#define sqrtf(x) ((float)sqrt((double)x))
|
||||
#define fabsf(x) ((float)fabs((double)(x)))
|
||||
#endif
|
||||
|
||||
#ifndef _strtoui64
|
||||
#define _strtoui64(x, y, z) (_atoi64(x))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX _MAX_PATH
|
||||
#endif
|
||||
|
||||
#ifndef SIZE_MAX
|
||||
#define SIZE_MAX _UI32_MAX
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
255
src/minarch/libretro-common/include/compat/msvc/stdint.h
Normal file
255
src/minarch/libretro-common/include/compat/msvc/stdint.h
Normal file
|
|
@ -0,0 +1,255 @@
|
|||
/* ISO C9x compliant stdint.h for Microsoft Visual Studio
|
||||
* Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
|
||||
*
|
||||
* Copyright (c) 2006-2008 Alexander Chemeris
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of the author may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef __RARCH_STDINT_H
|
||||
#define __RARCH_STDINT_H
|
||||
|
||||
#if _MSC_VER && (_MSC_VER < 1600)
|
||||
/* Pre-MSVC 2010 needs an implementation of stdint.h. */
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
/* For Visual Studio 6 in C++ mode and for many Visual Studio versions when
|
||||
* compiling for ARM we should wrap <wchar.h> include with 'extern "C++" {}'
|
||||
* or compiler give many errors like this:
|
||||
*
|
||||
* error C2733: second C linkage of overloaded function 'wmemchr' not allowed
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
#if _MSC_VER <= 1200
|
||||
extern "C++" {
|
||||
#else
|
||||
extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
# include <wchar.h>
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Define _W64 macros to mark types changing their size, like intptr_t. */
|
||||
#ifndef _W64
|
||||
# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
|
||||
# define _W64 __w64
|
||||
# else
|
||||
# define _W64
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* 7.18.1 Integer types. */
|
||||
|
||||
/* 7.18.1.1 Exact-width integer types. */
|
||||
|
||||
/* Visual Studio 6 and Embedded Visual C++ 4 doesn't
|
||||
* realize that, e.g. char has the same size as __int8
|
||||
* so we give up on __intX for them.
|
||||
*/
|
||||
#if (_MSC_VER < 1300)
|
||||
typedef signed char int8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
#else
|
||||
typedef signed __int8 int8_t;
|
||||
typedef signed __int16 int16_t;
|
||||
typedef signed __int32 int32_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
#endif
|
||||
typedef signed __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
|
||||
/* 7.18.1.2 Minimum-width integer types. */
|
||||
typedef int8_t int_least8_t;
|
||||
typedef int16_t int_least16_t;
|
||||
typedef int32_t int_least32_t;
|
||||
typedef int64_t int_least64_t;
|
||||
typedef uint8_t uint_least8_t;
|
||||
typedef uint16_t uint_least16_t;
|
||||
typedef uint32_t uint_least32_t;
|
||||
typedef uint64_t uint_least64_t;
|
||||
|
||||
/* 7.18.1.3 Fastest minimum-width integer types. */
|
||||
typedef int8_t int_fast8_t;
|
||||
typedef int16_t int_fast16_t;
|
||||
typedef int32_t int_fast32_t;
|
||||
typedef int64_t int_fast64_t;
|
||||
typedef uint8_t uint_fast8_t;
|
||||
typedef uint16_t uint_fast16_t;
|
||||
typedef uint32_t uint_fast32_t;
|
||||
typedef uint64_t uint_fast64_t;
|
||||
|
||||
/* 7.18.1.4 Integer types capable of holding object pointers. */
|
||||
#ifdef _WIN64 /* [ */
|
||||
typedef signed __int64 intptr_t;
|
||||
typedef unsigned __int64 uintptr_t;
|
||||
#else /* _WIN64 ][ */
|
||||
typedef _W64 signed int intptr_t;
|
||||
typedef _W64 unsigned int uintptr_t;
|
||||
#endif /* _WIN64 ] */
|
||||
|
||||
/* 7.18.1.5 Greatest-width integer types. */
|
||||
typedef int64_t intmax_t;
|
||||
typedef uint64_t uintmax_t;
|
||||
|
||||
/* 7.18.2 Limits of specified-width integer types. */
|
||||
|
||||
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
|
||||
/* [ See footnote 220 at page 257 and footnote 221 at page 259. */
|
||||
|
||||
/* 7.18.2.1 Limits of exact-width integer types. */
|
||||
#define INT8_MIN ((int8_t)_I8_MIN)
|
||||
#define INT8_MAX _I8_MAX
|
||||
#define INT16_MIN ((int16_t)_I16_MIN)
|
||||
#define INT16_MAX _I16_MAX
|
||||
#define INT32_MIN ((int32_t)_I32_MIN)
|
||||
#define INT32_MAX _I32_MAX
|
||||
#define INT64_MIN ((int64_t)_I64_MIN)
|
||||
#define INT64_MAX _I64_MAX
|
||||
#define UINT8_MAX _UI8_MAX
|
||||
#define UINT16_MAX _UI16_MAX
|
||||
#define UINT32_MAX _UI32_MAX
|
||||
#define UINT64_MAX _UI64_MAX
|
||||
|
||||
/* 7.18.2.2 Limits of minimum-width integer types. */
|
||||
#define INT_LEAST8_MIN INT8_MIN
|
||||
#define INT_LEAST8_MAX INT8_MAX
|
||||
#define INT_LEAST16_MIN INT16_MIN
|
||||
#define INT_LEAST16_MAX INT16_MAX
|
||||
#define INT_LEAST32_MIN INT32_MIN
|
||||
#define INT_LEAST32_MAX INT32_MAX
|
||||
#define INT_LEAST64_MIN INT64_MIN
|
||||
#define INT_LEAST64_MAX INT64_MAX
|
||||
#define UINT_LEAST8_MAX UINT8_MAX
|
||||
#define UINT_LEAST16_MAX UINT16_MAX
|
||||
#define UINT_LEAST32_MAX UINT32_MAX
|
||||
#define UINT_LEAST64_MAX UINT64_MAX
|
||||
|
||||
/* 7.18.2.3 Limits of fastest minimum-width integer types. */
|
||||
#define INT_FAST8_MIN INT8_MIN
|
||||
#define INT_FAST8_MAX INT8_MAX
|
||||
#define INT_FAST16_MIN INT16_MIN
|
||||
#define INT_FAST16_MAX INT16_MAX
|
||||
#define INT_FAST32_MIN INT32_MIN
|
||||
#define INT_FAST32_MAX INT32_MAX
|
||||
#define INT_FAST64_MIN INT64_MIN
|
||||
#define INT_FAST64_MAX INT64_MAX
|
||||
#define UINT_FAST8_MAX UINT8_MAX
|
||||
#define UINT_FAST16_MAX UINT16_MAX
|
||||
#define UINT_FAST32_MAX UINT32_MAX
|
||||
#define UINT_FAST64_MAX UINT64_MAX
|
||||
|
||||
/* 7.18.2.4 Limits of integer types capable of holding object pointers. */
|
||||
#ifdef _WIN64 /* [ */
|
||||
# define INTPTR_MIN INT64_MIN
|
||||
# define INTPTR_MAX INT64_MAX
|
||||
# define UINTPTR_MAX UINT64_MAX
|
||||
#else /* _WIN64 ][ */
|
||||
# define INTPTR_MIN INT32_MIN
|
||||
# define INTPTR_MAX INT32_MAX
|
||||
# define UINTPTR_MAX UINT32_MAX
|
||||
#endif /* _WIN64 ] */
|
||||
|
||||
/* 7.18.2.5 Limits of greatest-width integer types */
|
||||
#define INTMAX_MIN INT64_MIN
|
||||
#define INTMAX_MAX INT64_MAX
|
||||
#define UINTMAX_MAX UINT64_MAX
|
||||
|
||||
/* 7.18.3 Limits of other integer types */
|
||||
|
||||
#ifdef _WIN64 /* [ */
|
||||
# define PTRDIFF_MIN _I64_MIN
|
||||
# define PTRDIFF_MAX _I64_MAX
|
||||
#else /* _WIN64 ][ */
|
||||
# define PTRDIFF_MIN _I32_MIN
|
||||
# define PTRDIFF_MAX _I32_MAX
|
||||
#endif /* _WIN64 ] */
|
||||
|
||||
#define SIG_ATOMIC_MIN INT_MIN
|
||||
#define SIG_ATOMIC_MAX INT_MAX
|
||||
|
||||
#ifndef SIZE_MAX /* [ */
|
||||
# ifdef _WIN64 /* [ */
|
||||
# define SIZE_MAX _UI64_MAX
|
||||
# else /* _WIN64 ][ */
|
||||
# define SIZE_MAX _UI32_MAX
|
||||
# endif /* _WIN64 ] */
|
||||
#endif /* SIZE_MAX ] */
|
||||
|
||||
/* WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h> */
|
||||
#ifndef WCHAR_MIN /* [ */
|
||||
# define WCHAR_MIN 0
|
||||
#endif /* WCHAR_MIN ] */
|
||||
#ifndef WCHAR_MAX // [
|
||||
# define WCHAR_MAX _UI16_MAX
|
||||
#endif /* WCHAR_MAX ] */
|
||||
|
||||
#define WINT_MIN 0
|
||||
#define WINT_MAX _UI16_MAX
|
||||
|
||||
#endif /* __STDC_LIMIT_MACROS ] */
|
||||
|
||||
/* 7.18.4 Limits of other integer types */
|
||||
|
||||
#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS)
|
||||
/* [ See footnote 224 at page 260 */
|
||||
|
||||
/* 7.18.4.1 Macros for minimum-width integer constants */
|
||||
|
||||
#define INT8_C(val) val##i8
|
||||
#define INT16_C(val) val##i16
|
||||
#define INT32_C(val) val##i32
|
||||
#define INT64_C(val) val##i64
|
||||
|
||||
#define UINT8_C(val) val##ui8
|
||||
#define UINT16_C(val) val##ui16
|
||||
#define UINT32_C(val) val##ui32
|
||||
#define UINT64_C(val) val##ui64
|
||||
|
||||
/* 7.18.4.2 Macros for greatest-width integer constants */
|
||||
#define INTMAX_C INT64_C
|
||||
#define UINTMAX_C UINT64_C
|
||||
|
||||
#endif
|
||||
/* __STDC_CONSTANT_MACROS ] */
|
||||
|
||||
#else
|
||||
/* Sanity for everything else. */
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
60
src/minarch/libretro-common/include/compat/posix_string.h
Normal file
60
src/minarch/libretro-common/include/compat/posix_string.h
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (posix_string.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_COMPAT_POSIX_STRING_H
|
||||
#define __LIBRETRO_SDK_COMPAT_POSIX_STRING_H
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <compat/msvc.h>
|
||||
#endif
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
#ifdef _WIN32
|
||||
#undef strtok_r
|
||||
#define strtok_r(str, delim, saveptr) retro_strtok_r__(str, delim, saveptr)
|
||||
|
||||
char *strtok_r(char *str, const char *delim, char **saveptr);
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#undef strcasecmp
|
||||
#undef strdup
|
||||
#define strcasecmp(a, b) retro_strcasecmp__(a, b)
|
||||
#define strdup(orig) retro_strdup__(orig)
|
||||
int strcasecmp(const char *a, const char *b);
|
||||
char *strdup(const char *orig);
|
||||
|
||||
/* isblank is available since MSVC 2013 */
|
||||
#if _MSC_VER < 1800
|
||||
#undef isblank
|
||||
#define isblank(c) retro_isblank__(c)
|
||||
int isblank(int c);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
48
src/minarch/libretro-common/include/compat/strcasestr.h
Normal file
48
src/minarch/libretro-common/include/compat/strcasestr.h
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (strcasestr.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_COMPAT_STRCASESTR_H
|
||||
#define __LIBRETRO_SDK_COMPAT_STRCASESTR_H
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#if defined(RARCH_INTERNAL) && defined(HAVE_CONFIG_H)
|
||||
#include "../../../config.h"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRCASESTR
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
/* Avoid possible naming collisions during link
|
||||
* since we prefer to use the actual name. */
|
||||
#define strcasestr(haystack, needle) strcasestr_retro__(haystack, needle)
|
||||
|
||||
char *strcasestr(const char *haystack, const char *needle);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
59
src/minarch/libretro-common/include/compat/strl.h
Normal file
59
src/minarch/libretro-common/include/compat/strl.h
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (strl.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_COMPAT_STRL_H
|
||||
#define __LIBRETRO_SDK_COMPAT_STRL_H
|
||||
|
||||
#include <string.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#if defined(RARCH_INTERNAL) && defined(HAVE_CONFIG_H)
|
||||
#include "../../../config.h"
|
||||
#endif
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
#ifdef __MACH__
|
||||
#ifndef HAVE_STRL
|
||||
#define HAVE_STRL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRL
|
||||
/* Avoid possible naming collisions during link since
|
||||
* we prefer to use the actual name. */
|
||||
#define strlcpy(dst, src, size) strlcpy_retro__(dst, src, size)
|
||||
|
||||
#define strlcat(dst, src, size) strlcat_retro__(dst, src, size)
|
||||
|
||||
size_t strlcpy(char *dest, const char *source, size_t size);
|
||||
size_t strlcat(char *dest, const char *source, size_t size);
|
||||
|
||||
#endif
|
||||
|
||||
char *strldup(const char *s, size_t n);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
483
src/minarch/libretro-common/include/compat/zconf.h
Normal file
483
src/minarch/libretro-common/include/compat/zconf.h
Normal file
|
|
@ -0,0 +1,483 @@
|
|||
/* zconf.h -- configuration of the zlib compression library
|
||||
* Copyright (C) 1995-2013 Jean-loup Gailly.
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) $Id$ */
|
||||
|
||||
#ifndef ZCONF_H
|
||||
#define ZCONF_H
|
||||
|
||||
/*
|
||||
* If you *really* need a unique prefix for all types and library functions,
|
||||
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
|
||||
* Even better than compiling with -DZ_PREFIX would be to use configure to set
|
||||
* this permanently in zconf.h using "./configure --zprefix".
|
||||
*/
|
||||
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
|
||||
# define Z_PREFIX_SET
|
||||
|
||||
/* all linked symbols */
|
||||
# define _dist_code z__dist_code
|
||||
# define _length_code z__length_code
|
||||
# define _tr_align z__tr_align
|
||||
# define _tr_flush_bits z__tr_flush_bits
|
||||
# define _tr_flush_block z__tr_flush_block
|
||||
# define _tr_init z__tr_init
|
||||
# define _tr_stored_block z__tr_stored_block
|
||||
# define _tr_tally z__tr_tally
|
||||
# define adler32 z_adler32
|
||||
# define adler32_combine z_adler32_combine
|
||||
# define adler32_combine64 z_adler32_combine64
|
||||
# ifndef Z_SOLO
|
||||
# define compress z_compress
|
||||
# define compress2 z_compress2
|
||||
# define compressBound z_compressBound
|
||||
# endif
|
||||
# define crc32 z_crc32
|
||||
# define crc32_combine z_crc32_combine
|
||||
# define crc32_combine64 z_crc32_combine64
|
||||
# define deflate z_deflate
|
||||
# define deflateBound z_deflateBound
|
||||
# define deflateCopy z_deflateCopy
|
||||
# define deflateEnd z_deflateEnd
|
||||
# define deflateInit2_ z_deflateInit2_
|
||||
# define deflateInit_ z_deflateInit_
|
||||
# define deflateParams z_deflateParams
|
||||
# define deflatePending z_deflatePending
|
||||
# define deflatePrime z_deflatePrime
|
||||
# define deflateReset z_deflateReset
|
||||
# define deflateResetKeep z_deflateResetKeep
|
||||
# define deflateSetDictionary z_deflateSetDictionary
|
||||
# define deflateSetHeader z_deflateSetHeader
|
||||
# define deflateTune z_deflateTune
|
||||
# define deflate_copyright z_deflate_copyright
|
||||
# define get_crc_table z_get_crc_table
|
||||
# ifndef Z_SOLO
|
||||
# define gz_error z_gz_error
|
||||
# define gz_intmax z_gz_intmax
|
||||
# define gz_strwinerror z_gz_strwinerror
|
||||
# define gzbuffer z_gzbuffer
|
||||
# define gzclearerr z_gzclearerr
|
||||
# define gzclose z_gzclose
|
||||
# define gzclose_r z_gzclose_r
|
||||
# define gzclose_w z_gzclose_w
|
||||
# define gzdirect z_gzdirect
|
||||
# define gzdopen z_gzdopen
|
||||
# define gzeof z_gzeof
|
||||
# define gzerror z_gzerror
|
||||
# define gzflush z_gzflush
|
||||
# define gzgetc z_gzgetc
|
||||
# define gzgetc_ z_gzgetc_
|
||||
# define gzgets z_gzgets
|
||||
# define gzoffset z_gzoffset
|
||||
# define gzoffset64 z_gzoffset64
|
||||
# define gzopen z_gzopen
|
||||
# define gzopen64 z_gzopen64
|
||||
# ifdef _WIN32
|
||||
# define gzopen_w z_gzopen_w
|
||||
# endif
|
||||
# define gzprintf z_gzprintf
|
||||
# define gzvprintf z_gzvprintf
|
||||
# define gzputc z_gzputc
|
||||
# define gzputs z_gzputs
|
||||
# define gzread z_gzread
|
||||
# define gzrewind z_gzrewind
|
||||
# define gzseek z_gzseek
|
||||
# define gzseek64 z_gzseek64
|
||||
# define gzsetparams z_gzsetparams
|
||||
# define gztell z_gztell
|
||||
# define gztell64 z_gztell64
|
||||
# define gzungetc z_gzungetc
|
||||
# define gzwrite z_gzwrite
|
||||
# endif
|
||||
# define inflate z_inflate
|
||||
# define inflateBack z_inflateBack
|
||||
# define inflateBackEnd z_inflateBackEnd
|
||||
# define inflateBackInit_ z_inflateBackInit_
|
||||
# define inflateCopy z_inflateCopy
|
||||
# define inflateEnd z_inflateEnd
|
||||
# define inflateGetHeader z_inflateGetHeader
|
||||
# define inflateInit2_ z_inflateInit2_
|
||||
# define inflateInit_ z_inflateInit_
|
||||
# define inflateMark z_inflateMark
|
||||
# define inflatePrime z_inflatePrime
|
||||
# define inflateReset z_inflateReset
|
||||
# define inflateReset2 z_inflateReset2
|
||||
# define inflateSetDictionary z_inflateSetDictionary
|
||||
# define inflateGetDictionary z_inflateGetDictionary
|
||||
# define inflateSync z_inflateSync
|
||||
# define inflateSyncPoint z_inflateSyncPoint
|
||||
# define inflateUndermine z_inflateUndermine
|
||||
# define inflateResetKeep z_inflateResetKeep
|
||||
# define inflate_copyright z_inflate_copyright
|
||||
# define inflate_fast z_inflate_fast
|
||||
# define inflate_table z_inflate_table
|
||||
# ifndef Z_SOLO
|
||||
# define uncompress z_uncompress
|
||||
# endif
|
||||
# define zError z_zError
|
||||
# ifndef Z_SOLO
|
||||
# define zcalloc z_zcalloc
|
||||
# define zcfree z_zcfree
|
||||
# endif
|
||||
# define zlibCompileFlags z_zlibCompileFlags
|
||||
# define zlibVersion z_zlibVersion
|
||||
|
||||
/* all zlib typedefs in zlib.h and zconf.h */
|
||||
# define Byte z_Byte
|
||||
# define Bytef z_Bytef
|
||||
# define alloc_func z_alloc_func
|
||||
# define charf z_charf
|
||||
# define free_func z_free_func
|
||||
# ifndef Z_SOLO
|
||||
# define gzFile z_gzFile
|
||||
# endif
|
||||
# define gz_header z_gz_header
|
||||
# define gz_headerp z_gz_headerp
|
||||
# define in_func z_in_func
|
||||
# define intf z_intf
|
||||
# define out_func z_out_func
|
||||
# define uInt z_uInt
|
||||
# define uIntf z_uIntf
|
||||
# define uLong z_uLong
|
||||
# define uLongf z_uLongf
|
||||
# define voidp z_voidp
|
||||
# define voidpc z_voidpc
|
||||
# define voidpf z_voidpf
|
||||
|
||||
/* all zlib structs in zlib.h and zconf.h */
|
||||
# define gz_header_s z_gz_header_s
|
||||
# define internal_state z_internal_state
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__MSDOS__) && !defined(MSDOS)
|
||||
# define MSDOS
|
||||
#endif
|
||||
#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
|
||||
# define OS2
|
||||
#endif
|
||||
#if defined(_WINDOWS) && !defined(WINDOWS)
|
||||
# define WINDOWS
|
||||
#endif
|
||||
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
|
||||
# ifndef WIN32
|
||||
# define WIN32
|
||||
# endif
|
||||
#endif
|
||||
#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
|
||||
# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
|
||||
# ifndef SYS16BIT
|
||||
# define SYS16BIT
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Compile with -DMAXSEG_64K if the alloc function cannot allocate more
|
||||
* than 64k bytes at a time (needed on systems with 16-bit int).
|
||||
*/
|
||||
#ifdef SYS16BIT
|
||||
# define MAXSEG_64K
|
||||
#endif
|
||||
#ifdef MSDOS
|
||||
# define UNALIGNED_OK
|
||||
#endif
|
||||
|
||||
#ifdef __STDC_VERSION__
|
||||
# ifndef STDC
|
||||
# define STDC
|
||||
# endif
|
||||
# if __STDC_VERSION__ >= 199901L
|
||||
# ifndef STDC99
|
||||
# define STDC99
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
|
||||
# define STDC
|
||||
#endif
|
||||
|
||||
#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
|
||||
# define STDC
|
||||
#endif
|
||||
|
||||
#ifndef STDC
|
||||
# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
|
||||
# define const /* note: need a more gentle solution here */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(ZLIB_CONST) && !defined(z_const)
|
||||
# define z_const const
|
||||
#else
|
||||
# define z_const
|
||||
#endif
|
||||
|
||||
/* Some Mac compilers merge all .h files incorrectly: */
|
||||
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
|
||||
# define NO_DUMMY_DECL
|
||||
#endif
|
||||
|
||||
/* Maximum value for memLevel in deflateInit2 */
|
||||
#ifndef MAX_MEM_LEVEL
|
||||
# ifdef MAXSEG_64K
|
||||
# define MAX_MEM_LEVEL 8
|
||||
# else
|
||||
# define MAX_MEM_LEVEL 9
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
|
||||
* WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
|
||||
* created by gzip. (Files created by minigzip can still be extracted by
|
||||
* gzip.)
|
||||
*/
|
||||
#ifndef MAX_WBITS
|
||||
# define MAX_WBITS 15 /* 32K LZ77 window */
|
||||
#endif
|
||||
|
||||
/* The memory requirements for deflate are (in bytes):
|
||||
(1 << (windowBits+2)) + (1 << (memLevel+9))
|
||||
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
|
||||
plus a few kilobytes for small objects. For example, if you want to reduce
|
||||
the default memory requirements from 256K to 128K, compile with
|
||||
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
|
||||
Of course this will generally degrade compression (there's no free lunch).
|
||||
|
||||
The memory requirements for inflate are (in bytes) 1 << windowBits
|
||||
that is, 32K for windowBits=15 (default value) plus a few kilobytes
|
||||
for small objects.
|
||||
*/
|
||||
|
||||
/* Type declarations */
|
||||
|
||||
#ifndef OF /* function prototypes */
|
||||
# ifdef STDC
|
||||
# define OF(args) args
|
||||
# else
|
||||
# define OF(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef Z_ARG /* function prototypes for stdarg */
|
||||
# if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||
# define Z_ARG(args) args
|
||||
# else
|
||||
# define Z_ARG(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* The following definitions for FAR are needed only for MSDOS mixed
|
||||
* model programming (small or medium model with some far allocations).
|
||||
* This was tested only with MSC; for other MSDOS compilers you may have
|
||||
* to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
|
||||
* just define FAR to be empty.
|
||||
*/
|
||||
#ifdef SYS16BIT
|
||||
# if defined(M_I86SM) || defined(M_I86MM)
|
||||
/* MSC small or medium model */
|
||||
# define SMALL_MEDIUM
|
||||
# ifdef _MSC_VER
|
||||
# define FAR _far
|
||||
# else
|
||||
# define FAR far
|
||||
# endif
|
||||
# endif
|
||||
# if (defined(__SMALL__) || defined(__MEDIUM__))
|
||||
/* Turbo C small or medium model */
|
||||
# define SMALL_MEDIUM
|
||||
# ifdef __BORLANDC__
|
||||
# define FAR _far
|
||||
# else
|
||||
# define FAR far
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(WINDOWS) || defined(WIN32)
|
||||
/* If building or using zlib as a DLL, define ZLIB_DLL.
|
||||
* This is not mandatory, but it offers a little performance increase.
|
||||
*/
|
||||
# ifdef ZLIB_DLL
|
||||
# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
|
||||
# ifdef ZLIB_INTERNAL
|
||||
# define ZEXTERN extern __declspec(dllexport)
|
||||
# else
|
||||
# define ZEXTERN extern __declspec(dllimport)
|
||||
# endif
|
||||
# endif
|
||||
# endif /* ZLIB_DLL */
|
||||
/* If building or using zlib with the WINAPI/WINAPIV calling convention,
|
||||
* define ZLIB_WINAPI.
|
||||
* Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
|
||||
*/
|
||||
# ifdef ZLIB_WINAPI
|
||||
# ifdef FAR
|
||||
# undef FAR
|
||||
# endif
|
||||
# include <windows.h>
|
||||
/* No need for _export, use ZLIB.DEF instead. */
|
||||
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef FAR
|
||||
# define FAR
|
||||
#endif
|
||||
|
||||
#if !defined(__MACTYPES__)
|
||||
typedef unsigned char Byte; /* 8 bits */
|
||||
#endif
|
||||
typedef unsigned int uInt; /* 16 bits or more */
|
||||
typedef unsigned long uLong; /* 32 bits or more */
|
||||
|
||||
#ifdef SMALL_MEDIUM
|
||||
/* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
|
||||
# define Bytef Byte FAR
|
||||
#else
|
||||
typedef Byte FAR Bytef;
|
||||
#endif
|
||||
typedef char FAR charf;
|
||||
typedef int FAR intf;
|
||||
typedef uInt FAR uIntf;
|
||||
typedef uLong FAR uLongf;
|
||||
|
||||
#ifdef STDC
|
||||
typedef void const *voidpc;
|
||||
typedef void FAR *voidpf;
|
||||
typedef void *voidp;
|
||||
#else
|
||||
typedef Byte const *voidpc;
|
||||
typedef Byte FAR *voidpf;
|
||||
typedef Byte *voidp;
|
||||
#endif
|
||||
|
||||
#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
|
||||
# include <limits.h>
|
||||
# if (UINT_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned
|
||||
# elif (ULONG_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned long
|
||||
# elif (USHRT_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned short
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef Z_U4
|
||||
typedef Z_U4 z_crc_t;
|
||||
#else
|
||||
typedef unsigned long z_crc_t;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
|
||||
# define Z_HAVE_STDARG_H
|
||||
#endif
|
||||
|
||||
#ifdef STDC
|
||||
# ifndef Z_SOLO
|
||||
# include <sys/types.h> /* for off_t */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||
# ifndef Z_SOLO
|
||||
# include <stdarg.h> /* for va_list */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# ifndef Z_SOLO
|
||||
# include <stddef.h> /* for wchar_t */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
|
||||
* "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
|
||||
* though the former does not conform to the LFS document), but considering
|
||||
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
|
||||
* equivalently requesting no 64-bit operations
|
||||
*/
|
||||
#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
|
||||
# undef _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
|
||||
#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
#ifndef Z_SOLO
|
||||
# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
|
||||
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
|
||||
# ifdef VMS
|
||||
# include <unixio.h> /* for off_t */
|
||||
# endif
|
||||
# ifndef z_off_t
|
||||
# define z_off_t off_t
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
|
||||
# define Z_LFS64
|
||||
#endif
|
||||
|
||||
#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
|
||||
# define Z_LARGE64
|
||||
#endif
|
||||
|
||||
#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
|
||||
# define Z_WANT64
|
||||
#endif
|
||||
|
||||
#if !defined(SEEK_SET) && !defined(Z_SOLO)
|
||||
# define SEEK_SET 0 /* Seek from beginning of file. */
|
||||
# define SEEK_CUR 1 /* Seek from current position. */
|
||||
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
|
||||
#endif
|
||||
|
||||
#ifndef z_off_t
|
||||
# define z_off_t long
|
||||
#endif
|
||||
|
||||
#if !defined(_WIN32) && defined(Z_LARGE64)
|
||||
# define z_off64_t off64_t
|
||||
#else
|
||||
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
|
||||
# define z_off64_t __int64
|
||||
# else
|
||||
# define z_off64_t z_off_t
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* MVS linker does not support external names larger than 8 bytes */
|
||||
#if defined(__MVS__)
|
||||
#pragma map(deflateInit_,"DEIN")
|
||||
#pragma map(deflateInit2_,"DEIN2")
|
||||
#pragma map(deflateEnd,"DEEND")
|
||||
#pragma map(deflateBound,"DEBND")
|
||||
#pragma map(inflateInit_,"ININ")
|
||||
#pragma map(inflateInit2_,"ININ2")
|
||||
#pragma map(inflateEnd,"INEND")
|
||||
#pragma map(inflateSync,"INSY")
|
||||
#pragma map(inflateSetDictionary,"INSEDI")
|
||||
#pragma map(compressBound,"CMBND")
|
||||
#pragma map(inflate_table,"INTABL")
|
||||
#pragma map(inflate_fast,"INFA")
|
||||
#pragma map(inflate_copyright,"INCOPY")
|
||||
#endif
|
||||
|
||||
#endif /* ZCONF_H */
|
||||
483
src/minarch/libretro-common/include/compat/zconf.h.in
Normal file
483
src/minarch/libretro-common/include/compat/zconf.h.in
Normal file
|
|
@ -0,0 +1,483 @@
|
|||
/* zconf.h -- configuration of the zlib compression library
|
||||
* Copyright (C) 1995-2013 Jean-loup Gailly.
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) $Id$ */
|
||||
|
||||
#ifndef ZCONF_H
|
||||
#define ZCONF_H
|
||||
|
||||
/*
|
||||
* If you *really* need a unique prefix for all types and library functions,
|
||||
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
|
||||
* Even better than compiling with -DZ_PREFIX would be to use configure to set
|
||||
* this permanently in zconf.h using "./configure --zprefix".
|
||||
*/
|
||||
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
|
||||
# define Z_PREFIX_SET
|
||||
|
||||
/* all linked symbols */
|
||||
# define _dist_code z__dist_code
|
||||
# define _length_code z__length_code
|
||||
# define _tr_align z__tr_align
|
||||
# define _tr_flush_bits z__tr_flush_bits
|
||||
# define _tr_flush_block z__tr_flush_block
|
||||
# define _tr_init z__tr_init
|
||||
# define _tr_stored_block z__tr_stored_block
|
||||
# define _tr_tally z__tr_tally
|
||||
# define adler32 z_adler32
|
||||
# define adler32_combine z_adler32_combine
|
||||
# define adler32_combine64 z_adler32_combine64
|
||||
# ifndef Z_SOLO
|
||||
# define compress z_compress
|
||||
# define compress2 z_compress2
|
||||
# define compressBound z_compressBound
|
||||
# endif
|
||||
# define crc32 z_crc32
|
||||
# define crc32_combine z_crc32_combine
|
||||
# define crc32_combine64 z_crc32_combine64
|
||||
# define deflate z_deflate
|
||||
# define deflateBound z_deflateBound
|
||||
# define deflateCopy z_deflateCopy
|
||||
# define deflateEnd z_deflateEnd
|
||||
# define deflateInit2_ z_deflateInit2_
|
||||
# define deflateInit_ z_deflateInit_
|
||||
# define deflateParams z_deflateParams
|
||||
# define deflatePending z_deflatePending
|
||||
# define deflatePrime z_deflatePrime
|
||||
# define deflateReset z_deflateReset
|
||||
# define deflateResetKeep z_deflateResetKeep
|
||||
# define deflateSetDictionary z_deflateSetDictionary
|
||||
# define deflateSetHeader z_deflateSetHeader
|
||||
# define deflateTune z_deflateTune
|
||||
# define deflate_copyright z_deflate_copyright
|
||||
# define get_crc_table z_get_crc_table
|
||||
# ifndef Z_SOLO
|
||||
# define gz_error z_gz_error
|
||||
# define gz_intmax z_gz_intmax
|
||||
# define gz_strwinerror z_gz_strwinerror
|
||||
# define gzbuffer z_gzbuffer
|
||||
# define gzclearerr z_gzclearerr
|
||||
# define gzclose z_gzclose
|
||||
# define gzclose_r z_gzclose_r
|
||||
# define gzclose_w z_gzclose_w
|
||||
# define gzdirect z_gzdirect
|
||||
# define gzdopen z_gzdopen
|
||||
# define gzeof z_gzeof
|
||||
# define gzerror z_gzerror
|
||||
# define gzflush z_gzflush
|
||||
# define gzgetc z_gzgetc
|
||||
# define gzgetc_ z_gzgetc_
|
||||
# define gzgets z_gzgets
|
||||
# define gzoffset z_gzoffset
|
||||
# define gzoffset64 z_gzoffset64
|
||||
# define gzopen z_gzopen
|
||||
# define gzopen64 z_gzopen64
|
||||
# ifdef _WIN32
|
||||
# define gzopen_w z_gzopen_w
|
||||
# endif
|
||||
# define gzprintf z_gzprintf
|
||||
# define gzvprintf z_gzvprintf
|
||||
# define gzputc z_gzputc
|
||||
# define gzputs z_gzputs
|
||||
# define gzread z_gzread
|
||||
# define gzrewind z_gzrewind
|
||||
# define gzseek z_gzseek
|
||||
# define gzseek64 z_gzseek64
|
||||
# define gzsetparams z_gzsetparams
|
||||
# define gztell z_gztell
|
||||
# define gztell64 z_gztell64
|
||||
# define gzungetc z_gzungetc
|
||||
# define gzwrite z_gzwrite
|
||||
# endif
|
||||
# define inflate z_inflate
|
||||
# define inflateBack z_inflateBack
|
||||
# define inflateBackEnd z_inflateBackEnd
|
||||
# define inflateBackInit_ z_inflateBackInit_
|
||||
# define inflateCopy z_inflateCopy
|
||||
# define inflateEnd z_inflateEnd
|
||||
# define inflateGetHeader z_inflateGetHeader
|
||||
# define inflateInit2_ z_inflateInit2_
|
||||
# define inflateInit_ z_inflateInit_
|
||||
# define inflateMark z_inflateMark
|
||||
# define inflatePrime z_inflatePrime
|
||||
# define inflateReset z_inflateReset
|
||||
# define inflateReset2 z_inflateReset2
|
||||
# define inflateSetDictionary z_inflateSetDictionary
|
||||
# define inflateGetDictionary z_inflateGetDictionary
|
||||
# define inflateSync z_inflateSync
|
||||
# define inflateSyncPoint z_inflateSyncPoint
|
||||
# define inflateUndermine z_inflateUndermine
|
||||
# define inflateResetKeep z_inflateResetKeep
|
||||
# define inflate_copyright z_inflate_copyright
|
||||
# define inflate_fast z_inflate_fast
|
||||
# define inflate_table z_inflate_table
|
||||
# ifndef Z_SOLO
|
||||
# define uncompress z_uncompress
|
||||
# endif
|
||||
# define zError z_zError
|
||||
# ifndef Z_SOLO
|
||||
# define zcalloc z_zcalloc
|
||||
# define zcfree z_zcfree
|
||||
# endif
|
||||
# define zlibCompileFlags z_zlibCompileFlags
|
||||
# define zlibVersion z_zlibVersion
|
||||
|
||||
/* all zlib typedefs in zlib.h and zconf.h */
|
||||
# define Byte z_Byte
|
||||
# define Bytef z_Bytef
|
||||
# define alloc_func z_alloc_func
|
||||
# define charf z_charf
|
||||
# define free_func z_free_func
|
||||
# ifndef Z_SOLO
|
||||
# define gzFile z_gzFile
|
||||
# endif
|
||||
# define gz_header z_gz_header
|
||||
# define gz_headerp z_gz_headerp
|
||||
# define in_func z_in_func
|
||||
# define intf z_intf
|
||||
# define out_func z_out_func
|
||||
# define uInt z_uInt
|
||||
# define uIntf z_uIntf
|
||||
# define uLong z_uLong
|
||||
# define uLongf z_uLongf
|
||||
# define voidp z_voidp
|
||||
# define voidpc z_voidpc
|
||||
# define voidpf z_voidpf
|
||||
|
||||
/* all zlib structs in zlib.h and zconf.h */
|
||||
# define gz_header_s z_gz_header_s
|
||||
# define internal_state z_internal_state
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__MSDOS__) && !defined(MSDOS)
|
||||
# define MSDOS
|
||||
#endif
|
||||
#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
|
||||
# define OS2
|
||||
#endif
|
||||
#if defined(_WINDOWS) && !defined(WINDOWS)
|
||||
# define WINDOWS
|
||||
#endif
|
||||
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
|
||||
# ifndef WIN32
|
||||
# define WIN32
|
||||
# endif
|
||||
#endif
|
||||
#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
|
||||
# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
|
||||
# ifndef SYS16BIT
|
||||
# define SYS16BIT
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Compile with -DMAXSEG_64K if the alloc function cannot allocate more
|
||||
* than 64k bytes at a time (needed on systems with 16-bit int).
|
||||
*/
|
||||
#ifdef SYS16BIT
|
||||
# define MAXSEG_64K
|
||||
#endif
|
||||
#ifdef MSDOS
|
||||
# define UNALIGNED_OK
|
||||
#endif
|
||||
|
||||
#ifdef __STDC_VERSION__
|
||||
# ifndef STDC
|
||||
# define STDC
|
||||
# endif
|
||||
# if __STDC_VERSION__ >= 199901L
|
||||
# ifndef STDC99
|
||||
# define STDC99
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
|
||||
# define STDC
|
||||
#endif
|
||||
|
||||
#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
|
||||
# define STDC
|
||||
#endif
|
||||
|
||||
#ifndef STDC
|
||||
# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
|
||||
# define const /* note: need a more gentle solution here */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(ZLIB_CONST) && !defined(z_const)
|
||||
# define z_const const
|
||||
#else
|
||||
# define z_const
|
||||
#endif
|
||||
|
||||
/* Some Mac compilers merge all .h files incorrectly: */
|
||||
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
|
||||
# define NO_DUMMY_DECL
|
||||
#endif
|
||||
|
||||
/* Maximum value for memLevel in deflateInit2 */
|
||||
#ifndef MAX_MEM_LEVEL
|
||||
# ifdef MAXSEG_64K
|
||||
# define MAX_MEM_LEVEL 8
|
||||
# else
|
||||
# define MAX_MEM_LEVEL 9
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
|
||||
* WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
|
||||
* created by gzip. (Files created by minigzip can still be extracted by
|
||||
* gzip.)
|
||||
*/
|
||||
#ifndef MAX_WBITS
|
||||
# define MAX_WBITS 15 /* 32K LZ77 window */
|
||||
#endif
|
||||
|
||||
/* The memory requirements for deflate are (in bytes):
|
||||
(1 << (windowBits+2)) + (1 << (memLevel+9))
|
||||
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
|
||||
plus a few kilobytes for small objects. For example, if you want to reduce
|
||||
the default memory requirements from 256K to 128K, compile with
|
||||
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
|
||||
Of course this will generally degrade compression (there's no free lunch).
|
||||
|
||||
The memory requirements for inflate are (in bytes) 1 << windowBits
|
||||
that is, 32K for windowBits=15 (default value) plus a few kilobytes
|
||||
for small objects.
|
||||
*/
|
||||
|
||||
/* Type declarations */
|
||||
|
||||
#ifndef OF /* function prototypes */
|
||||
# ifdef STDC
|
||||
# define OF(args) args
|
||||
# else
|
||||
# define OF(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef Z_ARG /* function prototypes for stdarg */
|
||||
# if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||
# define Z_ARG(args) args
|
||||
# else
|
||||
# define Z_ARG(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* The following definitions for FAR are needed only for MSDOS mixed
|
||||
* model programming (small or medium model with some far allocations).
|
||||
* This was tested only with MSC; for other MSDOS compilers you may have
|
||||
* to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
|
||||
* just define FAR to be empty.
|
||||
*/
|
||||
#ifdef SYS16BIT
|
||||
# if defined(M_I86SM) || defined(M_I86MM)
|
||||
/* MSC small or medium model */
|
||||
# define SMALL_MEDIUM
|
||||
# ifdef _MSC_VER
|
||||
# define FAR _far
|
||||
# else
|
||||
# define FAR far
|
||||
# endif
|
||||
# endif
|
||||
# if (defined(__SMALL__) || defined(__MEDIUM__))
|
||||
/* Turbo C small or medium model */
|
||||
# define SMALL_MEDIUM
|
||||
# ifdef __BORLANDC__
|
||||
# define FAR _far
|
||||
# else
|
||||
# define FAR far
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(WINDOWS) || defined(WIN32)
|
||||
/* If building or using zlib as a DLL, define ZLIB_DLL.
|
||||
* This is not mandatory, but it offers a little performance increase.
|
||||
*/
|
||||
# ifdef ZLIB_DLL
|
||||
# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
|
||||
# ifdef ZLIB_INTERNAL
|
||||
# define ZEXTERN extern __declspec(dllexport)
|
||||
# else
|
||||
# define ZEXTERN extern __declspec(dllimport)
|
||||
# endif
|
||||
# endif
|
||||
# endif /* ZLIB_DLL */
|
||||
/* If building or using zlib with the WINAPI/WINAPIV calling convention,
|
||||
* define ZLIB_WINAPI.
|
||||
* Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
|
||||
*/
|
||||
# ifdef ZLIB_WINAPI
|
||||
# ifdef FAR
|
||||
# undef FAR
|
||||
# endif
|
||||
# include <windows.h>
|
||||
/* No need for _export, use ZLIB.DEF instead. */
|
||||
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef FAR
|
||||
# define FAR
|
||||
#endif
|
||||
|
||||
#if !defined(__MACTYPES__)
|
||||
typedef unsigned char Byte; /* 8 bits */
|
||||
#endif
|
||||
typedef unsigned int uInt; /* 16 bits or more */
|
||||
typedef unsigned long uLong; /* 32 bits or more */
|
||||
|
||||
#ifdef SMALL_MEDIUM
|
||||
/* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
|
||||
# define Bytef Byte FAR
|
||||
#else
|
||||
typedef Byte FAR Bytef;
|
||||
#endif
|
||||
typedef char FAR charf;
|
||||
typedef int FAR intf;
|
||||
typedef uInt FAR uIntf;
|
||||
typedef uLong FAR uLongf;
|
||||
|
||||
#ifdef STDC
|
||||
typedef void const *voidpc;
|
||||
typedef void FAR *voidpf;
|
||||
typedef void *voidp;
|
||||
#else
|
||||
typedef Byte const *voidpc;
|
||||
typedef Byte FAR *voidpf;
|
||||
typedef Byte *voidp;
|
||||
#endif
|
||||
|
||||
#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
|
||||
# include <limits.h>
|
||||
# if (UINT_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned
|
||||
# elif (ULONG_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned long
|
||||
# elif (USHRT_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned short
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef Z_U4
|
||||
typedef Z_U4 z_crc_t;
|
||||
#else
|
||||
typedef unsigned long z_crc_t;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
|
||||
# define Z_HAVE_STDARG_H
|
||||
#endif
|
||||
|
||||
#ifdef STDC
|
||||
# ifndef Z_SOLO
|
||||
# include <sys/types.h> /* for off_t */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||
# ifndef Z_SOLO
|
||||
# include <stdarg.h> /* for va_list */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# ifndef Z_SOLO
|
||||
# include <stddef.h> /* for wchar_t */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
|
||||
* "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
|
||||
* though the former does not conform to the LFS document), but considering
|
||||
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
|
||||
* equivalently requesting no 64-bit operations
|
||||
*/
|
||||
#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
|
||||
# undef _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
|
||||
#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
#ifndef Z_SOLO
|
||||
# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
|
||||
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
|
||||
# ifdef VMS
|
||||
# include <unixio.h> /* for off_t */
|
||||
# endif
|
||||
# ifndef z_off_t
|
||||
# define z_off_t off_t
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
|
||||
# define Z_LFS64
|
||||
#endif
|
||||
|
||||
#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
|
||||
# define Z_LARGE64
|
||||
#endif
|
||||
|
||||
#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
|
||||
# define Z_WANT64
|
||||
#endif
|
||||
|
||||
#if !defined(SEEK_SET) && !defined(Z_SOLO)
|
||||
# define SEEK_SET 0 /* Seek from beginning of file. */
|
||||
# define SEEK_CUR 1 /* Seek from current position. */
|
||||
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
|
||||
#endif
|
||||
|
||||
#ifndef z_off_t
|
||||
# define z_off_t long
|
||||
#endif
|
||||
|
||||
#if !defined(_WIN32) && defined(Z_LARGE64)
|
||||
# define z_off64_t off64_t
|
||||
#else
|
||||
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
|
||||
# define z_off64_t __int64
|
||||
# else
|
||||
# define z_off64_t z_off_t
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* MVS linker does not support external names larger than 8 bytes */
|
||||
#if defined(__MVS__)
|
||||
#pragma map(deflateInit_,"DEIN")
|
||||
#pragma map(deflateInit2_,"DEIN2")
|
||||
#pragma map(deflateEnd,"DEEND")
|
||||
#pragma map(deflateBound,"DEBND")
|
||||
#pragma map(inflateInit_,"ININ")
|
||||
#pragma map(inflateInit2_,"ININ2")
|
||||
#pragma map(inflateEnd,"INEND")
|
||||
#pragma map(inflateSync,"INSY")
|
||||
#pragma map(inflateSetDictionary,"INSEDI")
|
||||
#pragma map(compressBound,"CMBND")
|
||||
#pragma map(inflate_table,"INTABL")
|
||||
#pragma map(inflate_fast,"INFA")
|
||||
#pragma map(inflate_copyright,"INCOPY")
|
||||
#endif
|
||||
|
||||
#endif /* ZCONF_H */
|
||||
1772
src/minarch/libretro-common/include/compat/zlib.h
Normal file
1772
src/minarch/libretro-common/include/compat/zlib.h
Normal file
File diff suppressed because it is too large
Load diff
483
src/minarch/libretro-common/include/compat/zlib/zconf.h
Normal file
483
src/minarch/libretro-common/include/compat/zlib/zconf.h
Normal file
|
|
@ -0,0 +1,483 @@
|
|||
/* zconf.h -- configuration of the zlib compression library
|
||||
* Copyright (C) 1995-2013 Jean-loup Gailly.
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) $Id$ */
|
||||
|
||||
#ifndef ZCONF_H
|
||||
#define ZCONF_H
|
||||
|
||||
/*
|
||||
* If you *really* need a unique prefix for all types and library functions,
|
||||
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
|
||||
* Even better than compiling with -DZ_PREFIX would be to use configure to set
|
||||
* this permanently in zconf.h using "./configure --zprefix".
|
||||
*/
|
||||
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
|
||||
# define Z_PREFIX_SET
|
||||
|
||||
/* all linked symbols */
|
||||
# define _dist_code z__dist_code
|
||||
# define _length_code z__length_code
|
||||
# define _tr_align z__tr_align
|
||||
# define _tr_flush_bits z__tr_flush_bits
|
||||
# define _tr_flush_block z__tr_flush_block
|
||||
# define _tr_init z__tr_init
|
||||
# define _tr_stored_block z__tr_stored_block
|
||||
# define _tr_tally z__tr_tally
|
||||
# define adler32 z_adler32
|
||||
# define adler32_combine z_adler32_combine
|
||||
# define adler32_combine64 z_adler32_combine64
|
||||
# ifndef Z_SOLO
|
||||
# define compress z_compress
|
||||
# define compress2 z_compress2
|
||||
# define compressBound z_compressBound
|
||||
# endif
|
||||
# define crc32 z_crc32
|
||||
# define crc32_combine z_crc32_combine
|
||||
# define crc32_combine64 z_crc32_combine64
|
||||
# define deflate z_deflate
|
||||
# define deflateBound z_deflateBound
|
||||
# define deflateCopy z_deflateCopy
|
||||
# define deflateEnd z_deflateEnd
|
||||
# define deflateInit2_ z_deflateInit2_
|
||||
# define deflateInit_ z_deflateInit_
|
||||
# define deflateParams z_deflateParams
|
||||
# define deflatePending z_deflatePending
|
||||
# define deflatePrime z_deflatePrime
|
||||
# define deflateReset z_deflateReset
|
||||
# define deflateResetKeep z_deflateResetKeep
|
||||
# define deflateSetDictionary z_deflateSetDictionary
|
||||
# define deflateSetHeader z_deflateSetHeader
|
||||
# define deflateTune z_deflateTune
|
||||
# define deflate_copyright z_deflate_copyright
|
||||
# define get_crc_table z_get_crc_table
|
||||
# ifndef Z_SOLO
|
||||
# define gz_error z_gz_error
|
||||
# define gz_intmax z_gz_intmax
|
||||
# define gz_strwinerror z_gz_strwinerror
|
||||
# define gzbuffer z_gzbuffer
|
||||
# define gzclearerr z_gzclearerr
|
||||
# define gzclose z_gzclose
|
||||
# define gzclose_r z_gzclose_r
|
||||
# define gzclose_w z_gzclose_w
|
||||
# define gzdirect z_gzdirect
|
||||
# define gzdopen z_gzdopen
|
||||
# define gzeof z_gzeof
|
||||
# define gzerror z_gzerror
|
||||
# define gzflush z_gzflush
|
||||
# define gzgetc z_gzgetc
|
||||
# define gzgetc_ z_gzgetc_
|
||||
# define gzgets z_gzgets
|
||||
# define gzoffset z_gzoffset
|
||||
# define gzoffset64 z_gzoffset64
|
||||
# define gzopen z_gzopen
|
||||
# define gzopen64 z_gzopen64
|
||||
# ifdef _WIN32
|
||||
# define gzopen_w z_gzopen_w
|
||||
# endif
|
||||
# define gzprintf z_gzprintf
|
||||
# define gzvprintf z_gzvprintf
|
||||
# define gzputc z_gzputc
|
||||
# define gzputs z_gzputs
|
||||
# define gzread z_gzread
|
||||
# define gzrewind z_gzrewind
|
||||
# define gzseek z_gzseek
|
||||
# define gzseek64 z_gzseek64
|
||||
# define gzsetparams z_gzsetparams
|
||||
# define gztell z_gztell
|
||||
# define gztell64 z_gztell64
|
||||
# define gzungetc z_gzungetc
|
||||
# define gzwrite z_gzwrite
|
||||
# endif
|
||||
# define inflate z_inflate
|
||||
# define inflateBack z_inflateBack
|
||||
# define inflateBackEnd z_inflateBackEnd
|
||||
# define inflateBackInit_ z_inflateBackInit_
|
||||
# define inflateCopy z_inflateCopy
|
||||
# define inflateEnd z_inflateEnd
|
||||
# define inflateGetHeader z_inflateGetHeader
|
||||
# define inflateInit2_ z_inflateInit2_
|
||||
# define inflateInit_ z_inflateInit_
|
||||
# define inflateMark z_inflateMark
|
||||
# define inflatePrime z_inflatePrime
|
||||
# define inflateReset z_inflateReset
|
||||
# define inflateReset2 z_inflateReset2
|
||||
# define inflateSetDictionary z_inflateSetDictionary
|
||||
# define inflateGetDictionary z_inflateGetDictionary
|
||||
# define inflateSync z_inflateSync
|
||||
# define inflateSyncPoint z_inflateSyncPoint
|
||||
# define inflateUndermine z_inflateUndermine
|
||||
# define inflateResetKeep z_inflateResetKeep
|
||||
# define inflate_copyright z_inflate_copyright
|
||||
# define inflate_fast z_inflate_fast
|
||||
# define inflate_table z_inflate_table
|
||||
# ifndef Z_SOLO
|
||||
# define uncompress z_uncompress
|
||||
# endif
|
||||
# define zError z_zError
|
||||
# ifndef Z_SOLO
|
||||
# define zcalloc z_zcalloc
|
||||
# define zcfree z_zcfree
|
||||
# endif
|
||||
# define zlibCompileFlags z_zlibCompileFlags
|
||||
# define zlibVersion z_zlibVersion
|
||||
|
||||
/* all zlib typedefs in zlib.h and zconf.h */
|
||||
# define Byte z_Byte
|
||||
# define Bytef z_Bytef
|
||||
# define alloc_func z_alloc_func
|
||||
# define charf z_charf
|
||||
# define free_func z_free_func
|
||||
# ifndef Z_SOLO
|
||||
# define gzFile z_gzFile
|
||||
# endif
|
||||
# define gz_header z_gz_header
|
||||
# define gz_headerp z_gz_headerp
|
||||
# define in_func z_in_func
|
||||
# define intf z_intf
|
||||
# define out_func z_out_func
|
||||
# define uInt z_uInt
|
||||
# define uIntf z_uIntf
|
||||
# define uLong z_uLong
|
||||
# define uLongf z_uLongf
|
||||
# define voidp z_voidp
|
||||
# define voidpc z_voidpc
|
||||
# define voidpf z_voidpf
|
||||
|
||||
/* all zlib structs in zlib.h and zconf.h */
|
||||
# define gz_header_s z_gz_header_s
|
||||
# define internal_state z_internal_state
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__MSDOS__) && !defined(MSDOS)
|
||||
# define MSDOS
|
||||
#endif
|
||||
#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
|
||||
# define OS2
|
||||
#endif
|
||||
#if defined(_WINDOWS) && !defined(WINDOWS)
|
||||
# define WINDOWS
|
||||
#endif
|
||||
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
|
||||
# ifndef WIN32
|
||||
# define WIN32
|
||||
# endif
|
||||
#endif
|
||||
#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
|
||||
# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
|
||||
# ifndef SYS16BIT
|
||||
# define SYS16BIT
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Compile with -DMAXSEG_64K if the alloc function cannot allocate more
|
||||
* than 64k bytes at a time (needed on systems with 16-bit int).
|
||||
*/
|
||||
#ifdef SYS16BIT
|
||||
# define MAXSEG_64K
|
||||
#endif
|
||||
#ifdef MSDOS
|
||||
# define UNALIGNED_OK
|
||||
#endif
|
||||
|
||||
#ifdef __STDC_VERSION__
|
||||
# ifndef STDC
|
||||
# define STDC
|
||||
# endif
|
||||
# if __STDC_VERSION__ >= 199901L
|
||||
# ifndef STDC99
|
||||
# define STDC99
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
|
||||
# define STDC
|
||||
#endif
|
||||
|
||||
#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
|
||||
# define STDC
|
||||
#endif
|
||||
|
||||
#ifndef STDC
|
||||
# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
|
||||
# define const /* note: need a more gentle solution here */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(ZLIB_CONST) && !defined(z_const)
|
||||
# define z_const const
|
||||
#else
|
||||
# define z_const
|
||||
#endif
|
||||
|
||||
/* Some Mac compilers merge all .h files incorrectly: */
|
||||
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
|
||||
# define NO_DUMMY_DECL
|
||||
#endif
|
||||
|
||||
/* Maximum value for memLevel in deflateInit2 */
|
||||
#ifndef MAX_MEM_LEVEL
|
||||
# ifdef MAXSEG_64K
|
||||
# define MAX_MEM_LEVEL 8
|
||||
# else
|
||||
# define MAX_MEM_LEVEL 9
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
|
||||
* WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
|
||||
* created by gzip. (Files created by minigzip can still be extracted by
|
||||
* gzip.)
|
||||
*/
|
||||
#ifndef MAX_WBITS
|
||||
# define MAX_WBITS 15 /* 32K LZ77 window */
|
||||
#endif
|
||||
|
||||
/* The memory requirements for deflate are (in bytes):
|
||||
(1 << (windowBits+2)) + (1 << (memLevel+9))
|
||||
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
|
||||
plus a few kilobytes for small objects. For example, if you want to reduce
|
||||
the default memory requirements from 256K to 128K, compile with
|
||||
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
|
||||
Of course this will generally degrade compression (there's no free lunch).
|
||||
|
||||
The memory requirements for inflate are (in bytes) 1 << windowBits
|
||||
that is, 32K for windowBits=15 (default value) plus a few kilobytes
|
||||
for small objects.
|
||||
*/
|
||||
|
||||
/* Type declarations */
|
||||
|
||||
#ifndef OF /* function prototypes */
|
||||
# ifdef STDC
|
||||
# define OF(args) args
|
||||
# else
|
||||
# define OF(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef Z_ARG /* function prototypes for stdarg */
|
||||
# if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||
# define Z_ARG(args) args
|
||||
# else
|
||||
# define Z_ARG(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* The following definitions for FAR are needed only for MSDOS mixed
|
||||
* model programming (small or medium model with some far allocations).
|
||||
* This was tested only with MSC; for other MSDOS compilers you may have
|
||||
* to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
|
||||
* just define FAR to be empty.
|
||||
*/
|
||||
#ifdef SYS16BIT
|
||||
# if defined(M_I86SM) || defined(M_I86MM)
|
||||
/* MSC small or medium model */
|
||||
# define SMALL_MEDIUM
|
||||
# ifdef _MSC_VER
|
||||
# define FAR _far
|
||||
# else
|
||||
# define FAR far
|
||||
# endif
|
||||
# endif
|
||||
# if (defined(__SMALL__) || defined(__MEDIUM__))
|
||||
/* Turbo C small or medium model */
|
||||
# define SMALL_MEDIUM
|
||||
# ifdef __BORLANDC__
|
||||
# define FAR _far
|
||||
# else
|
||||
# define FAR far
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(WINDOWS) || defined(WIN32)
|
||||
/* If building or using zlib as a DLL, define ZLIB_DLL.
|
||||
* This is not mandatory, but it offers a little performance increase.
|
||||
*/
|
||||
# ifdef ZLIB_DLL
|
||||
# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
|
||||
# ifdef ZLIB_INTERNAL
|
||||
# define ZEXTERN extern __declspec(dllexport)
|
||||
# else
|
||||
# define ZEXTERN extern __declspec(dllimport)
|
||||
# endif
|
||||
# endif
|
||||
# endif /* ZLIB_DLL */
|
||||
/* If building or using zlib with the WINAPI/WINAPIV calling convention,
|
||||
* define ZLIB_WINAPI.
|
||||
* Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
|
||||
*/
|
||||
# ifdef ZLIB_WINAPI
|
||||
# ifdef FAR
|
||||
# undef FAR
|
||||
# endif
|
||||
# include <windows.h>
|
||||
/* No need for _export, use ZLIB.DEF instead. */
|
||||
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef FAR
|
||||
# define FAR
|
||||
#endif
|
||||
|
||||
#if !defined(__MACTYPES__)
|
||||
typedef unsigned char Byte; /* 8 bits */
|
||||
#endif
|
||||
typedef unsigned int uInt; /* 16 bits or more */
|
||||
typedef unsigned long uLong; /* 32 bits or more */
|
||||
|
||||
#ifdef SMALL_MEDIUM
|
||||
/* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
|
||||
# define Bytef Byte FAR
|
||||
#else
|
||||
typedef Byte FAR Bytef;
|
||||
#endif
|
||||
typedef char FAR charf;
|
||||
typedef int FAR intf;
|
||||
typedef uInt FAR uIntf;
|
||||
typedef uLong FAR uLongf;
|
||||
|
||||
#ifdef STDC
|
||||
typedef void const *voidpc;
|
||||
typedef void FAR *voidpf;
|
||||
typedef void *voidp;
|
||||
#else
|
||||
typedef Byte const *voidpc;
|
||||
typedef Byte FAR *voidpf;
|
||||
typedef Byte *voidp;
|
||||
#endif
|
||||
|
||||
#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
|
||||
# include <limits.h>
|
||||
# if (UINT_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned
|
||||
# elif (ULONG_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned long
|
||||
# elif (USHRT_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned short
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef Z_U4
|
||||
typedef Z_U4 z_crc_t;
|
||||
#else
|
||||
typedef unsigned long z_crc_t;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
|
||||
# define Z_HAVE_STDARG_H
|
||||
#endif
|
||||
|
||||
#ifdef STDC
|
||||
# ifndef Z_SOLO
|
||||
# include <sys/types.h> /* for off_t */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||
# ifndef Z_SOLO
|
||||
# include <stdarg.h> /* for va_list */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# ifndef Z_SOLO
|
||||
# include <stddef.h> /* for wchar_t */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
|
||||
* "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
|
||||
* though the former does not conform to the LFS document), but considering
|
||||
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
|
||||
* equivalently requesting no 64-bit operations
|
||||
*/
|
||||
#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
|
||||
# undef _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
|
||||
#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
#ifndef Z_SOLO
|
||||
# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
|
||||
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
|
||||
# ifdef VMS
|
||||
# include <unixio.h> /* for off_t */
|
||||
# endif
|
||||
# ifndef z_off_t
|
||||
# define z_off_t off_t
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
|
||||
# define Z_LFS64
|
||||
#endif
|
||||
|
||||
#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
|
||||
# define Z_LARGE64
|
||||
#endif
|
||||
|
||||
#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
|
||||
# define Z_WANT64
|
||||
#endif
|
||||
|
||||
#if !defined(SEEK_SET) && !defined(Z_SOLO)
|
||||
# define SEEK_SET 0 /* Seek from beginning of file. */
|
||||
# define SEEK_CUR 1 /* Seek from current position. */
|
||||
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
|
||||
#endif
|
||||
|
||||
#ifndef z_off_t
|
||||
# define z_off_t long
|
||||
#endif
|
||||
|
||||
#if !defined(_WIN32) && defined(Z_LARGE64)
|
||||
# define z_off64_t off64_t
|
||||
#else
|
||||
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
|
||||
# define z_off64_t __int64
|
||||
# else
|
||||
# define z_off64_t z_off_t
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* MVS linker does not support external names larger than 8 bytes */
|
||||
#if defined(__MVS__)
|
||||
#pragma map(deflateInit_,"DEIN")
|
||||
#pragma map(deflateInit2_,"DEIN2")
|
||||
#pragma map(deflateEnd,"DEEND")
|
||||
#pragma map(deflateBound,"DEBND")
|
||||
#pragma map(inflateInit_,"ININ")
|
||||
#pragma map(inflateInit2_,"ININ2")
|
||||
#pragma map(inflateEnd,"INEND")
|
||||
#pragma map(inflateSync,"INSY")
|
||||
#pragma map(inflateSetDictionary,"INSEDI")
|
||||
#pragma map(compressBound,"CMBND")
|
||||
#pragma map(inflate_table,"INTABL")
|
||||
#pragma map(inflate_fast,"INFA")
|
||||
#pragma map(inflate_copyright,"INCOPY")
|
||||
#endif
|
||||
|
||||
#endif /* ZCONF_H */
|
||||
483
src/minarch/libretro-common/include/compat/zlib/zconf.h.in
Normal file
483
src/minarch/libretro-common/include/compat/zlib/zconf.h.in
Normal file
|
|
@ -0,0 +1,483 @@
|
|||
/* zconf.h -- configuration of the zlib compression library
|
||||
* Copyright (C) 1995-2013 Jean-loup Gailly.
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) $Id$ */
|
||||
|
||||
#ifndef ZCONF_H
|
||||
#define ZCONF_H
|
||||
|
||||
/*
|
||||
* If you *really* need a unique prefix for all types and library functions,
|
||||
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
|
||||
* Even better than compiling with -DZ_PREFIX would be to use configure to set
|
||||
* this permanently in zconf.h using "./configure --zprefix".
|
||||
*/
|
||||
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
|
||||
# define Z_PREFIX_SET
|
||||
|
||||
/* all linked symbols */
|
||||
# define _dist_code z__dist_code
|
||||
# define _length_code z__length_code
|
||||
# define _tr_align z__tr_align
|
||||
# define _tr_flush_bits z__tr_flush_bits
|
||||
# define _tr_flush_block z__tr_flush_block
|
||||
# define _tr_init z__tr_init
|
||||
# define _tr_stored_block z__tr_stored_block
|
||||
# define _tr_tally z__tr_tally
|
||||
# define adler32 z_adler32
|
||||
# define adler32_combine z_adler32_combine
|
||||
# define adler32_combine64 z_adler32_combine64
|
||||
# ifndef Z_SOLO
|
||||
# define compress z_compress
|
||||
# define compress2 z_compress2
|
||||
# define compressBound z_compressBound
|
||||
# endif
|
||||
# define crc32 z_crc32
|
||||
# define crc32_combine z_crc32_combine
|
||||
# define crc32_combine64 z_crc32_combine64
|
||||
# define deflate z_deflate
|
||||
# define deflateBound z_deflateBound
|
||||
# define deflateCopy z_deflateCopy
|
||||
# define deflateEnd z_deflateEnd
|
||||
# define deflateInit2_ z_deflateInit2_
|
||||
# define deflateInit_ z_deflateInit_
|
||||
# define deflateParams z_deflateParams
|
||||
# define deflatePending z_deflatePending
|
||||
# define deflatePrime z_deflatePrime
|
||||
# define deflateReset z_deflateReset
|
||||
# define deflateResetKeep z_deflateResetKeep
|
||||
# define deflateSetDictionary z_deflateSetDictionary
|
||||
# define deflateSetHeader z_deflateSetHeader
|
||||
# define deflateTune z_deflateTune
|
||||
# define deflate_copyright z_deflate_copyright
|
||||
# define get_crc_table z_get_crc_table
|
||||
# ifndef Z_SOLO
|
||||
# define gz_error z_gz_error
|
||||
# define gz_intmax z_gz_intmax
|
||||
# define gz_strwinerror z_gz_strwinerror
|
||||
# define gzbuffer z_gzbuffer
|
||||
# define gzclearerr z_gzclearerr
|
||||
# define gzclose z_gzclose
|
||||
# define gzclose_r z_gzclose_r
|
||||
# define gzclose_w z_gzclose_w
|
||||
# define gzdirect z_gzdirect
|
||||
# define gzdopen z_gzdopen
|
||||
# define gzeof z_gzeof
|
||||
# define gzerror z_gzerror
|
||||
# define gzflush z_gzflush
|
||||
# define gzgetc z_gzgetc
|
||||
# define gzgetc_ z_gzgetc_
|
||||
# define gzgets z_gzgets
|
||||
# define gzoffset z_gzoffset
|
||||
# define gzoffset64 z_gzoffset64
|
||||
# define gzopen z_gzopen
|
||||
# define gzopen64 z_gzopen64
|
||||
# ifdef _WIN32
|
||||
# define gzopen_w z_gzopen_w
|
||||
# endif
|
||||
# define gzprintf z_gzprintf
|
||||
# define gzvprintf z_gzvprintf
|
||||
# define gzputc z_gzputc
|
||||
# define gzputs z_gzputs
|
||||
# define gzread z_gzread
|
||||
# define gzrewind z_gzrewind
|
||||
# define gzseek z_gzseek
|
||||
# define gzseek64 z_gzseek64
|
||||
# define gzsetparams z_gzsetparams
|
||||
# define gztell z_gztell
|
||||
# define gztell64 z_gztell64
|
||||
# define gzungetc z_gzungetc
|
||||
# define gzwrite z_gzwrite
|
||||
# endif
|
||||
# define inflate z_inflate
|
||||
# define inflateBack z_inflateBack
|
||||
# define inflateBackEnd z_inflateBackEnd
|
||||
# define inflateBackInit_ z_inflateBackInit_
|
||||
# define inflateCopy z_inflateCopy
|
||||
# define inflateEnd z_inflateEnd
|
||||
# define inflateGetHeader z_inflateGetHeader
|
||||
# define inflateInit2_ z_inflateInit2_
|
||||
# define inflateInit_ z_inflateInit_
|
||||
# define inflateMark z_inflateMark
|
||||
# define inflatePrime z_inflatePrime
|
||||
# define inflateReset z_inflateReset
|
||||
# define inflateReset2 z_inflateReset2
|
||||
# define inflateSetDictionary z_inflateSetDictionary
|
||||
# define inflateGetDictionary z_inflateGetDictionary
|
||||
# define inflateSync z_inflateSync
|
||||
# define inflateSyncPoint z_inflateSyncPoint
|
||||
# define inflateUndermine z_inflateUndermine
|
||||
# define inflateResetKeep z_inflateResetKeep
|
||||
# define inflate_copyright z_inflate_copyright
|
||||
# define inflate_fast z_inflate_fast
|
||||
# define inflate_table z_inflate_table
|
||||
# ifndef Z_SOLO
|
||||
# define uncompress z_uncompress
|
||||
# endif
|
||||
# define zError z_zError
|
||||
# ifndef Z_SOLO
|
||||
# define zcalloc z_zcalloc
|
||||
# define zcfree z_zcfree
|
||||
# endif
|
||||
# define zlibCompileFlags z_zlibCompileFlags
|
||||
# define zlibVersion z_zlibVersion
|
||||
|
||||
/* all zlib typedefs in zlib.h and zconf.h */
|
||||
# define Byte z_Byte
|
||||
# define Bytef z_Bytef
|
||||
# define alloc_func z_alloc_func
|
||||
# define charf z_charf
|
||||
# define free_func z_free_func
|
||||
# ifndef Z_SOLO
|
||||
# define gzFile z_gzFile
|
||||
# endif
|
||||
# define gz_header z_gz_header
|
||||
# define gz_headerp z_gz_headerp
|
||||
# define in_func z_in_func
|
||||
# define intf z_intf
|
||||
# define out_func z_out_func
|
||||
# define uInt z_uInt
|
||||
# define uIntf z_uIntf
|
||||
# define uLong z_uLong
|
||||
# define uLongf z_uLongf
|
||||
# define voidp z_voidp
|
||||
# define voidpc z_voidpc
|
||||
# define voidpf z_voidpf
|
||||
|
||||
/* all zlib structs in zlib.h and zconf.h */
|
||||
# define gz_header_s z_gz_header_s
|
||||
# define internal_state z_internal_state
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__MSDOS__) && !defined(MSDOS)
|
||||
# define MSDOS
|
||||
#endif
|
||||
#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
|
||||
# define OS2
|
||||
#endif
|
||||
#if defined(_WINDOWS) && !defined(WINDOWS)
|
||||
# define WINDOWS
|
||||
#endif
|
||||
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
|
||||
# ifndef WIN32
|
||||
# define WIN32
|
||||
# endif
|
||||
#endif
|
||||
#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
|
||||
# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
|
||||
# ifndef SYS16BIT
|
||||
# define SYS16BIT
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Compile with -DMAXSEG_64K if the alloc function cannot allocate more
|
||||
* than 64k bytes at a time (needed on systems with 16-bit int).
|
||||
*/
|
||||
#ifdef SYS16BIT
|
||||
# define MAXSEG_64K
|
||||
#endif
|
||||
#ifdef MSDOS
|
||||
# define UNALIGNED_OK
|
||||
#endif
|
||||
|
||||
#ifdef __STDC_VERSION__
|
||||
# ifndef STDC
|
||||
# define STDC
|
||||
# endif
|
||||
# if __STDC_VERSION__ >= 199901L
|
||||
# ifndef STDC99
|
||||
# define STDC99
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
|
||||
# define STDC
|
||||
#endif
|
||||
|
||||
#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
|
||||
# define STDC
|
||||
#endif
|
||||
|
||||
#ifndef STDC
|
||||
# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
|
||||
# define const /* note: need a more gentle solution here */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(ZLIB_CONST) && !defined(z_const)
|
||||
# define z_const const
|
||||
#else
|
||||
# define z_const
|
||||
#endif
|
||||
|
||||
/* Some Mac compilers merge all .h files incorrectly: */
|
||||
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
|
||||
# define NO_DUMMY_DECL
|
||||
#endif
|
||||
|
||||
/* Maximum value for memLevel in deflateInit2 */
|
||||
#ifndef MAX_MEM_LEVEL
|
||||
# ifdef MAXSEG_64K
|
||||
# define MAX_MEM_LEVEL 8
|
||||
# else
|
||||
# define MAX_MEM_LEVEL 9
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
|
||||
* WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
|
||||
* created by gzip. (Files created by minigzip can still be extracted by
|
||||
* gzip.)
|
||||
*/
|
||||
#ifndef MAX_WBITS
|
||||
# define MAX_WBITS 15 /* 32K LZ77 window */
|
||||
#endif
|
||||
|
||||
/* The memory requirements for deflate are (in bytes):
|
||||
(1 << (windowBits+2)) + (1 << (memLevel+9))
|
||||
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
|
||||
plus a few kilobytes for small objects. For example, if you want to reduce
|
||||
the default memory requirements from 256K to 128K, compile with
|
||||
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
|
||||
Of course this will generally degrade compression (there's no free lunch).
|
||||
|
||||
The memory requirements for inflate are (in bytes) 1 << windowBits
|
||||
that is, 32K for windowBits=15 (default value) plus a few kilobytes
|
||||
for small objects.
|
||||
*/
|
||||
|
||||
/* Type declarations */
|
||||
|
||||
#ifndef OF /* function prototypes */
|
||||
# ifdef STDC
|
||||
# define OF(args) args
|
||||
# else
|
||||
# define OF(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef Z_ARG /* function prototypes for stdarg */
|
||||
# if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||
# define Z_ARG(args) args
|
||||
# else
|
||||
# define Z_ARG(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* The following definitions for FAR are needed only for MSDOS mixed
|
||||
* model programming (small or medium model with some far allocations).
|
||||
* This was tested only with MSC; for other MSDOS compilers you may have
|
||||
* to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
|
||||
* just define FAR to be empty.
|
||||
*/
|
||||
#ifdef SYS16BIT
|
||||
# if defined(M_I86SM) || defined(M_I86MM)
|
||||
/* MSC small or medium model */
|
||||
# define SMALL_MEDIUM
|
||||
# ifdef _MSC_VER
|
||||
# define FAR _far
|
||||
# else
|
||||
# define FAR far
|
||||
# endif
|
||||
# endif
|
||||
# if (defined(__SMALL__) || defined(__MEDIUM__))
|
||||
/* Turbo C small or medium model */
|
||||
# define SMALL_MEDIUM
|
||||
# ifdef __BORLANDC__
|
||||
# define FAR _far
|
||||
# else
|
||||
# define FAR far
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(WINDOWS) || defined(WIN32)
|
||||
/* If building or using zlib as a DLL, define ZLIB_DLL.
|
||||
* This is not mandatory, but it offers a little performance increase.
|
||||
*/
|
||||
# ifdef ZLIB_DLL
|
||||
# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
|
||||
# ifdef ZLIB_INTERNAL
|
||||
# define ZEXTERN extern __declspec(dllexport)
|
||||
# else
|
||||
# define ZEXTERN extern __declspec(dllimport)
|
||||
# endif
|
||||
# endif
|
||||
# endif /* ZLIB_DLL */
|
||||
/* If building or using zlib with the WINAPI/WINAPIV calling convention,
|
||||
* define ZLIB_WINAPI.
|
||||
* Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
|
||||
*/
|
||||
# ifdef ZLIB_WINAPI
|
||||
# ifdef FAR
|
||||
# undef FAR
|
||||
# endif
|
||||
# include <windows.h>
|
||||
/* No need for _export, use ZLIB.DEF instead. */
|
||||
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef FAR
|
||||
# define FAR
|
||||
#endif
|
||||
|
||||
#if !defined(__MACTYPES__)
|
||||
typedef unsigned char Byte; /* 8 bits */
|
||||
#endif
|
||||
typedef unsigned int uInt; /* 16 bits or more */
|
||||
typedef unsigned long uLong; /* 32 bits or more */
|
||||
|
||||
#ifdef SMALL_MEDIUM
|
||||
/* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
|
||||
# define Bytef Byte FAR
|
||||
#else
|
||||
typedef Byte FAR Bytef;
|
||||
#endif
|
||||
typedef char FAR charf;
|
||||
typedef int FAR intf;
|
||||
typedef uInt FAR uIntf;
|
||||
typedef uLong FAR uLongf;
|
||||
|
||||
#ifdef STDC
|
||||
typedef void const *voidpc;
|
||||
typedef void FAR *voidpf;
|
||||
typedef void *voidp;
|
||||
#else
|
||||
typedef Byte const *voidpc;
|
||||
typedef Byte FAR *voidpf;
|
||||
typedef Byte *voidp;
|
||||
#endif
|
||||
|
||||
#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
|
||||
# include <limits.h>
|
||||
# if (UINT_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned
|
||||
# elif (ULONG_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned long
|
||||
# elif (USHRT_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned short
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef Z_U4
|
||||
typedef Z_U4 z_crc_t;
|
||||
#else
|
||||
typedef unsigned long z_crc_t;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
|
||||
# define Z_HAVE_STDARG_H
|
||||
#endif
|
||||
|
||||
#ifdef STDC
|
||||
# ifndef Z_SOLO
|
||||
# include <sys/types.h> /* for off_t */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||
# ifndef Z_SOLO
|
||||
# include <stdarg.h> /* for va_list */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# ifndef Z_SOLO
|
||||
# include <stddef.h> /* for wchar_t */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
|
||||
* "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
|
||||
* though the former does not conform to the LFS document), but considering
|
||||
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
|
||||
* equivalently requesting no 64-bit operations
|
||||
*/
|
||||
#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
|
||||
# undef _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
|
||||
#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
#ifndef Z_SOLO
|
||||
# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
|
||||
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
|
||||
# ifdef VMS
|
||||
# include <unixio.h> /* for off_t */
|
||||
# endif
|
||||
# ifndef z_off_t
|
||||
# define z_off_t off_t
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
|
||||
# define Z_LFS64
|
||||
#endif
|
||||
|
||||
#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
|
||||
# define Z_LARGE64
|
||||
#endif
|
||||
|
||||
#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
|
||||
# define Z_WANT64
|
||||
#endif
|
||||
|
||||
#if !defined(SEEK_SET) && !defined(Z_SOLO)
|
||||
# define SEEK_SET 0 /* Seek from beginning of file. */
|
||||
# define SEEK_CUR 1 /* Seek from current position. */
|
||||
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
|
||||
#endif
|
||||
|
||||
#ifndef z_off_t
|
||||
# define z_off_t long
|
||||
#endif
|
||||
|
||||
#if !defined(_WIN32) && defined(Z_LARGE64)
|
||||
# define z_off64_t off64_t
|
||||
#else
|
||||
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
|
||||
# define z_off64_t __int64
|
||||
# else
|
||||
# define z_off64_t z_off_t
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* MVS linker does not support external names larger than 8 bytes */
|
||||
#if defined(__MVS__)
|
||||
#pragma map(deflateInit_,"DEIN")
|
||||
#pragma map(deflateInit2_,"DEIN2")
|
||||
#pragma map(deflateEnd,"DEEND")
|
||||
#pragma map(deflateBound,"DEBND")
|
||||
#pragma map(inflateInit_,"ININ")
|
||||
#pragma map(inflateInit2_,"ININ2")
|
||||
#pragma map(inflateEnd,"INEND")
|
||||
#pragma map(inflateSync,"INSY")
|
||||
#pragma map(inflateSetDictionary,"INSEDI")
|
||||
#pragma map(compressBound,"CMBND")
|
||||
#pragma map(inflate_table,"INTABL")
|
||||
#pragma map(inflate_fast,"INFA")
|
||||
#pragma map(inflate_copyright,"INCOPY")
|
||||
#endif
|
||||
|
||||
#endif /* ZCONF_H */
|
||||
1761
src/minarch/libretro-common/include/compat/zlib/zlib.h
Normal file
1761
src/minarch/libretro-common/include/compat/zlib/zlib.h
Normal file
File diff suppressed because it is too large
Load diff
253
src/minarch/libretro-common/include/compat/zlib/zutil.h
Normal file
253
src/minarch/libretro-common/include/compat/zlib/zutil.h
Normal file
|
|
@ -0,0 +1,253 @@
|
|||
#ifndef _COMPAT_ZUTIL_H
|
||||
#define _COMPAT_ZUTIL_H
|
||||
|
||||
#ifdef WANT_ZLIB
|
||||
|
||||
/* zutil.h -- internal interface and configuration of the compression library
|
||||
* Copyright (C) 1995-2013 Jean-loup Gailly.
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* WARNING: this file should *not* be used by applications. It is
|
||||
part of the implementation of the compression library and is
|
||||
subject to change. Applications should only use zlib.h.
|
||||
*/
|
||||
|
||||
/* @(#) $Id$ */
|
||||
|
||||
#ifndef ZUTIL_H
|
||||
#define ZUTIL_H
|
||||
|
||||
#ifdef HAVE_HIDDEN
|
||||
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
|
||||
#else
|
||||
# define ZLIB_INTERNAL
|
||||
#endif
|
||||
|
||||
#include <zlib.h>
|
||||
|
||||
#if defined(STDC) && !defined(Z_SOLO)
|
||||
# if !(defined(_WIN32_WCE) && defined(_MSC_VER))
|
||||
# include <stddef.h>
|
||||
# endif
|
||||
# include <string.h>
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef Z_SOLO
|
||||
typedef long ptrdiff_t; /* guess -- will be caught if guess is wrong */
|
||||
#endif
|
||||
|
||||
#ifndef local
|
||||
# define local static
|
||||
#endif
|
||||
/* compile with -Dlocal if your debugger can't find static symbols */
|
||||
|
||||
typedef unsigned char uch;
|
||||
typedef uch FAR uchf;
|
||||
typedef unsigned short ush;
|
||||
typedef ush FAR ushf;
|
||||
typedef unsigned long ulg;
|
||||
|
||||
extern char z_errmsg[10][21]; /* indexed by 2-zlib_error */
|
||||
/* (array size given to avoid silly warnings with Visual C++) */
|
||||
/* (array entry size given to avoid silly string cast warnings) */
|
||||
|
||||
#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
|
||||
|
||||
#define ERR_RETURN(strm,err) \
|
||||
return (strm->msg = ERR_MSG(err), (err))
|
||||
/* To be used only when the state is known to be valid */
|
||||
|
||||
/* common constants */
|
||||
|
||||
#ifndef DEF_WBITS
|
||||
# define DEF_WBITS MAX_WBITS
|
||||
#endif
|
||||
/* default windowBits for decompression. MAX_WBITS is for compression only */
|
||||
|
||||
#if MAX_MEM_LEVEL >= 8
|
||||
# define DEF_MEM_LEVEL 8
|
||||
#else
|
||||
# define DEF_MEM_LEVEL MAX_MEM_LEVEL
|
||||
#endif
|
||||
/* default memLevel */
|
||||
|
||||
#define STORED_BLOCK 0
|
||||
#define STATIC_TREES 1
|
||||
#define DYN_TREES 2
|
||||
/* The three kinds of block type */
|
||||
|
||||
#define MIN_MATCH 3
|
||||
#define MAX_MATCH 258
|
||||
/* The minimum and maximum match lengths */
|
||||
|
||||
#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
|
||||
|
||||
/* target dependencies */
|
||||
|
||||
#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
|
||||
# define OS_CODE 0x00
|
||||
# ifndef Z_SOLO
|
||||
# if defined(__TURBOC__) || defined(__BORLANDC__)
|
||||
# if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
|
||||
/* Allow compilation with ANSI keywords only enabled */
|
||||
void _Cdecl farfree( void *block );
|
||||
void *_Cdecl farmalloc( unsigned long nbytes );
|
||||
# else
|
||||
# include <alloc.h>
|
||||
# endif
|
||||
# else /* MSC or DJGPP */
|
||||
# include <malloc.h>
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef AMIGA
|
||||
# define OS_CODE 0x01
|
||||
#endif
|
||||
|
||||
#if defined(VAXC) || defined(VMS)
|
||||
# define OS_CODE 0x02
|
||||
# define F_OPEN(name, mode) \
|
||||
fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
|
||||
#endif
|
||||
|
||||
#if defined(ATARI) || defined(atarist)
|
||||
# define OS_CODE 0x05
|
||||
#endif
|
||||
|
||||
#ifdef OS2
|
||||
# define OS_CODE 0x06
|
||||
# if defined(M_I86) && !defined(Z_SOLO)
|
||||
# include <malloc.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(MACOS) || defined(TARGET_OS_MAC)
|
||||
# define OS_CODE 0x07
|
||||
# ifndef Z_SOLO
|
||||
# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
|
||||
# include <unix.h> /* for fdopen */
|
||||
# else
|
||||
# ifndef fdopen
|
||||
# define fdopen(fd,mode) NULL /* No fdopen() */
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef TOPS20
|
||||
# define OS_CODE 0x0a
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
# ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */
|
||||
# define OS_CODE 0x0b
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __50SERIES /* Prime/PRIMOS */
|
||||
# define OS_CODE 0x0f
|
||||
#endif
|
||||
|
||||
#if defined(_BEOS_) || defined(RISCOS)
|
||||
# define fdopen(fd,mode) NULL /* No fdopen() */
|
||||
#endif
|
||||
|
||||
#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX
|
||||
# if defined(_WIN32_WCE)
|
||||
# define fdopen(fd,mode) NULL /* No fdopen() */
|
||||
# ifndef _PTRDIFF_T_DEFINED
|
||||
typedef int ptrdiff_t;
|
||||
# define _PTRDIFF_T_DEFINED
|
||||
# endif
|
||||
# else
|
||||
# define fdopen(fd,type) _fdopen(fd,type)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(__BORLANDC__) && !defined(MSDOS)
|
||||
#pragma warn -8004
|
||||
#pragma warn -8008
|
||||
#pragma warn -8066
|
||||
#endif
|
||||
|
||||
/* provide prototypes for these when building zlib without LFS */
|
||||
#if !defined(_WIN32) && \
|
||||
(!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
|
||||
uLong adler32_combine64 (uLong, uLong, z_off_t);
|
||||
uLong crc32_combine64 (uLong, uLong, z_off_t);
|
||||
#endif
|
||||
|
||||
/* common defaults */
|
||||
|
||||
#ifndef OS_CODE
|
||||
# define OS_CODE 0x03 /* assume Unix */
|
||||
#endif
|
||||
|
||||
#ifndef F_OPEN
|
||||
# define F_OPEN(name, mode) fopen((name), (mode))
|
||||
#endif
|
||||
|
||||
/* functions */
|
||||
|
||||
#if defined(pyr) || defined(Z_SOLO)
|
||||
# define NO_MEMCPY
|
||||
#endif
|
||||
#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
|
||||
/* Use our own functions for small and medium model with MSC <= 5.0.
|
||||
* You may have to use the same strategy for Borland C (untested).
|
||||
* The __SC__ check is for Symantec.
|
||||
*/
|
||||
# define NO_MEMCPY
|
||||
#endif
|
||||
#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY)
|
||||
# define HAVE_MEMCPY
|
||||
#endif
|
||||
#ifdef HAVE_MEMCPY
|
||||
# ifdef SMALL_MEDIUM /* MSDOS small or medium model */
|
||||
# define zmemcpy _fmemcpy
|
||||
# define zmemcmp _fmemcmp
|
||||
# define zmemzero(dest, len) _fmemset(dest, 0, len)
|
||||
# else
|
||||
# define zmemcpy memcpy
|
||||
# define zmemcmp memcmp
|
||||
# define zmemzero(dest, len) memset(dest, 0, len)
|
||||
# endif
|
||||
#else
|
||||
void ZLIB_INTERNAL zmemcpy (Bytef* dest, const Bytef* source, uInt len);
|
||||
int ZLIB_INTERNAL zmemcmp (const Bytef* s1, const Bytef* s2, uInt len);
|
||||
void ZLIB_INTERNAL zmemzero (Bytef* dest, uInt len);
|
||||
#endif
|
||||
|
||||
/* Diagnostic functions */
|
||||
# define Assert(cond,msg)
|
||||
# define Trace(x)
|
||||
# define Tracev(x)
|
||||
# define Tracevv(x)
|
||||
# define Tracec(c,x)
|
||||
# define Tracecv(c,x)
|
||||
|
||||
#ifndef Z_SOLO
|
||||
voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items,
|
||||
unsigned size);
|
||||
void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr);
|
||||
#endif
|
||||
|
||||
#define ZALLOC(strm, items, size) \
|
||||
(*((strm)->zalloc))((strm)->opaque, (items), (size))
|
||||
#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
|
||||
#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
|
||||
|
||||
/* Reverse the bytes in a 32-bit value */
|
||||
#define ZSWAP32(q) ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
|
||||
(((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
|
||||
|
||||
#endif /* ZUTIL_H */
|
||||
|
||||
#else
|
||||
#include <zutil.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
253
src/minarch/libretro-common/include/compat/zutil.h
Normal file
253
src/minarch/libretro-common/include/compat/zutil.h
Normal file
|
|
@ -0,0 +1,253 @@
|
|||
#ifndef _COMPAT_ZUTIL_H
|
||||
#define _COMPAT_ZUTIL_H
|
||||
|
||||
#ifdef WANT_ZLIB
|
||||
|
||||
/* zutil.h -- internal interface and configuration of the compression library
|
||||
* Copyright (C) 1995-2013 Jean-loup Gailly.
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* WARNING: this file should *not* be used by applications. It is
|
||||
part of the implementation of the compression library and is
|
||||
subject to change. Applications should only use zlib.h.
|
||||
*/
|
||||
|
||||
/* @(#) $Id$ */
|
||||
|
||||
#ifndef ZUTIL_H
|
||||
#define ZUTIL_H
|
||||
|
||||
#ifdef HAVE_HIDDEN
|
||||
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
|
||||
#else
|
||||
# define ZLIB_INTERNAL
|
||||
#endif
|
||||
|
||||
#include <compat/zlib.h>
|
||||
|
||||
#if defined(STDC) && !defined(Z_SOLO)
|
||||
# if !(defined(_WIN32_WCE) && defined(_MSC_VER))
|
||||
# include <stddef.h>
|
||||
# endif
|
||||
# include <string.h>
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef Z_SOLO
|
||||
typedef long ptrdiff_t; /* guess -- will be caught if guess is wrong */
|
||||
#endif
|
||||
|
||||
#ifndef local
|
||||
# define local static
|
||||
#endif
|
||||
/* compile with -Dlocal if your debugger can't find static symbols */
|
||||
|
||||
typedef unsigned char uch;
|
||||
typedef uch FAR uchf;
|
||||
typedef unsigned short ush;
|
||||
typedef ush FAR ushf;
|
||||
typedef unsigned long ulg;
|
||||
|
||||
extern char z_errmsg[10][21]; /* indexed by 2-zlib_error */
|
||||
/* (array size given to avoid silly warnings with Visual C++) */
|
||||
/* (array entry size given to avoid silly string cast warnings) */
|
||||
|
||||
#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
|
||||
|
||||
#define ERR_RETURN(strm,err) \
|
||||
return (strm->msg = ERR_MSG(err), (err))
|
||||
/* To be used only when the state is known to be valid */
|
||||
|
||||
/* common constants */
|
||||
|
||||
#ifndef DEF_WBITS
|
||||
# define DEF_WBITS MAX_WBITS
|
||||
#endif
|
||||
/* default windowBits for decompression. MAX_WBITS is for compression only */
|
||||
|
||||
#if MAX_MEM_LEVEL >= 8
|
||||
# define DEF_MEM_LEVEL 8
|
||||
#else
|
||||
# define DEF_MEM_LEVEL MAX_MEM_LEVEL
|
||||
#endif
|
||||
/* default memLevel */
|
||||
|
||||
#define STORED_BLOCK 0
|
||||
#define STATIC_TREES 1
|
||||
#define DYN_TREES 2
|
||||
/* The three kinds of block type */
|
||||
|
||||
#define MIN_MATCH 3
|
||||
#define MAX_MATCH 258
|
||||
/* The minimum and maximum match lengths */
|
||||
|
||||
#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
|
||||
|
||||
/* target dependencies */
|
||||
|
||||
#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
|
||||
# define OS_CODE 0x00
|
||||
# ifndef Z_SOLO
|
||||
# if defined(__TURBOC__) || defined(__BORLANDC__)
|
||||
# if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
|
||||
/* Allow compilation with ANSI keywords only enabled */
|
||||
void _Cdecl farfree( void *block );
|
||||
void *_Cdecl farmalloc( unsigned long nbytes );
|
||||
# else
|
||||
# include <alloc.h>
|
||||
# endif
|
||||
# else /* MSC or DJGPP */
|
||||
# include <malloc.h>
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef AMIGA
|
||||
# define OS_CODE 0x01
|
||||
#endif
|
||||
|
||||
#if defined(VAXC) || defined(VMS)
|
||||
# define OS_CODE 0x02
|
||||
# define F_OPEN(name, mode) \
|
||||
fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
|
||||
#endif
|
||||
|
||||
#if defined(ATARI) || defined(atarist)
|
||||
# define OS_CODE 0x05
|
||||
#endif
|
||||
|
||||
#ifdef OS2
|
||||
# define OS_CODE 0x06
|
||||
# if defined(M_I86) && !defined(Z_SOLO)
|
||||
# include <malloc.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(MACOS) || defined(TARGET_OS_MAC)
|
||||
# define OS_CODE 0x07
|
||||
# ifndef Z_SOLO
|
||||
# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
|
||||
# include <unix.h> /* for fdopen */
|
||||
# else
|
||||
# ifndef fdopen
|
||||
# define fdopen(fd,mode) NULL /* No fdopen() */
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef TOPS20
|
||||
# define OS_CODE 0x0a
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
# ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */
|
||||
# define OS_CODE 0x0b
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __50SERIES /* Prime/PRIMOS */
|
||||
# define OS_CODE 0x0f
|
||||
#endif
|
||||
|
||||
#if defined(_BEOS_) || defined(RISCOS)
|
||||
# define fdopen(fd,mode) NULL /* No fdopen() */
|
||||
#endif
|
||||
|
||||
#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX
|
||||
# if defined(_WIN32_WCE)
|
||||
# define fdopen(fd,mode) NULL /* No fdopen() */
|
||||
# ifndef _PTRDIFF_T_DEFINED
|
||||
typedef int ptrdiff_t;
|
||||
# define _PTRDIFF_T_DEFINED
|
||||
# endif
|
||||
# else
|
||||
# define fdopen(fd,type) _fdopen(fd,type)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(__BORLANDC__) && !defined(MSDOS)
|
||||
#pragma warn -8004
|
||||
#pragma warn -8008
|
||||
#pragma warn -8066
|
||||
#endif
|
||||
|
||||
/* provide prototypes for these when building zlib without LFS */
|
||||
#if !defined(_WIN32) && \
|
||||
(!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
|
||||
uLong adler32_combine64 (uLong, uLong, z_off_t);
|
||||
uLong crc32_combine64 (uLong, uLong, z_off_t);
|
||||
#endif
|
||||
|
||||
/* common defaults */
|
||||
|
||||
#ifndef OS_CODE
|
||||
# define OS_CODE 0x03 /* assume Unix */
|
||||
#endif
|
||||
|
||||
#ifndef F_OPEN
|
||||
# define F_OPEN(name, mode) fopen((name), (mode))
|
||||
#endif
|
||||
|
||||
/* functions */
|
||||
|
||||
#if defined(pyr) || defined(Z_SOLO)
|
||||
# define NO_MEMCPY
|
||||
#endif
|
||||
#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
|
||||
/* Use our own functions for small and medium model with MSC <= 5.0.
|
||||
* You may have to use the same strategy for Borland C (untested).
|
||||
* The __SC__ check is for Symantec.
|
||||
*/
|
||||
# define NO_MEMCPY
|
||||
#endif
|
||||
#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY)
|
||||
# define HAVE_MEMCPY
|
||||
#endif
|
||||
#ifdef HAVE_MEMCPY
|
||||
# ifdef SMALL_MEDIUM /* MSDOS small or medium model */
|
||||
# define zmemcpy _fmemcpy
|
||||
# define zmemcmp _fmemcmp
|
||||
# define zmemzero(dest, len) _fmemset(dest, 0, len)
|
||||
# else
|
||||
# define zmemcpy memcpy
|
||||
# define zmemcmp memcmp
|
||||
# define zmemzero(dest, len) memset(dest, 0, len)
|
||||
# endif
|
||||
#else
|
||||
void ZLIB_INTERNAL zmemcpy (Bytef* dest, const Bytef* source, uInt len);
|
||||
int ZLIB_INTERNAL zmemcmp (const Bytef* s1, const Bytef* s2, uInt len);
|
||||
void ZLIB_INTERNAL zmemzero (Bytef* dest, uInt len);
|
||||
#endif
|
||||
|
||||
/* Diagnostic functions */
|
||||
# define Assert(cond,msg)
|
||||
# define Trace(x)
|
||||
# define Tracev(x)
|
||||
# define Tracevv(x)
|
||||
# define Tracec(c,x)
|
||||
# define Tracecv(c,x)
|
||||
|
||||
#ifndef Z_SOLO
|
||||
voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items,
|
||||
unsigned size);
|
||||
void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr);
|
||||
#endif
|
||||
|
||||
#define ZALLOC(strm, items, size) \
|
||||
(*((strm)->zalloc))((strm)->opaque, (items), (size))
|
||||
#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
|
||||
#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
|
||||
|
||||
/* Reverse the bytes in a 32-bit value */
|
||||
#define ZSWAP32(q) ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
|
||||
(((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
|
||||
|
||||
#endif /* ZUTIL_H */
|
||||
|
||||
#else
|
||||
#include <zutil.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
76
src/minarch/libretro-common/include/defines/cocoa_defines.h
Normal file
76
src/minarch/libretro-common/include/defines/cocoa_defines.h
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
/* Copyright (C) 2010-2021 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (cocoa_defines.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __COCOA_COMMON_DEFINES_H
|
||||
#define __COCOA_COMMON_DEFINES_H
|
||||
|
||||
#include <AvailabilityMacros.h>
|
||||
|
||||
#ifndef MAC_OS_X_VERSION_10_12
|
||||
#define MAC_OS_X_VERSION_10_12 101200
|
||||
#endif
|
||||
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12
|
||||
#define HAS_MACOSX_10_12 0
|
||||
#define NSEventModifierFlagCommand NSCommandKeyMask
|
||||
#define NSEventModifierFlagControl NSControlKeyMask
|
||||
#define NSEventModifierFlagHelp NSHelpKeyMask
|
||||
#define NSEventModifierFlagNumericPad NSNumericPadKeyMask
|
||||
#define NSEventModifierFlagOption NSAlternateKeyMask
|
||||
#define NSEventModifierFlagShift NSShiftKeyMask
|
||||
#define NSCompositingOperationSourceOver NSCompositeSourceOver
|
||||
#define NSEventMaskApplicationDefined NSApplicationDefinedMask
|
||||
#define NSEventTypeApplicationDefined NSApplicationDefined
|
||||
#define NSEventTypeCursorUpdate NSCursorUpdate
|
||||
#define NSEventTypeMouseMoved NSMouseMoved
|
||||
#define NSEventTypeMouseEntered NSMouseEntered
|
||||
#define NSEventTypeMouseExited NSMouseExited
|
||||
#define NSEventTypeLeftMouseDown NSLeftMouseDown
|
||||
#define NSEventTypeRightMouseDown NSRightMouseDown
|
||||
#define NSEventTypeOtherMouseDown NSOtherMouseDown
|
||||
#define NSEventTypeLeftMouseUp NSLeftMouseUp
|
||||
#define NSEventTypeRightMouseUp NSRightMouseUp
|
||||
#define NSEventTypeOtherMouseUp NSOtherMouseUp
|
||||
#define NSEventTypeLeftMouseDragged NSLeftMouseDragged
|
||||
#define NSEventTypeRightMouseDragged NSRightMouseDragged
|
||||
#define NSEventTypeOtherMouseDragged NSOtherMouseDragged
|
||||
#define NSEventTypeScrollWheel NSScrollWheel
|
||||
#define NSEventTypeKeyDown NSKeyDown
|
||||
#define NSEventTypeKeyUp NSKeyUp
|
||||
#define NSEventTypeFlagsChanged NSFlagsChanged
|
||||
#define NSEventMaskAny NSAnyEventMask
|
||||
#define NSWindowStyleMaskBorderless NSBorderlessWindowMask
|
||||
#define NSWindowStyleMaskClosable NSClosableWindowMask
|
||||
#define NSWindowStyleMaskFullScreen NSFullScreenWindowMask
|
||||
#define NSWindowStyleMaskMiniaturizable NSMiniaturizableWindowMask
|
||||
#define NSWindowStyleMaskResizable NSResizableWindowMask
|
||||
#define NSWindowStyleMaskTitled NSTitledWindowMask
|
||||
#define NSAlertStyleCritical NSCriticalAlertStyle
|
||||
#define NSAlertStyleInformational NSInformationalAlertStyle
|
||||
#define NSAlertStyleWarning NSWarningAlertStyle
|
||||
#define NSEventModifierFlagCapsLock NSAlphaShiftKeyMask
|
||||
#define NSControlSizeRegular NSRegularControlSize
|
||||
#else
|
||||
#define HAS_MACOSX_10_12 1
|
||||
#endif
|
||||
|
||||
#endif
|
||||
92
src/minarch/libretro-common/include/defines/d3d_defines.h
Normal file
92
src/minarch/libretro-common/include/defines/d3d_defines.h
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
/* Copyright (C) 2010-2021 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (d3d_defines.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef D3DVIDEO_DEFINES_H
|
||||
#define D3DVIDEO_DEFINES_H
|
||||
|
||||
#if defined(DEBUG) || defined(_DEBUG)
|
||||
#define D3D_DEBUG_INFO
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_D3D9)
|
||||
/* Direct3D 9 */
|
||||
#if 0
|
||||
#include <d3d9.h>
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#define LPDIRECT3D LPDIRECT3D9
|
||||
#define LPDIRECT3DDEVICE LPDIRECT3DDEVICE9
|
||||
#define LPDIRECT3DTEXTURE LPDIRECT3DTEXTURE9
|
||||
#define LPDIRECT3DCUBETEXTURE LPDIRECT3DCUBETEXTURE9
|
||||
#define LPDIRECT3DVERTEXBUFFER LPDIRECT3DVERTEXBUFFER9
|
||||
#define LPDIRECT3DVERTEXSHADER LPDIRECT3DVERTEXSHADER9
|
||||
#define LPDIRECT3DPIXELSHADER LPDIRECT3DPIXELSHADER9
|
||||
#define LPDIRECT3DSURFACE LPDIRECT3DSURFACE9
|
||||
#define LPDIRECT3DVERTEXDECLARATION LPDIRECT3DVERTEXDECLARATION9
|
||||
#define LPDIRECT3DVOLUMETEXTURE LPDIRECT3DVOLUMETEXTURE9
|
||||
#define LPDIRECT3DRESOURCE LPDIRECT3DRESOURCE9
|
||||
#define D3DVERTEXELEMENT D3DVERTEXELEMENT9
|
||||
#define D3DVIEWPORT D3DVIEWPORT9
|
||||
#endif
|
||||
|
||||
#ifndef D3DCREATE_SOFTWARE_VERTEXPROCESSING
|
||||
#define D3DCREATE_SOFTWARE_VERTEXPROCESSING 0
|
||||
#endif
|
||||
|
||||
#elif defined(HAVE_D3D8)
|
||||
#if 0
|
||||
#ifdef _XBOX
|
||||
#include <xtl.h>
|
||||
#else
|
||||
#include "../gfx/include/d3d8/d3d8.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Direct3D 8 */
|
||||
#if 0
|
||||
#define LPDIRECT3D LPDIRECT3D8
|
||||
#define LPDIRECT3DDEVICE LPDIRECT3DDEVICE8
|
||||
#define LPDIRECT3DTEXTURE LPDIRECT3DTEXTURE8
|
||||
#define LPDIRECT3DCUBETEXTURE LPDIRECT3DCUBETEXTURE8
|
||||
#define LPDIRECT3DVOLUMETEXTURE LPDIRECT3DVOLUMETEXTURE8
|
||||
#define LPDIRECT3DVERTEXBUFFER LPDIRECT3DVERTEXBUFFER8
|
||||
#define LPDIRECT3DVERTEXDECLARATION (void*)
|
||||
#define LPDIRECT3DSURFACE LPDIRECT3DSURFACE8
|
||||
#define LPDIRECT3DRESOURCE LPDIRECT3DRESOURCE8
|
||||
#define D3DVERTEXELEMENT D3DVERTEXELEMENT8
|
||||
#define D3DVIEWPORT D3DVIEWPORT8
|
||||
#endif
|
||||
|
||||
#if !defined(D3DLOCK_NOSYSLOCK) && defined(_XBOX)
|
||||
#define D3DLOCK_NOSYSLOCK (0)
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#define D3DSAMP_ADDRESSU D3DTSS_ADDRESSU
|
||||
#define D3DSAMP_ADDRESSV D3DTSS_ADDRESSV
|
||||
#define D3DSAMP_MAGFILTER D3DTSS_MAGFILTER
|
||||
#define D3DSAMP_MINFILTER D3DTSS_MINFILTER
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
96
src/minarch/libretro-common/include/defines/gx_defines.h
Normal file
96
src/minarch/libretro-common/include/defines/gx_defines.h
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
/* Copyright (C) 2010-2021 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (gx_defines.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _GX_DEFINES_H
|
||||
#define _GX_DEFINES_H
|
||||
|
||||
#ifdef GEKKO
|
||||
|
||||
#define SYSMEM1_SIZE 0x01800000
|
||||
|
||||
#define _SHIFTL(v, s, w) ((uint32_t) (((uint32_t)(v) & ((0x01 << (w)) - 1)) << (s)))
|
||||
#define _SHIFTR(v, s, w) ((uint32_t)(((uint32_t)(v) >> (s)) & ((0x01 << (w)) - 1)))
|
||||
|
||||
#define OSThread lwp_t
|
||||
#define OSCond lwpq_t
|
||||
#define OSThreadQueue lwpq_t
|
||||
|
||||
#define OSInitMutex(mutex) LWP_MutexInit(mutex, 0)
|
||||
#define OSLockMutex(mutex) LWP_MutexLock(mutex)
|
||||
#define OSUnlockMutex(mutex) LWP_MutexUnlock(mutex)
|
||||
#define OSTryLockMutex(mutex) LWP_MutexTryLock(mutex)
|
||||
|
||||
#define OSInitCond(cond) LWP_CondInit(cond)
|
||||
#define OSSignalCond(cond) LWP_ThreadSignal(cond)
|
||||
#define OSWaitCond(cond, mutex) LWP_CondWait(cond, mutex)
|
||||
|
||||
#define OSInitThreadQueue(queue) LWP_InitQueue(queue)
|
||||
#define OSCloseThreadQueue(queue) LWP_CloseQueue(queue)
|
||||
#define OSSleepThread(queue) LWP_ThreadSleep(queue)
|
||||
#define OSJoinThread(thread, val) LWP_JoinThread(thread, val)
|
||||
|
||||
#define OSCreateThread(thread, func, intarg, ptrarg, stackbase, stacksize, priority, attrs) LWP_CreateThread(thread, func, ptrarg, stackbase, stacksize, priority)
|
||||
|
||||
#define BLIT_LINE_16(off) \
|
||||
{ \
|
||||
const uint32_t *tmp_src = src; \
|
||||
uint32_t *tmp_dst = dst; \
|
||||
for (unsigned x = 0; x < width2 >> 1; x++, tmp_src += 2, tmp_dst += 8) \
|
||||
{ \
|
||||
tmp_dst[ 0 + off] = BLIT_LINE_16_CONV(tmp_src[0]); \
|
||||
tmp_dst[ 1 + off] = BLIT_LINE_16_CONV(tmp_src[1]); \
|
||||
} \
|
||||
src += tmp_pitch; \
|
||||
}
|
||||
|
||||
#define BLIT_LINE_32(off) \
|
||||
{ \
|
||||
const uint16_t *tmp_src = src; \
|
||||
uint16_t *tmp_dst = dst; \
|
||||
for (unsigned x = 0; x < width2 >> 3; x++, tmp_src += 8, tmp_dst += 32) \
|
||||
{ \
|
||||
tmp_dst[ 0 + off] = tmp_src[0] | 0xFF00; \
|
||||
tmp_dst[ 16 + off] = tmp_src[1]; \
|
||||
tmp_dst[ 1 + off] = tmp_src[2] | 0xFF00; \
|
||||
tmp_dst[ 17 + off] = tmp_src[3]; \
|
||||
tmp_dst[ 2 + off] = tmp_src[4] | 0xFF00; \
|
||||
tmp_dst[ 18 + off] = tmp_src[5]; \
|
||||
tmp_dst[ 3 + off] = tmp_src[6] | 0xFF00; \
|
||||
tmp_dst[ 19 + off] = tmp_src[7]; \
|
||||
} \
|
||||
src += tmp_pitch; \
|
||||
}
|
||||
|
||||
#define CHUNK_FRAMES 64
|
||||
#define CHUNK_SIZE (CHUNK_FRAMES * sizeof(uint32_t))
|
||||
#define BLOCKS 16
|
||||
|
||||
#define AIInit AUDIO_Init
|
||||
#define AIInitDMA AUDIO_InitDMA
|
||||
#define AIStartDMA AUDIO_StartDMA
|
||||
#define AIStopDMA AUDIO_StopDMA
|
||||
#define AIRegisterDMACallback AUDIO_RegisterDMACallback
|
||||
#define AISetDSPSampleRate AUDIO_SetDSPSampleRate
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
727
src/minarch/libretro-common/include/defines/ps3_defines.h
Normal file
727
src/minarch/libretro-common/include/defines/ps3_defines.h
Normal file
|
|
@ -0,0 +1,727 @@
|
|||
/* Copyright (C) 2010-2021 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (ps3_defines.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _PS3_DEFINES_H
|
||||
#define _PS3_DEFINES_H
|
||||
|
||||
/*============================================================
|
||||
AUDIO PROTOTYPES
|
||||
============================================================ */
|
||||
|
||||
#ifdef __PSL1GHT__
|
||||
#include <audio/audio.h>
|
||||
#include <sys/thread.h>
|
||||
|
||||
#include <sys/event_queue.h>
|
||||
#include <lv2/mutex.h>
|
||||
#include <lv2/cond.h>
|
||||
|
||||
/*forward decl. for audioAddData */
|
||||
extern int audioAddData(uint32_t portNum, float *data,
|
||||
uint32_t frames, float volume);
|
||||
|
||||
#define PS3_SYS_NO_TIMEOUT 0
|
||||
#define param_attrib attrib
|
||||
|
||||
#else
|
||||
#include <sdk_version.h>
|
||||
#include <cell/audio.h>
|
||||
#include <sys/event.h>
|
||||
#include <sys/synchronization.h>
|
||||
|
||||
#define numChannels nChannel
|
||||
#define numBlocks nBlock
|
||||
#define param_attrib attr
|
||||
|
||||
#define audioQuit cellAudioQuit
|
||||
#define audioInit cellAudioInit
|
||||
#define audioPortStart cellAudioPortStart
|
||||
#define audioPortOpen cellAudioPortOpen
|
||||
#define audioPortClose cellAudioPortClose
|
||||
#define audioPortStop cellAudioPortStop
|
||||
#define audioPortParam CellAudioPortParam
|
||||
#define audioPortOpen cellAudioPortOpen
|
||||
#define audioAddData cellAudioAddData
|
||||
|
||||
/* event queue functions */
|
||||
#define sysEventQueueReceive sys_event_queue_receive
|
||||
#define audioSetNotifyEventQueue cellAudioSetNotifyEventQueue
|
||||
#define audioRemoveNotifyEventQueue cellAudioRemoveNotifyEventQueue
|
||||
#define audioCreateNotifyEventQueue cellAudioCreateNotifyEventQueue
|
||||
|
||||
#define sysLwCondCreate sys_lwcond_create
|
||||
#define sysLwCondDestroy sys_lwcond_destroy
|
||||
#define sysLwCondWait sys_lwcond_wait
|
||||
#define sysLwCondSignal sys_lwcond_signal
|
||||
|
||||
#define sysLwMutexDestroy sys_lwmutex_destroy
|
||||
#define sysLwMutexLock sys_lwmutex_lock
|
||||
#define sysLwMutexUnlock sys_lwmutex_unlock
|
||||
#define sysLwMutexCreate sys_lwmutex_create
|
||||
|
||||
#define AUDIO_BLOCK_SAMPLES CELL_AUDIO_BLOCK_SAMPLES
|
||||
#define SYSMODULE_NET CELL_SYSMODULE_NET
|
||||
#define PS3_SYS_NO_TIMEOUT SYS_NO_TIMEOUT
|
||||
|
||||
#define sys_lwmutex_attr_t sys_lwmutex_attribute_t
|
||||
#define sys_lwcond_attr_t sys_lwcond_attribute_t
|
||||
#define sys_sem_t sys_semaphore_t
|
||||
|
||||
#define sysGetSystemTime sys_time_get_system_time
|
||||
#define sysModuleLoad cellSysmoduleLoadModule
|
||||
#define sysModuleUnload cellSysmoduleUnloadModule
|
||||
|
||||
#define netInitialize sys_net_initialize_network
|
||||
|
||||
#endif
|
||||
|
||||
/*============================================================
|
||||
INPUT PAD PROTOTYPES
|
||||
============================================================ */
|
||||
|
||||
#ifdef __PSL1GHT__
|
||||
#include <io/pad.h>
|
||||
#define CELL_PAD_CAPABILITY_SENSOR_MODE 4
|
||||
#define CELL_PAD_SETTING_SENSOR_ON 4
|
||||
#define CELL_PAD_STATUS_ASSIGN_CHANGES 2
|
||||
#define CELL_PAD_BTN_OFFSET_DIGITAL1 2
|
||||
#define CELL_PAD_BTN_OFFSET_DIGITAL2 3
|
||||
#define CELL_PAD_BTN_OFFSET_ANALOG_RIGHT_X 4
|
||||
#define CELL_PAD_BTN_OFFSET_ANALOG_RIGHT_Y 5
|
||||
#define CELL_PAD_BTN_OFFSET_ANALOG_LEFT_X 6
|
||||
#define CELL_PAD_BTN_OFFSET_ANALOG_LEFT_Y 7
|
||||
#define CELL_PAD_BTN_OFFSET_PRESS_RIGHT 8
|
||||
#define CELL_PAD_BTN_OFFSET_PRESS_LEFT 9
|
||||
#define CELL_PAD_BTN_OFFSET_PRESS_UP 10
|
||||
#define CELL_PAD_BTN_OFFSET_PRESS_DOWN 11
|
||||
#define CELL_PAD_BTN_OFFSET_PRESS_TRIANGLE 12
|
||||
#define CELL_PAD_BTN_OFFSET_PRESS_CIRCLE 13
|
||||
#define CELL_PAD_BTN_OFFSET_PRESS_CROSS 14
|
||||
#define CELL_PAD_BTN_OFFSET_PRESS_SQUARE 15
|
||||
#define CELL_PAD_BTN_OFFSET_PRESS_L1 16
|
||||
#define CELL_PAD_BTN_OFFSET_PRESS_R1 17
|
||||
#define CELL_PAD_BTN_OFFSET_PRESS_L2 18
|
||||
#define CELL_PAD_BTN_OFFSET_PRESS_R2 19
|
||||
#define CELL_PAD_BTN_OFFSET_SENSOR_X 20
|
||||
#define CELL_PAD_BTN_OFFSET_SENSOR_Y 21
|
||||
#define CELL_PAD_BTN_OFFSET_SENSOR_Z 22
|
||||
#define CELL_PAD_BTN_OFFSET_SENSOR_G 23
|
||||
#define CELL_PAD_CTRL_LEFT (128)
|
||||
#define CELL_PAD_CTRL_DOWN (64)
|
||||
#define CELL_PAD_CTRL_RIGHT (32)
|
||||
#define CELL_PAD_CTRL_UP (16)
|
||||
#define CELL_PAD_CTRL_START (8)
|
||||
#define CELL_PAD_CTRL_R3 (4)
|
||||
#define CELL_PAD_CTRL_L3 (2)
|
||||
#define CELL_PAD_CTRL_SELECT (1)
|
||||
#define CELL_PAD_CTRL_SQUARE (128)
|
||||
#define CELL_PAD_CTRL_CROSS (64)
|
||||
#define CELL_PAD_CTRL_CIRCLE (32)
|
||||
#define CELL_PAD_CTRL_TRIANGLE (16)
|
||||
#define CELL_PAD_CTRL_R1 (8)
|
||||
#define CELL_PAD_CTRL_L1 (4)
|
||||
#define CELL_PAD_CTRL_R2 (2)
|
||||
#define CELL_PAD_CTRL_L2 (1)
|
||||
#define CELL_PAD_CTRL_LDD_PS (1)
|
||||
#define CELL_PAD_STATUS_CONNECTED (1)
|
||||
#define CELL_SYSUTIL_SYSTEMPARAM_ID_ENTER_BUTTON_ASSIGN SYSUTIL_SYSTEMPARAM_ID_ENTER_BUTTON_ASSIGN
|
||||
#define CELL_SYSUTIL_ENTER_BUTTON_ASSIGN_CROSS (1)
|
||||
#define CELL_SYSUTIL_ENTER_BUTTON_ASSIGN_CIRCLE (0)
|
||||
#define now_connect connected
|
||||
#define CellPadActParam padActParam
|
||||
#define cellPadSetPortSetting ioPadSetPortSetting
|
||||
#define cellSysutilGetSystemParamInt sysUtilGetSystemParamInt
|
||||
#define cellPadSetActDirect ioPadSetActDirect
|
||||
#define CellPadInfo2 padInfo2
|
||||
#define cellPadGetInfo2 ioPadGetInfo2
|
||||
#define CellPadData padData
|
||||
#define cellPadGetData ioPadGetData
|
||||
#define cellPadInit ioPadInit
|
||||
#define cellPadEnd ioPadEnd
|
||||
#else
|
||||
#include <cell/pad.h>
|
||||
#define padInfo2 CellPadInfo2
|
||||
#define padData CellPadData
|
||||
#define ioPadGetInfo2 cellPadGetInfo2
|
||||
#define ioPadGetData cellPadGetData
|
||||
#define ioPadInit cellPadInit
|
||||
#define ioPadEnd cellPadEnd
|
||||
#endif
|
||||
|
||||
/*============================================================
|
||||
INPUT MOUSE PROTOTYPES
|
||||
============================================================ */
|
||||
|
||||
#ifdef HAVE_MOUSE
|
||||
|
||||
#ifdef __PSL1GHT__
|
||||
#include <io/mouse.h>
|
||||
|
||||
/* define ps3 mouse structs */
|
||||
#define CellMouseInfo mouseInfo
|
||||
#define CellMouseData mouseData
|
||||
|
||||
/* define all the ps3 mouse functions */
|
||||
#define cellMouseInit ioMouseInit
|
||||
#define cellMouseGetData ioMouseGetData
|
||||
#define cellMouseEnd ioMouseEnd
|
||||
#define cellMouseGetInfo ioMouseGetInfo
|
||||
|
||||
/* PSL1GHT does not define these in its header */
|
||||
#define CELL_MOUSE_BUTTON_1 (UINT64_C(1) << 0) /* Button 1 */
|
||||
#define CELL_MOUSE_BUTTON_2 (UINT64_C(1) << 1) /* Button 2 */
|
||||
#define CELL_MOUSE_BUTTON_3 (UINT64_C(1) << 2) /* Button 3 */
|
||||
#define CELL_MOUSE_BUTTON_4 (UINT64_C(1) << 3) /* Button 4 */
|
||||
#define CELL_MOUSE_BUTTON_5 (UINT64_C(1) << 4) /* Button 5 */
|
||||
#define CELL_MOUSE_BUTTON_6 (UINT64_C(1) << 5) /* Button 6 */
|
||||
#define CELL_MOUSE_BUTTON_7 (UINT64_C(1) << 6) /* Button 7 */
|
||||
#define CELL_MOUSE_BUTTON_8 (UINT64_C(1) << 7) /* Button 8 */
|
||||
|
||||
#else
|
||||
#include <cell/mouse.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*============================================================
|
||||
OSK PROTOTYPES
|
||||
============================================================ */
|
||||
|
||||
#ifdef __PSL1GHT__
|
||||
#include <sysutil/osk.h>
|
||||
/* define all the OSK functions */
|
||||
#define pOskLoadAsync oskLoadAsync
|
||||
#define pOskSetLayoutMode oskSetLayoutMode
|
||||
#define pOskSetKeyLayoutOption oskSetKeyLayoutOption
|
||||
#define pOskGetSize oskGetSize
|
||||
#define pOskDisableDimmer oskDisableDimmer
|
||||
#define pOskAbort oskAbort
|
||||
#define pOskUnloadAsync oskUnloadAsync
|
||||
|
||||
/* define OSK structs / types */
|
||||
#define sys_memory_container_t sys_mem_container_t
|
||||
#define CellOskDialogPoint oskPoint
|
||||
#define CellOskDialogInputFieldInfo oskInputFieldInfo
|
||||
#define CellOskDialogCallbackReturnParam oskCallbackReturnParam
|
||||
#define CellOskDialogParam oskParam
|
||||
|
||||
#define osk_allowed_panels allowedPanels
|
||||
#define osk_prohibit_flags prohibitFlags
|
||||
|
||||
#define osk_inputfield_message message
|
||||
#define osk_inputfield_starttext startText
|
||||
#define osk_inputfield_max_length maxLength
|
||||
#define osk_callback_return_param res
|
||||
#define osk_callback_num_chars len
|
||||
#define osk_callback_return_string str
|
||||
|
||||
/* define the OSK defines */
|
||||
#define CELL_OSKDIALOG_10KEY_PANEL OSK_10KEY_PANEL
|
||||
#define CELL_OSKDIALOG_FULLKEY_PANEL OSK_FULLKEY_PANEL
|
||||
#define CELL_OSKDIALOG_LAYOUTMODE_X_ALIGN_CENTER OSK_LAYOUTMODE_HORIZONTAL_ALIGN_CENTER
|
||||
#define CELL_OSKDIALOG_LAYOUTMODE_Y_ALIGN_TOP OSK_LAYOUTMODE_VERTICAL_ALIGN_TOP
|
||||
#define CELL_OSKDIALOG_PANELMODE_NUMERAL OSK_PANEL_TYPE_NUMERAL
|
||||
#define CELL_OSKDIALOG_PANELMODE_NUMERAL_FULL_WIDTH OSK_PANEL_TYPE_NUMERAL_FULL_WIDTH
|
||||
#define CELL_OSKDIALOG_PANELMODE_ALPHABET OSK_PANEL_TYPE_ALPHABET
|
||||
#define CELL_OSKDIALOG_PANELMODE_ENGLISH OSK_PANEL_TYPE_ENGLISH
|
||||
#define CELL_OSKDIALOG_INPUT_FIELD_RESULT_OK (0)
|
||||
#define CELL_OSKDIALOG_INPUT_FIELD_RESULT_CANCELED (1)
|
||||
#define CELL_OSKDIALOG_INPUT_FIELD_RESULT_ABORT (2)
|
||||
#define CELL_OSKDIALOG_INPUT_FIELD_RESULT_NO_INPUT_TEXT (3)
|
||||
#define CELL_OSKDIALOG_STRING_SIZE (512)
|
||||
#else
|
||||
#include <sysutil/sysutil_oskdialog.h>
|
||||
/* define all the OSK functions */
|
||||
#define pOskLoadAsync cellOskDialogLoadAsync
|
||||
#define pOskSetLayoutMode cellOskDialogSetLayoutMode
|
||||
#define pOskSetKeyLayoutOption cellOskDialogSetKeyLayoutOption
|
||||
#define pOskGetSize cellOskDialogGetSize
|
||||
#define pOskDisableDimmer cellOskDialogDisableDimmer
|
||||
#define pOskAbort cellOskDialogAbort
|
||||
#define pOskUnloadAsync cellOskDialogUnloadAsync
|
||||
|
||||
/* define OSK structs / types */
|
||||
#define osk_allowed_panels allowOskPanelFlg
|
||||
#define osk_prohibit_flags prohibitFlgs
|
||||
#define osk_inputfield_message message
|
||||
#define osk_inputfield_starttext init_text
|
||||
#define osk_inputfield_max_length limit_length
|
||||
#define osk_callback_return_param result
|
||||
#define osk_callback_num_chars numCharsResultString
|
||||
#define osk_callback_return_string pResultString
|
||||
#endif
|
||||
|
||||
/*============================================================
|
||||
JPEG/PNG DECODING/ENCODING PROTOTYPES
|
||||
============================================================ */
|
||||
|
||||
#ifdef __PSL1GHT__
|
||||
|
||||
#define spu_enable enable
|
||||
#define stream_select stream
|
||||
#define color_alpha alpha
|
||||
#define color_space space
|
||||
#define output_mode mode
|
||||
#define output_bytes_per_line bytes_per_line
|
||||
#define output_width width
|
||||
#define output_height height
|
||||
|
||||
#define CELL_OK 0
|
||||
#define PTR_NULL 0
|
||||
|
||||
#else
|
||||
/* define the JPEG/PNG struct member names */
|
||||
#define spu_enable spuThreadEnable
|
||||
#define ppu_prio ppuThreadPriority
|
||||
#define spu_prio spuThreadPriority
|
||||
#define malloc_func cbCtrlMallocFunc
|
||||
#define malloc_arg cbCtrlMallocArg
|
||||
#define free_func cbCtrlFreeFunc
|
||||
#define free_arg cbCtrlFreeArg
|
||||
#define stream_select srcSelect
|
||||
#define file_name fileName
|
||||
#define file_offset fileOffset
|
||||
#define file_size fileSize
|
||||
#define stream_ptr streamPtr
|
||||
#define stream_size streamSize
|
||||
#define down_scale downScale
|
||||
#define color_alpha outputColorAlpha
|
||||
#define color_space outputColorSpace
|
||||
#define cmd_ptr commandPtr
|
||||
#define quality method
|
||||
#define output_mode outputMode
|
||||
#define output_bytes_per_line outputBytesPerLine
|
||||
#define output_width outputWidth
|
||||
#define output_height outputHeight
|
||||
#define bit_depth outputBitDepth
|
||||
#define pack_flag outputPackFlag
|
||||
#define alpha_select outputAlphaSelect
|
||||
|
||||
#define PTR_NULL NULL
|
||||
|
||||
#endif
|
||||
|
||||
/*============================================================
|
||||
TIMER PROTOTYPES
|
||||
============================================================ */
|
||||
|
||||
#ifdef __PSL1GHT__
|
||||
#define sys_timer_usleep usleep
|
||||
#endif
|
||||
|
||||
/*============================================================
|
||||
THREADING PROTOTYPES
|
||||
============================================================ */
|
||||
|
||||
#ifdef __PSL1GHT__
|
||||
#include <sys/thread.h>
|
||||
|
||||
/* FIXME - not sure if this is correct -> FIXED! 1 and not 0 */
|
||||
#define SYS_THREAD_CREATE_JOINABLE THREAD_JOINABLE
|
||||
|
||||
#else
|
||||
#include <sys/ppu_thread.h>
|
||||
|
||||
#define SYS_PROCESS_SPAWN_STACK_SIZE_1M SYS_PROCESS_PRIMARY_STACK_SIZE_1M
|
||||
#define SYS_THREAD_CREATE_JOINABLE SYS_PPU_THREAD_CREATE_JOINABLE
|
||||
|
||||
#define sysThreadCreate sys_ppu_thread_create
|
||||
#define sysThreadJoin sys_ppu_thread_join
|
||||
#define sysThreadExit sys_ppu_thread_exit
|
||||
|
||||
#define sysProcessExit sys_process_exit
|
||||
#define sysProcessExitSpawn2 sys_game_process_exitspawn
|
||||
|
||||
#endif
|
||||
|
||||
/*============================================================
|
||||
MEMORY PROTOTYPES
|
||||
============================================================ */
|
||||
|
||||
#ifndef __PSL1GHT__
|
||||
#define sysMemContainerCreate sys_memory_container_create
|
||||
#define sysMemContainerDestroy sys_memory_container_destroy
|
||||
#endif
|
||||
|
||||
/*============================================================
|
||||
RSX PROTOTYPES
|
||||
============================================================ */
|
||||
|
||||
#ifdef __PSL1GHT__
|
||||
#include <sysutil/video.h>
|
||||
#define CELL_GCM_FALSE GCM_FALSE
|
||||
#define CELL_GCM_TRUE GCM_TRUE
|
||||
|
||||
#define CELL_GCM_ONE GCM_ONE
|
||||
#define CELL_GCM_ZERO GCM_ZERO
|
||||
#define CELL_GCM_ALWAYS GCM_ALWAYS
|
||||
|
||||
#define CELL_GCM_LOCATION_LOCAL GCM_LOCATION_RSX
|
||||
#define CELL_GCM_LOCATION_MAIN GCM_LOCATION_CELL
|
||||
|
||||
#define CELL_GCM_MAX_RT_DIMENSION (4096)
|
||||
|
||||
#define CELL_GCM_TEXTURE_LINEAR_NEAREST GCM_TEXTURE_LINEAR_MIPMAP_NEAREST
|
||||
#define CELL_GCM_TEXTURE_LINEAR_LINEAR GCM_TEXTURE_LINEAR_MIPMAP_LINEAR
|
||||
#define CELL_GCM_TEXTURE_NEAREST_LINEAR GCM_TEXTURE_NEAREST_MIPMAP_LINEAR
|
||||
#define CELL_GCM_TEXTURE_NEAREST_NEAREST GCM_TEXTURE_NEAREST_MIPMAP_NEAREST
|
||||
#define CELL_GCM_TEXTURE_NEAREST GCM_TEXTURE_NEAREST
|
||||
#define CELL_GCM_TEXTURE_LINEAR GCM_TEXTURE_LINEAR
|
||||
|
||||
#define CELL_GCM_TEXTURE_A8R8G8B8 GCM_TEXTURE_FORMAT_A8R8G8B8
|
||||
#define CELL_GCM_TEXTURE_R5G6B5 GCM_TEXTURE_FORMAT_R5G6B5
|
||||
#define CELL_GCM_TEXTURE_A1R5G5B5 GCM_TEXTURE_FORMAT_A1R5G5B5
|
||||
|
||||
#define CELL_GCM_TEXTURE_CLAMP_TO_EDGE GCM_TEXTURE_CLAMP_TO_EDGE
|
||||
|
||||
#define CELL_GCM_TEXTURE_MAX_ANISO_1 GCM_TEXTURE_MAX_ANISO_1
|
||||
#define CELL_GCM_TEXTURE_CONVOLUTION_QUINCUNX GCM_TEXTURE_CONVOLUTION_QUINCUNX
|
||||
#define CELL_GCM_TEXTURE_ZFUNC_NEVER GCM_TEXTURE_ZFUNC_NEVER
|
||||
|
||||
#define CELL_GCM_DISPLAY_HSYNC GCM_FLIP_HSYNC
|
||||
#define CELL_GCM_DISPLAY_VSYNC GCM_FLIP_VSYNC
|
||||
|
||||
#define CELL_GCM_CLEAR_R GCM_CLEAR_R
|
||||
#define CELL_GCM_CLEAR_G GCM_CLEAR_G
|
||||
#define CELL_GCM_CLEAR_B GCM_CLEAR_B
|
||||
#define CELL_GCM_CLEAR_A GCM_CLEAR_A
|
||||
|
||||
#define CELL_GCM_FUNC_ADD GCM_FUNC_ADD
|
||||
|
||||
#define CELL_GCM_SMOOTH (0x1D01)
|
||||
#define CELL_GCM_DEBUG_LEVEL2 2
|
||||
|
||||
#define CELL_GCM_COMPMODE_DISABLED 0
|
||||
|
||||
#define CELL_GCM_TRANSFER_LOCAL_TO_LOCAL 0
|
||||
|
||||
#define CELL_GCM_TEXTURE_REMAP_ORDER_XYXY (0)
|
||||
#define CELL_GCM_TEXTURE_REMAP_ORDER_XXXY (1)
|
||||
|
||||
#define CELL_GCM_TEXTURE_UNSIGNED_REMAP_NORMAL (0)
|
||||
|
||||
#define CELL_GCM_TEXTURE_REMAP_FROM_A (0)
|
||||
#define CELL_GCM_TEXTURE_REMAP_FROM_R (1)
|
||||
#define CELL_GCM_TEXTURE_REMAP_FROM_G (2)
|
||||
#define CELL_GCM_TEXTURE_REMAP_FROM_B (3)
|
||||
|
||||
#define CELL_GCM_TEXTURE_REMAP_ZERO (0)
|
||||
#define CELL_GCM_TEXTURE_REMAP_ONE (1)
|
||||
#define CELL_GCM_TEXTURE_REMAP_REMAP (2)
|
||||
|
||||
#define CELL_GCM_MAX_TEXIMAGE_COUNT (16)
|
||||
|
||||
#define CELL_GCM_TEXTURE_WRAP (1)
|
||||
|
||||
#define CELL_GCM_TEXTURE_NR (0x00)
|
||||
#define CELL_GCM_TEXTURE_LN (0x20)
|
||||
|
||||
#define CELL_GCM_TEXTURE_B8 (0x81)
|
||||
|
||||
#define CELL_RESC_720x480 RESC_720x480
|
||||
#define CELL_RESC_720x576 RESC_720x576
|
||||
#define CELL_RESC_1280x720 RESC_1280x720
|
||||
#define CELL_RESC_1920x1080 RESC_1920x1080
|
||||
|
||||
#define CELL_RESC_FULLSCREEN RESC_FULLSCREEN
|
||||
#define CELL_RESC_PANSCAN RESC_PANSCAN
|
||||
#define CELL_RESC_LETTERBOX RESC_LETTERBOX
|
||||
#define CELL_RESC_CONSTANT_VRAM RESC_CONSTANT_VRAM
|
||||
#define CELL_RESC_MINIMUM_GPU_LOAD RESC_MINIMUM_GPU_LOAD
|
||||
|
||||
#define CELL_RESC_PAL_50 RESC_PAL_50
|
||||
#define CELL_RESC_PAL_60_DROP RESC_PAL_60_DROP
|
||||
#define CELL_RESC_PAL_60_INTERPOLATE RESC_PAL_60_INTERPOLATE
|
||||
#define CELL_RESC_PAL_60_INTERPOLATE_30_DROP RESC_PAL_60_INTERPOLATE_30_DROP
|
||||
#define CELL_RESC_PAL_60_INTERPOLATE_DROP_FLEXIBLE RESC_PAL_60_INTERPOLATE_DROP_FLEXIBLE
|
||||
|
||||
#define CELL_RESC_INTERLACE_FILTER RESC_INTERLACE_FILTER
|
||||
#define CELL_RESC_NORMAL_BILINEAR RESC_NORMAL_BILINEAR
|
||||
|
||||
#define CELL_RESC_ELEMENT_HALF RESC_ELEMENT_HALF
|
||||
|
||||
#define CELL_VIDEO_OUT_ASPECT_AUTO VIDEO_ASPECT_AUTO
|
||||
#define CELL_VIDEO_OUT_ASPECT_4_3 VIDEO_ASPECT_4_3
|
||||
#define CELL_VIDEO_OUT_ASPECT_16_9 VIDEO_ASPECT_16_9
|
||||
|
||||
#define CELL_VIDEO_OUT_RESOLUTION_480 VIDEO_RESOLUTION_480
|
||||
#define CELL_VIDEO_OUT_RESOLUTION_576 VIDEO_RESOLUTION_576
|
||||
#define CELL_VIDEO_OUT_RESOLUTION_720 VIDEO_RESOLUTION_720
|
||||
#define CELL_VIDEO_OUT_RESOLUTION_1080 VIDEO_RESOLUTION_1080
|
||||
#define CELL_VIDEO_OUT_RESOLUTION_960x1080 VIDEO_RESOLUTION_960x1080
|
||||
#define CELL_VIDEO_OUT_RESOLUTION_1280x1080 VIDEO_RESOLUTION_1280x1080
|
||||
#define CELL_VIDEO_OUT_RESOLUTION_1440x1080 VIDEO_RESOLUTION_1440x1080
|
||||
#define CELL_VIDEO_OUT_RESOLUTION_1600x1080 VIDEO_RESOLUTION_1600x1080
|
||||
|
||||
#define CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE VIDEO_SCANMODE_PROGRESSIVE
|
||||
|
||||
#define CELL_VIDEO_OUT_PRIMARY VIDEO_PRIMARY
|
||||
|
||||
#define CELL_VIDEO_OUT_BUFFER_COLOR_FORMAT_X8R8G8B8 VIDEO_BUFFER_FORMAT_XRGB
|
||||
#define CELL_VIDEO_OUT_BUFFER_COLOR_FORMAT_R16G16B16X16_FLOAT VIDEO_BUFFER_FORMAT_FLOAT
|
||||
|
||||
#define CellGcmSurface gcmSurface
|
||||
#define CellGcmTexture gcmTexture
|
||||
#define CellGcmContextData _gcmCtxData
|
||||
#define CellGcmConfig gcmConfiguration
|
||||
#define CellVideoOutConfiguration videoConfiguration
|
||||
#define CellVideoOutResolution videoResolution
|
||||
#define CellVideoOutState videoState
|
||||
|
||||
#define CellRescInitConfig rescInitConfig
|
||||
#define CellRescSrc rescSrc
|
||||
#define CellRescBufferMode rescBufferMode
|
||||
|
||||
#define resolutionId resolution
|
||||
#define memoryFrequency memoryFreq
|
||||
#define coreFrequency coreFreq
|
||||
|
||||
#define cellGcmFinish rsxFinish
|
||||
|
||||
#define cellGcmGetFlipStatus gcmGetFlipStatus
|
||||
#define cellGcmResetFlipStatus gcmResetFlipStatus
|
||||
#define cellGcmSetWaitFlip gcmSetWaitFlip
|
||||
#define cellGcmSetDebugOutputLevel gcmSetDebugOutputLevel
|
||||
#define cellGcmSetDisplayBuffer gcmSetDisplayBuffer
|
||||
#define cellGcmSetGraphicsHandler gcmSetGraphicsHandler
|
||||
#define cellGcmSetFlipHandler gcmSetFlipHandler
|
||||
#define cellGcmSetVBlankHandler gcmSetVBlankHandler
|
||||
#define cellGcmGetConfiguration gcmGetConfiguration
|
||||
#define cellGcmSetJumpCommand rsxSetJumpCommand
|
||||
#define cellGcmFlush rsxFlushBuffer
|
||||
#define cellGcmSetFlipMode gcmSetFlipMode
|
||||
#define cellGcmSetFlip gcmSetFlip
|
||||
#define cellGcmGetLabelAddress gcmGetLabelAddress
|
||||
#define cellGcmUnbindTile gcmUnbindTile
|
||||
#define cellGcmBindTile gcmBindTile
|
||||
#define cellGcmSetTileInfo gcmSetTileInfo
|
||||
#define cellGcmAddressToOffset gcmAddressToOffset
|
||||
|
||||
#define cellRescCreateInterlaceTable rescCreateInterlaceTable
|
||||
#define cellRescSetDisplayMode rescSetDisplayMode
|
||||
#define cellRescGetNumColorBuffers rescGetNumColorBuffers
|
||||
#define cellRescGetBufferSize rescGetBufferSize
|
||||
#define cellRescSetBufferAddress rescSetBufferAddress
|
||||
#define cellRescGetFlipStatus rescGetFlipStatus
|
||||
#define cellRescResetFlipStatus rescResetFlipStatus
|
||||
#define cellRescSetConvertAndFlip rescSetConvertAndFlip
|
||||
#define cellRescSetVBlankHandler rescSetVBlankHandler
|
||||
#define cellRescSetFlipHandler rescSetFlipHandler
|
||||
#define cellRescAdjustAspectRatio rescAdjustAspectRatio
|
||||
#define cellRescSetWaitFlip rescSetWaitFlip
|
||||
#define cellRescSetSrc rescSetSrc
|
||||
#define cellRescInit rescInit
|
||||
#define cellRescExit rescExit
|
||||
|
||||
#define cellVideoOutConfigure videoConfigure
|
||||
#define cellVideoOutGetState videoGetState
|
||||
#define cellVideoOutGetResolution videoGetResolution
|
||||
#define cellVideoOutGetResolutionAvailability videoGetResolutionAvailability
|
||||
|
||||
#define cellGcmSetViewportInline rsxSetViewport
|
||||
#define cellGcmSetReferenceCommandInline rsxSetReferenceCommand
|
||||
#define cellGcmSetBlendEquationInline rsxSetBlendEquation
|
||||
#define cellGcmSetWriteBackEndLabelInline rsxSetWriteBackendLabel
|
||||
#define cellGcmSetWaitLabelInline rsxSetWaitLabel
|
||||
#define cellGcmSetDepthTestEnableInline rsxSetDepthTestEnable
|
||||
#define cellGcmSetScissorInline rsxSetScissor
|
||||
#define cellGcmSetBlendEnableInline rsxSetBlendEnable
|
||||
#define cellGcmSetClearColorInline rsxSetClearColor
|
||||
#define cellGcmSetBlendFuncInline rsxSetBlendFunc
|
||||
#define cellGcmSetBlendColorInline rsxSetBlendColor
|
||||
#define cellGcmSetTextureFilterInline rsxTextureFilter
|
||||
#define cellGcmSetTextureControlInline rsxTextureControl
|
||||
#define cellGcmSetCullFaceEnableInline rsxSetCullFaceEnable
|
||||
#define cellGcmSetShadeModeInline rsxSetShadeModel
|
||||
#define cellGcmSetTransferImage rsxSetTransferImage
|
||||
#define cellGcmSetBlendColor rsxSetBlendColor
|
||||
#define cellGcmSetBlendEquation rsxSetBlendEquation
|
||||
#define cellGcmSetBlendFunc rsxSetBlendFunc
|
||||
#define cellGcmSetClearColor rsxSetClearColor
|
||||
#define cellGcmSetScissor rsxSetScissor
|
||||
#define celGcmSetInvalidateVertexCache(fifo) rsxInvalidateTextureCache(fifo, GCM_INVALIDATE_VERTEX_TEXTURE)
|
||||
#else
|
||||
#define cellGcmSetTransferImage cellGcmSetTransferImageInline
|
||||
#define celGcmSetInvalidateVertexCache cellGcmSetInvalidateVertexCacheInline
|
||||
#endif
|
||||
|
||||
/*============================================================
|
||||
NETWORK PROTOTYPES
|
||||
============================================================ */
|
||||
|
||||
#ifdef __PSL1GHT__
|
||||
#include <net/netctl.h>
|
||||
|
||||
#define cellNetCtlInit netCtlInit
|
||||
#define cellNetCtlGetState netCtlGetState
|
||||
#define cellNetCtlTerm netCtlTerm
|
||||
|
||||
#define CELL_NET_CTL_STATE_IPObtained NET_CTL_STATE_IPObtained
|
||||
#else
|
||||
#define netCtlInit cellNetCtlInit
|
||||
#define netCtlGetState cellNetCtlGetState
|
||||
#define netCtlTerm cellNetCtlTerm
|
||||
#define NET_CTL_STATE_IPObtained CELL_NET_CTL_STATE_IPObtained
|
||||
#endif
|
||||
|
||||
/*============================================================
|
||||
NET PROTOTYPES
|
||||
============================================================ */
|
||||
|
||||
#if defined(HAVE_NETWORKING)
|
||||
#ifdef __PSL1GHT__
|
||||
#include <net/net.h>
|
||||
|
||||
#define socketselect select
|
||||
#define socketclose close
|
||||
|
||||
#define sys_net_initialize_network netInitialize
|
||||
#define sys_net_finalize_network netFinalizeNetwork
|
||||
#else
|
||||
#include <netex/net.h>
|
||||
#include <np.h>
|
||||
#include <np/drm.h>
|
||||
|
||||
#define netInitialize sys_net_initialize_network
|
||||
#define netFinalizeNetwork sys_net_finalize_network
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*============================================================
|
||||
SYSUTIL PROTOTYPES
|
||||
============================================================ */
|
||||
|
||||
#ifdef __PSL1GHT__
|
||||
#include <sysutil/game.h>
|
||||
#define CellGameContentSize sysGameContentSize
|
||||
#define cellGameContentPermit sysGameContentPermit
|
||||
#define cellGameBootCheck sysGameBootCheck
|
||||
|
||||
#define CELL_GAME_ATTRIBUTE_APP_HOME (UINT64_C(1) <<1) /* boot from / app_home/PS3_GAME */
|
||||
#define CELL_GAME_DIRNAME_SIZE 32
|
||||
|
||||
#define CELL_GAME_GAMETYPE_SYS 0
|
||||
#define CELL_GAME_GAMETYPE_DISC 1
|
||||
#define CELL_GAME_GAMETYPE_HDD 2
|
||||
#define CELL_GAME_GAMETYPE_GAMEDATA 3
|
||||
#define CELL_GAME_GAMETYPE_HOME 4
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SYSUTILS)
|
||||
#ifdef __PSL1GHT__
|
||||
#include <sysutil/sysutil.h>
|
||||
|
||||
#define CELL_SYSUTIL_REQUEST_EXITGAME SYSUTIL_EXIT_GAME
|
||||
|
||||
#define cellSysutilRegisterCallback sysUtilRegisterCallback
|
||||
#define cellSysutilCheckCallback sysUtilCheckCallback
|
||||
#else
|
||||
#include <sysutil/sysutil_screenshot.h>
|
||||
#include <sysutil/sysutil_common.h>
|
||||
#include <sysutil/sysutil_gamecontent.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if(CELL_SDK_VERSION > 0x340000)
|
||||
#include <sysutil/sysutil_bgmplayback.h>
|
||||
#endif
|
||||
|
||||
/*============================================================
|
||||
SYSMODULE PROTOTYPES
|
||||
============================================================ */
|
||||
|
||||
#if defined(HAVE_SYSMODULES)
|
||||
#ifdef __PSL1GHT__
|
||||
#include <sysmodule/sysmodule.h>
|
||||
|
||||
#define CELL_SYSMODULE_IO SYSMODULE_IO
|
||||
#define CELL_SYSMODULE_FS SYSMODULE_FS
|
||||
#define CELL_SYSMODULE_NET SYSMODULE_NET
|
||||
#define CELL_SYSMODULE_SYSUTIL_NP SYSMODULE_SYSUTIL_NP
|
||||
#define CELL_SYSMODULE_JPGDEC SYSMODULE_JPGDEC
|
||||
#define CELL_SYSMODULE_PNGDEC SYSMODULE_PNGDEC
|
||||
#define CELL_SYSMODULE_FONT SYSMODULE_FONT
|
||||
#define CELL_SYSMODULE_FREETYPE SYSMODULE_FREETYPE
|
||||
#define CELL_SYSMODULE_FONTFT SYSMODULE_FONTFT
|
||||
|
||||
#define cellSysmoduleLoadModule sysModuleLoad
|
||||
#define cellSysmoduleUnloadModule sysModuleUnload
|
||||
|
||||
#else
|
||||
#include <cell/sysmodule.h>
|
||||
|
||||
#define sysModuleLoad cellSysmoduleLoadModule
|
||||
#define sysModuleUnload cellSysmoduleUnloadModule
|
||||
#define SYSMODULE_NET CELL_SYSMODULE_NET
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*============================================================
|
||||
FS PROTOTYPES
|
||||
============================================================ */
|
||||
#define FS_SUCCEEDED 0
|
||||
#define FS_TYPE_DIR 1
|
||||
#ifdef __PSL1GHT__
|
||||
#include <lv2/sysfs.h>
|
||||
#ifndef O_RDONLY
|
||||
#define O_RDONLY SYS_O_RDONLY
|
||||
#endif
|
||||
#ifndef O_WRONLY
|
||||
#define O_WRONLY SYS_O_WRONLY
|
||||
#endif
|
||||
#ifndef O_CREAT
|
||||
#define O_CREAT SYS_O_CREAT
|
||||
#endif
|
||||
#ifndef O_TRUNC
|
||||
#define O_TRUNC SYS_O_TRUNC
|
||||
#endif
|
||||
#ifndef O_RDWR
|
||||
#define O_RDWR SYS_O_RDWR
|
||||
#endif
|
||||
#else
|
||||
#include <cell/cell_fs.h>
|
||||
#ifndef O_RDONLY
|
||||
#define O_RDONLY CELL_FS_O_RDONLY
|
||||
#endif
|
||||
#ifndef O_WRONLY
|
||||
#define O_WRONLY CELL_FS_O_WRONLY
|
||||
#endif
|
||||
#ifndef O_CREAT
|
||||
#define O_CREAT CELL_FS_O_CREAT
|
||||
#endif
|
||||
#ifndef O_TRUNC
|
||||
#define O_TRUNC CELL_FS_O_TRUNC
|
||||
#endif
|
||||
#ifndef O_RDWR
|
||||
#define O_RDWR CELL_FS_O_RDWR
|
||||
#endif
|
||||
#define sysFsStat cellFsStat
|
||||
#define sysFSStat CellFsStat
|
||||
#define sysFSDirent CellFsDirent
|
||||
#define sysFsOpendir cellFsOpendir
|
||||
#define sysFsReaddir cellFsReaddir
|
||||
#define sysFSDirent CellFsDirent
|
||||
#define sysFsClosedir cellFsClosedir
|
||||
#endif
|
||||
|
||||
#endif
|
||||
46
src/minarch/libretro-common/include/defines/ps4_defines.h
Normal file
46
src/minarch/libretro-common/include/defines/ps4_defines.h
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
#ifndef _PS4_DEFINES_H
|
||||
#define _PS4_DEFINES_H
|
||||
|
||||
#define PS4_MAX_ORBISPADS 16
|
||||
#define PS4_MAX_PAD_PORT_TYPES 3
|
||||
|
||||
#define ORBISPAD_L3 0x00000002
|
||||
#define ORBISPAD_R3 0x00000004
|
||||
#define ORBISPAD_OPTIONS 0x00000008
|
||||
#define ORBISPAD_UP 0x00000010
|
||||
#define ORBISPAD_RIGHT 0x00000020
|
||||
#define ORBISPAD_DOWN 0x00000040
|
||||
#define ORBISPAD_LEFT 0x00000080
|
||||
#define ORBISPAD_L2 0x00000100
|
||||
#define ORBISPAD_R2 0x00000200
|
||||
#define ORBISPAD_L1 0x00000400
|
||||
#define ORBISPAD_R1 0x00000800
|
||||
#define ORBISPAD_TRIANGLE 0x00001000
|
||||
#define ORBISPAD_CIRCLE 0x00002000
|
||||
#define ORBISPAD_CROSS 0x00004000
|
||||
#define ORBISPAD_SQUARE 0x00008000
|
||||
#define ORBISPAD_TOUCH_PAD 0x00100000
|
||||
#define ORBISPAD_INTERCEPTED 0x80000000
|
||||
|
||||
#define SceUID uint32_t
|
||||
#define SceKernelStat OrbisKernelStat
|
||||
#define SCE_KERNEL_PRIO_FIFO_DEFAULT 700
|
||||
#define SCE_AUDIO_OUT_PORT_TYPE_MAIN 0
|
||||
#define SCE_AUDIO_OUT_MODE_STEREO 1
|
||||
#define SCE_MOUSE_BUTTON_PRIMARY 0x00000001
|
||||
#define SCE_MOUSE_BUTTON_SECONDARY 0x00000002
|
||||
#define SCE_MOUSE_BUTTON_OPTIONAL 0x00000004
|
||||
#define SCE_MOUSE_BUTTON_INTERCEPTED 0x80000000
|
||||
#define SCE_MOUSE_OPEN_PARAM_MERGED 0x01
|
||||
#define SCE_MOUSE_PORT_TYPE_STANDARD 0
|
||||
#define SCE_DBG_KEYBOARD_PORT_TYPE_STANDARD 0
|
||||
#define SCE_USER_SERVICE_MAX_LOGIN_USERS 16
|
||||
#define SCE_USER_SERVICE_USER_ID_INVALID 0xFFFFFFFF
|
||||
#define SCE_ORBISPAD_ERROR_ALREADY_OPENED 0x80920004
|
||||
#define SCE_PAD_PORT_TYPE_STANDARD 0
|
||||
#define SCE_PAD_PORT_TYPE_SPECIAL 2
|
||||
#define SCE_PAD_PORT_TYPE_REMOTE_CONTROL 16
|
||||
#define SCE_KERNEL_PROT_CPU_RW 0x02
|
||||
#define SCE_KERNEL_MAP_FIXED 0x10
|
||||
|
||||
#endif
|
||||
145
src/minarch/libretro-common/include/defines/psp_defines.h
Normal file
145
src/minarch/libretro-common/include/defines/psp_defines.h
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
/* Copyright (C) 2010-2021 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (psp_defines.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _PSP_DEFINES_H
|
||||
#define _PSP_DEFINES_H
|
||||
|
||||
/*============================================================
|
||||
ERROR PROTOTYPES
|
||||
============================================================ */
|
||||
|
||||
#ifndef SCE_OK
|
||||
#define SCE_OK 0
|
||||
#endif
|
||||
|
||||
/*============================================================
|
||||
DISPLAY PROTOTYPES
|
||||
============================================================ */
|
||||
|
||||
#if defined(SN_TARGET_PSP2) || defined(VITA)
|
||||
|
||||
#ifdef VITA
|
||||
int sceClibPrintf ( const char * format, ... );
|
||||
#define printf sceClibPrintf
|
||||
#define PSP_DISPLAY_PIXEL_FORMAT_8888 (SCE_DISPLAY_PIXELFORMAT_A8B8G8R8)
|
||||
#else
|
||||
#define PSP_DISPLAY_PIXEL_FORMAT_8888 (SCE_DISPLAY_PIXELFORMAT_A8B8G8R8)
|
||||
#endif
|
||||
|
||||
#define DisplaySetFrameBuf(topaddr, bufferwidth, pixelformat, sync) sceDisplaySetFrameBuf(topaddr, sync)
|
||||
|
||||
#define PSP_FB_WIDTH 960
|
||||
#define PSP_FB_HEIGHT 544
|
||||
#define PSP_PITCH_PIXELS 1024
|
||||
|
||||
// Memory left to the system for threads and other internal stuffs
|
||||
#ifdef SCE_LIBC_SIZE
|
||||
#define RAM_THRESHOLD 0x2000000 + SCE_LIBC_SIZE
|
||||
#else
|
||||
#define RAM_THRESHOLD 0x2000000
|
||||
#endif
|
||||
|
||||
#elif defined(PSP)
|
||||
#define DisplaySetFrameBuf(topaddr, bufferwidth, pixelformat, sync) sceDisplaySetFrameBuf(topaddr, bufferwidth, pixelformat, sync)
|
||||
|
||||
#define SCE_DISPLAY_UPDATETIMING_NEXTVSYNC 1
|
||||
|
||||
#define PSP_FB_WIDTH 512
|
||||
#define PSP_FB_HEIGHT 512
|
||||
#define PSP_PITCH_PIXELS 512
|
||||
|
||||
#endif
|
||||
|
||||
/*============================================================
|
||||
INPUT PROTOTYPES
|
||||
============================================================ */
|
||||
|
||||
#if defined(SN_TARGET_PSP2) || defined(VITA)
|
||||
|
||||
#define STATE_BUTTON(state) ((state).buttons)
|
||||
#define STATE_ANALOGLX(state) ((state).lx)
|
||||
#define STATE_ANALOGLY(state) ((state).ly)
|
||||
#define STATE_ANALOGRX(state) ((state).rx)
|
||||
#define STATE_ANALOGRY(state) ((state).ry)
|
||||
|
||||
#if defined(VITA)
|
||||
#define DEFAULT_SAMPLING_MODE (SCE_CTRL_MODE_ANALOG)
|
||||
|
||||
#define PSP_CTRL_LEFT SCE_CTRL_LEFT
|
||||
#define PSP_CTRL_DOWN SCE_CTRL_DOWN
|
||||
#define PSP_CTRL_RIGHT SCE_CTRL_RIGHT
|
||||
#define PSP_CTRL_UP SCE_CTRL_UP
|
||||
#define PSP_CTRL_START SCE_CTRL_START
|
||||
#define PSP_CTRL_SELECT SCE_CTRL_SELECT
|
||||
#define PSP_CTRL_TRIANGLE SCE_CTRL_TRIANGLE
|
||||
#define PSP_CTRL_SQUARE SCE_CTRL_SQUARE
|
||||
#define PSP_CTRL_CROSS SCE_CTRL_CROSS
|
||||
#define PSP_CTRL_CIRCLE SCE_CTRL_CIRCLE
|
||||
#define PSP_CTRL_L SCE_CTRL_L1
|
||||
#define PSP_CTRL_R SCE_CTRL_R1
|
||||
#define PSP_CTRL_L2 SCE_CTRL_LTRIGGER
|
||||
#define PSP_CTRL_R2 SCE_CTRL_RTRIGGER
|
||||
#define PSP_CTRL_L3 SCE_CTRL_L3
|
||||
#define PSP_CTRL_R3 SCE_CTRL_R3
|
||||
#else
|
||||
#define DEFAULT_SAMPLING_MODE (SCE_CTRL_MODE_DIGITALANALOG)
|
||||
|
||||
#define PSP_CTRL_LEFT SCE_CTRL_LEFT
|
||||
#define PSP_CTRL_DOWN SCE_CTRL_DOWN
|
||||
#define PSP_CTRL_RIGHT SCE_CTRL_RIGHT
|
||||
#define PSP_CTRL_UP SCE_CTRL_UP
|
||||
#define PSP_CTRL_START SCE_CTRL_START
|
||||
#define PSP_CTRL_SELECT SCE_CTRL_SELECT
|
||||
#define PSP_CTRL_TRIANGLE SCE_CTRL_TRIANGLE
|
||||
#define PSP_CTRL_SQUARE SCE_CTRL_SQUARE
|
||||
#define PSP_CTRL_CROSS SCE_CTRL_CROSS
|
||||
#define PSP_CTRL_CIRCLE SCE_CTRL_CIRCLE
|
||||
#define PSP_CTRL_L SCE_CTRL_L
|
||||
#define PSP_CTRL_R SCE_CTRL_R
|
||||
#endif
|
||||
|
||||
#if defined(VITA)
|
||||
#define CtrlSetSamplingMode(mode) sceCtrlSetSamplingModeExt(mode)
|
||||
#define CtrlPeekBufferPositive(port, pad_data, bufs) sceCtrlPeekBufferPositiveExt2(port, pad_data, bufs)
|
||||
#else
|
||||
#define CtrlSetSamplingMode(mode) sceCtrlSetSamplingMode(mode)
|
||||
#define CtrlPeekBufferPositive(port, pad_data, bufs) sceCtrlPeekBufferPositive(port, pad_data, bufs)
|
||||
#endif
|
||||
|
||||
#elif defined(PSP)
|
||||
|
||||
#define PSP_CTRL_L PSP_CTRL_LTRIGGER
|
||||
#define PSP_CTRL_R PSP_CTRL_RTRIGGER
|
||||
|
||||
#define STATE_BUTTON(state) ((state).Buttons)
|
||||
#define STATE_ANALOGLX(state) ((state).Lx)
|
||||
#define STATE_ANALOGLY(state) ((state).Ly)
|
||||
#define STATE_ANALOGRX(state) ((state).Rx)
|
||||
#define STATE_ANALOGRY(state) ((state).Ry)
|
||||
|
||||
#define DEFAULT_SAMPLING_MODE (PSP_CTRL_MODE_ANALOG)
|
||||
|
||||
#define CtrlSetSamplingMode(mode) sceCtrlSetSamplingMode(mode)
|
||||
#define CtrlPeekBufferPositive(port, pad_data, bufs) sceCtrlPeekBufferPositive(pad_data, bufs)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
71
src/minarch/libretro-common/include/dynamic/dylib.h
Normal file
71
src/minarch/libretro-common/include/dynamic/dylib.h
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (dylib.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __DYLIB_H
|
||||
#define __DYLIB_H
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#if defined(HAVE_DYNAMIC) || defined(HAVE_DYLIB)
|
||||
#define NEED_DYNAMIC
|
||||
#else
|
||||
#undef NEED_DYNAMIC
|
||||
#endif
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef void *dylib_t;
|
||||
typedef void (*function_t)(void);
|
||||
|
||||
#ifdef NEED_DYNAMIC
|
||||
/**
|
||||
* dylib_load:
|
||||
* @path : Path to libretro core library.
|
||||
*
|
||||
* Platform independent dylib loading.
|
||||
*
|
||||
* @return Library handle on success, otherwise NULL.
|
||||
**/
|
||||
dylib_t dylib_load(const char *path);
|
||||
|
||||
/**
|
||||
* dylib_close:
|
||||
* @lib : Library handle.
|
||||
*
|
||||
* Frees library handle.
|
||||
**/
|
||||
void dylib_close(dylib_t lib);
|
||||
|
||||
char *dylib_error(void);
|
||||
|
||||
function_t dylib_proc(dylib_t lib, const char *proc);
|
||||
#endif
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
16
src/minarch/libretro-common/include/encodings/base64.h
Normal file
16
src/minarch/libretro-common/include/encodings/base64.h
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#ifndef _LIBRETRO_ENCODINGS_BASE64_H
|
||||
#define _LIBRETRO_ENCODINGS_BASE64_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
char* base64(const void* binaryData, int len, int *flen);
|
||||
unsigned char* unbase64(const char* ascii, int len, int *flen);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
37
src/minarch/libretro-common/include/encodings/crc32.h
Normal file
37
src/minarch/libretro-common/include/encodings/crc32.h
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (crc32.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _LIBRETRO_ENCODINGS_CRC32_H
|
||||
#define _LIBRETRO_ENCODINGS_CRC32_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
uint32_t encoding_crc32(uint32_t crc, const uint8_t *buf, size_t len);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
137
src/minarch/libretro-common/include/encodings/utf.h
Normal file
137
src/minarch/libretro-common/include/encodings/utf.h
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (utf.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _LIBRETRO_ENCODINGS_UTF_H
|
||||
#define _LIBRETRO_ENCODINGS_UTF_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
enum CodePage
|
||||
{
|
||||
CODEPAGE_LOCAL = 0, /* CP_ACP */
|
||||
CODEPAGE_UTF8 = 65001 /* CP_UTF8 */
|
||||
};
|
||||
|
||||
/**
|
||||
* utf8_conv_utf32:
|
||||
*
|
||||
* Simple implementation. Assumes the sequence is
|
||||
* properly synchronized and terminated.
|
||||
**/
|
||||
size_t utf8_conv_utf32(uint32_t *out, size_t out_chars,
|
||||
const char *in, size_t in_size);
|
||||
|
||||
/**
|
||||
* utf16_conv_utf8:
|
||||
*
|
||||
* Leaf function.
|
||||
**/
|
||||
bool utf16_conv_utf8(uint8_t *out, size_t *out_chars,
|
||||
const uint16_t *in, size_t in_size);
|
||||
|
||||
/**
|
||||
* utf8len:
|
||||
*
|
||||
* Leaf function.
|
||||
**/
|
||||
size_t utf8len(const char *string);
|
||||
|
||||
/**
|
||||
* utf8cpy:
|
||||
*
|
||||
* Acts mostly like strlcpy.
|
||||
*
|
||||
* Copies the given number of UTF-8 characters,
|
||||
* but at most @d_len bytes.
|
||||
*
|
||||
* Always NULL terminates. Does not copy half a character.
|
||||
* @s is assumed valid UTF-8.
|
||||
* Use only if @chars is considerably less than @d_len.
|
||||
*
|
||||
* Hidden non-leaf function cost:
|
||||
* - Calls memcpy
|
||||
*
|
||||
* @return Number of bytes.
|
||||
**/
|
||||
size_t utf8cpy(char *d, size_t d_len, const char *s, size_t chars);
|
||||
|
||||
/**
|
||||
* utf8skip:
|
||||
*
|
||||
* Leaf function
|
||||
**/
|
||||
const char *utf8skip(const char *str, size_t chars);
|
||||
|
||||
/**
|
||||
* utf8_walk:
|
||||
*
|
||||
* Does not validate the input.
|
||||
*
|
||||
* Leaf function.
|
||||
*
|
||||
* @return Returns garbage if it's not UTF-8.
|
||||
**/
|
||||
uint32_t utf8_walk(const char **string);
|
||||
|
||||
/**
|
||||
* utf16_to_char_string:
|
||||
**/
|
||||
bool utf16_to_char_string(const uint16_t *in, char *s, size_t len);
|
||||
|
||||
/**
|
||||
* utf8_to_local_string_alloc:
|
||||
*
|
||||
* @return Returned pointer MUST be freed by the caller if non-NULL.
|
||||
**/
|
||||
char *utf8_to_local_string_alloc(const char *str);
|
||||
|
||||
/**
|
||||
* local_to_utf8_string_alloc:
|
||||
*
|
||||
* @return Returned pointer MUST be freed by the caller if non-NULL.
|
||||
**/
|
||||
char *local_to_utf8_string_alloc(const char *str);
|
||||
|
||||
/**
|
||||
* utf8_to_utf16_string_alloc:
|
||||
*
|
||||
* @return Returned pointer MUST be freed by the caller if non-NULL.
|
||||
**/
|
||||
wchar_t *utf8_to_utf16_string_alloc(const char *str);
|
||||
|
||||
/**
|
||||
* utf16_to_utf8_string_alloc:
|
||||
*
|
||||
* @return Returned pointer MUST be freed by the caller if non-NULL.
|
||||
**/
|
||||
char *utf16_to_utf8_string_alloc(const wchar_t *str);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
63
src/minarch/libretro-common/include/encodings/win32.h
Normal file
63
src/minarch/libretro-common/include/encodings/win32.h
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (utf.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _LIBRETRO_ENCODINGS_WIN32_H
|
||||
#define _LIBRETRO_ENCODINGS_WIN32_H
|
||||
|
||||
#ifndef _XBOX
|
||||
#ifdef _WIN32
|
||||
/*#define UNICODE
|
||||
#include <tchar.h>
|
||||
#include <wchar.h>*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <encodings/utf.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef UNICODE
|
||||
#define CHAR_TO_WCHAR_ALLOC(s, ws) \
|
||||
size_t ws##_size = (NULL != s && s[0] ? strlen(s) : 0) + 1; \
|
||||
wchar_t *ws = (wchar_t*)calloc(ws##_size, 2); \
|
||||
if (NULL != s && s[0]) \
|
||||
MultiByteToWideChar(CP_UTF8, 0, s, -1, ws, ws##_size / sizeof(wchar_t));
|
||||
|
||||
#define WCHAR_TO_CHAR_ALLOC(ws, s) \
|
||||
size_t s##_size = ((NULL != ws && ws[0] ? wcslen((const wchar_t*)ws) : 0) / 2) + 1; \
|
||||
char *s = (char*)calloc(s##_size, 1); \
|
||||
if (NULL != ws && ws[0]) \
|
||||
utf16_to_char_string((const uint16_t*)ws, s, s##_size);
|
||||
|
||||
#else
|
||||
#define CHAR_TO_WCHAR_ALLOC(s, ws) char *ws = (NULL != s && s[0] ? strdup(s) : NULL);
|
||||
#define WCHAR_TO_CHAR_ALLOC(ws, s) char *s = (NULL != ws && ws[0] ? strdup(ws) : NULL);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
93
src/minarch/libretro-common/include/fastcpy.h
Normal file
93
src/minarch/libretro-common/include/fastcpy.h
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (fastcpy.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* in the future ASM and new c++ features can be added to speed up copying */
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <retro_inline.h>
|
||||
|
||||
static INLINE void* memcpy16(void* dst,void* src,size_t size)
|
||||
{
|
||||
return memcpy(dst,src,size * 2);
|
||||
}
|
||||
|
||||
static INLINE void* memcpy32(void* dst,void* src,size_t size)
|
||||
{
|
||||
return memcpy(dst,src,size * 4);
|
||||
}
|
||||
|
||||
static INLINE void* memcpy64(void* dst,void* src,size_t size)
|
||||
{
|
||||
return memcpy(dst,src,size * 8);
|
||||
}
|
||||
|
||||
#ifdef USECPPSTDFILL
|
||||
#include <algorithm>
|
||||
|
||||
static INLINE void* memset16(void* dst,uint16_t val,size_t size)
|
||||
{
|
||||
uint16_t *typedptr = (uint16_t*)dst;
|
||||
std::fill(typedptr, typedptr + size, val);
|
||||
return dst;
|
||||
}
|
||||
|
||||
static INLINE void* memset32(void* dst,uint32_t val,size_t size)
|
||||
{
|
||||
uint32_t *typedptr = (uint32_t*)dst;
|
||||
std::fill(typedptr, typedptr + size, val);
|
||||
return dst;
|
||||
}
|
||||
|
||||
static INLINE void* memset64(void* dst,uint64_t val,size_t size)
|
||||
{
|
||||
uint64_t *typedptr = (uint64_t*)dst;
|
||||
std::fill(typedptr, typedptr + size, val);
|
||||
return dst;
|
||||
}
|
||||
#else
|
||||
static INLINE void *memset16(void* dst,uint16_t val,size_t size)
|
||||
{
|
||||
size_t i;
|
||||
uint16_t *typedptr = (uint16_t*)dst;
|
||||
for (i = 0;i < size;i++)
|
||||
typedptr[i] = val;
|
||||
return dst;
|
||||
}
|
||||
|
||||
static INLINE void *memset32(void* dst,uint32_t val,size_t size)
|
||||
{
|
||||
size_t i;
|
||||
uint32_t *typedptr = (uint32_t*)dst;
|
||||
for (i = 0; i < size; i++)
|
||||
typedptr[i] = val;
|
||||
return dst;
|
||||
}
|
||||
|
||||
static INLINE void *memset64(void* dst,uint64_t val,size_t size)
|
||||
{
|
||||
size_t i;
|
||||
uint64_t *typedptr = (uint64_t*)dst;
|
||||
for (i = 0; i < size;i++)
|
||||
typedptr[i] = val;
|
||||
return dst;
|
||||
}
|
||||
#endif
|
||||
75
src/minarch/libretro-common/include/features/features_cpu.h
Normal file
75
src/minarch/libretro-common/include/features/features_cpu.h
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (features_cpu.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _LIBRETRO_SDK_CPU_INFO_H
|
||||
#define _LIBRETRO_SDK_CPU_INFO_H
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <libretro.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* cpu_features_get_perf_counter:
|
||||
*
|
||||
* Gets performance counter.
|
||||
*
|
||||
* @return Performance counter.
|
||||
**/
|
||||
retro_perf_tick_t cpu_features_get_perf_counter(void);
|
||||
|
||||
/**
|
||||
* cpu_features_get_time_usec:
|
||||
*
|
||||
* Gets time in microseconds, from an undefined epoch.
|
||||
* The epoch may change between computers or across reboots.
|
||||
*
|
||||
* @return Time in microseconds
|
||||
**/
|
||||
retro_time_t cpu_features_get_time_usec(void);
|
||||
|
||||
/**
|
||||
* cpu_features_get:
|
||||
*
|
||||
* Gets CPU features.
|
||||
*
|
||||
* @return Bitmask of all CPU features available.
|
||||
**/
|
||||
uint64_t cpu_features_get(void);
|
||||
|
||||
/**
|
||||
* cpu_features_get_core_amount:
|
||||
*
|
||||
* Gets the amount of available CPU cores.
|
||||
*
|
||||
* @return Amount of CPU cores available.
|
||||
**/
|
||||
unsigned cpu_features_get_core_amount(void);
|
||||
|
||||
void cpu_features_get_model_name(char *name, int len);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
210
src/minarch/libretro-common/include/file/archive_file.h
Normal file
210
src/minarch/libretro-common/include/file/archive_file.h
Normal file
|
|
@ -0,0 +1,210 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (archive_file.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef LIBRETRO_SDK_ARCHIVE_FILE_H__
|
||||
#define LIBRETRO_SDK_ARCHIVE_FILE_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <boolean.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <direct.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#if defined(RARCH_INTERNAL) && defined(HAVE_CONFIG_H)
|
||||
#include "../../../config.h" /* for HAVE_MMAP */
|
||||
#endif
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
enum file_archive_transfer_type
|
||||
{
|
||||
ARCHIVE_TRANSFER_NONE = 0,
|
||||
ARCHIVE_TRANSFER_INIT,
|
||||
ARCHIVE_TRANSFER_ITERATE,
|
||||
ARCHIVE_TRANSFER_DEINIT,
|
||||
ARCHIVE_TRANSFER_DEINIT_ERROR
|
||||
};
|
||||
|
||||
typedef struct file_archive_handle
|
||||
{
|
||||
uint8_t *data;
|
||||
uint32_t real_checksum;
|
||||
} file_archive_file_handle_t;
|
||||
|
||||
typedef struct file_archive_transfer
|
||||
{
|
||||
int64_t archive_size;
|
||||
void *context;
|
||||
struct RFILE *archive_file;
|
||||
const struct file_archive_file_backend *backend;
|
||||
#ifdef HAVE_MMAP
|
||||
uint8_t *archive_mmap_data;
|
||||
int archive_mmap_fd;
|
||||
#endif
|
||||
unsigned step_total;
|
||||
unsigned step_current;
|
||||
enum file_archive_transfer_type type;
|
||||
} file_archive_transfer_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
file_archive_transfer_t archive; /* int64_t alignment */
|
||||
char *source_file;
|
||||
char *subdir;
|
||||
char *target_dir;
|
||||
char *target_file;
|
||||
char *valid_ext;
|
||||
char *callback_error;
|
||||
struct archive_extract_userdata *userdata;
|
||||
} decompress_state_t;
|
||||
|
||||
struct archive_extract_userdata
|
||||
{
|
||||
/* These are set or read by the archive processing */
|
||||
char *first_extracted_file_path;
|
||||
const char *extraction_directory;
|
||||
struct string_list *ext;
|
||||
struct string_list *list;
|
||||
file_archive_transfer_t *transfer;
|
||||
/* Not used by the processing, free to use outside or in iterate callback */
|
||||
decompress_state_t *dec;
|
||||
void* cb_data;
|
||||
uint32_t crc;
|
||||
char archive_path[PATH_MAX_LENGTH];
|
||||
char current_file_path[PATH_MAX_LENGTH];
|
||||
bool found_file;
|
||||
bool list_only;
|
||||
};
|
||||
|
||||
/* Returns true when parsing should continue. False to stop. */
|
||||
typedef int (*file_archive_file_cb)(const char *name, const char *valid_exts,
|
||||
const uint8_t *cdata, unsigned cmode, uint32_t csize, uint32_t size,
|
||||
uint32_t crc32, struct archive_extract_userdata *userdata);
|
||||
|
||||
struct file_archive_file_backend
|
||||
{
|
||||
int (*archive_parse_file_init)(
|
||||
file_archive_transfer_t *state,
|
||||
const char *file);
|
||||
int (*archive_parse_file_iterate_step)(
|
||||
void *context,
|
||||
const char *valid_exts,
|
||||
struct archive_extract_userdata *userdata,
|
||||
file_archive_file_cb file_cb);
|
||||
void (*archive_parse_file_free)(
|
||||
void *context);
|
||||
|
||||
bool (*stream_decompress_data_to_file_init)(
|
||||
void *context, file_archive_file_handle_t *handle,
|
||||
const uint8_t *cdata, unsigned cmode, uint32_t csize, uint32_t size);
|
||||
int (*stream_decompress_data_to_file_iterate)(
|
||||
void *context,
|
||||
file_archive_file_handle_t *handle);
|
||||
|
||||
uint32_t (*stream_crc_calculate)(uint32_t, const uint8_t *, size_t);
|
||||
int64_t (*compressed_file_read)(const char *path, const char *needle, void **buf,
|
||||
const char *optional_outfile);
|
||||
const char *ident;
|
||||
};
|
||||
|
||||
int file_archive_parse_file_iterate(
|
||||
file_archive_transfer_t *state,
|
||||
bool *returnerr,
|
||||
const char *file,
|
||||
const char *valid_exts,
|
||||
file_archive_file_cb file_cb,
|
||||
struct archive_extract_userdata *userdata);
|
||||
|
||||
void file_archive_parse_file_iterate_stop(file_archive_transfer_t *state);
|
||||
|
||||
int file_archive_parse_file_progress(file_archive_transfer_t *state);
|
||||
|
||||
/**
|
||||
* file_archive_extract_file:
|
||||
* @archive_path : filename path to ZIP archive.
|
||||
* @valid_exts : valid extensions for a file.
|
||||
* @extraction_directory : the directory to extract the temporary
|
||||
* file to.
|
||||
*
|
||||
* Extract file from archive. If no file inside the archive is
|
||||
* specified, the first file found will be used.
|
||||
*
|
||||
* Returns : true (1) on success, otherwise false (0).
|
||||
**/
|
||||
bool file_archive_extract_file(const char *archive_path,
|
||||
const char *valid_exts, const char *extraction_dir,
|
||||
char *out_path, size_t len);
|
||||
|
||||
/* Warning: 'list' must zero initialised before
|
||||
* calling this function, otherwise memory leaks/
|
||||
* undefined behaviour will occur */
|
||||
bool file_archive_get_file_list_noalloc(struct string_list *list,
|
||||
const char *path,
|
||||
const char *valid_exts);
|
||||
|
||||
/**
|
||||
* file_archive_get_file_list:
|
||||
* @path : filename path of archive
|
||||
* @valid_exts : Valid extensions of archive to be parsed.
|
||||
* If NULL, allow all.
|
||||
*
|
||||
* Returns: string listing of files from archive on success, otherwise NULL.
|
||||
**/
|
||||
struct string_list* file_archive_get_file_list(const char *path, const char *valid_exts);
|
||||
|
||||
bool file_archive_perform_mode(const char *name, const char *valid_exts,
|
||||
const uint8_t *cdata, unsigned cmode, uint32_t csize, uint32_t size,
|
||||
uint32_t crc32, struct archive_extract_userdata *userdata);
|
||||
|
||||
int file_archive_compressed_read(
|
||||
const char* path, void **buf,
|
||||
const char* optional_filename, int64_t *length);
|
||||
|
||||
const struct file_archive_file_backend* file_archive_get_zlib_file_backend(void);
|
||||
const struct file_archive_file_backend* file_archive_get_7z_file_backend(void);
|
||||
|
||||
const struct file_archive_file_backend* file_archive_get_file_backend(const char *path);
|
||||
|
||||
/**
|
||||
* file_archive_get_file_crc32:
|
||||
* @path : filename path of archive
|
||||
*
|
||||
* Returns: CRC32 of the specified file in the archive, otherwise 0.
|
||||
* If no path within the archive is specified, the first
|
||||
* file found inside is used.
|
||||
**/
|
||||
uint32_t file_archive_get_file_crc32(const char *path);
|
||||
|
||||
extern const struct file_archive_file_backend zlib_backend;
|
||||
extern const struct file_archive_file_backend sevenzip_backend;
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
330
src/minarch/libretro-common/include/file/config_file.h
Normal file
330
src/minarch/libretro-common/include/file/config_file.h
Normal file
|
|
@ -0,0 +1,330 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (config_file.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_CONFIG_FILE_H
|
||||
#define __LIBRETRO_SDK_CONFIG_FILE_H
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
#define CONFIG_GET_BOOL_BASE(conf, base, var, key) do { \
|
||||
bool tmp = false; \
|
||||
if (config_get_bool(conf, key, &tmp)) \
|
||||
base->var = tmp; \
|
||||
} while(0)
|
||||
|
||||
#define CONFIG_GET_INT_BASE(conf, base, var, key) do { \
|
||||
int tmp = 0; \
|
||||
if (config_get_int(conf, key, &tmp)) \
|
||||
base->var = tmp; \
|
||||
} while(0)
|
||||
|
||||
#define CONFIG_GET_FLOAT_BASE(conf, base, var, key) do { \
|
||||
float tmp = 0.0f; \
|
||||
if (config_get_float(conf, key, &tmp)) \
|
||||
base->var = tmp; \
|
||||
} while(0)
|
||||
|
||||
struct config_file
|
||||
{
|
||||
char *path;
|
||||
struct config_entry_list **entries_map;
|
||||
struct config_entry_list *entries;
|
||||
struct config_entry_list *tail;
|
||||
struct config_entry_list *last;
|
||||
struct config_include_list *includes;
|
||||
struct path_linked_list *references;
|
||||
unsigned include_depth;
|
||||
bool guaranteed_no_duplicates;
|
||||
bool modified;
|
||||
};
|
||||
|
||||
typedef struct config_file config_file_t;
|
||||
|
||||
struct config_file_cb
|
||||
{
|
||||
void (*config_file_new_entry_cb)(char*, char*);
|
||||
};
|
||||
|
||||
typedef struct config_file_cb config_file_cb_t ;
|
||||
|
||||
/* Config file format
|
||||
* - # are treated as comments. Rest of the line is ignored.
|
||||
* - Format is: key = value. There can be as many spaces as you like in-between.
|
||||
* - Value can be wrapped inside "" for multiword strings. (foo = "hai u")
|
||||
* - #include includes a config file in-place.
|
||||
*
|
||||
* Path is relative to where config file was loaded unless an absolute path is chosen.
|
||||
* Key/value pairs from an #include are read-only, and cannot be modified.
|
||||
*/
|
||||
|
||||
/**
|
||||
* config_file_new:
|
||||
*
|
||||
* Loads a config file.
|
||||
* If @path is NULL, will create an empty config file.
|
||||
*
|
||||
* @return Returns NULL if file doesn't exist.
|
||||
**/
|
||||
config_file_t *config_file_new(const char *path);
|
||||
|
||||
config_file_t *config_file_new_alloc(void);
|
||||
|
||||
/**
|
||||
* config_file_initialize:
|
||||
*
|
||||
* Leaf function.
|
||||
**/
|
||||
void config_file_initialize(struct config_file *conf);
|
||||
|
||||
/**
|
||||
* config_file_new_with_callback:
|
||||
*
|
||||
* Loads a config file.
|
||||
* If @path is NULL, will create an empty config file.
|
||||
* Includes cb callbacks to run custom code during config file processing.
|
||||
*
|
||||
* @return Returns NULL if file doesn't exist.
|
||||
**/
|
||||
config_file_t *config_file_new_with_callback(
|
||||
const char *path, config_file_cb_t *cb);
|
||||
|
||||
/**
|
||||
* config_file_new_from_string:
|
||||
*
|
||||
* Load a config file from a string.
|
||||
*
|
||||
* NOTE: This will modify @from_string.
|
||||
* Pass a copy of source string if original
|
||||
* contents must be preserved
|
||||
**/
|
||||
config_file_t *config_file_new_from_string(char *from_string,
|
||||
const char *path);
|
||||
|
||||
config_file_t *config_file_new_from_path_to_string(const char *path);
|
||||
|
||||
/**
|
||||
* config_file_free:
|
||||
*
|
||||
* Frees config file.
|
||||
**/
|
||||
void config_file_free(config_file_t *conf);
|
||||
|
||||
void config_file_add_reference(config_file_t *conf, char *path);
|
||||
|
||||
bool config_file_deinitialize(config_file_t *conf);
|
||||
|
||||
/**
|
||||
* config_append_file:
|
||||
*
|
||||
* Loads a new config, and appends its data to @conf.
|
||||
* The key-value pairs of the new config file takes priority over the old.
|
||||
**/
|
||||
bool config_append_file(config_file_t *conf, const char *path);
|
||||
|
||||
/* All extract functions return true when value is valid and exists.
|
||||
* Returns false otherwise. */
|
||||
|
||||
struct config_entry_list
|
||||
{
|
||||
char *key;
|
||||
char *value;
|
||||
struct config_entry_list *next;
|
||||
/* If we got this from an #include,
|
||||
* do not allow overwrite. */
|
||||
bool readonly;
|
||||
};
|
||||
|
||||
struct config_file_entry
|
||||
{
|
||||
const char *key;
|
||||
const char *value;
|
||||
/* Used intentionally. Opaque here. */
|
||||
const struct config_entry_list *next;
|
||||
};
|
||||
|
||||
struct config_entry_list *config_get_entry(
|
||||
const config_file_t *conf, const char *key);
|
||||
|
||||
/**
|
||||
* config_get_entry_list_head:
|
||||
*
|
||||
* Leaf function.
|
||||
**/
|
||||
bool config_get_entry_list_head(config_file_t *conf,
|
||||
struct config_file_entry *entry);
|
||||
|
||||
/**
|
||||
* config_get_entry_list_next:
|
||||
*
|
||||
* Leaf function.
|
||||
**/
|
||||
bool config_get_entry_list_next(struct config_file_entry *entry);
|
||||
|
||||
/**
|
||||
* config_get_double:
|
||||
*
|
||||
* Extracts a double from config file.
|
||||
*
|
||||
* Hidden non-leaf function cost:
|
||||
* - Calls config_get_entry()
|
||||
* - Calls strtod
|
||||
*
|
||||
* @return True if double found, otherwise false.
|
||||
**/
|
||||
bool config_get_double(config_file_t *conf, const char *entry, double *in);
|
||||
|
||||
/**
|
||||
* config_get_float:
|
||||
*
|
||||
* Extracts a float from config file.
|
||||
*
|
||||
* Hidden non-leaf function cost:
|
||||
* - Calls config_get_entry()
|
||||
* - Calls strtod
|
||||
*
|
||||
* @return true if found, otherwise false.
|
||||
**/
|
||||
bool config_get_float(config_file_t *conf, const char *entry, float *in);
|
||||
|
||||
/* Extracts an int from config file. */
|
||||
bool config_get_int(config_file_t *conf, const char *entry, int *in);
|
||||
|
||||
/* Extracts an uint from config file. */
|
||||
bool config_get_uint(config_file_t *conf, const char *entry, unsigned *in);
|
||||
|
||||
/* Extracts an size_t from config file. */
|
||||
bool config_get_size_t(config_file_t *conf, const char *key, size_t *in);
|
||||
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L
|
||||
/* Extracts an uint64 from config file. */
|
||||
bool config_get_uint64(config_file_t *conf, const char *entry, uint64_t *in);
|
||||
#endif
|
||||
|
||||
/* Extracts an unsigned int from config file treating input as hex. */
|
||||
bool config_get_hex(config_file_t *conf, const char *entry, unsigned *in);
|
||||
|
||||
/**
|
||||
* config_get_char:
|
||||
*
|
||||
* Extracts a single char from config file.
|
||||
* If value consists of several chars, this is an error.
|
||||
*
|
||||
* Hidden non-leaf function cost:
|
||||
* - Calls config_get_entry()
|
||||
*
|
||||
* @return true if found, otherwise false.
|
||||
**/
|
||||
bool config_get_char(config_file_t *conf, const char *entry, char *in);
|
||||
|
||||
/**
|
||||
* config_get_string:
|
||||
*
|
||||
* Extracts an allocated string in *in. This must be free()-d if
|
||||
* this function succeeds.
|
||||
*
|
||||
* Hidden non-leaf function cost:
|
||||
* - Calls config_get_entry()
|
||||
* - Calls strdup
|
||||
*
|
||||
* @return true if found, otherwise false.
|
||||
**/
|
||||
bool config_get_string(config_file_t *conf, const char *entry, char **in);
|
||||
|
||||
/* Extracts a string to a preallocated buffer. Avoid memory allocation. */
|
||||
bool config_get_array(config_file_t *conf, const char *entry, char *s, size_t len);
|
||||
|
||||
/**
|
||||
* config_get_config_path:
|
||||
*
|
||||
* Extracts a string to a preallocated buffer.
|
||||
* Avoid memory allocation.
|
||||
*
|
||||
* Hidden non-leaf function cost:
|
||||
* - Calls strlcpy
|
||||
**/
|
||||
bool config_get_config_path(config_file_t *conf, char *s, size_t len);
|
||||
|
||||
/* Extracts a string to a preallocated buffer. Avoid memory allocation.
|
||||
* Recognized magic like ~/. Similar to config_get_array() otherwise. */
|
||||
bool config_get_path(config_file_t *conf, const char *entry, char *s, size_t len);
|
||||
|
||||
/**
|
||||
* config_get_bool:
|
||||
*
|
||||
* Extracts a boolean from config.
|
||||
* Valid boolean true are "true" and "1". Valid false are "false" and "0".
|
||||
* Other values will be treated as an error.
|
||||
*
|
||||
* Hidden non-leaf function cost:
|
||||
* - Calls string_is_equal() x times
|
||||
*
|
||||
* @return true if preconditions are true, otherwise false.
|
||||
**/
|
||||
bool config_get_bool(config_file_t *conf, const char *entry, bool *in);
|
||||
|
||||
/* Setters. Similar to the getters.
|
||||
* Will not write to entry if the entry was obtained from an #include. */
|
||||
void config_set_double(config_file_t *conf, const char *entry, double value);
|
||||
void config_set_float(config_file_t *conf, const char *entry, float value);
|
||||
void config_set_int(config_file_t *conf, const char *entry, int val);
|
||||
void config_set_hex(config_file_t *conf, const char *entry, unsigned val);
|
||||
void config_set_uint64(config_file_t *conf, const char *entry, uint64_t val);
|
||||
void config_set_char(config_file_t *conf, const char *entry, char val);
|
||||
void config_set_string(config_file_t *conf, const char *entry, const char *val);
|
||||
void config_unset(config_file_t *conf, const char *key);
|
||||
void config_set_path(config_file_t *conf, const char *entry, const char *val);
|
||||
|
||||
/**
|
||||
* config_set_bool:
|
||||
|
||||
* TODO/FIXME - could be turned into a trivial macro or removed
|
||||
**/
|
||||
void config_set_bool(config_file_t *conf, const char *entry, bool val);
|
||||
|
||||
void config_set_uint(config_file_t *conf, const char *key, unsigned int val);
|
||||
|
||||
/**
|
||||
* config_file_write:
|
||||
*
|
||||
* Write the current config to a file.
|
||||
**/
|
||||
bool config_file_write(config_file_t *conf, const char *path, bool val);
|
||||
|
||||
/**
|
||||
* config_file_dump:
|
||||
*
|
||||
* Dump the current config to an already opened file.
|
||||
* Does not close the file.
|
||||
**/
|
||||
void config_file_dump(config_file_t *conf, FILE *file, bool val);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (config_file_userdata.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _LIBRETRO_SDK_CONFIG_FILE_USERDATA_H
|
||||
#define _LIBRETRO_SDK_CONFIG_FILE_USERDATA_H
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <file/config_file.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
struct config_file_userdata
|
||||
{
|
||||
config_file_t *conf;
|
||||
const char *prefix[2];
|
||||
};
|
||||
|
||||
int config_userdata_get_float(void *userdata, const char *key_str,
|
||||
float *value, float default_value);
|
||||
|
||||
int config_userdata_get_int(void *userdata, const char *key_str,
|
||||
int *value, int default_value);
|
||||
|
||||
int config_userdata_get_hex(void *userdata, const char *key_str,
|
||||
unsigned *value, unsigned default_value);
|
||||
|
||||
int config_userdata_get_float_array(void *userdata, const char *key_str,
|
||||
float **values, unsigned *out_num_values,
|
||||
const float *default_values, unsigned num_default_values);
|
||||
|
||||
int config_userdata_get_int_array(void *userdata, const char *key_str,
|
||||
int **values, unsigned *out_num_values,
|
||||
const int *default_values, unsigned num_default_values);
|
||||
|
||||
int config_userdata_get_string(void *userdata, const char *key_str,
|
||||
char **output, const char *default_output);
|
||||
|
||||
void config_userdata_free(void *ptr);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
679
src/minarch/libretro-common/include/file/file_path.h
Normal file
679
src/minarch/libretro-common/include/file/file_path.h
Normal file
|
|
@ -0,0 +1,679 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (file_path.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_FILE_PATH_H
|
||||
#define __LIBRETRO_SDK_FILE_PATH_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <libretro.h>
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
#define PATH_REQUIRED_VFS_VERSION 3
|
||||
|
||||
void path_vfs_init(const struct retro_vfs_interface_info* vfs_info);
|
||||
|
||||
/* Order in this enum is equivalent to negative sort order in filelist
|
||||
* (i.e. DIRECTORY is on top of PLAIN_FILE) */
|
||||
enum
|
||||
{
|
||||
RARCH_FILETYPE_UNSET,
|
||||
RARCH_PLAIN_FILE,
|
||||
RARCH_COMPRESSED_FILE_IN_ARCHIVE,
|
||||
RARCH_COMPRESSED_ARCHIVE,
|
||||
RARCH_DIRECTORY,
|
||||
RARCH_FILE_UNSUPPORTED
|
||||
};
|
||||
|
||||
struct path_linked_list
|
||||
{
|
||||
char *path;
|
||||
struct path_linked_list *next;
|
||||
};
|
||||
|
||||
/**
|
||||
* Create a new linked list with one item in it
|
||||
* The path on this item will be set to NULL
|
||||
**/
|
||||
struct path_linked_list* path_linked_list_new(void);
|
||||
|
||||
/* Free the entire linked list */
|
||||
void path_linked_list_free(struct path_linked_list *in_path_linked_list);
|
||||
|
||||
/**
|
||||
* Add a node to the linked list with this path
|
||||
* If the first node's path if it's not yet set,
|
||||
* set this instead
|
||||
**/
|
||||
void path_linked_list_add_path(struct path_linked_list *in_path_linked_list, char *path);
|
||||
|
||||
/**
|
||||
* path_is_compressed_file:
|
||||
* @path : path
|
||||
*
|
||||
* Checks if path is a compressed file.
|
||||
*
|
||||
* Returns: true (1) if path is a compressed file, otherwise false (0).
|
||||
**/
|
||||
bool path_is_compressed_file(const char *path);
|
||||
|
||||
/**
|
||||
* path_contains_compressed_file:
|
||||
* @path : path
|
||||
*
|
||||
* Checks if path contains a compressed file.
|
||||
*
|
||||
* Currently we only check for hash symbol (#) inside the pathname.
|
||||
* If path is ever expanded to a general URI, we should check for that here.
|
||||
*
|
||||
* Example: Somewhere in the path there might be a compressed file
|
||||
* E.g.: /path/to/file.7z#mygame.img
|
||||
*
|
||||
* Returns: true (1) if path contains compressed file, otherwise false (0).
|
||||
**/
|
||||
#define path_contains_compressed_file(path) (path_get_archive_delim((path)) != NULL)
|
||||
|
||||
/**
|
||||
* path_get_archive_delim:
|
||||
* @path : path
|
||||
*
|
||||
* Find delimiter of an archive file. Only the first '#'
|
||||
* after a compression extension is considered.
|
||||
*
|
||||
* @return pointer to the delimiter in the path if it contains
|
||||
* a path inside a compressed file, otherwise NULL.
|
||||
**/
|
||||
const char *path_get_archive_delim(const char *path);
|
||||
|
||||
/**
|
||||
* path_get_extension:
|
||||
* @path : path
|
||||
*
|
||||
* Gets extension of file. Only '.'s
|
||||
* after the last slash are considered.
|
||||
*
|
||||
* Hidden non-leaf function cost:
|
||||
* - calls string_is_empty()
|
||||
* - calls strrchr
|
||||
*
|
||||
* @return extension part from the path.
|
||||
**/
|
||||
const char *path_get_extension(const char *path);
|
||||
|
||||
/**
|
||||
* path_get_extension_mutable:
|
||||
* @path : path
|
||||
*
|
||||
* Specialized version of path_get_extension(). Return
|
||||
* value is mutable.
|
||||
*
|
||||
* Gets extension of file. Only '.'s
|
||||
* after the last slash are considered.
|
||||
*
|
||||
* @return extension part from the path.
|
||||
**/
|
||||
char *path_get_extension_mutable(const char *path);
|
||||
|
||||
/**
|
||||
* path_remove_extension:
|
||||
* @path : path
|
||||
*
|
||||
* Mutates path by removing its extension. Removes all
|
||||
* text after and including the last '.'.
|
||||
* Only '.'s after the last slash are considered.
|
||||
*
|
||||
* Hidden non-leaf function cost:
|
||||
* - calls strrchr
|
||||
*
|
||||
* @return
|
||||
* 1) If path has an extension, returns path with the
|
||||
* extension removed.
|
||||
* 2) If there is no extension, returns NULL.
|
||||
* 3) If path is empty or NULL, returns NULL
|
||||
*/
|
||||
char *path_remove_extension(char *path);
|
||||
|
||||
/**
|
||||
* path_basename:
|
||||
* @path : path
|
||||
*
|
||||
* Get basename from @path.
|
||||
*
|
||||
* Hidden non-leaf function cost:
|
||||
* - Calls path_get_archive_delim()
|
||||
* - can call find_last_slash() once if it returns NULL
|
||||
*
|
||||
* @return basename from path.
|
||||
**/
|
||||
const char *path_basename(const char *path);
|
||||
|
||||
/**
|
||||
* path_basename_nocompression:
|
||||
* @path : path
|
||||
*
|
||||
* Specialized version of path_basename().
|
||||
* Get basename from @path.
|
||||
*
|
||||
* Hidden non-leaf function cost:
|
||||
* - Calls find_last_slash()
|
||||
*
|
||||
* @return basename from path.
|
||||
**/
|
||||
const char *path_basename_nocompression(const char *path);
|
||||
|
||||
/**
|
||||
* path_basedir:
|
||||
* @path : path
|
||||
*
|
||||
* Extracts base directory by mutating path.
|
||||
* Keeps trailing '/'.
|
||||
**/
|
||||
void path_basedir(char *path);
|
||||
|
||||
/**
|
||||
* path_parent_dir:
|
||||
* @path : path
|
||||
* @len : length of @path
|
||||
*
|
||||
* Extracts parent directory by mutating path.
|
||||
* Assumes that path is a directory. Keeps trailing '/'.
|
||||
* If the path was already at the root directory, returns empty string
|
||||
**/
|
||||
void path_parent_dir(char *path, size_t len);
|
||||
|
||||
/**
|
||||
* path_resolve_realpath:
|
||||
* @buf : input and output buffer for path
|
||||
* @size : size of buffer
|
||||
* @resolve_symlinks : whether to resolve symlinks or not
|
||||
*
|
||||
* Resolves use of ".", "..", multiple slashes etc in absolute paths.
|
||||
*
|
||||
* Relative paths are rebased on the current working dir.
|
||||
*
|
||||
* @return @buf if successful, NULL otherwise.
|
||||
* Note: Not implemented on consoles
|
||||
* Note: Symlinks are only resolved on Unix-likes
|
||||
* Note: The current working dir might not be what you expect,
|
||||
* e.g. on Android it is "/"
|
||||
* Use of fill_pathname_resolve_relative() should be prefered
|
||||
**/
|
||||
char *path_resolve_realpath(char *buf, size_t size, bool resolve_symlinks);
|
||||
|
||||
/**
|
||||
* path_relative_to:
|
||||
* @out : buffer to write the relative path to
|
||||
* @path : path to be expressed relatively
|
||||
* @base : relative to this
|
||||
* @size : size of output buffer
|
||||
*
|
||||
* Turns @path into a path relative to @base and writes it to @out.
|
||||
*
|
||||
* @base is assumed to be a base directory, i.e. a path ending with '/' or '\'.
|
||||
* Both @path and @base are assumed to be absolute paths without "." or "..".
|
||||
*
|
||||
* E.g. path /a/b/e/f.cgp with base /a/b/c/d/ turns into ../../e/f.cgp
|
||||
*
|
||||
* @return Length of the string copied into @out
|
||||
**/
|
||||
size_t path_relative_to(char *out, const char *path, const char *base,
|
||||
size_t size);
|
||||
|
||||
/**
|
||||
* path_is_absolute:
|
||||
* @path : path
|
||||
*
|
||||
* Checks if @path is an absolute path or a relative path.
|
||||
*
|
||||
* @return true if path is absolute, false if path is relative.
|
||||
**/
|
||||
bool path_is_absolute(const char *path);
|
||||
|
||||
/**
|
||||
* fill_pathname:
|
||||
* @out_path : output path
|
||||
* @in_path : input path
|
||||
* @replace : what to replace
|
||||
* @size : buffer size of output path
|
||||
*
|
||||
* FIXME: Verify
|
||||
*
|
||||
* Replaces filename extension with 'replace' and outputs result to out_path.
|
||||
* The extension here is considered to be the string from the last '.'
|
||||
* to the end.
|
||||
*
|
||||
* Only '.'s after the last slash are considered as extensions.
|
||||
* If no '.' is present, in_path and replace will simply be concatenated.
|
||||
* 'size' is buffer size of 'out_path'.
|
||||
* E.g.: in_path = "/foo/bar/baz/boo.c", replace = ".asm" =>
|
||||
* out_path = "/foo/bar/baz/boo.asm"
|
||||
* E.g.: in_path = "/foo/bar/baz/boo.c", replace = "" =>
|
||||
* out_path = "/foo/bar/baz/boo"
|
||||
*
|
||||
* Hidden non-leaf function cost:
|
||||
* - calls strlcpy 2x
|
||||
* - calls strrchr
|
||||
* - calls strlcat
|
||||
*
|
||||
* @return Length of the string copied into @out
|
||||
*/
|
||||
size_t fill_pathname(char *out_path, const char *in_path,
|
||||
const char *replace, size_t size);
|
||||
|
||||
/**
|
||||
* fill_dated_filename:
|
||||
* @out_filename : output filename
|
||||
* @ext : extension of output filename
|
||||
* @size : buffer size of output filename
|
||||
*
|
||||
* Creates a 'dated' filename prefixed by 'RetroArch', and
|
||||
* concatenates extension (@ext) to it.
|
||||
*
|
||||
* E.g.:
|
||||
* out_filename = "RetroArch-{month}{day}-{Hours}{Minutes}.{@ext}"
|
||||
*
|
||||
* Hidden non-leaf function cost:
|
||||
* - Calls rtime_localtime()
|
||||
* - Calls strftime
|
||||
* - Calls strlcat
|
||||
*
|
||||
**/
|
||||
size_t fill_dated_filename(char *out_filename,
|
||||
const char *ext, size_t size);
|
||||
|
||||
/**
|
||||
* fill_str_dated_filename:
|
||||
* @out_filename : output filename
|
||||
* @in_str : input string
|
||||
* @ext : extension of output filename
|
||||
* @size : buffer size of output filename
|
||||
*
|
||||
* Creates a 'dated' filename prefixed by the string @in_str, and
|
||||
* concatenates extension (@ext) to it.
|
||||
*
|
||||
* E.g.:
|
||||
* out_filename = "RetroArch-{year}{month}{day}-{Hour}{Minute}{Second}.{@ext}"
|
||||
*
|
||||
* Hidden non-leaf function cost:
|
||||
* - Calls time
|
||||
* - Calls rtime_localtime()
|
||||
* - Calls strlcpy
|
||||
* - Calls string_is_empty()
|
||||
* - Calls strftime
|
||||
* - Calls strlcat at least 2x
|
||||
*
|
||||
* @return Length of the string copied into @out_path
|
||||
**/
|
||||
size_t fill_str_dated_filename(char *out_filename,
|
||||
const char *in_str, const char *ext, size_t size);
|
||||
|
||||
/**
|
||||
* find_last_slash:
|
||||
* @str : path
|
||||
* @size : size of path
|
||||
*
|
||||
* Find last slash in path. Tries to find
|
||||
* a backslash on Windows too which takes precedence
|
||||
* over regular slash.
|
||||
|
||||
* Hidden non-leaf function cost:
|
||||
* - calls strrchr
|
||||
*
|
||||
* @return pointer to last slash/backslash found in @str.
|
||||
**/
|
||||
char *find_last_slash(const char *str);
|
||||
|
||||
/**
|
||||
* fill_pathname_dir:
|
||||
* @in_dir : input directory path
|
||||
* @in_basename : input basename to be appended to @in_dir
|
||||
* @replace : replacement to be appended to @in_basename
|
||||
* @size : size of buffer
|
||||
*
|
||||
* Appends basename of 'in_basename', to 'in_dir', along with 'replace'.
|
||||
* Basename of in_basename is the string after the last '/' or '\\',
|
||||
* i.e the filename without directories.
|
||||
*
|
||||
* If in_basename has no '/' or '\\', the whole 'in_basename' will be used.
|
||||
* 'size' is buffer size of 'in_dir'.
|
||||
*
|
||||
* E.g..: in_dir = "/tmp/some_dir", in_basename = "/some_content/foo.c",
|
||||
* replace = ".asm" => in_dir = "/tmp/some_dir/foo.c.asm"
|
||||
*
|
||||
* Hidden non-leaf function cost:
|
||||
* - Calls fill_pathname_slash()
|
||||
* - Calls path_basename()
|
||||
* - Calls strlcat 2x
|
||||
**/
|
||||
size_t fill_pathname_dir(char *in_dir, const char *in_basename,
|
||||
const char *replace, size_t size);
|
||||
|
||||
/**
|
||||
* fill_pathname_base:
|
||||
* @out : output path
|
||||
* @in_path : input path
|
||||
* @size : size of output path
|
||||
*
|
||||
* Copies basename of @in_path into @out_path.
|
||||
*
|
||||
* Hidden non-leaf function cost:
|
||||
* - Calls path_basename()
|
||||
* - Calls strlcpy
|
||||
*
|
||||
* @return length of the string copied into @out
|
||||
**/
|
||||
size_t fill_pathname_base(char *out_path, const char *in_path, size_t size);
|
||||
|
||||
/**
|
||||
* fill_pathname_basedir:
|
||||
* @out_dir : output directory
|
||||
* @in_path : input path
|
||||
* @size : size of output directory
|
||||
*
|
||||
* Copies base directory of @in_path into @out_path.
|
||||
* If in_path is a path without any slashes (relative current directory),
|
||||
* @out_path will get path "./".
|
||||
*
|
||||
* Hidden non-leaf function cost:
|
||||
* - Calls strlcpy
|
||||
* - Calls path_basedir()
|
||||
**/
|
||||
void fill_pathname_basedir(char *out_path, const char *in_path, size_t size);
|
||||
|
||||
/**
|
||||
* fill_pathname_parent_dir_name:
|
||||
* @out_dir : output directory
|
||||
* @in_dir : input directory
|
||||
* @size : size of output directory
|
||||
*
|
||||
* Copies only the parent directory name of @in_dir into @out_dir.
|
||||
* The two buffers must not overlap. Removes trailing '/'.
|
||||
*
|
||||
* Hidden non-leaf function cost:
|
||||
* - Calls strdup
|
||||
* - Calls find_last_slash() x times
|
||||
* - Can call strlcpy
|
||||
*
|
||||
* @return true on success, false if a slash was not found in the path.
|
||||
**/
|
||||
bool fill_pathname_parent_dir_name(char *out_dir,
|
||||
const char *in_dir, size_t size);
|
||||
|
||||
/**
|
||||
* fill_pathname_parent_dir:
|
||||
* @out_dir : output directory
|
||||
* @in_dir : input directory
|
||||
* @size : size of output directory
|
||||
*
|
||||
* Copies parent directory of @in_dir into @out_dir.
|
||||
* Assumes @in_dir is a directory. Keeps trailing '/'.
|
||||
* If the path was already at the root directory, @out_dir will be an empty string.
|
||||
*
|
||||
* Hidden non-leaf function cost:
|
||||
* - Can call strlcpy if (@out_dir != @in_dir)
|
||||
* - Calls strlen if (@out_dir == @in_dir)
|
||||
* - Calls path_parent_dir()
|
||||
**/
|
||||
void fill_pathname_parent_dir(char *out_dir,
|
||||
const char *in_dir, size_t size);
|
||||
|
||||
/**
|
||||
* fill_pathname_resolve_relative:
|
||||
* @out_path : output path
|
||||
* @in_refpath : input reference path
|
||||
* @in_path : input path
|
||||
* @size : size of @out_path
|
||||
*
|
||||
* Joins basedir of @in_refpath together with @in_path.
|
||||
* If @in_path is an absolute path, out_path = in_path.
|
||||
* E.g.: in_refpath = "/foo/bar/baz.a", in_path = "foobar.cg",
|
||||
* out_path = "/foo/bar/foobar.cg".
|
||||
**/
|
||||
void fill_pathname_resolve_relative(char *out_path, const char *in_refpath,
|
||||
const char *in_path, size_t size);
|
||||
|
||||
/**
|
||||
* fill_pathname_join:
|
||||
* @out_path : output path
|
||||
* @dir : directory
|
||||
* @path : path
|
||||
* @size : size of output path
|
||||
*
|
||||
* Joins a directory (@dir) and path (@path) together.
|
||||
* Makes sure not to get two consecutive slashes
|
||||
* between directory and path.
|
||||
*
|
||||
* Hidden non-leaf function cost:
|
||||
* - calls strlcpy
|
||||
* - calls fill_pathname_slash()
|
||||
* - calls strlcat
|
||||
*
|
||||
* Deprecated. Use fill_pathname_join_special() instead
|
||||
* if you can ensure @dir != @out_path
|
||||
*
|
||||
* @return Length of the string copied into @out_path
|
||||
**/
|
||||
size_t fill_pathname_join(char *out_path, const char *dir,
|
||||
const char *path, size_t size);
|
||||
|
||||
/**
|
||||
* fill_pathname_join_special:
|
||||
* @out_path : output path
|
||||
* @dir : directory. Cannot be identical to @out_path
|
||||
* @path : path
|
||||
* @size : size of output path
|
||||
*
|
||||
*
|
||||
* Specialized version of fill_pathname_join.
|
||||
* Unlike fill_pathname_join(),
|
||||
* @dir and @out_path CANNOT be identical.
|
||||
*
|
||||
* Joins a directory (@dir) and path (@path) together.
|
||||
* Makes sure not to get two consecutive slashes
|
||||
* between directory and path.
|
||||
*
|
||||
* Hidden non-leaf function cost:
|
||||
* - calls strlcpy
|
||||
* - calls find_last_slash()
|
||||
* - calls strlcat
|
||||
*
|
||||
* @return Length of the string copied into @out_path
|
||||
**/
|
||||
size_t fill_pathname_join_special(char *out_path,
|
||||
const char *dir, const char *path, size_t size);
|
||||
|
||||
size_t fill_pathname_join_special_ext(char *out_path,
|
||||
const char *dir, const char *path,
|
||||
const char *last, const char *ext,
|
||||
size_t size);
|
||||
|
||||
/**
|
||||
* fill_pathname_join_delim:
|
||||
* @out_path : output path
|
||||
* @dir : directory
|
||||
* @path : path
|
||||
* @delim : delimiter
|
||||
* @size : size of output path
|
||||
*
|
||||
* Joins a directory (@dir) and path (@path) together
|
||||
* using the given delimiter (@delim).
|
||||
*
|
||||
* Hidden non-leaf function cost:
|
||||
* - can call strlen
|
||||
* - can call strlcpy
|
||||
* - can call strlcat
|
||||
**/
|
||||
size_t fill_pathname_join_delim(char *out_path, const char *dir,
|
||||
const char *path, const char delim, size_t size);
|
||||
|
||||
size_t fill_pathname_expand_special(char *out_path,
|
||||
const char *in_path, size_t size);
|
||||
|
||||
size_t fill_pathname_abbreviate_special(char *out_path,
|
||||
const char *in_path, size_t size);
|
||||
|
||||
/**
|
||||
* fill_pathname_abbreviated_or_relative:
|
||||
*
|
||||
* Fills the supplied path with either the abbreviated path or
|
||||
* the relative path, which ever one has less depth / number of slashes
|
||||
*
|
||||
* If lengths of abbreviated and relative paths are the same,
|
||||
* the relative path will be used
|
||||
* @in_path can be an absolute, relative or abbreviated path
|
||||
*
|
||||
* @return Length of the string copied into @out_path
|
||||
**/
|
||||
size_t fill_pathname_abbreviated_or_relative(char *out_path,
|
||||
const char *in_refpath, const char *in_path, size_t size);
|
||||
|
||||
/**
|
||||
* pathname_conform_slashes_to_os:
|
||||
*
|
||||
* @path : path
|
||||
*
|
||||
* Leaf function.
|
||||
*
|
||||
* Changes the slashes to the correct kind for the os
|
||||
* So forward slash on linux and backslash on Windows
|
||||
**/
|
||||
void pathname_conform_slashes_to_os(char *path);
|
||||
|
||||
/**
|
||||
* pathname_make_slashes_portable:
|
||||
* @path : path
|
||||
*
|
||||
* Leaf function.
|
||||
*
|
||||
* Change all slashes to forward so they are more
|
||||
* portable between Windows and Linux
|
||||
**/
|
||||
void pathname_make_slashes_portable(char *path);
|
||||
|
||||
/**
|
||||
* path_basedir:
|
||||
* @path : path
|
||||
*
|
||||
* Extracts base directory by mutating path.
|
||||
* Keeps trailing '/'.
|
||||
**/
|
||||
void path_basedir_wrapper(char *path);
|
||||
|
||||
/**
|
||||
* path_char_is_slash:
|
||||
* @c : character
|
||||
*
|
||||
* Checks if character (@c) is a slash.
|
||||
*
|
||||
* @return true if character is a slash, otherwise false.
|
||||
**/
|
||||
#ifdef _WIN32
|
||||
#define PATH_CHAR_IS_SLASH(c) (((c) == '/') || ((c) == '\\'))
|
||||
#else
|
||||
#define PATH_CHAR_IS_SLASH(c) ((c) == '/')
|
||||
#endif
|
||||
|
||||
/**
|
||||
* path_default_slash and path_default_slash_c:
|
||||
*
|
||||
* Gets the default slash separator.
|
||||
*
|
||||
* @return default slash separator.
|
||||
**/
|
||||
#ifdef _WIN32
|
||||
#define PATH_DEFAULT_SLASH() "\\"
|
||||
#define PATH_DEFAULT_SLASH_C() '\\'
|
||||
#else
|
||||
#define PATH_DEFAULT_SLASH() "/"
|
||||
#define PATH_DEFAULT_SLASH_C() '/'
|
||||
#endif
|
||||
|
||||
/**
|
||||
* fill_pathname_slash:
|
||||
* @path : path
|
||||
* @size : size of path
|
||||
*
|
||||
* Assumes path is a directory. Appends a slash
|
||||
* if not already there.
|
||||
|
||||
* Hidden non-leaf function cost:
|
||||
* - calls find_last_slash()
|
||||
* - can call strlcat once if it returns false
|
||||
* - calls strlen
|
||||
**/
|
||||
void fill_pathname_slash(char *path, size_t size);
|
||||
|
||||
#if !defined(RARCH_CONSOLE) && defined(RARCH_INTERNAL)
|
||||
void fill_pathname_application_path(char *buf, size_t size);
|
||||
void fill_pathname_application_dir(char *buf, size_t size);
|
||||
void fill_pathname_home_dir(char *buf, size_t size);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* path_mkdir:
|
||||
* @dir : directory
|
||||
*
|
||||
* Create directory on filesystem.
|
||||
*
|
||||
* Recursive function.
|
||||
*
|
||||
* Hidden non-leaf function cost:
|
||||
* - Calls strdup
|
||||
* - Calls path_parent_dir()
|
||||
* - Calls strcmp
|
||||
* - Calls path_is_directory()
|
||||
* - Calls path_mkdir()
|
||||
*
|
||||
* @return true if directory could be created, otherwise false.
|
||||
**/
|
||||
bool path_mkdir(const char *dir);
|
||||
|
||||
/**
|
||||
* path_is_directory:
|
||||
* @path : path
|
||||
*
|
||||
* Checks if path is a directory.
|
||||
*
|
||||
* @return true if path is a directory, otherwise false.
|
||||
*/
|
||||
bool path_is_directory(const char *path);
|
||||
|
||||
bool path_is_character_special(const char *path);
|
||||
|
||||
int path_stat(const char *path);
|
||||
|
||||
bool path_is_valid(const char *path);
|
||||
|
||||
int32_t path_get_size(const char *path);
|
||||
|
||||
bool is_path_accessible_using_standard_io(const char *path);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
124
src/minarch/libretro-common/include/file/nbio.h
Normal file
124
src/minarch/libretro-common/include/file/nbio.h
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (nbio.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_NBIO_H
|
||||
#define __LIBRETRO_SDK_NBIO_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <boolean.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
#ifndef NBIO_READ
|
||||
#define NBIO_READ 0
|
||||
#endif
|
||||
|
||||
#ifndef NBIO_WRITE
|
||||
#define NBIO_WRITE 1
|
||||
#endif
|
||||
|
||||
#ifndef NBIO_UPDATE
|
||||
#define NBIO_UPDATE 2
|
||||
#endif
|
||||
|
||||
/* these two are blocking; nbio_iterate always returns true, but that operation (or something earlier) may take arbitrarily long */
|
||||
#ifndef BIO_READ
|
||||
#define BIO_READ 3
|
||||
#endif
|
||||
|
||||
#ifndef BIO_WRITE
|
||||
#define BIO_WRITE 4
|
||||
#endif
|
||||
|
||||
typedef struct nbio_intf
|
||||
{
|
||||
void *(*open)(const char * filename, unsigned mode);
|
||||
|
||||
void (*begin_read)(void *data);
|
||||
|
||||
void (*begin_write)(void *data);
|
||||
|
||||
bool (*iterate)(void *data);
|
||||
|
||||
void (*resize)(void *data, size_t len);
|
||||
|
||||
void *(*get_ptr)(void *data, size_t* len);
|
||||
|
||||
void (*cancel)(void *data);
|
||||
|
||||
void (*free)(void *data);
|
||||
|
||||
/* Human readable string. */
|
||||
const char *ident;
|
||||
} nbio_intf_t;
|
||||
|
||||
/*
|
||||
* Creates an nbio structure for performing the
|
||||
* given operation on the given file.
|
||||
*/
|
||||
void *nbio_open(const char * filename, unsigned mode);
|
||||
|
||||
/*
|
||||
* Starts reading the given file. When done, it will be available in nbio_get_ptr.
|
||||
* Can not be done if the structure was created with {N,}BIO_WRITE.
|
||||
*/
|
||||
void nbio_begin_read(void *data);
|
||||
|
||||
/*
|
||||
* Starts writing to the given file. Before this, you should've copied the data to nbio_get_ptr.
|
||||
* Can not be done if the structure was created with {N,}BIO_READ.
|
||||
*/
|
||||
void nbio_begin_write(void *data);
|
||||
|
||||
/*
|
||||
* Performs part of the requested operation, or checks how it's going.
|
||||
* When it returns true, it's done.
|
||||
*/
|
||||
bool nbio_iterate(void *data);
|
||||
|
||||
/*
|
||||
* Resizes the file up to the given size; cannot shrink.
|
||||
* Can not be done if the structure was created with {N,}BIO_READ.
|
||||
*/
|
||||
void nbio_resize(void *data, size_t len);
|
||||
|
||||
/*
|
||||
* Returns a pointer to the file data. Writable only if structure was not created with {N,}BIO_READ.
|
||||
* If any operation is in progress, the pointer will be NULL, but len will still be correct.
|
||||
*/
|
||||
void* nbio_get_ptr(void *data, size_t* len);
|
||||
|
||||
/*
|
||||
* Stops any pending operation, allowing the object to be freed.
|
||||
*/
|
||||
void nbio_cancel(void *data);
|
||||
|
||||
/*
|
||||
* Deletes the nbio structure and its associated pointer.
|
||||
*/
|
||||
void nbio_free(void *data);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
103
src/minarch/libretro-common/include/filters.h
Normal file
103
src/minarch/libretro-common/include/filters.h
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (filters.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _LIBRETRO_SDK_FILTERS_H
|
||||
#define _LIBRETRO_SDK_FILTERS_H
|
||||
|
||||
/* for MSVC; should be benign under any circumstances */
|
||||
#define _USE_MATH_DEFINES
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <retro_inline.h>
|
||||
#include <retro_math.h>
|
||||
|
||||
/**
|
||||
* sinc:
|
||||
*
|
||||
* Pure function.
|
||||
**/
|
||||
static INLINE double sinc(double val)
|
||||
{
|
||||
if (fabs(val) < 0.00001)
|
||||
return 1.0;
|
||||
return sin(val) / val;
|
||||
}
|
||||
|
||||
/**
|
||||
* paeth:
|
||||
*
|
||||
* Pure function.
|
||||
* Paeth prediction filter.
|
||||
**/
|
||||
static INLINE int paeth(int a, int b, int c)
|
||||
{
|
||||
int p = a + b - c;
|
||||
int pa = abs(p - a);
|
||||
int pb = abs(p - b);
|
||||
int pc = abs(p - c);
|
||||
|
||||
if (pa <= pb && pa <= pc)
|
||||
return a;
|
||||
else if (pb <= pc)
|
||||
return b;
|
||||
return c;
|
||||
}
|
||||
|
||||
/**
|
||||
* besseli0:
|
||||
*
|
||||
* Pure function.
|
||||
*
|
||||
* Modified Bessel function of first order.
|
||||
* Check Wiki for mathematical definition ...
|
||||
**/
|
||||
static INLINE double besseli0(double x)
|
||||
{
|
||||
int i;
|
||||
double sum = 0.0;
|
||||
double factorial = 1.0;
|
||||
double factorial_mult = 0.0;
|
||||
double x_pow = 1.0;
|
||||
double two_div_pow = 1.0;
|
||||
double x_sqr = x * x;
|
||||
|
||||
/* Approximate. This is an infinite sum.
|
||||
* Luckily, it converges rather fast. */
|
||||
for (i = 0; i < 18; i++)
|
||||
{
|
||||
sum += x_pow * two_div_pow / (factorial * factorial);
|
||||
factorial_mult += 1.0;
|
||||
x_pow *= x_sqr;
|
||||
two_div_pow *= 0.25;
|
||||
factorial *= factorial_mult;
|
||||
}
|
||||
|
||||
return sum;
|
||||
}
|
||||
|
||||
static INLINE double kaiser_window_function(double index, double beta)
|
||||
{
|
||||
return besseli0(beta * sqrtf(1 - index * index));
|
||||
}
|
||||
|
||||
#endif
|
||||
113
src/minarch/libretro-common/include/formats/cdfs.h
Normal file
113
src/minarch/libretro-common/include/formats/cdfs.h
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (cdfs.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __RARCH_CDFS_H
|
||||
#define __RARCH_CDFS_H
|
||||
|
||||
#include <streams/interface_stream.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
/* these functions provide an interface for locating and reading files within a data track
|
||||
* of a CD (following the ISO-9660 directory structure definition)
|
||||
*/
|
||||
|
||||
typedef struct cdfs_track_t
|
||||
{
|
||||
intfstream_t* stream;
|
||||
unsigned int stream_sector_size;
|
||||
unsigned int stream_sector_header_size;
|
||||
unsigned int first_sector_offset;
|
||||
unsigned int first_sector_index;
|
||||
} cdfs_track_t;
|
||||
|
||||
typedef struct cdfs_file_t
|
||||
{
|
||||
struct cdfs_track_t* track;
|
||||
int first_sector;
|
||||
int current_sector;
|
||||
int sector_buffer_valid;
|
||||
unsigned int current_sector_offset;
|
||||
unsigned int size;
|
||||
unsigned int pos;
|
||||
uint8_t sector_buffer[2048];
|
||||
} cdfs_file_t;
|
||||
|
||||
/* opens the specified file within the CD or virtual CD.
|
||||
* if path is NULL, will open the raw CD (useful for
|
||||
* reading CD without having to worry about sector sizes,
|
||||
* headers, or checksum data)
|
||||
*/
|
||||
int cdfs_open_file(cdfs_file_t* file, cdfs_track_t* stream, const char* path);
|
||||
|
||||
void cdfs_close_file(cdfs_file_t* file);
|
||||
|
||||
int64_t cdfs_read_file(cdfs_file_t* file, void* buffer, uint64_t len);
|
||||
|
||||
int64_t cdfs_get_size(cdfs_file_t* file);
|
||||
|
||||
int64_t cdfs_tell(cdfs_file_t* file);
|
||||
|
||||
int64_t cdfs_seek(cdfs_file_t* file, int64_t offset, int whence);
|
||||
|
||||
void cdfs_seek_sector(cdfs_file_t* file, unsigned int sector);
|
||||
|
||||
uint32_t cdfs_get_num_sectors(cdfs_file_t* file);
|
||||
|
||||
uint32_t cdfs_get_first_sector(cdfs_file_t* file);
|
||||
|
||||
/* opens the specified track in a CD or virtual CD file - the resulting stream should be passed to
|
||||
* cdfs_open_file to get access to a file within the CD.
|
||||
*
|
||||
* supported files:
|
||||
* real CD - path will be in the form "cdrom://drive1.cue" or "cdrom://d:/drive.cue"
|
||||
* bin/cue - path will point to the cue file
|
||||
* chd - path will point to the chd file
|
||||
*
|
||||
* for bin/cue files, the following storage modes are supported:
|
||||
* MODE2/2352
|
||||
* MODE1/2352
|
||||
* MODE1/2048 - untested
|
||||
* MODE2/2336 - untested
|
||||
*/
|
||||
cdfs_track_t* cdfs_open_track(const char* path, unsigned int track_index);
|
||||
|
||||
/* opens the first data track in a CD or virtual CD file. see cdfs_open_track for supported file formats
|
||||
*/
|
||||
cdfs_track_t* cdfs_open_data_track(const char* path);
|
||||
|
||||
/* opens a raw track file for a CD or virtual CD.
|
||||
*
|
||||
* supported files:
|
||||
* real CD - path will be in the form "cdrom://drive1-track01.bin" or "cdrom://d:/drive-track01.bin"
|
||||
* NOTE: cue file for CD must be opened first to populate vfs_cdrom_toc.
|
||||
* bin - path will point to the bin file
|
||||
* iso - path will point to the iso file
|
||||
*/
|
||||
cdfs_track_t* cdfs_open_raw_track(const char* path);
|
||||
|
||||
/* closes the CD or virtual CD track and frees the associated memory */
|
||||
void cdfs_close_track(cdfs_track_t* track);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif /* __RARCH_CDFS_H */
|
||||
102
src/minarch/libretro-common/include/formats/image.h
Normal file
102
src/minarch/libretro-common/include/formats/image.h
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (image.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __RARCH_IMAGE_CONTEXT_H
|
||||
#define __RARCH_IMAGE_CONTEXT_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
enum image_process_code
|
||||
{
|
||||
IMAGE_PROCESS_ERROR = -2,
|
||||
IMAGE_PROCESS_ERROR_END = -1,
|
||||
IMAGE_PROCESS_NEXT = 0,
|
||||
IMAGE_PROCESS_END = 1
|
||||
};
|
||||
|
||||
struct texture_image
|
||||
{
|
||||
uint32_t *pixels;
|
||||
unsigned width;
|
||||
unsigned height;
|
||||
bool supports_rgba;
|
||||
};
|
||||
|
||||
enum image_type_enum
|
||||
{
|
||||
IMAGE_TYPE_NONE = 0,
|
||||
IMAGE_TYPE_PNG,
|
||||
IMAGE_TYPE_JPEG,
|
||||
IMAGE_TYPE_BMP,
|
||||
IMAGE_TYPE_TGA
|
||||
};
|
||||
|
||||
enum image_type_enum image_texture_get_type(const char *path);
|
||||
|
||||
bool image_texture_set_color_shifts(unsigned *r_shift, unsigned *g_shift,
|
||||
unsigned *b_shift, unsigned *a_shift,
|
||||
struct texture_image *out_img);
|
||||
|
||||
bool image_texture_color_convert(unsigned r_shift,
|
||||
unsigned g_shift, unsigned b_shift, unsigned a_shift,
|
||||
struct texture_image *out_img);
|
||||
|
||||
bool image_texture_load_buffer(struct texture_image *img,
|
||||
enum image_type_enum type, void *buffer, size_t buffer_len);
|
||||
|
||||
bool image_texture_load(struct texture_image *img, const char *path);
|
||||
void image_texture_free(struct texture_image *img);
|
||||
|
||||
/* Image transfer */
|
||||
|
||||
void image_transfer_free(void *data, enum image_type_enum type);
|
||||
|
||||
void *image_transfer_new(enum image_type_enum type);
|
||||
|
||||
bool image_transfer_start(void *data, enum image_type_enum type);
|
||||
|
||||
void image_transfer_set_buffer_ptr(
|
||||
void *data,
|
||||
enum image_type_enum type,
|
||||
void *ptr,
|
||||
size_t len);
|
||||
|
||||
int image_transfer_process(
|
||||
void *data,
|
||||
enum image_type_enum type,
|
||||
uint32_t **buf, size_t size,
|
||||
unsigned *width, unsigned *height);
|
||||
|
||||
bool image_transfer_iterate(void *data, enum image_type_enum type);
|
||||
|
||||
bool image_transfer_is_valid(void *data, enum image_type_enum type);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
107
src/minarch/libretro-common/include/formats/logiqx_dat.h
Normal file
107
src/minarch/libretro-common/include/formats/logiqx_dat.h
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (logiqx_dat.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_FORMAT_LOGIQX_DAT_H__
|
||||
#define __LIBRETRO_SDK_FORMAT_LOGIQX_DAT_H__
|
||||
|
||||
#include <retro_common_api.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
/* Trivial handler for DAT files in Logiqx XML format
|
||||
* (http://www.logiqx.com/). Provides bare minimum
|
||||
* functionality - predominantly concerned with obtaining
|
||||
* description text for specific arcade ROM images.
|
||||
*
|
||||
* Note: Also supports the following alternative DAT
|
||||
* formats, since they are functionally identical to
|
||||
* Logiqx XML (but with different element names):
|
||||
* > MAME List XML
|
||||
* > MAME 'Software List' */
|
||||
|
||||
/* Prevent direct access to logiqx_dat_t members */
|
||||
typedef struct logiqx_dat logiqx_dat_t;
|
||||
|
||||
/* Holds all metadata for a single game entry
|
||||
* in the DAT file (minimal at present - may be
|
||||
* expanded with individual internal ROM data
|
||||
* if required) */
|
||||
typedef struct
|
||||
{
|
||||
char name[PATH_MAX_LENGTH];
|
||||
char description[PATH_MAX_LENGTH];
|
||||
char year[8];
|
||||
char manufacturer[128];
|
||||
bool is_bios;
|
||||
bool is_runnable;
|
||||
} logiqx_dat_game_info_t;
|
||||
|
||||
/* Validation */
|
||||
|
||||
/* Performs rudimentary validation of the specified
|
||||
* Logiqx XML DAT file path (not rigorous - just
|
||||
* enough to prevent obvious errors).
|
||||
* Also provides access to file size (DAT files can
|
||||
* be very large, so it is useful to have this information
|
||||
* on hand - i.e. so we can check that the system has
|
||||
* enough free memory to load the file). */
|
||||
bool logiqx_dat_path_is_valid(const char *path, uint64_t *file_size);
|
||||
|
||||
/* File initialisation/de-initialisation */
|
||||
|
||||
/* Loads specified Logiqx XML DAT file from disk.
|
||||
* Returned logiqx_dat_t object must be free'd using
|
||||
* logiqx_dat_free().
|
||||
* Returns NULL if file is invalid or a read error
|
||||
* occurs. */
|
||||
logiqx_dat_t *logiqx_dat_init(const char *path);
|
||||
|
||||
/* Frees specified DAT file */
|
||||
void logiqx_dat_free(logiqx_dat_t *dat_file);
|
||||
|
||||
/* Game information access */
|
||||
|
||||
/* Sets/resets internal node pointer to the first
|
||||
* entry in the DAT file */
|
||||
void logiqx_dat_set_first(logiqx_dat_t *dat_file);
|
||||
|
||||
/* Fetches game information for the current entry
|
||||
* in the DAT file and increments the internal node
|
||||
* pointer.
|
||||
* Returns false if the end of the DAT file has been
|
||||
* reached (in which case 'game_info' will be invalid) */
|
||||
bool logiqx_dat_get_next(
|
||||
logiqx_dat_t *dat_file, logiqx_dat_game_info_t *game_info);
|
||||
|
||||
/* Fetches information for the specified game.
|
||||
* Returns false if game does not exist, or arguments
|
||||
* are invalid. */
|
||||
bool logiqx_dat_search(
|
||||
logiqx_dat_t *dat_file, const char *game_name,
|
||||
logiqx_dat_game_info_t *game_info);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
122
src/minarch/libretro-common/include/formats/m3u_file.h
Normal file
122
src/minarch/libretro-common/include/formats/m3u_file.h
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (m3u_file.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_FORMAT_M3U_FILE_H__
|
||||
#define __LIBRETRO_SDK_FORMAT_M3U_FILE_H__
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <boolean.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
/* Trivial handler for M3U playlist files */
|
||||
|
||||
/* M3U file extension */
|
||||
#define M3U_FILE_EXT "m3u"
|
||||
|
||||
/* Prevent direct access to m3u_file_t members */
|
||||
typedef struct content_m3u_file m3u_file_t;
|
||||
|
||||
/* Holds all metadata for a single M3U file entry */
|
||||
typedef struct
|
||||
{
|
||||
char *path;
|
||||
char *full_path;
|
||||
char *label;
|
||||
} m3u_file_entry_t;
|
||||
|
||||
/* Defines entry label formatting when
|
||||
* writing M3U files to disk */
|
||||
enum m3u_file_label_type
|
||||
{
|
||||
M3U_FILE_LABEL_NONE = 0,
|
||||
M3U_FILE_LABEL_NONSTD,
|
||||
M3U_FILE_LABEL_EXTSTD,
|
||||
M3U_FILE_LABEL_RETRO
|
||||
};
|
||||
|
||||
/* File Initialisation / De-Initialisation */
|
||||
|
||||
/* Creates and initialises an M3U file
|
||||
* - If 'path' refers to an existing file,
|
||||
* contents is parsed
|
||||
* - If path does not exist, an empty M3U file
|
||||
* is created
|
||||
* - Returned m3u_file_t object must be free'd using
|
||||
* m3u_file_free()
|
||||
* - Returns NULL in the event of an error */
|
||||
m3u_file_t *m3u_file_init(const char *path);
|
||||
|
||||
/* Frees specified M3U file */
|
||||
void m3u_file_free(m3u_file_t *m3u_file);
|
||||
|
||||
/* Getters */
|
||||
|
||||
/* Returns M3U file path */
|
||||
char *m3u_file_get_path(m3u_file_t *m3u_file);
|
||||
|
||||
/* Returns number of entries in M3U file */
|
||||
size_t m3u_file_get_size(m3u_file_t *m3u_file);
|
||||
|
||||
/* Fetches specified M3U file entry
|
||||
* - Returns false if 'idx' is invalid, or internal
|
||||
* entry is NULL */
|
||||
bool m3u_file_get_entry(
|
||||
m3u_file_t *m3u_file, size_t idx, m3u_file_entry_t **entry);
|
||||
|
||||
/* Setters */
|
||||
|
||||
/* Adds specified entry to the M3U file
|
||||
* - Returns false if path is invalid, or
|
||||
* memory could not be allocated for the
|
||||
* entry */
|
||||
bool m3u_file_add_entry(
|
||||
m3u_file_t *m3u_file, const char *path, const char *label);
|
||||
|
||||
/* Removes all entries in M3U file */
|
||||
void m3u_file_clear(m3u_file_t *m3u_file);
|
||||
|
||||
/* Saving */
|
||||
|
||||
/* Saves M3U file to disk
|
||||
* - Setting 'label_type' to M3U_FILE_LABEL_NONE
|
||||
* just outputs entry paths - this the most
|
||||
* common format supported by most cores
|
||||
* - Returns false in the event of an error */
|
||||
bool m3u_file_save(
|
||||
m3u_file_t *m3u_file, enum m3u_file_label_type label_type);
|
||||
|
||||
/* Utilities */
|
||||
|
||||
/* Sorts M3U file entries in alphabetical order */
|
||||
void m3u_file_qsort(m3u_file_t *m3u_file);
|
||||
|
||||
/* Returns true if specified path corresponds
|
||||
* to an M3U file (simple convenience function) */
|
||||
bool m3u_file_is_m3u(const char *path);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
66
src/minarch/libretro-common/include/formats/rbmp.h
Normal file
66
src/minarch/libretro-common/include/formats/rbmp.h
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (rbmp.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_FORMAT_RBMP_H__
|
||||
#define __LIBRETRO_SDK_FORMAT_RBMP_H__
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
enum rbmp_source_type
|
||||
{
|
||||
RBMP_SOURCE_TYPE_DONT_CARE,
|
||||
RBMP_SOURCE_TYPE_BGR24,
|
||||
RBMP_SOURCE_TYPE_XRGB888,
|
||||
RBMP_SOURCE_TYPE_RGB565,
|
||||
RBMP_SOURCE_TYPE_ARGB8888
|
||||
};
|
||||
|
||||
typedef struct rbmp rbmp_t;
|
||||
|
||||
bool rbmp_save_image(
|
||||
const char *filename,
|
||||
const void *frame,
|
||||
unsigned width,
|
||||
unsigned height,
|
||||
unsigned pitch,
|
||||
enum rbmp_source_type type);
|
||||
|
||||
int rbmp_process_image(rbmp_t *rbmp, void **buf,
|
||||
size_t size, unsigned *width, unsigned *height);
|
||||
|
||||
void form_bmp_header(uint8_t *header,
|
||||
unsigned width, unsigned height,
|
||||
bool is32bpp);
|
||||
|
||||
bool rbmp_set_buf_ptr(rbmp_t *rbmp, void *data);
|
||||
|
||||
void rbmp_free(rbmp_t *rbmp);
|
||||
|
||||
rbmp_t *rbmp_alloc(void);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
48
src/minarch/libretro-common/include/formats/rjpeg.h
Normal file
48
src/minarch/libretro-common/include/formats/rjpeg.h
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (rjpeg.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_FORMAT_RJPEG_H__
|
||||
#define __LIBRETRO_SDK_FORMAT_RJPEG_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct rjpeg rjpeg_t;
|
||||
|
||||
int rjpeg_process_image(rjpeg_t *rjpeg, void **buf,
|
||||
size_t size, unsigned *width, unsigned *height);
|
||||
|
||||
bool rjpeg_set_buf_ptr(rjpeg_t *rjpeg, void *data);
|
||||
|
||||
void rjpeg_free(rjpeg_t *rjpeg);
|
||||
|
||||
rjpeg_t *rjpeg_alloc(void);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
234
src/minarch/libretro-common/include/formats/rjson.h
Normal file
234
src/minarch/libretro-common/include/formats/rjson.h
Normal file
|
|
@ -0,0 +1,234 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (rjson.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_FORMAT_RJSON_H__
|
||||
#define __LIBRETRO_SDK_FORMAT_RJSON_H__
|
||||
|
||||
#include <retro_common_api.h>
|
||||
#include <boolean.h> /* bool */
|
||||
#include <stddef.h> /* size_t */
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
/* List of possible element types returned by rjson_next */
|
||||
enum rjson_type
|
||||
{
|
||||
RJSON_DONE,
|
||||
RJSON_OBJECT, RJSON_ARRAY, RJSON_OBJECT_END, RJSON_ARRAY_END,
|
||||
RJSON_STRING, RJSON_NUMBER, RJSON_TRUE, RJSON_FALSE, RJSON_NULL,
|
||||
RJSON_ERROR
|
||||
};
|
||||
|
||||
/* Options that can be passed to rjson_set_options */
|
||||
enum rjson_option
|
||||
{
|
||||
/* Allow UTF-8 byte order marks */
|
||||
RJSON_OPTION_ALLOW_UTF8BOM = (1<<0),
|
||||
/* Allow JavaScript style comments in the stream */
|
||||
RJSON_OPTION_ALLOW_COMMENTS = (1<<1),
|
||||
/* Allow unescaped control characters in strings (bytes 0x00 - 0x1F) */
|
||||
RJSON_OPTION_ALLOW_UNESCAPED_CONTROL_CHARACTERS = (1<<2),
|
||||
/* Ignore invalid Unicode escapes and don't validate UTF-8 codes */
|
||||
RJSON_OPTION_IGNORE_INVALID_ENCODING = (1<<3),
|
||||
/* Replace invalid Unicode escapes and UTF-8 codes with a '?' character */
|
||||
RJSON_OPTION_REPLACE_INVALID_ENCODING = (1<<4),
|
||||
/* Ignore carriage return (\r escape sequence) in strings */
|
||||
RJSON_OPTION_IGNORE_STRING_CARRIAGE_RETURN = (1<<5),
|
||||
/* Allow data after the end of the top JSON object/array/value */
|
||||
RJSON_OPTION_ALLOW_TRAILING_DATA = (1<<6)
|
||||
};
|
||||
|
||||
/* Custom data input callback
|
||||
* Should return > 0 and <= len on success, 0 on file end and < 0 on error. */
|
||||
typedef int (*rjson_io_t)(void* buf, int len, void *user_data);
|
||||
typedef struct rjson rjson_t;
|
||||
struct intfstream_internal;
|
||||
struct RFILE;
|
||||
|
||||
/* Create a new parser instance from various sources */
|
||||
rjson_t *rjson_open_stream(struct intfstream_internal *stream);
|
||||
rjson_t *rjson_open_rfile(struct RFILE *rfile);
|
||||
rjson_t *rjson_open_buffer(const void *buffer, size_t size);
|
||||
rjson_t *rjson_open_string(const char *string, size_t len);
|
||||
rjson_t *rjson_open_user(rjson_io_t io, void *user_data, int io_block_size);
|
||||
|
||||
/* Free the parser instance created with rjson_open_* */
|
||||
void rjson_free(rjson_t *json);
|
||||
|
||||
/* Set one or more enum rjson_option, will override previously set options.
|
||||
* Use bitwise OR to concatenate multiple options.
|
||||
* By default none of the options are set. */
|
||||
void rjson_set_options(rjson_t *json, char rjson_option_flags);
|
||||
|
||||
/* Sets the maximum context depth, recursion inside arrays and objects.
|
||||
* By default this is set to 50. */
|
||||
void rjson_set_max_depth(rjson_t *json, unsigned int max_depth);
|
||||
|
||||
/* Parse to the next JSON element and return the type of it.
|
||||
* Will return RJSON_DONE when successfully reaching the end or
|
||||
* RJSON_ERROR when an error was encountered. */
|
||||
enum rjson_type rjson_next(rjson_t *json);
|
||||
|
||||
/* Get the current string, null-terminated unescaped UTF-8 encoded.
|
||||
* Can only be used when the current element is RJSON_STRING or RJSON_NUMBER.
|
||||
* The returned pointer is only valid until the parsing continues. */
|
||||
const char *rjson_get_string(rjson_t *json, size_t *length);
|
||||
|
||||
/* Returns the current number (or string) converted to double or int */
|
||||
double rjson_get_double(rjson_t *json);
|
||||
int rjson_get_int(rjson_t *json);
|
||||
|
||||
/* Returns a string describing the error once rjson_next/rjson_parse
|
||||
* has returned an unrecoverable RJSON_ERROR (otherwise returns ""). */
|
||||
const char *rjson_get_error(rjson_t *json);
|
||||
|
||||
/* Can be used to set a custom error description on an invalid JSON structure.
|
||||
* Maximum length of 79 characters and once set the parsing can't continue. */
|
||||
void rjson_set_error(rjson_t *json, const char* error);
|
||||
|
||||
/* Functions to get the current position in the source stream as well as */
|
||||
/* a bit of source json arround the current position for additional detail
|
||||
* when parsing has failed with RJSON_ERROR.
|
||||
* Intended to be used with printf style formatting like:
|
||||
* printf("Invalid JSON at line %d, column %d - %s - Source: ...%.*s...\n",
|
||||
* (int)rjson_get_source_line(json), (int)rjson_get_source_column(json),
|
||||
* rjson_get_error(json), rjson_get_source_context_len(json),
|
||||
* rjson_get_source_context_buf(json)); */
|
||||
size_t rjson_get_source_line(rjson_t *json);
|
||||
size_t rjson_get_source_column(rjson_t *json);
|
||||
int rjson_get_source_context_len(rjson_t *json);
|
||||
const char* rjson_get_source_context_buf(rjson_t *json);
|
||||
|
||||
/* Confirm the parsing context stack, for example calling
|
||||
rjson_check_context(json, 2, RJSON_OBJECT, RJSON_ARRAY)
|
||||
returns true when inside "{ [ ..." but not for "[ .." or "{ [ { ..." */
|
||||
bool rjson_check_context(rjson_t *json, unsigned int depth, ...);
|
||||
|
||||
/* Returns the current level of nested objects/arrays */
|
||||
unsigned int rjson_get_context_depth(rjson_t *json);
|
||||
|
||||
/* Return the current parsing context, that is, RJSON_OBJECT if we are inside
|
||||
* an object, RJSON_ARRAY if we are inside an array, and RJSON_DONE or
|
||||
* RJSON_ERROR if we are not yet/anymore in either. */
|
||||
enum rjson_type rjson_get_context_type(rjson_t *json);
|
||||
|
||||
/* While inside an object or an array, this return the number of parsing
|
||||
* events that have already been observed at this level with rjson_next.
|
||||
* In particular, inside an object, an odd number would indicate that the just
|
||||
* observed RJSON_STRING event is a member name. */
|
||||
size_t rjson_get_context_count(rjson_t *json);
|
||||
|
||||
/* Parse an entire JSON stream with a list of element specific handlers.
|
||||
* Each of the handlers can be passed a function or NULL to ignore it.
|
||||
* If a handler returns false, the parsing will abort and the returned
|
||||
* rjson_type will indicate on which element type parsing was aborted.
|
||||
* Otherwise the return value will be RJSON_DONE or RJSON_ERROR. */
|
||||
enum rjson_type rjson_parse(rjson_t *json, void* context,
|
||||
bool (*object_member_handler)(void *context, const char *str, size_t len),
|
||||
bool (*string_handler )(void *context, const char *str, size_t len),
|
||||
bool (*number_handler )(void *context, const char *str, size_t len),
|
||||
bool (*start_object_handler )(void *context),
|
||||
bool (*end_object_handler )(void *context),
|
||||
bool (*start_array_handler )(void *context),
|
||||
bool (*end_array_handler )(void *context),
|
||||
bool (*boolean_handler )(void *context, bool value),
|
||||
bool (*null_handler )(void *context));
|
||||
|
||||
/* A simpler interface to parse a JSON in memory. This will avoid any memory
|
||||
* allocations unless the document contains strings longer than 512 characters.
|
||||
* In the error handler, error will be "" if any of the other handlers aborted. */
|
||||
bool rjson_parse_quick(const char *string, size_t len, void* context, char option_flags,
|
||||
bool (*object_member_handler)(void *context, const char *str, size_t len),
|
||||
bool (*string_handler )(void *context, const char *str, size_t len),
|
||||
bool (*number_handler )(void *context, const char *str, size_t len),
|
||||
bool (*start_object_handler )(void *context),
|
||||
bool (*end_object_handler )(void *context),
|
||||
bool (*start_array_handler )(void *context),
|
||||
bool (*end_array_handler )(void *context),
|
||||
bool (*boolean_handler )(void *context, bool value),
|
||||
bool (*null_handler )(void *context),
|
||||
void (*error_handler )(void *context, int line, int col, const char* error));
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
/* Options that can be passed to rjsonwriter_set_options */
|
||||
enum rjsonwriter_option
|
||||
{
|
||||
/* Don't write spaces, tabs or newlines to the output (except in strings) */
|
||||
RJSONWRITER_OPTION_SKIP_WHITESPACE = (1<<0)
|
||||
};
|
||||
|
||||
/* Custom data output callback
|
||||
* Should return len on success and < len on a write error. */
|
||||
typedef int (*rjsonwriter_io_t)(const void* buf, int len, void *user_data);
|
||||
typedef struct rjsonwriter rjsonwriter_t;
|
||||
|
||||
/* Create a new writer instance to various targets */
|
||||
rjsonwriter_t *rjsonwriter_open_stream(struct intfstream_internal *stream);
|
||||
rjsonwriter_t *rjsonwriter_open_rfile(struct RFILE *rfile);
|
||||
rjsonwriter_t *rjsonwriter_open_memory(void);
|
||||
rjsonwriter_t *rjsonwriter_open_user(rjsonwriter_io_t io, void *user_data);
|
||||
|
||||
/* When opened with rjsonwriter_open_memory, will return the generated JSON.
|
||||
* Result is always null-terminated. Passed len can be NULL if not needed,
|
||||
* otherwise returned len will be string length without null-terminator.
|
||||
* Returns NULL if writing ran out of memory or not opened from memory.
|
||||
* Returned buffer is only valid until writer is modified or freed. */
|
||||
char* rjsonwriter_get_memory_buffer(rjsonwriter_t *writer, int* len);
|
||||
|
||||
/* Free rjsonwriter handle and return result of final rjsonwriter_flush call */
|
||||
bool rjsonwriter_free(rjsonwriter_t *writer);
|
||||
|
||||
/* Set one or more enum rjsonwriter_option, will override previously set options.
|
||||
* Use bitwise OR to concatenate multiple options.
|
||||
* By default none of the options are set. */
|
||||
void rjsonwriter_set_options(rjsonwriter_t *writer, int rjsonwriter_option_flags);
|
||||
|
||||
/* Flush any buffered output data to the output stream.
|
||||
* Returns true if the data was successfully written. Once writing fails once,
|
||||
* no more data will be written and flush will always returns false */
|
||||
bool rjsonwriter_flush(rjsonwriter_t *writer);
|
||||
|
||||
/* Returns a string describing an error or "" if there was none.
|
||||
* The only error possible is "output error" after the io function failed.
|
||||
* If rjsonwriter_rawf were used manually, "out of memory" is also possible. */
|
||||
const char *rjsonwriter_get_error(rjsonwriter_t *writer);
|
||||
|
||||
/* Used by the inline functions below to append raw data */
|
||||
void rjsonwriter_raw(rjsonwriter_t *writer, const char *buf, int len);
|
||||
void rjsonwriter_rawf(rjsonwriter_t *writer, const char *fmt, ...);
|
||||
|
||||
/* Add a UTF-8 encoded string
|
||||
* Special and control characters are automatically escaped.
|
||||
* If NULL is passed an empty string will be written (not JSON null). */
|
||||
void rjsonwriter_add_string(rjsonwriter_t *writer, const char *value);
|
||||
void rjsonwriter_add_string_len(rjsonwriter_t *writer, const char *value, int len);
|
||||
|
||||
void rjsonwriter_add_double(rjsonwriter_t *writer, double value);
|
||||
|
||||
void rjsonwriter_add_spaces(rjsonwriter_t *writer, int count);
|
||||
|
||||
void rjsonwriter_add_tabs(rjsonwriter_t *writer, int count);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
76
src/minarch/libretro-common/include/formats/rjson_helpers.h
Normal file
76
src/minarch/libretro-common/include/formats/rjson_helpers.h
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (rjson.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_FORMAT_RJSON_HELPERS_H__
|
||||
#define __LIBRETRO_SDK_FORMAT_RJSON_HELPERS_H__
|
||||
|
||||
#include <retro_common_api.h>
|
||||
#include <retro_inline.h> /* INLINE */
|
||||
#include <boolean.h> /* bool */
|
||||
#include <stddef.h> /* size_t */
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
/* Functions to add JSON token characters */
|
||||
static INLINE void rjsonwriter_add_start_object(rjsonwriter_t *writer)
|
||||
{ rjsonwriter_raw(writer, "{", 1); }
|
||||
|
||||
static INLINE void rjsonwriter_add_end_object(rjsonwriter_t *writer)
|
||||
{ rjsonwriter_raw(writer, "}", 1); }
|
||||
|
||||
static INLINE void rjsonwriter_add_start_array(rjsonwriter_t *writer)
|
||||
{ rjsonwriter_raw(writer, "[", 1); }
|
||||
|
||||
static INLINE void rjsonwriter_add_end_array(rjsonwriter_t *writer)
|
||||
{ rjsonwriter_raw(writer, "]", 1); }
|
||||
|
||||
static INLINE void rjsonwriter_add_colon(rjsonwriter_t *writer)
|
||||
{ rjsonwriter_raw(writer, ":", 1); }
|
||||
|
||||
static INLINE void rjsonwriter_add_comma(rjsonwriter_t *writer)
|
||||
{ rjsonwriter_raw(writer, ",", 1); }
|
||||
|
||||
/* Functions to add whitespace characters */
|
||||
/* These do nothing with the option RJSONWRITER_OPTION_SKIP_WHITESPACE */
|
||||
static INLINE void rjsonwriter_add_newline(rjsonwriter_t *writer)
|
||||
{ rjsonwriter_raw(writer, "\n", 1); }
|
||||
|
||||
static INLINE void rjsonwriter_add_space(rjsonwriter_t *writer)
|
||||
{ rjsonwriter_raw(writer, " ", 1); }
|
||||
|
||||
static INLINE void rjsonwriter_add_tab(rjsonwriter_t *writer)
|
||||
{ rjsonwriter_raw(writer, "\t", 1); }
|
||||
|
||||
static INLINE void rjsonwriter_add_unsigned(rjsonwriter_t *writer, unsigned value)
|
||||
{ rjsonwriter_rawf(writer, "%u", value); }
|
||||
|
||||
/* Add a signed or unsigned integer or a double number */
|
||||
static INLINE void rjsonwriter_add_int(rjsonwriter_t *writer, int value)
|
||||
{ rjsonwriter_rawf(writer, "%d", value); }
|
||||
|
||||
static INLINE void rjsonwriter_add_bool(rjsonwriter_t *writer, bool value)
|
||||
{ rjsonwriter_raw(writer, (value ? "true" : "false"), (value ? 4 : 5)); }
|
||||
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
64
src/minarch/libretro-common/include/formats/rpng.h
Normal file
64
src/minarch/libretro-common/include/formats/rpng.h
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (rpng.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_FORMAT_RPNG_H__
|
||||
#define __LIBRETRO_SDK_FORMAT_RPNG_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct rpng rpng_t;
|
||||
|
||||
rpng_t *rpng_init(const char *path);
|
||||
|
||||
bool rpng_is_valid(rpng_t *rpng);
|
||||
|
||||
bool rpng_set_buf_ptr(rpng_t *rpng, void *data, size_t len);
|
||||
|
||||
rpng_t *rpng_alloc(void);
|
||||
|
||||
void rpng_free(rpng_t *rpng);
|
||||
|
||||
bool rpng_iterate_image(rpng_t *rpng);
|
||||
|
||||
int rpng_process_image(rpng_t *rpng,
|
||||
void **data, size_t size, unsigned *width, unsigned *height);
|
||||
|
||||
bool rpng_start(rpng_t *rpng);
|
||||
|
||||
bool rpng_save_image_argb(const char *path, const uint32_t *data,
|
||||
unsigned width, unsigned height, unsigned pitch);
|
||||
bool rpng_save_image_bgr24(const char *path, const uint8_t *data,
|
||||
unsigned width, unsigned height, unsigned pitch);
|
||||
|
||||
uint8_t* rpng_save_image_bgr24_string(const uint8_t *data,
|
||||
unsigned width, unsigned height, signed pitch, uint64_t *bytes);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
48
src/minarch/libretro-common/include/formats/rtga.h
Normal file
48
src/minarch/libretro-common/include/formats/rtga.h
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (rtga.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_FORMAT_RTGA_H__
|
||||
#define __LIBRETRO_SDK_FORMAT_RTGA_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct rtga rtga_t;
|
||||
|
||||
int rtga_process_image(rtga_t *rtga, void **buf,
|
||||
size_t size, unsigned *width, unsigned *height);
|
||||
|
||||
bool rtga_set_buf_ptr(rtga_t *rtga, void *data);
|
||||
|
||||
void rtga_free(rtga_t *rtga);
|
||||
|
||||
rtga_t *rtga_alloc(void);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
87
src/minarch/libretro-common/include/formats/rwav.h
Normal file
87
src/minarch/libretro-common/include/formats/rwav.h
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (rwav.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_FORMAT_RWAV_H__
|
||||
#define __LIBRETRO_SDK_FORMAT_RWAV_H__
|
||||
|
||||
#include <retro_common_api.h>
|
||||
#include <stdint.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* bits per sample */
|
||||
unsigned int bitspersample;
|
||||
|
||||
/* number of channels */
|
||||
unsigned int numchannels;
|
||||
|
||||
/* sample rate */
|
||||
unsigned int samplerate;
|
||||
|
||||
/* number of *samples* */
|
||||
size_t numsamples;
|
||||
|
||||
/* number of *bytes* in the pointer below, i.e. numsamples * numchannels * bitspersample/8 */
|
||||
size_t subchunk2size;
|
||||
|
||||
/* PCM data */
|
||||
const void* samples;
|
||||
} rwav_t;
|
||||
|
||||
enum rwav_state
|
||||
{
|
||||
RWAV_ITERATE_ERROR = -1,
|
||||
RWAV_ITERATE_MORE = 0,
|
||||
RWAV_ITERATE_DONE = 1,
|
||||
RWAV_ITERATE_BUF_SIZE = 4096
|
||||
};
|
||||
|
||||
typedef struct rwav_iterator rwav_iterator_t;
|
||||
|
||||
/**
|
||||
* Initializes the iterator to fill the out structure with data parsed from buf.
|
||||
*/
|
||||
void rwav_init(rwav_iterator_t* iter, rwav_t* out, const void* buf, size_t size);
|
||||
|
||||
/**
|
||||
* Parses a piece of the data. Continue calling as long as it returns RWAV_ITERATE_MORE.
|
||||
* Stop calling otherwise, and check for errors. If RWAV_ITERATE_DONE is returned,
|
||||
* the rwav_t structure passed to rwav_init is ready to be used. The iterator does not
|
||||
* have to be freed.
|
||||
*/
|
||||
enum rwav_state rwav_iterate(rwav_iterator_t *iter);
|
||||
|
||||
/**
|
||||
* Loads the entire data in one go.
|
||||
*/
|
||||
enum rwav_state rwav_load(rwav_t* out, const void* buf, size_t size);
|
||||
|
||||
/**
|
||||
* Frees parsed wave data.
|
||||
*/
|
||||
void rwav_free(rwav_t *rwav);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
69
src/minarch/libretro-common/include/formats/rxml.h
Normal file
69
src/minarch/libretro-common/include/formats/rxml.h
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (rxml.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifndef __LIBRETRO_SDK_FORMAT_RXML_H__
|
||||
#define __LIBRETRO_SDK_FORMAT_RXML_H__
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
/* Total NIH. Very trivial "XML" implementation for use in RetroArch.
|
||||
* Error checking is minimal. Invalid documents may lead to very
|
||||
* buggy behavior, but memory corruption should never happen.
|
||||
*
|
||||
* Only parts of standard that RetroArch cares about is supported.
|
||||
* Nothing more, nothing less. "Clever" XML documents will
|
||||
* probably break the implementation.
|
||||
*
|
||||
* Do *NOT* try to use this for anything else. You have been warned.
|
||||
*/
|
||||
|
||||
typedef struct rxml_document rxml_document_t;
|
||||
|
||||
struct rxml_attrib_node
|
||||
{
|
||||
char *attrib;
|
||||
char *value;
|
||||
struct rxml_attrib_node *next;
|
||||
};
|
||||
|
||||
typedef struct rxml_node
|
||||
{
|
||||
char *name;
|
||||
char *data;
|
||||
struct rxml_attrib_node *attrib;
|
||||
|
||||
struct rxml_node *children;
|
||||
struct rxml_node *next;
|
||||
} rxml_node_t;
|
||||
|
||||
rxml_document_t *rxml_load_document(const char *path);
|
||||
rxml_document_t *rxml_load_document_string(const char *str);
|
||||
void rxml_free_document(rxml_document_t *doc);
|
||||
|
||||
struct rxml_node *rxml_root_node(rxml_document_t *doc);
|
||||
|
||||
const char *rxml_node_attrib(struct rxml_node *node, const char *attrib);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
68
src/minarch/libretro-common/include/gfx/gl_capabilities.h
Normal file
68
src/minarch/libretro-common/include/gfx/gl_capabilities.h
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (gl_capabilities.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _GL_CAPABILITIES_H
|
||||
#define _GL_CAPABILITIES_H
|
||||
|
||||
#include <boolean.h>
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
enum gl_capability_enum
|
||||
{
|
||||
GL_CAPS_NONE = 0,
|
||||
GL_CAPS_EGLIMAGE,
|
||||
GL_CAPS_SYNC,
|
||||
GL_CAPS_MIPMAP,
|
||||
GL_CAPS_VAO,
|
||||
GL_CAPS_FBO,
|
||||
GL_CAPS_ARGB8,
|
||||
GL_CAPS_DEBUG,
|
||||
GL_CAPS_PACKED_DEPTH_STENCIL,
|
||||
GL_CAPS_ES2_COMPAT,
|
||||
GL_CAPS_UNPACK_ROW_LENGTH,
|
||||
GL_CAPS_FULL_NPOT_SUPPORT,
|
||||
GL_CAPS_SRGB_FBO,
|
||||
GL_CAPS_SRGB_FBO_ES3,
|
||||
GL_CAPS_FP_FBO,
|
||||
GL_CAPS_BGRA8888,
|
||||
GL_CAPS_GLES3_SUPPORTED,
|
||||
GL_CAPS_TEX_STORAGE,
|
||||
GL_CAPS_TEX_STORAGE_EXT
|
||||
};
|
||||
|
||||
bool gl_query_core_context_in_use(void);
|
||||
|
||||
void gl_query_core_context_set(bool set);
|
||||
|
||||
void gl_query_core_context_unset(void);
|
||||
|
||||
bool gl_query_extension(const char *ext);
|
||||
|
||||
bool gl_check_error(char **error_string);
|
||||
|
||||
bool gl_check_capability(enum gl_capability_enum enum_idx);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
253
src/minarch/libretro-common/include/gfx/math/matrix_3x3.h
Normal file
253
src/minarch/libretro-common/include/gfx/math/matrix_3x3.h
Normal file
|
|
@ -0,0 +1,253 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (matrix_3x3.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_GFX_MATH_MATRIX_3X3_H__
|
||||
#define __LIBRETRO_SDK_GFX_MATH_MATRIX_3X3_H__
|
||||
|
||||
#include <boolean.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
#include <retro_inline.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct math_matrix_3x3
|
||||
{
|
||||
float data[9];
|
||||
} math_matrix_3x3;
|
||||
|
||||
#define MAT_ELEM_3X3(mat, r, c) ((mat).data[3 * (r) + (c)])
|
||||
|
||||
#define matrix_3x3_init(mat, n11, n12, n13, n21, n22, n23, n31, n32, n33) \
|
||||
MAT_ELEM_3X3(mat, 0, 0) = n11; \
|
||||
MAT_ELEM_3X3(mat, 0, 1) = n12; \
|
||||
MAT_ELEM_3X3(mat, 0, 2) = n13; \
|
||||
MAT_ELEM_3X3(mat, 1, 0) = n21; \
|
||||
MAT_ELEM_3X3(mat, 1, 1) = n22; \
|
||||
MAT_ELEM_3X3(mat, 1, 2) = n23; \
|
||||
MAT_ELEM_3X3(mat, 2, 0) = n31; \
|
||||
MAT_ELEM_3X3(mat, 2, 1) = n32; \
|
||||
MAT_ELEM_3X3(mat, 2, 2) = n33
|
||||
|
||||
#define matrix_3x3_identity(mat) \
|
||||
MAT_ELEM_3X3(mat, 0, 0) = 1.0f; \
|
||||
MAT_ELEM_3X3(mat, 0, 1) = 0; \
|
||||
MAT_ELEM_3X3(mat, 0, 2) = 0; \
|
||||
MAT_ELEM_3X3(mat, 1, 0) = 0; \
|
||||
MAT_ELEM_3X3(mat, 1, 1) = 1.0f; \
|
||||
MAT_ELEM_3X3(mat, 1, 2) = 0; \
|
||||
MAT_ELEM_3X3(mat, 2, 0) = 0; \
|
||||
MAT_ELEM_3X3(mat, 2, 1) = 0; \
|
||||
MAT_ELEM_3X3(mat, 2, 2) = 1.0f
|
||||
|
||||
#define matrix_3x3_divide_scalar(mat, s) \
|
||||
MAT_ELEM_3X3(mat, 0, 0) /= s; \
|
||||
MAT_ELEM_3X3(mat, 0, 1) /= s; \
|
||||
MAT_ELEM_3X3(mat, 0, 2) /= s; \
|
||||
MAT_ELEM_3X3(mat, 1, 0) /= s; \
|
||||
MAT_ELEM_3X3(mat, 1, 1) /= s; \
|
||||
MAT_ELEM_3X3(mat, 1, 2) /= s; \
|
||||
MAT_ELEM_3X3(mat, 2, 0) /= s; \
|
||||
MAT_ELEM_3X3(mat, 2, 1) /= s; \
|
||||
MAT_ELEM_3X3(mat, 2, 2) /= s
|
||||
|
||||
#define matrix_3x3_transpose(mat, in) \
|
||||
MAT_ELEM_3X3(mat, 0, 0) = MAT_ELEM_3X3(in, 0, 0); \
|
||||
MAT_ELEM_3X3(mat, 1, 0) = MAT_ELEM_3X3(in, 0, 1); \
|
||||
MAT_ELEM_3X3(mat, 2, 0) = MAT_ELEM_3X3(in, 0, 2); \
|
||||
MAT_ELEM_3X3(mat, 0, 1) = MAT_ELEM_3X3(in, 1, 0); \
|
||||
MAT_ELEM_3X3(mat, 1, 1) = MAT_ELEM_3X3(in, 1, 1); \
|
||||
MAT_ELEM_3X3(mat, 2, 1) = MAT_ELEM_3X3(in, 1, 2); \
|
||||
MAT_ELEM_3X3(mat, 0, 2) = MAT_ELEM_3X3(in, 2, 0); \
|
||||
MAT_ELEM_3X3(mat, 1, 2) = MAT_ELEM_3X3(in, 2, 1); \
|
||||
MAT_ELEM_3X3(mat, 2, 2) = MAT_ELEM_3X3(in, 2, 2)
|
||||
|
||||
#define matrix_3x3_multiply(out, a, b) \
|
||||
MAT_ELEM_3X3(out, 0, 0) = \
|
||||
MAT_ELEM_3X3(a, 0, 0) * MAT_ELEM_3X3(b, 0, 0) + \
|
||||
MAT_ELEM_3X3(a, 0, 1) * MAT_ELEM_3X3(b, 1, 0) + \
|
||||
MAT_ELEM_3X3(a, 0, 2) * MAT_ELEM_3X3(b, 2, 0); \
|
||||
MAT_ELEM_3X3(out, 0, 1) = \
|
||||
MAT_ELEM_3X3(a, 0, 0) * MAT_ELEM_3X3(b, 0, 1) + \
|
||||
MAT_ELEM_3X3(a, 0, 1) * MAT_ELEM_3X3(b, 1, 1) + \
|
||||
MAT_ELEM_3X3(a, 0, 2) * MAT_ELEM_3X3(b, 2, 1); \
|
||||
MAT_ELEM_3X3(out, 0, 2) = \
|
||||
MAT_ELEM_3X3(a, 0, 0) * MAT_ELEM_3X3(b, 0, 2) + \
|
||||
MAT_ELEM_3X3(a, 0, 1) * MAT_ELEM_3X3(b, 1, 2) + \
|
||||
MAT_ELEM_3X3(a, 0, 2) * MAT_ELEM_3X3(b, 2, 2); \
|
||||
MAT_ELEM_3X3(out, 1, 0) = \
|
||||
MAT_ELEM_3X3(a, 1, 0) * MAT_ELEM_3X3(b, 0, 0) + \
|
||||
MAT_ELEM_3X3(a, 1, 1) * MAT_ELEM_3X3(b, 1, 0) + \
|
||||
MAT_ELEM_3X3(a, 1, 2) * MAT_ELEM_3X3(b, 2, 0); \
|
||||
MAT_ELEM_3X3(out, 1, 1) = \
|
||||
MAT_ELEM_3X3(a, 1, 0) * MAT_ELEM_3X3(b, 0, 1) + \
|
||||
MAT_ELEM_3X3(a, 1, 1) * MAT_ELEM_3X3(b, 1, 1) + \
|
||||
MAT_ELEM_3X3(a, 1, 2) * MAT_ELEM_3X3(b, 2, 1); \
|
||||
MAT_ELEM_3X3(out, 1, 2) = \
|
||||
MAT_ELEM_3X3(a, 1, 0) * MAT_ELEM_3X3(b, 0, 2) + \
|
||||
MAT_ELEM_3X3(a, 1, 1) * MAT_ELEM_3X3(b, 1, 2) + \
|
||||
MAT_ELEM_3X3(a, 1, 2) * MAT_ELEM_3X3(b, 2, 2); \
|
||||
MAT_ELEM_3X3(out, 2, 0) = \
|
||||
MAT_ELEM_3X3(a, 2, 0) * MAT_ELEM_3X3(b, 0, 0) + \
|
||||
MAT_ELEM_3X3(a, 2, 1) * MAT_ELEM_3X3(b, 1, 0) + \
|
||||
MAT_ELEM_3X3(a, 2, 2) * MAT_ELEM_3X3(b, 2, 0); \
|
||||
MAT_ELEM_3X3(out, 2, 1) = \
|
||||
MAT_ELEM_3X3(a, 2, 0) * MAT_ELEM_3X3(b, 0, 1) + \
|
||||
MAT_ELEM_3X3(a, 2, 1) * MAT_ELEM_3X3(b, 1, 1) + \
|
||||
MAT_ELEM_3X3(a, 2, 2) * MAT_ELEM_3X3(b, 2, 1); \
|
||||
MAT_ELEM_3X3(out, 2, 2) = \
|
||||
MAT_ELEM_3X3(a, 2, 0) * MAT_ELEM_3X3(b, 0, 2) + \
|
||||
MAT_ELEM_3X3(a, 2, 1) * MAT_ELEM_3X3(b, 1, 2) + \
|
||||
MAT_ELEM_3X3(a, 2, 2) * MAT_ELEM_3X3(b, 2, 2)
|
||||
|
||||
#define matrix_3x3_determinant(mat) (MAT_ELEM_3X3(mat, 0, 0) * (MAT_ELEM_3X3(mat, 1, 1) * MAT_ELEM_3X3(mat, 2, 2) - MAT_ELEM_3X3(mat, 1, 2) * MAT_ELEM_3X3(mat, 2, 1)) - MAT_ELEM_3X3(mat, 0, 1) * (MAT_ELEM_3X3(mat, 1, 0) * MAT_ELEM_3X3(mat, 2, 2) - MAT_ELEM_3X3(mat, 1, 2) * MAT_ELEM_3X3(mat, 2, 0)) + MAT_ELEM_3X3(mat, 0, 2) * (MAT_ELEM_3X3(mat, 1, 0) * MAT_ELEM_3X3(mat, 2, 1) - MAT_ELEM_3X3(mat, 1, 1) * MAT_ELEM_3X3(mat, 2, 0)))
|
||||
|
||||
#define matrix_3x3_adjoint(mat) \
|
||||
MAT_ELEM_3X3(mat, 0, 0) = (MAT_ELEM_3X3(mat, 1, 1) * MAT_ELEM_3X3(mat, 2, 2) - MAT_ELEM_3X3(mat, 1, 2) * MAT_ELEM_3X3(mat, 2, 1)); \
|
||||
MAT_ELEM_3X3(mat, 0, 1) = -(MAT_ELEM_3X3(mat, 0, 1) * MAT_ELEM_3X3(mat, 2, 2) - MAT_ELEM_3X3(mat, 0, 2) * MAT_ELEM_3X3(mat, 2, 1)); \
|
||||
MAT_ELEM_3X3(mat, 0, 2) = (MAT_ELEM_3X3(mat, 0, 1) * MAT_ELEM_3X3(mat, 1, 1) - MAT_ELEM_3X3(mat, 0, 2) * MAT_ELEM_3X3(mat, 1, 1)); \
|
||||
MAT_ELEM_3X3(mat, 1, 0) = -(MAT_ELEM_3X3(mat, 1, 0) * MAT_ELEM_3X3(mat, 2, 2) - MAT_ELEM_3X3(mat, 1, 2) * MAT_ELEM_3X3(mat, 2, 0)); \
|
||||
MAT_ELEM_3X3(mat, 1, 1) = (MAT_ELEM_3X3(mat, 0, 0) * MAT_ELEM_3X3(mat, 2, 2) - MAT_ELEM_3X3(mat, 0, 2) * MAT_ELEM_3X3(mat, 2, 0)); \
|
||||
MAT_ELEM_3X3(mat, 1, 2) = -(MAT_ELEM_3X3(mat, 0, 0) * MAT_ELEM_3X3(mat, 1, 2) - MAT_ELEM_3X3(mat, 0, 2) * MAT_ELEM_3X3(mat, 1, 0)); \
|
||||
MAT_ELEM_3X3(mat, 2, 0) = (MAT_ELEM_3X3(mat, 1, 0) * MAT_ELEM_3X3(mat, 2, 1) - MAT_ELEM_3X3(mat, 1, 1) * MAT_ELEM_3X3(mat, 2, 0)); \
|
||||
MAT_ELEM_3X3(mat, 2, 1) = -(MAT_ELEM_3X3(mat, 0, 0) * MAT_ELEM_3X3(mat, 2, 1) - MAT_ELEM_3X3(mat, 0, 1) * MAT_ELEM_3X3(mat, 2, 0)); \
|
||||
MAT_ELEM_3X3(mat, 2, 2) = (MAT_ELEM_3X3(mat, 0, 0) * MAT_ELEM_3X3(mat, 1, 1) - MAT_ELEM_3X3(mat, 0, 1) * MAT_ELEM_3X3(mat, 1, 0))
|
||||
|
||||
#define FLOATS_ARE_EQUAL(x, y) (fabs(x - y) <= 0.00001f * ((x) > (y) ? (y) : (x)))
|
||||
#define FLOAT_IS_ZERO(x) (FLOATS_ARE_EQUAL((x) + 1, 1))
|
||||
|
||||
static INLINE bool matrix_3x3_invert(math_matrix_3x3 *mat)
|
||||
{
|
||||
float det = matrix_3x3_determinant(*mat);
|
||||
|
||||
if (FLOAT_IS_ZERO(det))
|
||||
return false;
|
||||
|
||||
matrix_3x3_adjoint(*mat);
|
||||
matrix_3x3_divide_scalar(*mat, det);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static INLINE bool matrix_3x3_square_to_quad(
|
||||
const float dx0, const float dy0,
|
||||
const float dx1, const float dy1,
|
||||
const float dx3, const float dy3,
|
||||
const float dx2, const float dy2,
|
||||
math_matrix_3x3 *mat)
|
||||
{
|
||||
float a, b, d, e;
|
||||
float ax = dx0 - dx1 + dx2 - dx3;
|
||||
float ay = dy0 - dy1 + dy2 - dy3;
|
||||
float c = dx0;
|
||||
float f = dy0;
|
||||
float g = 0;
|
||||
float h = 0;
|
||||
|
||||
if (FLOAT_IS_ZERO(ax) && FLOAT_IS_ZERO(ay))
|
||||
{
|
||||
/* affine case */
|
||||
a = dx1 - dx0;
|
||||
b = dx2 - dx1;
|
||||
d = dy1 - dy0;
|
||||
e = dy2 - dy1;
|
||||
}
|
||||
else
|
||||
{
|
||||
float ax1 = dx1 - dx2;
|
||||
float ax2 = dx3 - dx2;
|
||||
float ay1 = dy1 - dy2;
|
||||
float ay2 = dy3 - dy2;
|
||||
|
||||
/* determinants */
|
||||
float gtop = ax * ay2 - ax2 * ay;
|
||||
float htop = ax1 * ay - ax * ay1;
|
||||
float bottom = ax1 * ay2 - ax2 * ay1;
|
||||
|
||||
if (!bottom)
|
||||
return false;
|
||||
|
||||
g = gtop / bottom;
|
||||
h = htop / bottom;
|
||||
|
||||
a = dx1 - dx0 + g * dx1;
|
||||
b = dx3 - dx0 + h * dx3;
|
||||
d = dy1 - dy0 + g * dy1;
|
||||
e = dy3 - dy0 + h * dy3;
|
||||
}
|
||||
|
||||
matrix_3x3_init(*mat,
|
||||
a, d, g,
|
||||
b, e, h,
|
||||
c, f, 1.f);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static INLINE bool matrix_3x3_quad_to_square(
|
||||
const float sx0, const float sy0,
|
||||
const float sx1, const float sy1,
|
||||
const float sx2, const float sy2,
|
||||
const float sx3, const float sy3,
|
||||
math_matrix_3x3 *mat)
|
||||
{
|
||||
return matrix_3x3_square_to_quad(sx0, sy0, sx1, sy1,
|
||||
sx2, sy2, sx3, sy3,
|
||||
mat) ? matrix_3x3_invert(mat) : false;
|
||||
}
|
||||
|
||||
static INLINE bool matrix_3x3_quad_to_quad(
|
||||
const float dx0, const float dy0,
|
||||
const float dx1, const float dy1,
|
||||
const float dx2, const float dy2,
|
||||
const float dx3, const float dy3,
|
||||
const float sx0, const float sy0,
|
||||
const float sx1, const float sy1,
|
||||
const float sx2, const float sy2,
|
||||
const float sx3, const float sy3,
|
||||
math_matrix_3x3 *mat)
|
||||
{
|
||||
math_matrix_3x3 square_to_quad;
|
||||
|
||||
if (matrix_3x3_square_to_quad(dx0, dy0, dx1, dy1,
|
||||
dx2, dy2, dx3, dy3,
|
||||
&square_to_quad))
|
||||
{
|
||||
math_matrix_3x3 quad_to_square;
|
||||
if (matrix_3x3_quad_to_square(sx0, sy0, sx1, sy1,
|
||||
sx2, sy2, sx3, sy3,
|
||||
&quad_to_square))
|
||||
{
|
||||
matrix_3x3_multiply(*mat, quad_to_square, square_to_quad);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
395
src/minarch/libretro-common/include/gfx/math/matrix_4x4.h
Normal file
395
src/minarch/libretro-common/include/gfx/math/matrix_4x4.h
Normal file
|
|
@ -0,0 +1,395 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (matrix_4x4.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_GFX_MATH_MATRIX_4X4_H__
|
||||
#define __LIBRETRO_SDK_GFX_MATH_MATRIX_4X4_H__
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include <math.h>
|
||||
#include <gfx/math/vector_3.h>
|
||||
|
||||
/* Column-major matrix (OpenGL-style).
|
||||
* Reimplements functionality from FF OpenGL pipeline to be able
|
||||
* to work on GLES 2.0 and modern GL variants.
|
||||
*/
|
||||
|
||||
#define MAT_ELEM_4X4(mat, row, column) ((mat).data[4 * (column) + (row)])
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct math_matrix_4x4
|
||||
{
|
||||
float data[16];
|
||||
} math_matrix_4x4;
|
||||
|
||||
#define matrix_4x4_copy(dst, src) \
|
||||
MAT_ELEM_4X4(dst, 0, 0) = MAT_ELEM_4X4(src, 0, 0); \
|
||||
MAT_ELEM_4X4(dst, 0, 1) = MAT_ELEM_4X4(src, 0, 1); \
|
||||
MAT_ELEM_4X4(dst, 0, 2) = MAT_ELEM_4X4(src, 0, 2); \
|
||||
MAT_ELEM_4X4(dst, 0, 3) = MAT_ELEM_4X4(src, 0, 3); \
|
||||
MAT_ELEM_4X4(dst, 1, 0) = MAT_ELEM_4X4(src, 1, 0); \
|
||||
MAT_ELEM_4X4(dst, 1, 1) = MAT_ELEM_4X4(src, 1, 1); \
|
||||
MAT_ELEM_4X4(dst, 1, 2) = MAT_ELEM_4X4(src, 1, 2); \
|
||||
MAT_ELEM_4X4(dst, 1, 3) = MAT_ELEM_4X4(src, 1, 3); \
|
||||
MAT_ELEM_4X4(dst, 2, 0) = MAT_ELEM_4X4(src, 2, 0); \
|
||||
MAT_ELEM_4X4(dst, 2, 1) = MAT_ELEM_4X4(src, 2, 1); \
|
||||
MAT_ELEM_4X4(dst, 2, 2) = MAT_ELEM_4X4(src, 2, 2); \
|
||||
MAT_ELEM_4X4(dst, 2, 3) = MAT_ELEM_4X4(src, 2, 3); \
|
||||
MAT_ELEM_4X4(dst, 3, 0) = MAT_ELEM_4X4(src, 3, 0); \
|
||||
MAT_ELEM_4X4(dst, 3, 1) = MAT_ELEM_4X4(src, 3, 1); \
|
||||
MAT_ELEM_4X4(dst, 3, 2) = MAT_ELEM_4X4(src, 3, 2); \
|
||||
MAT_ELEM_4X4(dst, 3, 3) = MAT_ELEM_4X4(src, 3, 3)
|
||||
|
||||
/*
|
||||
* Sets mat to an identity matrix
|
||||
*/
|
||||
#define matrix_4x4_identity(mat) \
|
||||
MAT_ELEM_4X4(mat, 0, 0) = 1.0f; \
|
||||
MAT_ELEM_4X4(mat, 0, 1) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 0, 2) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 0, 3) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 1, 0) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 1, 1) = 1.0f; \
|
||||
MAT_ELEM_4X4(mat, 1, 2) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 1, 3) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 2, 0) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 2, 1) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 2, 2) = 1.0f; \
|
||||
MAT_ELEM_4X4(mat, 2, 3) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 0) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 1) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 2) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 3) = 1.0f
|
||||
|
||||
/*
|
||||
* Sets out to the transposed matrix of in
|
||||
*/
|
||||
|
||||
#define matrix_4x4_transpose(out, in) \
|
||||
MAT_ELEM_4X4(out, 0, 0) = MAT_ELEM_4X4(in, 0, 0); \
|
||||
MAT_ELEM_4X4(out, 1, 0) = MAT_ELEM_4X4(in, 0, 1); \
|
||||
MAT_ELEM_4X4(out, 2, 0) = MAT_ELEM_4X4(in, 0, 2); \
|
||||
MAT_ELEM_4X4(out, 3, 0) = MAT_ELEM_4X4(in, 0, 3); \
|
||||
MAT_ELEM_4X4(out, 0, 1) = MAT_ELEM_4X4(in, 1, 0); \
|
||||
MAT_ELEM_4X4(out, 1, 1) = MAT_ELEM_4X4(in, 1, 1); \
|
||||
MAT_ELEM_4X4(out, 2, 1) = MAT_ELEM_4X4(in, 1, 2); \
|
||||
MAT_ELEM_4X4(out, 3, 1) = MAT_ELEM_4X4(in, 1, 3); \
|
||||
MAT_ELEM_4X4(out, 0, 2) = MAT_ELEM_4X4(in, 2, 0); \
|
||||
MAT_ELEM_4X4(out, 1, 2) = MAT_ELEM_4X4(in, 2, 1); \
|
||||
MAT_ELEM_4X4(out, 2, 2) = MAT_ELEM_4X4(in, 2, 2); \
|
||||
MAT_ELEM_4X4(out, 3, 2) = MAT_ELEM_4X4(in, 2, 3); \
|
||||
MAT_ELEM_4X4(out, 0, 3) = MAT_ELEM_4X4(in, 3, 0); \
|
||||
MAT_ELEM_4X4(out, 1, 3) = MAT_ELEM_4X4(in, 3, 1); \
|
||||
MAT_ELEM_4X4(out, 2, 3) = MAT_ELEM_4X4(in, 3, 2); \
|
||||
MAT_ELEM_4X4(out, 3, 3) = MAT_ELEM_4X4(in, 3, 3)
|
||||
|
||||
/*
|
||||
* Builds an X-axis rotation matrix
|
||||
*/
|
||||
#define matrix_4x4_rotate_x(mat, radians) \
|
||||
{ \
|
||||
float cosine = cosf(radians); \
|
||||
float sine = sinf(radians); \
|
||||
MAT_ELEM_4X4(mat, 0, 0) = 1.0f; \
|
||||
MAT_ELEM_4X4(mat, 0, 1) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 0, 2) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 0, 3) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 1, 0) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 1, 1) = cosine; \
|
||||
MAT_ELEM_4X4(mat, 1, 2) = -sine; \
|
||||
MAT_ELEM_4X4(mat, 1, 3) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 2, 0) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 2, 1) = sine; \
|
||||
MAT_ELEM_4X4(mat, 2, 2) = cosine; \
|
||||
MAT_ELEM_4X4(mat, 2, 3) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 0) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 1) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 2) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 3) = 1.0f; \
|
||||
}
|
||||
|
||||
/*
|
||||
* Builds a rotation matrix using the
|
||||
* rotation around the Y-axis.
|
||||
*/
|
||||
|
||||
#define matrix_4x4_rotate_y(mat, radians) \
|
||||
{ \
|
||||
float cosine = cosf(radians); \
|
||||
float sine = sinf(radians); \
|
||||
MAT_ELEM_4X4(mat, 0, 0) = cosine; \
|
||||
MAT_ELEM_4X4(mat, 0, 1) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 0, 2) = -sine; \
|
||||
MAT_ELEM_4X4(mat, 0, 3) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 1, 0) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 1, 1) = 1.0f; \
|
||||
MAT_ELEM_4X4(mat, 1, 2) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 1, 3) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 2, 0) = sine; \
|
||||
MAT_ELEM_4X4(mat, 2, 1) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 2, 2) = cosine; \
|
||||
MAT_ELEM_4X4(mat, 2, 3) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 0) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 1) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 2) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 3) = 1.0f; \
|
||||
}
|
||||
|
||||
/*
|
||||
* Builds a rotation matrix using the
|
||||
* rotation around the Z-axis.
|
||||
*/
|
||||
#define matrix_4x4_rotate_z(mat, radians) \
|
||||
{ \
|
||||
float cosine = cosf(radians); \
|
||||
float sine = sinf(radians); \
|
||||
MAT_ELEM_4X4(mat, 0, 0) = cosine; \
|
||||
MAT_ELEM_4X4(mat, 0, 1) = -sine; \
|
||||
MAT_ELEM_4X4(mat, 0, 2) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 0, 3) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 1, 0) = sine; \
|
||||
MAT_ELEM_4X4(mat, 1, 1) = cosine; \
|
||||
MAT_ELEM_4X4(mat, 1, 2) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 1, 3) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 2, 0) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 2, 1) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 2, 2) = 1.0f; \
|
||||
MAT_ELEM_4X4(mat, 2, 3) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 0) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 1) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 2) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 3) = 1.0f; \
|
||||
}
|
||||
|
||||
/*
|
||||
* Creates an orthographic projection matrix.
|
||||
*/
|
||||
#define matrix_4x4_ortho(mat, left, right, bottom, top, znear, zfar) \
|
||||
{ \
|
||||
float rl = (right) - (left); \
|
||||
float tb = (top) - (bottom); \
|
||||
float fn = (zfar) - (znear); \
|
||||
MAT_ELEM_4X4(mat, 0, 0) = 2.0f / rl; \
|
||||
MAT_ELEM_4X4(mat, 0, 1) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 0, 2) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 0, 3) = -((left) + (right)) / rl; \
|
||||
MAT_ELEM_4X4(mat, 1, 0) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 1, 1) = 2.0f / tb; \
|
||||
MAT_ELEM_4X4(mat, 1, 2) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 1, 3) = -((top) + (bottom)) / tb; \
|
||||
MAT_ELEM_4X4(mat, 2, 0) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 2, 1) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 2, 2) = -2.0f / fn; \
|
||||
MAT_ELEM_4X4(mat, 2, 3) = -((zfar) + (znear)) / fn; \
|
||||
MAT_ELEM_4X4(mat, 3, 0) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 1) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 2) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 3) = 1.0f; \
|
||||
}
|
||||
|
||||
#define matrix_4x4_lookat(out, eye, center, up) \
|
||||
{ \
|
||||
vec3_t zaxis; /* the "forward" vector */ \
|
||||
vec3_t xaxis; /* the "right" vector */ \
|
||||
vec3_t yaxis; /* the "up" vector */ \
|
||||
vec3_copy(zaxis, center); \
|
||||
vec3_subtract(zaxis, eye); \
|
||||
vec3_normalize(zaxis); \
|
||||
vec3_cross(xaxis, zaxis, up); \
|
||||
vec3_normalize(xaxis); \
|
||||
vec3_cross(yaxis, xaxis, zaxis); \
|
||||
MAT_ELEM_4X4(out, 0, 0) = xaxis[0]; \
|
||||
MAT_ELEM_4X4(out, 0, 1) = yaxis[0]; \
|
||||
MAT_ELEM_4X4(out, 0, 2) = -zaxis[0]; \
|
||||
MAT_ELEM_4X4(out, 0, 3) = 0.0; \
|
||||
MAT_ELEM_4X4(out, 1, 0) = xaxis[1]; \
|
||||
MAT_ELEM_4X4(out, 1, 1) = yaxis[1]; \
|
||||
MAT_ELEM_4X4(out, 1, 2) = -zaxis[1]; \
|
||||
MAT_ELEM_4X4(out, 1, 3) = 0.0f; \
|
||||
MAT_ELEM_4X4(out, 2, 0) = xaxis[2]; \
|
||||
MAT_ELEM_4X4(out, 2, 1) = yaxis[2]; \
|
||||
MAT_ELEM_4X4(out, 2, 2) = -zaxis[2]; \
|
||||
MAT_ELEM_4X4(out, 2, 3) = 0.0f; \
|
||||
MAT_ELEM_4X4(out, 3, 0) = -(xaxis[0] * eye[0] + xaxis[1] * eye[1] + xaxis[2] * eye[2]); \
|
||||
MAT_ELEM_4X4(out, 3, 1) = -(yaxis[0] * eye[0] + yaxis[1] * eye[1] + yaxis[2] * eye[2]); \
|
||||
MAT_ELEM_4X4(out, 3, 2) = (zaxis[0] * eye[0] + zaxis[1] * eye[1] + zaxis[2] * eye[2]); \
|
||||
MAT_ELEM_4X4(out, 3, 3) = 1.f; \
|
||||
}
|
||||
|
||||
/*
|
||||
* Multiplies a with b, stores the result in out
|
||||
*/
|
||||
|
||||
#define matrix_4x4_multiply(out, a, b) \
|
||||
MAT_ELEM_4X4(out, 0, 0) = \
|
||||
MAT_ELEM_4X4(a, 0, 0) * MAT_ELEM_4X4(b, 0, 0) + \
|
||||
MAT_ELEM_4X4(a, 0, 1) * MAT_ELEM_4X4(b, 1, 0) + \
|
||||
MAT_ELEM_4X4(a, 0, 2) * MAT_ELEM_4X4(b, 2, 0) + \
|
||||
MAT_ELEM_4X4(a, 0, 3) * MAT_ELEM_4X4(b, 3, 0); \
|
||||
MAT_ELEM_4X4(out, 0, 1) = \
|
||||
MAT_ELEM_4X4(a, 0, 0) * MAT_ELEM_4X4(b, 0, 1) + \
|
||||
MAT_ELEM_4X4(a, 0, 1) * MAT_ELEM_4X4(b, 1, 1) + \
|
||||
MAT_ELEM_4X4(a, 0, 2) * MAT_ELEM_4X4(b, 2, 1) + \
|
||||
MAT_ELEM_4X4(a, 0, 3) * MAT_ELEM_4X4(b, 3, 1); \
|
||||
MAT_ELEM_4X4(out, 0, 2) = \
|
||||
MAT_ELEM_4X4(a, 0, 0) * MAT_ELEM_4X4(b, 0, 2) + \
|
||||
MAT_ELEM_4X4(a, 0, 1) * MAT_ELEM_4X4(b, 1, 2) + \
|
||||
MAT_ELEM_4X4(a, 0, 2) * MAT_ELEM_4X4(b, 2, 2) + \
|
||||
MAT_ELEM_4X4(a, 0, 3) * MAT_ELEM_4X4(b, 3, 2); \
|
||||
MAT_ELEM_4X4(out, 0, 3) = \
|
||||
MAT_ELEM_4X4(a, 0, 0) * MAT_ELEM_4X4(b, 0, 3) + \
|
||||
MAT_ELEM_4X4(a, 0, 1) * MAT_ELEM_4X4(b, 1, 3) + \
|
||||
MAT_ELEM_4X4(a, 0, 2) * MAT_ELEM_4X4(b, 2, 3) + \
|
||||
MAT_ELEM_4X4(a, 0, 3) * MAT_ELEM_4X4(b, 3, 3); \
|
||||
MAT_ELEM_4X4(out, 1, 0) = \
|
||||
MAT_ELEM_4X4(a, 1, 0) * MAT_ELEM_4X4(b, 0, 0) + \
|
||||
MAT_ELEM_4X4(a, 1, 1) * MAT_ELEM_4X4(b, 1, 0) + \
|
||||
MAT_ELEM_4X4(a, 1, 2) * MAT_ELEM_4X4(b, 2, 0) + \
|
||||
MAT_ELEM_4X4(a, 1, 3) * MAT_ELEM_4X4(b, 3, 0); \
|
||||
MAT_ELEM_4X4(out, 1, 1) = \
|
||||
MAT_ELEM_4X4(a, 1, 0) * MAT_ELEM_4X4(b, 0, 1) + \
|
||||
MAT_ELEM_4X4(a, 1, 1) * MAT_ELEM_4X4(b, 1, 1) + \
|
||||
MAT_ELEM_4X4(a, 1, 2) * MAT_ELEM_4X4(b, 2, 1) + \
|
||||
MAT_ELEM_4X4(a, 1, 3) * MAT_ELEM_4X4(b, 3, 1); \
|
||||
MAT_ELEM_4X4(out, 1, 2) = \
|
||||
MAT_ELEM_4X4(a, 1, 0) * MAT_ELEM_4X4(b, 0, 2) + \
|
||||
MAT_ELEM_4X4(a, 1, 1) * MAT_ELEM_4X4(b, 1, 2) + \
|
||||
MAT_ELEM_4X4(a, 1, 2) * MAT_ELEM_4X4(b, 2, 2) + \
|
||||
MAT_ELEM_4X4(a, 1, 3) * MAT_ELEM_4X4(b, 3, 2); \
|
||||
MAT_ELEM_4X4(out, 1, 3) = \
|
||||
MAT_ELEM_4X4(a, 1, 0) * MAT_ELEM_4X4(b, 0, 3) + \
|
||||
MAT_ELEM_4X4(a, 1, 1) * MAT_ELEM_4X4(b, 1, 3) + \
|
||||
MAT_ELEM_4X4(a, 1, 2) * MAT_ELEM_4X4(b, 2, 3) + \
|
||||
MAT_ELEM_4X4(a, 1, 3) * MAT_ELEM_4X4(b, 3, 3); \
|
||||
MAT_ELEM_4X4(out, 2, 0) = \
|
||||
MAT_ELEM_4X4(a, 2, 0) * MAT_ELEM_4X4(b, 0, 0) + \
|
||||
MAT_ELEM_4X4(a, 2, 1) * MAT_ELEM_4X4(b, 1, 0) + \
|
||||
MAT_ELEM_4X4(a, 2, 2) * MAT_ELEM_4X4(b, 2, 0) + \
|
||||
MAT_ELEM_4X4(a, 2, 3) * MAT_ELEM_4X4(b, 3, 0); \
|
||||
MAT_ELEM_4X4(out, 2, 1) = \
|
||||
MAT_ELEM_4X4(a, 2, 0) * MAT_ELEM_4X4(b, 0, 1) + \
|
||||
MAT_ELEM_4X4(a, 2, 1) * MAT_ELEM_4X4(b, 1, 1) + \
|
||||
MAT_ELEM_4X4(a, 2, 2) * MAT_ELEM_4X4(b, 2, 1) + \
|
||||
MAT_ELEM_4X4(a, 2, 3) * MAT_ELEM_4X4(b, 3, 1); \
|
||||
MAT_ELEM_4X4(out, 2, 2) = \
|
||||
MAT_ELEM_4X4(a, 2, 0) * MAT_ELEM_4X4(b, 0, 2) + \
|
||||
MAT_ELEM_4X4(a, 2, 1) * MAT_ELEM_4X4(b, 1, 2) + \
|
||||
MAT_ELEM_4X4(a, 2, 2) * MAT_ELEM_4X4(b, 2, 2) + \
|
||||
MAT_ELEM_4X4(a, 2, 3) * MAT_ELEM_4X4(b, 3, 2); \
|
||||
MAT_ELEM_4X4(out, 2, 3) = \
|
||||
MAT_ELEM_4X4(a, 2, 0) * MAT_ELEM_4X4(b, 0, 3) + \
|
||||
MAT_ELEM_4X4(a, 2, 1) * MAT_ELEM_4X4(b, 1, 3) + \
|
||||
MAT_ELEM_4X4(a, 2, 2) * MAT_ELEM_4X4(b, 2, 3) + \
|
||||
MAT_ELEM_4X4(a, 2, 3) * MAT_ELEM_4X4(b, 3, 3); \
|
||||
MAT_ELEM_4X4(out, 3, 0) = \
|
||||
MAT_ELEM_4X4(a, 3, 0) * MAT_ELEM_4X4(b, 0, 0) + \
|
||||
MAT_ELEM_4X4(a, 3, 1) * MAT_ELEM_4X4(b, 1, 0) + \
|
||||
MAT_ELEM_4X4(a, 3, 2) * MAT_ELEM_4X4(b, 2, 0) + \
|
||||
MAT_ELEM_4X4(a, 3, 3) * MAT_ELEM_4X4(b, 3, 0); \
|
||||
MAT_ELEM_4X4(out, 3, 1) = \
|
||||
MAT_ELEM_4X4(a, 3, 0) * MAT_ELEM_4X4(b, 0, 1) + \
|
||||
MAT_ELEM_4X4(a, 3, 1) * MAT_ELEM_4X4(b, 1, 1) + \
|
||||
MAT_ELEM_4X4(a, 3, 2) * MAT_ELEM_4X4(b, 2, 1) + \
|
||||
MAT_ELEM_4X4(a, 3, 3) * MAT_ELEM_4X4(b, 3, 1); \
|
||||
MAT_ELEM_4X4(out, 3, 2) = \
|
||||
MAT_ELEM_4X4(a, 3, 0) * MAT_ELEM_4X4(b, 0, 2) + \
|
||||
MAT_ELEM_4X4(a, 3, 1) * MAT_ELEM_4X4(b, 1, 2) + \
|
||||
MAT_ELEM_4X4(a, 3, 2) * MAT_ELEM_4X4(b, 2, 2) + \
|
||||
MAT_ELEM_4X4(a, 3, 3) * MAT_ELEM_4X4(b, 3, 2); \
|
||||
MAT_ELEM_4X4(out, 3, 3) = \
|
||||
MAT_ELEM_4X4(a, 3, 0) * MAT_ELEM_4X4(b, 0, 3) + \
|
||||
MAT_ELEM_4X4(a, 3, 1) * MAT_ELEM_4X4(b, 1, 3) + \
|
||||
MAT_ELEM_4X4(a, 3, 2) * MAT_ELEM_4X4(b, 2, 3) + \
|
||||
MAT_ELEM_4X4(a, 3, 3) * MAT_ELEM_4X4(b, 3, 3)
|
||||
|
||||
#define matrix_4x4_scale(mat, x, y, z) \
|
||||
MAT_ELEM_4X4(mat, 0, 0) = x; \
|
||||
MAT_ELEM_4X4(mat, 0, 1) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 0, 2) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 0, 3) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 1, 0) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 1, 1) = y; \
|
||||
MAT_ELEM_4X4(mat, 1, 2) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 1, 3) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 2, 0) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 2, 1) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 2, 2) = z; \
|
||||
MAT_ELEM_4X4(mat, 2, 3) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 0) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 1) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 2) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 3) = 1.0f
|
||||
|
||||
/*
|
||||
* Builds a translation matrix. All other elements in
|
||||
* the matrix will be set to zero except for the
|
||||
* diagonal which is set to 1.0
|
||||
*/
|
||||
|
||||
#define matrix_4x4_translate(mat, x, y, z) \
|
||||
MAT_ELEM_4X4(mat, 0, 0) = 1.0f; \
|
||||
MAT_ELEM_4X4(mat, 0, 1) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 0, 2) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 0, 3) = x; \
|
||||
MAT_ELEM_4X4(mat, 1, 0) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 1, 1) = 1.0f; \
|
||||
MAT_ELEM_4X4(mat, 1, 2) = 1.0f; \
|
||||
MAT_ELEM_4X4(mat, 1, 3) = y; \
|
||||
MAT_ELEM_4X4(mat, 2, 0) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 2, 1) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 2, 2) = 1.0f; \
|
||||
MAT_ELEM_4X4(mat, 2, 3) = z; \
|
||||
MAT_ELEM_4X4(mat, 3, 0) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 1) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 2) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 3) = 1.0f
|
||||
|
||||
/*
|
||||
* Creates a perspective projection matrix.
|
||||
*/
|
||||
|
||||
#define matrix_4x4_projection(mat, y_fov, aspect, znear, zfar) \
|
||||
{ \
|
||||
float const a = 1.f / tan((y_fov) / 2.f); \
|
||||
float delta_z = (zfar) - (znear); \
|
||||
MAT_ELEM_4X4(mat, 0, 0) = a / (aspect); \
|
||||
MAT_ELEM_4X4(mat, 0, 1) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 0, 2) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 0, 3) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 1, 0) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 1, 1) = a; \
|
||||
MAT_ELEM_4X4(mat, 1, 2) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 1, 3) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 2, 0) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 2, 1) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 2, 2) = -(((zfar) + (znear)) / delta_z); \
|
||||
MAT_ELEM_4X4(mat, 2, 3) = -1.f; \
|
||||
MAT_ELEM_4X4(mat, 3, 0) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 1) = 0.0f; \
|
||||
MAT_ELEM_4X4(mat, 3, 2) = -((2.f * (zfar) * (znear)) / delta_z); \
|
||||
MAT_ELEM_4X4(mat, 3, 3) = 0.0f; \
|
||||
}
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
138
src/minarch/libretro-common/include/gfx/math/vector_2.h
Normal file
138
src/minarch/libretro-common/include/gfx/math/vector_2.h
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (vector_2.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_GFX_MATH_VECTOR_2_H__
|
||||
#define __LIBRETRO_SDK_GFX_MATH_VECTOR_2_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
#include <retro_inline.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef float vec2_t[2];
|
||||
|
||||
#define vec2_dot(a, b) ((a[0] * b[0]) + (a[1] * b[1]))
|
||||
|
||||
#define vec2_cross(a, b) ((a[0]*b[1]) - (a[1]*b[0]))
|
||||
|
||||
#define vec2_add(dst, src) \
|
||||
dst[0] += src[0]; \
|
||||
dst[1] += src[1]
|
||||
|
||||
#define vec2_subtract(dst, src) \
|
||||
dst[0] -= src[0]; \
|
||||
dst[1] -= src[1]
|
||||
|
||||
#define vec2_copy(dst, src) \
|
||||
dst[0] = src[0]; \
|
||||
dst[1] = src[1]
|
||||
|
||||
static INLINE float overflow(void)
|
||||
{
|
||||
unsigned i;
|
||||
volatile float f = 1e10;
|
||||
|
||||
for (i = 0; i < 10; ++i)
|
||||
f *= f;
|
||||
return f;
|
||||
}
|
||||
|
||||
static INLINE int16_t tofloat16(float f)
|
||||
{
|
||||
union uif32
|
||||
{
|
||||
float f;
|
||||
uint32_t i;
|
||||
};
|
||||
|
||||
int i, s, e, m;
|
||||
union uif32 Entry;
|
||||
Entry.f = f;
|
||||
i = (int)Entry.i;
|
||||
s = (i >> 16) & 0x00008000;
|
||||
e = ((i >> 23) & 0x000000ff) - (127 - 15);
|
||||
m = i & 0x007fffff;
|
||||
|
||||
if(e <= 0)
|
||||
{
|
||||
if(e < -10)
|
||||
return (int16_t)(s);
|
||||
|
||||
m = (m | 0x00800000) >> (1 - e);
|
||||
|
||||
if(m & 0x00001000)
|
||||
m += 0x00002000;
|
||||
|
||||
return (int16_t)(s | (m >> 13));
|
||||
}
|
||||
|
||||
if(e == 0xff - (127 - 15))
|
||||
{
|
||||
if(m == 0)
|
||||
return (int16_t)(s | 0x7c00);
|
||||
|
||||
m >>= 13;
|
||||
|
||||
return (int16_t)(s | 0x7c00 | m | (m == 0));
|
||||
}
|
||||
|
||||
if(m & 0x00001000)
|
||||
{
|
||||
m += 0x00002000;
|
||||
|
||||
if(m & 0x00800000)
|
||||
{
|
||||
m = 0;
|
||||
e += 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (e > 30)
|
||||
{
|
||||
overflow();
|
||||
|
||||
return (int16_t)(s | 0x7c00);
|
||||
}
|
||||
|
||||
return (int16_t)(s | (e << 10) | (m >> 13));
|
||||
}
|
||||
|
||||
static INLINE unsigned int vec2_packHalf2x16(float vec0, float vec1)
|
||||
{
|
||||
union
|
||||
{
|
||||
int16_t in[2];
|
||||
unsigned int out;
|
||||
} u;
|
||||
|
||||
u.in[0] = tofloat16(vec0);
|
||||
u.in[1] = tofloat16(vec1);
|
||||
|
||||
return u.out;
|
||||
}
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
68
src/minarch/libretro-common/include/gfx/math/vector_3.h
Normal file
68
src/minarch/libretro-common/include/gfx/math/vector_3.h
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (vector_3.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_GFX_MATH_VECTOR_3_H__
|
||||
#define __LIBRETRO_SDK_GFX_MATH_VECTOR_3_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef float vec3_t[3];
|
||||
|
||||
#define vec3_dot(a, b) (a[0] * b[0] + a[1] * b[1] + a[2] * b[2])
|
||||
|
||||
#define vec3_cross(dst, a, b) \
|
||||
dst[0] = a[1]*b[2] - a[2]*b[1]; \
|
||||
dst[1] = a[2]*b[0] - a[0]*b[2]; \
|
||||
dst[2] = a[0]*b[1] - a[1]*b[0]
|
||||
|
||||
#define vec3_length(a) sqrtf(vec3_dot(a,a))
|
||||
|
||||
#define vec3_add(dst, src) \
|
||||
dst[0] += src[0]; \
|
||||
dst[1] += src[1]; \
|
||||
dst[2] += src[2]
|
||||
|
||||
#define vec3_subtract(dst, src) \
|
||||
dst[0] -= src[0]; \
|
||||
dst[1] -= src[1]; \
|
||||
dst[2] -= src[2]
|
||||
|
||||
#define vec3_scale(dst, scale) \
|
||||
dst[0] *= scale; \
|
||||
dst[1] *= scale; \
|
||||
dst[2] *= scale
|
||||
|
||||
#define vec3_copy(dst, src) \
|
||||
dst[0] = src[0]; \
|
||||
dst[1] = src[1]; \
|
||||
dst[2] = src[2]
|
||||
|
||||
#define vec3_normalize(dst) vec3_scale(dst,1.0f / vec3_length(dst))
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
61
src/minarch/libretro-common/include/gfx/math/vector_4.h
Normal file
61
src/minarch/libretro-common/include/gfx/math/vector_4.h
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (vector_4.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_GFX_MATH_VECTOR_4_H__
|
||||
#define __LIBRETRO_SDK_GFX_MATH_VECTOR_4_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef float vec4_t[4];
|
||||
|
||||
#define vec4_add(dst, src) \
|
||||
dst[0] += src[0]; \
|
||||
dst[1] += src[1]; \
|
||||
dst[2] += src[2]; \
|
||||
dst[3] += src[3]
|
||||
|
||||
#define vec4_subtract(dst, src) \
|
||||
dst[0] -= src[0]; \
|
||||
dst[1] -= src[1]; \
|
||||
dst[2] -= src[2]; \
|
||||
dst[3] -= src[3]
|
||||
|
||||
#define vec4_scale(dst, scale) \
|
||||
dst[0] *= scale; \
|
||||
dst[1] *= scale; \
|
||||
dst[2] *= scale; \
|
||||
dst[3] *= scale
|
||||
|
||||
#define vec4_copy(dst, src) \
|
||||
dst[0] = src[0]; \
|
||||
dst[1] = src[1]; \
|
||||
dst[2] = src[2]; \
|
||||
dst[3] = src[3]
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
37
src/minarch/libretro-common/include/gfx/scaler/filter.h
Normal file
37
src/minarch/libretro-common/include/gfx/scaler/filter.h
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (filter.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_SCALER_FILTER_H__
|
||||
#define __LIBRETRO_SDK_SCALER_FILTER_H__
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
#include <boolean.h>
|
||||
#include <gfx/scaler/scaler.h>
|
||||
|
||||
bool scaler_gen_filter(struct scaler_ctx *ctx);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
110
src/minarch/libretro-common/include/gfx/scaler/pixconv.h
Normal file
110
src/minarch/libretro-common/include/gfx/scaler/pixconv.h
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (pixconv.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_SCALER_PIXCONV_H__
|
||||
#define __LIBRETRO_SDK_SCALER_PIXCONV_H__
|
||||
|
||||
#include <clamping.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
void conv_0rgb1555_argb8888(void *output, const void *input,
|
||||
int width, int height,
|
||||
int out_stride, int in_stride);
|
||||
|
||||
void conv_0rgb1555_rgb565(void *output, const void *input,
|
||||
int width, int height,
|
||||
int out_stride, int in_stride);
|
||||
|
||||
void conv_rgb565_0rgb1555(void *output, const void *input,
|
||||
int width, int height,
|
||||
int out_stride, int in_stride);
|
||||
|
||||
void conv_rgb565_abgr8888(void *output, const void *input,
|
||||
int width, int height,
|
||||
int out_stride, int in_stride);
|
||||
|
||||
void conv_rgb565_argb8888(void *output, const void *input,
|
||||
int width, int height,
|
||||
int out_stride, int in_stride);
|
||||
|
||||
void conv_rgba4444_argb8888(void *output, const void *input,
|
||||
int width, int height,
|
||||
int out_stride, int in_stride);
|
||||
|
||||
void conv_rgba4444_rgb565(void *output, const void *input,
|
||||
int width, int height,
|
||||
int out_stride, int in_stride);
|
||||
|
||||
void conv_bgr24_argb8888(void *output, const void *input,
|
||||
int width, int height,
|
||||
int out_stride, int in_stride);
|
||||
|
||||
void conv_bgr24_rgb565(void *output, const void *input,
|
||||
int width, int height,
|
||||
int out_stride, int in_stride);
|
||||
|
||||
void conv_argb8888_0rgb1555(void *output, const void *input,
|
||||
int width, int height,
|
||||
int out_stride, int in_stride);
|
||||
|
||||
void conv_argb8888_rgba4444(void *output_, const void *input_,
|
||||
int width, int height,
|
||||
int out_stride, int in_stride);
|
||||
|
||||
void conv_argb8888_rgb565(void *output, const void *input,
|
||||
int width, int height,
|
||||
int out_stride, int in_stride);
|
||||
|
||||
void conv_argb8888_bgr24(void *output, const void *input,
|
||||
int width, int height,
|
||||
int out_stride, int in_stride);
|
||||
|
||||
void conv_abgr8888_bgr24(void *output, const void *input,
|
||||
int width, int height,
|
||||
int out_stride, int in_stride);
|
||||
|
||||
void conv_argb8888_abgr8888(void *output, const void *input,
|
||||
int width, int height,
|
||||
int out_stride, int in_stride);
|
||||
|
||||
void conv_0rgb1555_bgr24(void *output, const void *input,
|
||||
int width, int height,
|
||||
int out_stride, int in_stride);
|
||||
|
||||
void conv_rgb565_bgr24(void *output, const void *input,
|
||||
int width, int height,
|
||||
int out_stride, int in_stride);
|
||||
|
||||
void conv_yuyv_argb8888(void *output, const void *input,
|
||||
int width, int height,
|
||||
int out_stride, int in_stride);
|
||||
|
||||
void conv_copy(void *output, const void *input,
|
||||
int width, int height,
|
||||
int out_stride, int in_stride);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
128
src/minarch/libretro-common/include/gfx/scaler/scaler.h
Normal file
128
src/minarch/libretro-common/include/gfx/scaler/scaler.h
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (scaler.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_SCALER_H__
|
||||
#define __LIBRETRO_SDK_SCALER_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <boolean.h>
|
||||
#include <clamping.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
enum scaler_pix_fmt
|
||||
{
|
||||
SCALER_FMT_ARGB8888 = 0,
|
||||
SCALER_FMT_ABGR8888,
|
||||
SCALER_FMT_0RGB1555,
|
||||
SCALER_FMT_RGB565,
|
||||
SCALER_FMT_BGR24,
|
||||
SCALER_FMT_YUYV,
|
||||
SCALER_FMT_RGBA4444
|
||||
};
|
||||
|
||||
enum scaler_type
|
||||
{
|
||||
SCALER_TYPE_UNKNOWN = 0,
|
||||
SCALER_TYPE_POINT,
|
||||
SCALER_TYPE_BILINEAR,
|
||||
SCALER_TYPE_SINC
|
||||
};
|
||||
|
||||
struct scaler_filter
|
||||
{
|
||||
int16_t *filter;
|
||||
int *filter_pos;
|
||||
int filter_len;
|
||||
int filter_stride;
|
||||
};
|
||||
|
||||
struct scaler_ctx
|
||||
{
|
||||
void (*scaler_horiz)(const struct scaler_ctx*,
|
||||
const void*, int);
|
||||
void (*scaler_vert)(const struct scaler_ctx*,
|
||||
void*, int);
|
||||
void (*scaler_special)(const struct scaler_ctx*,
|
||||
void*, const void*, int, int, int, int, int, int);
|
||||
|
||||
void (*in_pixconv)(void*, const void*, int, int, int, int);
|
||||
void (*out_pixconv)(void*, const void*, int, int, int, int);
|
||||
void (*direct_pixconv)(void*, const void*, int, int, int, int);
|
||||
struct scaler_filter horiz, vert; /* ptr alignment */
|
||||
|
||||
struct
|
||||
{
|
||||
uint32_t *frame;
|
||||
int stride;
|
||||
} input;
|
||||
|
||||
struct
|
||||
{
|
||||
uint64_t *frame;
|
||||
int width;
|
||||
int height;
|
||||
int stride;
|
||||
} scaled;
|
||||
|
||||
struct
|
||||
{
|
||||
uint32_t *frame;
|
||||
int stride;
|
||||
} output;
|
||||
|
||||
int in_width;
|
||||
int in_height;
|
||||
int in_stride;
|
||||
|
||||
int out_width;
|
||||
int out_height;
|
||||
int out_stride;
|
||||
|
||||
enum scaler_pix_fmt in_fmt;
|
||||
enum scaler_pix_fmt out_fmt;
|
||||
enum scaler_type scaler_type;
|
||||
|
||||
bool unscaled;
|
||||
};
|
||||
|
||||
bool scaler_ctx_gen_filter(struct scaler_ctx *ctx);
|
||||
|
||||
void scaler_ctx_gen_reset(struct scaler_ctx *ctx);
|
||||
|
||||
/**
|
||||
* scaler_ctx_scale:
|
||||
* @ctx : pointer to scaler context object.
|
||||
* @output : pointer to output image.
|
||||
* @input : pointer to input image.
|
||||
*
|
||||
* Scales an input image to an output image.
|
||||
**/
|
||||
void scaler_ctx_scale(struct scaler_ctx *ctx,
|
||||
void *output, const void *input);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
46
src/minarch/libretro-common/include/gfx/scaler/scaler_int.h
Normal file
46
src/minarch/libretro-common/include/gfx/scaler/scaler_int.h
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (scaler_int.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_SCALER_INT_H__
|
||||
#define __LIBRETRO_SDK_SCALER_INT_H__
|
||||
|
||||
#include <gfx/scaler/scaler.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
void scaler_argb8888_vert(const struct scaler_ctx *ctx,
|
||||
void *output, int stride);
|
||||
|
||||
void scaler_argb8888_horiz(const struct scaler_ctx *ctx,
|
||||
const void *input, int stride);
|
||||
|
||||
void scaler_argb8888_point_special(const struct scaler_ctx *ctx,
|
||||
void *output, const void *input,
|
||||
int out_width, int out_height,
|
||||
int in_width, int in_height,
|
||||
int out_stride, int in_stride);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
220
src/minarch/libretro-common/include/gfx/video_frame.h
Normal file
220
src/minarch/libretro-common/include/gfx/video_frame.h
Normal file
|
|
@ -0,0 +1,220 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (video_frame.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _LIBRETRO_SDK_VIDEO_FRAME_H
|
||||
#define _LIBRETRO_SDK_VIDEO_FRAME_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <retro_common_api.h>
|
||||
#include <retro_inline.h>
|
||||
|
||||
#include <gfx/scaler/scaler.h>
|
||||
|
||||
#include <libretro.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
#define scaler_ctx_scale_direct(ctx, output, input) \
|
||||
{ \
|
||||
if (ctx && ctx->unscaled && ctx->direct_pixconv) \
|
||||
/* Just perform straight pixel conversion. */ \
|
||||
ctx->direct_pixconv(output, input, \
|
||||
ctx->out_width, ctx->out_height, \
|
||||
ctx->out_stride, ctx->in_stride); \
|
||||
else \
|
||||
scaler_ctx_scale(ctx, output, input); \
|
||||
}
|
||||
|
||||
static INLINE void video_frame_convert_rgb16_to_rgb32(
|
||||
struct scaler_ctx *scaler,
|
||||
void *output,
|
||||
const void *input,
|
||||
int width, int height,
|
||||
int in_pitch)
|
||||
{
|
||||
if (width != scaler->in_width || height != scaler->in_height)
|
||||
{
|
||||
scaler->in_width = width;
|
||||
scaler->in_height = height;
|
||||
scaler->out_width = width;
|
||||
scaler->out_height = height;
|
||||
scaler->in_fmt = SCALER_FMT_RGB565;
|
||||
scaler->out_fmt = SCALER_FMT_ARGB8888;
|
||||
scaler->scaler_type = SCALER_TYPE_POINT;
|
||||
scaler_ctx_gen_filter(scaler);
|
||||
}
|
||||
|
||||
scaler->in_stride = in_pitch;
|
||||
scaler->out_stride = width * sizeof(uint32_t);
|
||||
|
||||
scaler_ctx_scale_direct(scaler, output, input);
|
||||
}
|
||||
|
||||
static INLINE void video_frame_scale(
|
||||
struct scaler_ctx *scaler,
|
||||
void *output,
|
||||
const void *input,
|
||||
enum scaler_pix_fmt format,
|
||||
unsigned scaler_width,
|
||||
unsigned scaler_height,
|
||||
unsigned scaler_pitch,
|
||||
unsigned width,
|
||||
unsigned height,
|
||||
unsigned pitch)
|
||||
{
|
||||
if (
|
||||
width != (unsigned)scaler->in_width
|
||||
|| height != (unsigned)scaler->in_height
|
||||
|| format != scaler->in_fmt
|
||||
|| pitch != (unsigned)scaler->in_stride
|
||||
)
|
||||
{
|
||||
scaler->in_fmt = format;
|
||||
scaler->in_width = width;
|
||||
scaler->in_height = height;
|
||||
scaler->in_stride = pitch;
|
||||
|
||||
scaler->out_width = scaler_width;
|
||||
scaler->out_height = scaler_height;
|
||||
scaler->out_stride = scaler_pitch;
|
||||
|
||||
scaler_ctx_gen_filter(scaler);
|
||||
}
|
||||
|
||||
scaler_ctx_scale_direct(scaler, output, input);
|
||||
}
|
||||
|
||||
static INLINE void video_frame_record_scale(
|
||||
struct scaler_ctx *scaler,
|
||||
void *output,
|
||||
const void *input,
|
||||
unsigned scaler_width,
|
||||
unsigned scaler_height,
|
||||
unsigned scaler_pitch,
|
||||
unsigned width,
|
||||
unsigned height,
|
||||
unsigned pitch,
|
||||
bool bilinear)
|
||||
{
|
||||
if (
|
||||
width != (unsigned)scaler->in_width
|
||||
|| height != (unsigned)scaler->in_height
|
||||
)
|
||||
{
|
||||
scaler->in_width = width;
|
||||
scaler->in_height = height;
|
||||
scaler->in_stride = pitch;
|
||||
|
||||
scaler->scaler_type = bilinear ?
|
||||
SCALER_TYPE_BILINEAR : SCALER_TYPE_POINT;
|
||||
|
||||
scaler->out_width = scaler_width;
|
||||
scaler->out_height = scaler_height;
|
||||
scaler->out_stride = scaler_pitch;
|
||||
|
||||
scaler_ctx_gen_filter(scaler);
|
||||
}
|
||||
|
||||
scaler_ctx_scale_direct(scaler, output, input);
|
||||
}
|
||||
|
||||
static INLINE void video_frame_convert_argb8888_to_abgr8888(
|
||||
struct scaler_ctx *scaler,
|
||||
void *output, const void *input,
|
||||
int width, int height, int in_pitch)
|
||||
{
|
||||
if (width != scaler->in_width || height != scaler->in_height)
|
||||
{
|
||||
scaler->in_width = width;
|
||||
scaler->in_height = height;
|
||||
scaler->out_width = width;
|
||||
scaler->out_height = height;
|
||||
scaler->in_fmt = SCALER_FMT_ARGB8888;
|
||||
scaler->out_fmt = SCALER_FMT_ABGR8888;
|
||||
scaler->scaler_type = SCALER_TYPE_POINT;
|
||||
scaler_ctx_gen_filter(scaler);
|
||||
}
|
||||
|
||||
scaler->in_stride = in_pitch;
|
||||
scaler->out_stride = width * sizeof(uint32_t);
|
||||
|
||||
scaler_ctx_scale_direct(scaler, output, input);
|
||||
}
|
||||
|
||||
static INLINE void video_frame_convert_to_bgr24(
|
||||
struct scaler_ctx *scaler,
|
||||
void *output, const void *input,
|
||||
int width, int height, int in_pitch)
|
||||
{
|
||||
scaler->in_width = width;
|
||||
scaler->in_height = height;
|
||||
scaler->out_width = width;
|
||||
scaler->out_height = height;
|
||||
scaler->out_fmt = SCALER_FMT_BGR24;
|
||||
scaler->scaler_type = SCALER_TYPE_POINT;
|
||||
|
||||
scaler_ctx_gen_filter(scaler);
|
||||
|
||||
scaler->in_stride = in_pitch;
|
||||
scaler->out_stride = width * 3;
|
||||
|
||||
scaler_ctx_scale_direct(scaler, output, input);
|
||||
}
|
||||
|
||||
static INLINE void video_frame_convert_rgba_to_bgr(
|
||||
const void *src_data,
|
||||
void *dst_data,
|
||||
unsigned width)
|
||||
{
|
||||
unsigned x;
|
||||
uint8_t *dst = (uint8_t*)dst_data;
|
||||
const uint8_t *src = (const uint8_t*)src_data;
|
||||
|
||||
for (x = 0; x < width; x++, dst += 3, src += 4)
|
||||
{
|
||||
dst[0] = src[2];
|
||||
dst[1] = src[1];
|
||||
dst[2] = src[0];
|
||||
}
|
||||
}
|
||||
|
||||
static INLINE bool video_pixel_frame_scale(
|
||||
struct scaler_ctx *scaler,
|
||||
void *output, const void *data,
|
||||
unsigned width, unsigned height,
|
||||
size_t pitch)
|
||||
{
|
||||
scaler->in_width = width;
|
||||
scaler->in_height = height;
|
||||
scaler->out_width = width;
|
||||
scaler->out_height = height;
|
||||
scaler->in_stride = (int)pitch;
|
||||
scaler->out_stride = width * sizeof(uint16_t);
|
||||
|
||||
scaler_ctx_scale_direct(scaler, output, data);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
45
src/minarch/libretro-common/include/glsym/glsym.h
Normal file
45
src/minarch/libretro-common/include/glsym/glsym.h
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this libretro SDK code part (glsym).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_GLSYM_H__
|
||||
#define __LIBRETRO_SDK_GLSYM_H__
|
||||
|
||||
#include "rglgen.h"
|
||||
|
||||
#ifndef HAVE_PSGL
|
||||
#if defined(HAVE_OPENGLES2)
|
||||
#include "glsym_es2.h"
|
||||
#elif defined(HAVE_OPENGLES3)
|
||||
#include "glsym_es3.h"
|
||||
#else
|
||||
#ifdef HAVE_LIBNX
|
||||
#include "switch/nx_glsym.h"
|
||||
#endif
|
||||
#include "glsym_gl.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GLSYM_PRIVATE
|
||||
#include "glsym_private.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
639
src/minarch/libretro-common/include/glsym/glsym_es2.h
Normal file
639
src/minarch/libretro-common/include/glsym/glsym_es2.h
Normal file
|
|
@ -0,0 +1,639 @@
|
|||
#ifndef RGLGEN_DECL_H__
|
||||
#define RGLGEN_DECL_H__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#ifdef GL_APIENTRY
|
||||
typedef void (GL_APIENTRY *RGLGENGLDEBUGPROC)(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar*, GLvoid*);
|
||||
typedef void (GL_APIENTRY *RGLGENGLDEBUGPROCKHR)(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar*, GLvoid*);
|
||||
#else
|
||||
#ifndef APIENTRY
|
||||
#define APIENTRY
|
||||
#endif
|
||||
#ifndef APIENTRYP
|
||||
#define APIENTRYP APIENTRY *
|
||||
#endif
|
||||
typedef void (APIENTRY *RGLGENGLDEBUGPROCARB)(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar*, GLvoid*);
|
||||
typedef void (APIENTRY *RGLGENGLDEBUGPROC)(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar*, GLvoid*);
|
||||
#endif
|
||||
#ifndef GL_OES_EGL_image
|
||||
typedef void *GLeglImageOES;
|
||||
#endif
|
||||
#if !defined(GL_OES_fixed_point) && !defined(HAVE_OPENGLES2)
|
||||
typedef GLint GLfixed;
|
||||
#endif
|
||||
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBLENDBARRIERKHRPROC) (void);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDEBUGMESSAGECONTROLKHRPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDEBUGMESSAGEINSERTKHRPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDEBUGMESSAGECALLBACKKHRPROC) (RGLGENGLDEBUGPROCKHR callback, const void *userParam);
|
||||
typedef GLuint (GL_APIENTRYP RGLSYMGLGETDEBUGMESSAGELOGKHRPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPUSHDEBUGGROUPKHRPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPOPDEBUGGROUPKHRPROC) (void);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei length, const GLchar *label);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETPOINTERVKHRPROC) (GLenum pname, void **params);
|
||||
typedef GLenum (GL_APIENTRYP RGLSYMGLGETGRAPHICSRESETSTATUSKHRPROC) (void);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLREADNPIXELSKHRPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETNUNIFORMFVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETNUNIFORMIVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETNUNIFORMUIVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLCOPYIMAGESUBDATAOESPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLENABLEIOESPROC) (GLenum target, GLuint index);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDISABLEIOESPROC) (GLenum target, GLuint index);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBLENDEQUATIONIOESPROC) (GLuint buf, GLenum mode);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBLENDEQUATIONSEPARATEIOESPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBLENDFUNCIOESPROC) (GLuint buf, GLenum src, GLenum dst);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBLENDFUNCSEPARATEIOESPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLCOLORMASKIOESPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
|
||||
typedef GLboolean (GL_APIENTRYP RGLSYMGLISENABLEDIOESPROC) (GLenum target, GLuint index);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWELEMENTSBASEVERTEXOESPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWRANGEELEMENTSBASEVERTEXOESPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWELEMENTSINSTANCEDBASEVERTEXOESPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLMULTIDRAWELEMENTSBASEVERTEXOESPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, const GLint *basevertex);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLFRAMEBUFFERTEXTUREOESPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
|
||||
typedef void *(GL_APIENTRYP RGLSYMGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
|
||||
typedef GLboolean (GL_APIENTRYP RGLSYMGLUNMAPBUFFEROESPROC) (GLenum target);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void **params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPRIMITIVEBOUNDINGBOXOESPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLMINSAMPLESHADINGOESPROC) (GLfloat value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPATCHPARAMETERIOESPROC) (GLenum pname, GLint value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLFRAMEBUFFERTEXTURE3DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXPARAMETERIIVOESPROC) (GLenum target, GLenum pname, const GLint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXPARAMETERIUIVOESPROC) (GLenum target, GLenum pname, const GLuint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETTEXPARAMETERIIVOESPROC) (GLenum target, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETTEXPARAMETERIUIVOESPROC) (GLenum target, GLenum pname, GLuint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLSAMPLERPARAMETERIIVOESPROC) (GLuint sampler, GLenum pname, const GLint *param);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLSAMPLERPARAMETERIUIVOESPROC) (GLuint sampler, GLenum pname, const GLuint *param);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETSAMPLERPARAMETERIIVOESPROC) (GLuint sampler, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETSAMPLERPARAMETERIUIVOESPROC) (GLuint sampler, GLenum pname, GLuint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXBUFFEROESPROC) (GLenum target, GLenum internalformat, GLuint buffer);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXBUFFERRANGEOESPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXSTORAGE3DMULTISAMPLEOESPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXTUREVIEWOESPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBINDVERTEXARRAYOESPROC) (GLuint array);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
|
||||
typedef GLboolean (GL_APIENTRYP RGLSYMGLISVERTEXARRAYOESPROC) (GLuint array);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLVIEWPORTARRAYVOESPROC) (GLuint first, GLsizei count, const GLfloat *v);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLVIEWPORTINDEXEDFOESPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLVIEWPORTINDEXEDFVOESPROC) (GLuint index, const GLfloat *v);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLSCISSORARRAYVOESPROC) (GLuint first, GLsizei count, const GLint *v);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLSCISSORINDEXEDOESPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLSCISSORINDEXEDVOESPROC) (GLuint index, const GLint *v);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDEPTHRANGEARRAYFVOESPROC) (GLuint first, GLsizei count, const GLfloat *v);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDEPTHRANGEINDEXEDFOESPROC) (GLuint index, GLfloat n, GLfloat f);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETFLOATI_VOESPROC) (GLenum target, GLuint index, GLfloat *data);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWARRAYSINSTANCEDBASEINSTANCEEXTPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWELEMENTSINSTANCEDBASEINSTANCEEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBINDFRAGDATALOCATIONINDEXEDEXTPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
|
||||
typedef GLint (GL_APIENTRYP RGLSYMGLGETPROGRAMRESOURCELOCATIONINDEXEXTPROC) (GLuint program, GLenum programInterface, const GLchar *name);
|
||||
typedef GLint (GL_APIENTRYP RGLSYMGLGETFRAGDATAINDEXEXTPROC) (GLuint program, const GLchar *name);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBUFFERSTORAGEEXTPROC) (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLCLEARTEXIMAGEEXTPROC) (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLCLEARTEXSUBIMAGEEXTPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLCOPYIMAGESUBDATAEXTPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPOPGROUPMARKEREXTPROC) (void);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids);
|
||||
typedef GLboolean (GL_APIENTRYP RGLSYMGLISQUERYEXTPROC) (GLuint id);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBEGINQUERYEXTPROC) (GLenum target, GLuint id);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLENDQUERYEXTPROC) (GLenum target);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLQUERYCOUNTEREXTPROC) (GLuint id, GLenum target);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETQUERYOBJECTIVEXTPROC) (GLuint id, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWBUFFERSEXTPROC) (GLsizei n, const GLenum *bufs);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLENABLEIEXTPROC) (GLenum target, GLuint index);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDISABLEIEXTPROC) (GLenum target, GLuint index);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBLENDEQUATIONIEXTPROC) (GLuint buf, GLenum mode);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBLENDEQUATIONSEPARATEIEXTPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBLENDFUNCIEXTPROC) (GLuint buf, GLenum src, GLenum dst);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBLENDFUNCSEPARATEIEXTPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLCOLORMASKIEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
|
||||
typedef GLboolean (GL_APIENTRYP RGLSYMGLISENABLEDIEXTPROC) (GLenum target, GLuint index);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWELEMENTSBASEVERTEXEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWRANGEELEMENTSBASEVERTEXEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWELEMENTSINSTANCEDBASEVERTEXEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLMULTIDRAWELEMENTSBASEVERTEXEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, const GLint *basevertex);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLVERTEXATTRIBDIVISOREXTPROC) (GLuint index, GLuint divisor);
|
||||
typedef void *(GL_APIENTRYP RGLSYMGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLMULTIDRAWARRAYSINDIRECTEXTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLMULTIDRAWELEMENTSINDIRECTEXTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPOLYGONOFFSETCLAMPEXTPROC) (GLfloat factor, GLfloat units, GLfloat clamp);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPRIMITIVEBOUNDINGBOXEXTPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLRASTERSAMPLESEXTPROC) (GLuint samples, GLboolean fixedsamplelocations);
|
||||
typedef GLenum (GL_APIENTRYP RGLSYMGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
|
||||
typedef GLuint (GL_APIENTRYP RGLSYMGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params);
|
||||
typedef GLboolean (GL_APIENTRYP RGLSYMGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLFRAMEBUFFERPIXELLOCALSTORAGESIZEEXTPROC) (GLuint target, GLsizei size);
|
||||
typedef GLsizei (GL_APIENTRYP RGLSYMGLGETFRAMEBUFFERPIXELLOCALSTORAGESIZEEXTPROC) (GLuint target);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLCLEARPIXELLOCALSTORAGEUIEXTPROC) (GLsizei offset, GLsizei n, const GLuint *values);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXPAGECOMMITMENTEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPATCHPARAMETERIEXTPROC) (GLenum pname, GLint value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLSAMPLERPARAMETERIIVEXTPROC) (GLuint sampler, GLenum pname, const GLint *param);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLSAMPLERPARAMETERIUIVEXTPROC) (GLuint sampler, GLenum pname, const GLuint *param);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETSAMPLERPARAMETERIIVEXTPROC) (GLuint sampler, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETSAMPLERPARAMETERIUIVEXTPROC) (GLuint sampler, GLenum pname, GLuint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXBUFFERRANGEEXTPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXTUREVIEWEXTPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLWINDOWRECTANGLESEXTPROC) (GLenum mode, GLsizei count, const GLint *box);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLFRAMEBUFFERTEXTUREMULTISAMPLEMULTIVIEWOVRPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLsizei samples, GLint baseViewIndex, GLsizei numViews);
|
||||
|
||||
#define glBlendBarrierKHR __rglgen_glBlendBarrierKHR
|
||||
#define glDebugMessageControlKHR __rglgen_glDebugMessageControlKHR
|
||||
#define glDebugMessageInsertKHR __rglgen_glDebugMessageInsertKHR
|
||||
#define glDebugMessageCallbackKHR __rglgen_glDebugMessageCallbackKHR
|
||||
#define glGetDebugMessageLogKHR __rglgen_glGetDebugMessageLogKHR
|
||||
#define glPushDebugGroupKHR __rglgen_glPushDebugGroupKHR
|
||||
#define glPopDebugGroupKHR __rglgen_glPopDebugGroupKHR
|
||||
#define glObjectLabelKHR __rglgen_glObjectLabelKHR
|
||||
#define glGetObjectLabelKHR __rglgen_glGetObjectLabelKHR
|
||||
#define glObjectPtrLabelKHR __rglgen_glObjectPtrLabelKHR
|
||||
#define glGetObjectPtrLabelKHR __rglgen_glGetObjectPtrLabelKHR
|
||||
#define glGetPointervKHR __rglgen_glGetPointervKHR
|
||||
#define glGetGraphicsResetStatusKHR __rglgen_glGetGraphicsResetStatusKHR
|
||||
#define glReadnPixelsKHR __rglgen_glReadnPixelsKHR
|
||||
#define glGetnUniformfvKHR __rglgen_glGetnUniformfvKHR
|
||||
#define glGetnUniformivKHR __rglgen_glGetnUniformivKHR
|
||||
#define glGetnUniformuivKHR __rglgen_glGetnUniformuivKHR
|
||||
#define glEGLImageTargetTexture2DOES __rglgen_glEGLImageTargetTexture2DOES
|
||||
#define glEGLImageTargetRenderbufferStorageOES __rglgen_glEGLImageTargetRenderbufferStorageOES
|
||||
#define glCopyImageSubDataOES __rglgen_glCopyImageSubDataOES
|
||||
#define glEnableiOES __rglgen_glEnableiOES
|
||||
#define glDisableiOES __rglgen_glDisableiOES
|
||||
#define glBlendEquationiOES __rglgen_glBlendEquationiOES
|
||||
#define glBlendEquationSeparateiOES __rglgen_glBlendEquationSeparateiOES
|
||||
#define glBlendFunciOES __rglgen_glBlendFunciOES
|
||||
#define glBlendFuncSeparateiOES __rglgen_glBlendFuncSeparateiOES
|
||||
#define glColorMaskiOES __rglgen_glColorMaskiOES
|
||||
#define glIsEnablediOES __rglgen_glIsEnablediOES
|
||||
#define glDrawElementsBaseVertexOES __rglgen_glDrawElementsBaseVertexOES
|
||||
#define glDrawRangeElementsBaseVertexOES __rglgen_glDrawRangeElementsBaseVertexOES
|
||||
#define glDrawElementsInstancedBaseVertexOES __rglgen_glDrawElementsInstancedBaseVertexOES
|
||||
#define glMultiDrawElementsBaseVertexOES __rglgen_glMultiDrawElementsBaseVertexOES
|
||||
#define glFramebufferTextureOES __rglgen_glFramebufferTextureOES
|
||||
#define glGetProgramBinaryOES __rglgen_glGetProgramBinaryOES
|
||||
#define glProgramBinaryOES __rglgen_glProgramBinaryOES
|
||||
#define glMapBufferOES __rglgen_glMapBufferOES
|
||||
#define glUnmapBufferOES __rglgen_glUnmapBufferOES
|
||||
#define glGetBufferPointervOES __rglgen_glGetBufferPointervOES
|
||||
#define glPrimitiveBoundingBoxOES __rglgen_glPrimitiveBoundingBoxOES
|
||||
#define glMinSampleShadingOES __rglgen_glMinSampleShadingOES
|
||||
#define glPatchParameteriOES __rglgen_glPatchParameteriOES
|
||||
#define glTexImage3DOES __rglgen_glTexImage3DOES
|
||||
#define glTexSubImage3DOES __rglgen_glTexSubImage3DOES
|
||||
#define glCopyTexSubImage3DOES __rglgen_glCopyTexSubImage3DOES
|
||||
#define glCompressedTexImage3DOES __rglgen_glCompressedTexImage3DOES
|
||||
#define glCompressedTexSubImage3DOES __rglgen_glCompressedTexSubImage3DOES
|
||||
#define glFramebufferTexture3DOES __rglgen_glFramebufferTexture3DOES
|
||||
#define glTexParameterIivOES __rglgen_glTexParameterIivOES
|
||||
#define glTexParameterIuivOES __rglgen_glTexParameterIuivOES
|
||||
#define glGetTexParameterIivOES __rglgen_glGetTexParameterIivOES
|
||||
#define glGetTexParameterIuivOES __rglgen_glGetTexParameterIuivOES
|
||||
#define glSamplerParameterIivOES __rglgen_glSamplerParameterIivOES
|
||||
#define glSamplerParameterIuivOES __rglgen_glSamplerParameterIuivOES
|
||||
#define glGetSamplerParameterIivOES __rglgen_glGetSamplerParameterIivOES
|
||||
#define glGetSamplerParameterIuivOES __rglgen_glGetSamplerParameterIuivOES
|
||||
#define glTexBufferOES __rglgen_glTexBufferOES
|
||||
#define glTexBufferRangeOES __rglgen_glTexBufferRangeOES
|
||||
#define glTexStorage3DMultisampleOES __rglgen_glTexStorage3DMultisampleOES
|
||||
#define glTextureViewOES __rglgen_glTextureViewOES
|
||||
#define glBindVertexArrayOES __rglgen_glBindVertexArrayOES
|
||||
#define glDeleteVertexArraysOES __rglgen_glDeleteVertexArraysOES
|
||||
#define glGenVertexArraysOES __rglgen_glGenVertexArraysOES
|
||||
#define glIsVertexArrayOES __rglgen_glIsVertexArrayOES
|
||||
#define glViewportArrayvOES __rglgen_glViewportArrayvOES
|
||||
#define glViewportIndexedfOES __rglgen_glViewportIndexedfOES
|
||||
#define glViewportIndexedfvOES __rglgen_glViewportIndexedfvOES
|
||||
#define glScissorArrayvOES __rglgen_glScissorArrayvOES
|
||||
#define glScissorIndexedOES __rglgen_glScissorIndexedOES
|
||||
#define glScissorIndexedvOES __rglgen_glScissorIndexedvOES
|
||||
#define glDepthRangeArrayfvOES __rglgen_glDepthRangeArrayfvOES
|
||||
#define glDepthRangeIndexedfOES __rglgen_glDepthRangeIndexedfOES
|
||||
#define glGetFloati_vOES __rglgen_glGetFloati_vOES
|
||||
#define glDrawArraysInstancedBaseInstanceEXT __rglgen_glDrawArraysInstancedBaseInstanceEXT
|
||||
#define glDrawElementsInstancedBaseInstanceEXT __rglgen_glDrawElementsInstancedBaseInstanceEXT
|
||||
#define glDrawElementsInstancedBaseVertexBaseInstanceEXT __rglgen_glDrawElementsInstancedBaseVertexBaseInstanceEXT
|
||||
#define glBindFragDataLocationIndexedEXT __rglgen_glBindFragDataLocationIndexedEXT
|
||||
#define glBindFragDataLocationEXT __rglgen_glBindFragDataLocationEXT
|
||||
#define glGetProgramResourceLocationIndexEXT __rglgen_glGetProgramResourceLocationIndexEXT
|
||||
#define glGetFragDataIndexEXT __rglgen_glGetFragDataIndexEXT
|
||||
#define glBufferStorageEXT __rglgen_glBufferStorageEXT
|
||||
#define glClearTexImageEXT __rglgen_glClearTexImageEXT
|
||||
#define glClearTexSubImageEXT __rglgen_glClearTexSubImageEXT
|
||||
#define glCopyImageSubDataEXT __rglgen_glCopyImageSubDataEXT
|
||||
#define glLabelObjectEXT __rglgen_glLabelObjectEXT
|
||||
#define glGetObjectLabelEXT __rglgen_glGetObjectLabelEXT
|
||||
#define glInsertEventMarkerEXT __rglgen_glInsertEventMarkerEXT
|
||||
#define glPushGroupMarkerEXT __rglgen_glPushGroupMarkerEXT
|
||||
#define glPopGroupMarkerEXT __rglgen_glPopGroupMarkerEXT
|
||||
#define glDiscardFramebufferEXT __rglgen_glDiscardFramebufferEXT
|
||||
#define glGenQueriesEXT __rglgen_glGenQueriesEXT
|
||||
#define glDeleteQueriesEXT __rglgen_glDeleteQueriesEXT
|
||||
#define glIsQueryEXT __rglgen_glIsQueryEXT
|
||||
#define glBeginQueryEXT __rglgen_glBeginQueryEXT
|
||||
#define glEndQueryEXT __rglgen_glEndQueryEXT
|
||||
#define glQueryCounterEXT __rglgen_glQueryCounterEXT
|
||||
#define glGetQueryivEXT __rglgen_glGetQueryivEXT
|
||||
#define glGetQueryObjectivEXT __rglgen_glGetQueryObjectivEXT
|
||||
#define glGetQueryObjectuivEXT __rglgen_glGetQueryObjectuivEXT
|
||||
#define glDrawBuffersEXT __rglgen_glDrawBuffersEXT
|
||||
#define glEnableiEXT __rglgen_glEnableiEXT
|
||||
#define glDisableiEXT __rglgen_glDisableiEXT
|
||||
#define glBlendEquationiEXT __rglgen_glBlendEquationiEXT
|
||||
#define glBlendEquationSeparateiEXT __rglgen_glBlendEquationSeparateiEXT
|
||||
#define glBlendFunciEXT __rglgen_glBlendFunciEXT
|
||||
#define glBlendFuncSeparateiEXT __rglgen_glBlendFuncSeparateiEXT
|
||||
#define glColorMaskiEXT __rglgen_glColorMaskiEXT
|
||||
#define glIsEnablediEXT __rglgen_glIsEnablediEXT
|
||||
#define glDrawElementsBaseVertexEXT __rglgen_glDrawElementsBaseVertexEXT
|
||||
#define glDrawRangeElementsBaseVertexEXT __rglgen_glDrawRangeElementsBaseVertexEXT
|
||||
#define glDrawElementsInstancedBaseVertexEXT __rglgen_glDrawElementsInstancedBaseVertexEXT
|
||||
#define glMultiDrawElementsBaseVertexEXT __rglgen_glMultiDrawElementsBaseVertexEXT
|
||||
#define glDrawArraysInstancedEXT __rglgen_glDrawArraysInstancedEXT
|
||||
#define glDrawElementsInstancedEXT __rglgen_glDrawElementsInstancedEXT
|
||||
#define glFramebufferTextureEXT __rglgen_glFramebufferTextureEXT
|
||||
#define glVertexAttribDivisorEXT __rglgen_glVertexAttribDivisorEXT
|
||||
#define glMapBufferRangeEXT __rglgen_glMapBufferRangeEXT
|
||||
#define glFlushMappedBufferRangeEXT __rglgen_glFlushMappedBufferRangeEXT
|
||||
#define glMultiDrawArraysEXT __rglgen_glMultiDrawArraysEXT
|
||||
#define glMultiDrawElementsEXT __rglgen_glMultiDrawElementsEXT
|
||||
#define glMultiDrawArraysIndirectEXT __rglgen_glMultiDrawArraysIndirectEXT
|
||||
#define glMultiDrawElementsIndirectEXT __rglgen_glMultiDrawElementsIndirectEXT
|
||||
#define glRenderbufferStorageMultisampleEXT __rglgen_glRenderbufferStorageMultisampleEXT
|
||||
#define glFramebufferTexture2DMultisampleEXT __rglgen_glFramebufferTexture2DMultisampleEXT
|
||||
#define glReadBufferIndexedEXT __rglgen_glReadBufferIndexedEXT
|
||||
#define glDrawBuffersIndexedEXT __rglgen_glDrawBuffersIndexedEXT
|
||||
#define glGetIntegeri_vEXT __rglgen_glGetIntegeri_vEXT
|
||||
#define glPolygonOffsetClampEXT __rglgen_glPolygonOffsetClampEXT
|
||||
#define glPrimitiveBoundingBoxEXT __rglgen_glPrimitiveBoundingBoxEXT
|
||||
#define glRasterSamplesEXT __rglgen_glRasterSamplesEXT
|
||||
#define glGetGraphicsResetStatusEXT __rglgen_glGetGraphicsResetStatusEXT
|
||||
#define glReadnPixelsEXT __rglgen_glReadnPixelsEXT
|
||||
#define glGetnUniformfvEXT __rglgen_glGetnUniformfvEXT
|
||||
#define glGetnUniformivEXT __rglgen_glGetnUniformivEXT
|
||||
#define glActiveShaderProgramEXT __rglgen_glActiveShaderProgramEXT
|
||||
#define glBindProgramPipelineEXT __rglgen_glBindProgramPipelineEXT
|
||||
#define glCreateShaderProgramvEXT __rglgen_glCreateShaderProgramvEXT
|
||||
#define glDeleteProgramPipelinesEXT __rglgen_glDeleteProgramPipelinesEXT
|
||||
#define glGenProgramPipelinesEXT __rglgen_glGenProgramPipelinesEXT
|
||||
#define glGetProgramPipelineInfoLogEXT __rglgen_glGetProgramPipelineInfoLogEXT
|
||||
#define glGetProgramPipelineivEXT __rglgen_glGetProgramPipelineivEXT
|
||||
#define glIsProgramPipelineEXT __rglgen_glIsProgramPipelineEXT
|
||||
#define glProgramParameteriEXT __rglgen_glProgramParameteriEXT
|
||||
#define glProgramUniform1fEXT __rglgen_glProgramUniform1fEXT
|
||||
#define glProgramUniform1fvEXT __rglgen_glProgramUniform1fvEXT
|
||||
#define glProgramUniform1iEXT __rglgen_glProgramUniform1iEXT
|
||||
#define glProgramUniform1ivEXT __rglgen_glProgramUniform1ivEXT
|
||||
#define glProgramUniform2fEXT __rglgen_glProgramUniform2fEXT
|
||||
#define glProgramUniform2fvEXT __rglgen_glProgramUniform2fvEXT
|
||||
#define glProgramUniform2iEXT __rglgen_glProgramUniform2iEXT
|
||||
#define glProgramUniform2ivEXT __rglgen_glProgramUniform2ivEXT
|
||||
#define glProgramUniform3fEXT __rglgen_glProgramUniform3fEXT
|
||||
#define glProgramUniform3fvEXT __rglgen_glProgramUniform3fvEXT
|
||||
#define glProgramUniform3iEXT __rglgen_glProgramUniform3iEXT
|
||||
#define glProgramUniform3ivEXT __rglgen_glProgramUniform3ivEXT
|
||||
#define glProgramUniform4fEXT __rglgen_glProgramUniform4fEXT
|
||||
#define glProgramUniform4fvEXT __rglgen_glProgramUniform4fvEXT
|
||||
#define glProgramUniform4iEXT __rglgen_glProgramUniform4iEXT
|
||||
#define glProgramUniform4ivEXT __rglgen_glProgramUniform4ivEXT
|
||||
#define glProgramUniformMatrix2fvEXT __rglgen_glProgramUniformMatrix2fvEXT
|
||||
#define glProgramUniformMatrix3fvEXT __rglgen_glProgramUniformMatrix3fvEXT
|
||||
#define glProgramUniformMatrix4fvEXT __rglgen_glProgramUniformMatrix4fvEXT
|
||||
#define glUseProgramStagesEXT __rglgen_glUseProgramStagesEXT
|
||||
#define glValidateProgramPipelineEXT __rglgen_glValidateProgramPipelineEXT
|
||||
#define glProgramUniform1uiEXT __rglgen_glProgramUniform1uiEXT
|
||||
#define glProgramUniform2uiEXT __rglgen_glProgramUniform2uiEXT
|
||||
#define glProgramUniform3uiEXT __rglgen_glProgramUniform3uiEXT
|
||||
#define glProgramUniform4uiEXT __rglgen_glProgramUniform4uiEXT
|
||||
#define glProgramUniform1uivEXT __rglgen_glProgramUniform1uivEXT
|
||||
#define glProgramUniform2uivEXT __rglgen_glProgramUniform2uivEXT
|
||||
#define glProgramUniform3uivEXT __rglgen_glProgramUniform3uivEXT
|
||||
#define glProgramUniform4uivEXT __rglgen_glProgramUniform4uivEXT
|
||||
#define glProgramUniformMatrix2x3fvEXT __rglgen_glProgramUniformMatrix2x3fvEXT
|
||||
#define glProgramUniformMatrix3x2fvEXT __rglgen_glProgramUniformMatrix3x2fvEXT
|
||||
#define glProgramUniformMatrix2x4fvEXT __rglgen_glProgramUniformMatrix2x4fvEXT
|
||||
#define glProgramUniformMatrix4x2fvEXT __rglgen_glProgramUniformMatrix4x2fvEXT
|
||||
#define glProgramUniformMatrix3x4fvEXT __rglgen_glProgramUniformMatrix3x4fvEXT
|
||||
#define glProgramUniformMatrix4x3fvEXT __rglgen_glProgramUniformMatrix4x3fvEXT
|
||||
#define glFramebufferPixelLocalStorageSizeEXT __rglgen_glFramebufferPixelLocalStorageSizeEXT
|
||||
#define glGetFramebufferPixelLocalStorageSizeEXT __rglgen_glGetFramebufferPixelLocalStorageSizeEXT
|
||||
#define glClearPixelLocalStorageuiEXT __rglgen_glClearPixelLocalStorageuiEXT
|
||||
#define glTexPageCommitmentEXT __rglgen_glTexPageCommitmentEXT
|
||||
#define glPatchParameteriEXT __rglgen_glPatchParameteriEXT
|
||||
#define glTexParameterIivEXT __rglgen_glTexParameterIivEXT
|
||||
#define glTexParameterIuivEXT __rglgen_glTexParameterIuivEXT
|
||||
#define glGetTexParameterIivEXT __rglgen_glGetTexParameterIivEXT
|
||||
#define glGetTexParameterIuivEXT __rglgen_glGetTexParameterIuivEXT
|
||||
#define glSamplerParameterIivEXT __rglgen_glSamplerParameterIivEXT
|
||||
#define glSamplerParameterIuivEXT __rglgen_glSamplerParameterIuivEXT
|
||||
#define glGetSamplerParameterIivEXT __rglgen_glGetSamplerParameterIivEXT
|
||||
#define glGetSamplerParameterIuivEXT __rglgen_glGetSamplerParameterIuivEXT
|
||||
#define glTexBufferEXT __rglgen_glTexBufferEXT
|
||||
#define glTexBufferRangeEXT __rglgen_glTexBufferRangeEXT
|
||||
#define glTexStorage1DEXT __rglgen_glTexStorage1DEXT
|
||||
#define glTexStorage2DEXT __rglgen_glTexStorage2DEXT
|
||||
#define glTexStorage3DEXT __rglgen_glTexStorage3DEXT
|
||||
#define glTextureStorage1DEXT __rglgen_glTextureStorage1DEXT
|
||||
#define glTextureStorage2DEXT __rglgen_glTextureStorage2DEXT
|
||||
#define glTextureStorage3DEXT __rglgen_glTextureStorage3DEXT
|
||||
#define glTextureViewEXT __rglgen_glTextureViewEXT
|
||||
#define glesEXT __rglgen_glesEXT
|
||||
#define glFramebufferTextureMultiviewOVR __rglgen_glFramebufferTextureMultiviewOVR
|
||||
#define glFramebufferTextureMultisampleMultiviewOVR __rglgen_glFramebufferTextureMultisampleMultiviewOVR
|
||||
|
||||
extern RGLSYMGLBLENDBARRIERKHRPROC __rglgen_glBlendBarrierKHR;
|
||||
extern RGLSYMGLDEBUGMESSAGECONTROLKHRPROC __rglgen_glDebugMessageControlKHR;
|
||||
extern RGLSYMGLDEBUGMESSAGEINSERTKHRPROC __rglgen_glDebugMessageInsertKHR;
|
||||
extern RGLSYMGLDEBUGMESSAGECALLBACKKHRPROC __rglgen_glDebugMessageCallbackKHR;
|
||||
extern RGLSYMGLGETDEBUGMESSAGELOGKHRPROC __rglgen_glGetDebugMessageLogKHR;
|
||||
extern RGLSYMGLPUSHDEBUGGROUPKHRPROC __rglgen_glPushDebugGroupKHR;
|
||||
extern RGLSYMGLPOPDEBUGGROUPKHRPROC __rglgen_glPopDebugGroupKHR;
|
||||
extern RGLSYMGLOBJECTLABELKHRPROC __rglgen_glObjectLabelKHR;
|
||||
extern RGLSYMGLGETOBJECTLABELKHRPROC __rglgen_glGetObjectLabelKHR;
|
||||
extern RGLSYMGLOBJECTPTRLABELKHRPROC __rglgen_glObjectPtrLabelKHR;
|
||||
extern RGLSYMGLGETOBJECTPTRLABELKHRPROC __rglgen_glGetObjectPtrLabelKHR;
|
||||
extern RGLSYMGLGETPOINTERVKHRPROC __rglgen_glGetPointervKHR;
|
||||
extern RGLSYMGLGETGRAPHICSRESETSTATUSKHRPROC __rglgen_glGetGraphicsResetStatusKHR;
|
||||
extern RGLSYMGLREADNPIXELSKHRPROC __rglgen_glReadnPixelsKHR;
|
||||
extern RGLSYMGLGETNUNIFORMFVKHRPROC __rglgen_glGetnUniformfvKHR;
|
||||
extern RGLSYMGLGETNUNIFORMIVKHRPROC __rglgen_glGetnUniformivKHR;
|
||||
extern RGLSYMGLGETNUNIFORMUIVKHRPROC __rglgen_glGetnUniformuivKHR;
|
||||
extern RGLSYMGLEGLIMAGETARGETTEXTURE2DOESPROC __rglgen_glEGLImageTargetTexture2DOES;
|
||||
extern RGLSYMGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC __rglgen_glEGLImageTargetRenderbufferStorageOES;
|
||||
extern RGLSYMGLCOPYIMAGESUBDATAOESPROC __rglgen_glCopyImageSubDataOES;
|
||||
extern RGLSYMGLENABLEIOESPROC __rglgen_glEnableiOES;
|
||||
extern RGLSYMGLDISABLEIOESPROC __rglgen_glDisableiOES;
|
||||
extern RGLSYMGLBLENDEQUATIONIOESPROC __rglgen_glBlendEquationiOES;
|
||||
extern RGLSYMGLBLENDEQUATIONSEPARATEIOESPROC __rglgen_glBlendEquationSeparateiOES;
|
||||
extern RGLSYMGLBLENDFUNCIOESPROC __rglgen_glBlendFunciOES;
|
||||
extern RGLSYMGLBLENDFUNCSEPARATEIOESPROC __rglgen_glBlendFuncSeparateiOES;
|
||||
extern RGLSYMGLCOLORMASKIOESPROC __rglgen_glColorMaskiOES;
|
||||
extern RGLSYMGLISENABLEDIOESPROC __rglgen_glIsEnablediOES;
|
||||
extern RGLSYMGLDRAWELEMENTSBASEVERTEXOESPROC __rglgen_glDrawElementsBaseVertexOES;
|
||||
extern RGLSYMGLDRAWRANGEELEMENTSBASEVERTEXOESPROC __rglgen_glDrawRangeElementsBaseVertexOES;
|
||||
extern RGLSYMGLDRAWELEMENTSINSTANCEDBASEVERTEXOESPROC __rglgen_glDrawElementsInstancedBaseVertexOES;
|
||||
extern RGLSYMGLMULTIDRAWELEMENTSBASEVERTEXOESPROC __rglgen_glMultiDrawElementsBaseVertexOES;
|
||||
extern RGLSYMGLFRAMEBUFFERTEXTUREOESPROC __rglgen_glFramebufferTextureOES;
|
||||
extern RGLSYMGLGETPROGRAMBINARYOESPROC __rglgen_glGetProgramBinaryOES;
|
||||
extern RGLSYMGLPROGRAMBINARYOESPROC __rglgen_glProgramBinaryOES;
|
||||
extern RGLSYMGLMAPBUFFEROESPROC __rglgen_glMapBufferOES;
|
||||
extern RGLSYMGLUNMAPBUFFEROESPROC __rglgen_glUnmapBufferOES;
|
||||
extern RGLSYMGLGETBUFFERPOINTERVOESPROC __rglgen_glGetBufferPointervOES;
|
||||
extern RGLSYMGLPRIMITIVEBOUNDINGBOXOESPROC __rglgen_glPrimitiveBoundingBoxOES;
|
||||
extern RGLSYMGLMINSAMPLESHADINGOESPROC __rglgen_glMinSampleShadingOES;
|
||||
extern RGLSYMGLPATCHPARAMETERIOESPROC __rglgen_glPatchParameteriOES;
|
||||
extern RGLSYMGLTEXIMAGE3DOESPROC __rglgen_glTexImage3DOES;
|
||||
extern RGLSYMGLTEXSUBIMAGE3DOESPROC __rglgen_glTexSubImage3DOES;
|
||||
extern RGLSYMGLCOPYTEXSUBIMAGE3DOESPROC __rglgen_glCopyTexSubImage3DOES;
|
||||
extern RGLSYMGLCOMPRESSEDTEXIMAGE3DOESPROC __rglgen_glCompressedTexImage3DOES;
|
||||
extern RGLSYMGLCOMPRESSEDTEXSUBIMAGE3DOESPROC __rglgen_glCompressedTexSubImage3DOES;
|
||||
extern RGLSYMGLFRAMEBUFFERTEXTURE3DOESPROC __rglgen_glFramebufferTexture3DOES;
|
||||
extern RGLSYMGLTEXPARAMETERIIVOESPROC __rglgen_glTexParameterIivOES;
|
||||
extern RGLSYMGLTEXPARAMETERIUIVOESPROC __rglgen_glTexParameterIuivOES;
|
||||
extern RGLSYMGLGETTEXPARAMETERIIVOESPROC __rglgen_glGetTexParameterIivOES;
|
||||
extern RGLSYMGLGETTEXPARAMETERIUIVOESPROC __rglgen_glGetTexParameterIuivOES;
|
||||
extern RGLSYMGLSAMPLERPARAMETERIIVOESPROC __rglgen_glSamplerParameterIivOES;
|
||||
extern RGLSYMGLSAMPLERPARAMETERIUIVOESPROC __rglgen_glSamplerParameterIuivOES;
|
||||
extern RGLSYMGLGETSAMPLERPARAMETERIIVOESPROC __rglgen_glGetSamplerParameterIivOES;
|
||||
extern RGLSYMGLGETSAMPLERPARAMETERIUIVOESPROC __rglgen_glGetSamplerParameterIuivOES;
|
||||
extern RGLSYMGLTEXBUFFEROESPROC __rglgen_glTexBufferOES;
|
||||
extern RGLSYMGLTEXBUFFERRANGEOESPROC __rglgen_glTexBufferRangeOES;
|
||||
extern RGLSYMGLTEXSTORAGE3DMULTISAMPLEOESPROC __rglgen_glTexStorage3DMultisampleOES;
|
||||
extern RGLSYMGLTEXTUREVIEWOESPROC __rglgen_glTextureViewOES;
|
||||
extern RGLSYMGLBINDVERTEXARRAYOESPROC __rglgen_glBindVertexArrayOES;
|
||||
extern RGLSYMGLDELETEVERTEXARRAYSOESPROC __rglgen_glDeleteVertexArraysOES;
|
||||
extern RGLSYMGLGENVERTEXARRAYSOESPROC __rglgen_glGenVertexArraysOES;
|
||||
extern RGLSYMGLISVERTEXARRAYOESPROC __rglgen_glIsVertexArrayOES;
|
||||
extern RGLSYMGLVIEWPORTARRAYVOESPROC __rglgen_glViewportArrayvOES;
|
||||
extern RGLSYMGLVIEWPORTINDEXEDFOESPROC __rglgen_glViewportIndexedfOES;
|
||||
extern RGLSYMGLVIEWPORTINDEXEDFVOESPROC __rglgen_glViewportIndexedfvOES;
|
||||
extern RGLSYMGLSCISSORARRAYVOESPROC __rglgen_glScissorArrayvOES;
|
||||
extern RGLSYMGLSCISSORINDEXEDOESPROC __rglgen_glScissorIndexedOES;
|
||||
extern RGLSYMGLSCISSORINDEXEDVOESPROC __rglgen_glScissorIndexedvOES;
|
||||
extern RGLSYMGLDEPTHRANGEARRAYFVOESPROC __rglgen_glDepthRangeArrayfvOES;
|
||||
extern RGLSYMGLDEPTHRANGEINDEXEDFOESPROC __rglgen_glDepthRangeIndexedfOES;
|
||||
extern RGLSYMGLGETFLOATI_VOESPROC __rglgen_glGetFloati_vOES;
|
||||
extern RGLSYMGLDRAWARRAYSINSTANCEDBASEINSTANCEEXTPROC __rglgen_glDrawArraysInstancedBaseInstanceEXT;
|
||||
extern RGLSYMGLDRAWELEMENTSINSTANCEDBASEINSTANCEEXTPROC __rglgen_glDrawElementsInstancedBaseInstanceEXT;
|
||||
extern RGLSYMGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEEXTPROC __rglgen_glDrawElementsInstancedBaseVertexBaseInstanceEXT;
|
||||
extern RGLSYMGLBINDFRAGDATALOCATIONINDEXEDEXTPROC __rglgen_glBindFragDataLocationIndexedEXT;
|
||||
extern RGLSYMGLBINDFRAGDATALOCATIONEXTPROC __rglgen_glBindFragDataLocationEXT;
|
||||
extern RGLSYMGLGETPROGRAMRESOURCELOCATIONINDEXEXTPROC __rglgen_glGetProgramResourceLocationIndexEXT;
|
||||
extern RGLSYMGLGETFRAGDATAINDEXEXTPROC __rglgen_glGetFragDataIndexEXT;
|
||||
extern RGLSYMGLBUFFERSTORAGEEXTPROC __rglgen_glBufferStorageEXT;
|
||||
extern RGLSYMGLCLEARTEXIMAGEEXTPROC __rglgen_glClearTexImageEXT;
|
||||
extern RGLSYMGLCLEARTEXSUBIMAGEEXTPROC __rglgen_glClearTexSubImageEXT;
|
||||
extern RGLSYMGLCOPYIMAGESUBDATAEXTPROC __rglgen_glCopyImageSubDataEXT;
|
||||
extern RGLSYMGLLABELOBJECTEXTPROC __rglgen_glLabelObjectEXT;
|
||||
extern RGLSYMGLGETOBJECTLABELEXTPROC __rglgen_glGetObjectLabelEXT;
|
||||
extern RGLSYMGLINSERTEVENTMARKEREXTPROC __rglgen_glInsertEventMarkerEXT;
|
||||
extern RGLSYMGLPUSHGROUPMARKEREXTPROC __rglgen_glPushGroupMarkerEXT;
|
||||
extern RGLSYMGLPOPGROUPMARKEREXTPROC __rglgen_glPopGroupMarkerEXT;
|
||||
extern RGLSYMGLDISCARDFRAMEBUFFEREXTPROC __rglgen_glDiscardFramebufferEXT;
|
||||
extern RGLSYMGLGENQUERIESEXTPROC __rglgen_glGenQueriesEXT;
|
||||
extern RGLSYMGLDELETEQUERIESEXTPROC __rglgen_glDeleteQueriesEXT;
|
||||
extern RGLSYMGLISQUERYEXTPROC __rglgen_glIsQueryEXT;
|
||||
extern RGLSYMGLBEGINQUERYEXTPROC __rglgen_glBeginQueryEXT;
|
||||
extern RGLSYMGLENDQUERYEXTPROC __rglgen_glEndQueryEXT;
|
||||
extern RGLSYMGLQUERYCOUNTEREXTPROC __rglgen_glQueryCounterEXT;
|
||||
extern RGLSYMGLGETQUERYIVEXTPROC __rglgen_glGetQueryivEXT;
|
||||
extern RGLSYMGLGETQUERYOBJECTIVEXTPROC __rglgen_glGetQueryObjectivEXT;
|
||||
extern RGLSYMGLGETQUERYOBJECTUIVEXTPROC __rglgen_glGetQueryObjectuivEXT;
|
||||
extern RGLSYMGLDRAWBUFFERSEXTPROC __rglgen_glDrawBuffersEXT;
|
||||
extern RGLSYMGLENABLEIEXTPROC __rglgen_glEnableiEXT;
|
||||
extern RGLSYMGLDISABLEIEXTPROC __rglgen_glDisableiEXT;
|
||||
extern RGLSYMGLBLENDEQUATIONIEXTPROC __rglgen_glBlendEquationiEXT;
|
||||
extern RGLSYMGLBLENDEQUATIONSEPARATEIEXTPROC __rglgen_glBlendEquationSeparateiEXT;
|
||||
extern RGLSYMGLBLENDFUNCIEXTPROC __rglgen_glBlendFunciEXT;
|
||||
extern RGLSYMGLBLENDFUNCSEPARATEIEXTPROC __rglgen_glBlendFuncSeparateiEXT;
|
||||
extern RGLSYMGLCOLORMASKIEXTPROC __rglgen_glColorMaskiEXT;
|
||||
extern RGLSYMGLISENABLEDIEXTPROC __rglgen_glIsEnablediEXT;
|
||||
extern RGLSYMGLDRAWELEMENTSBASEVERTEXEXTPROC __rglgen_glDrawElementsBaseVertexEXT;
|
||||
extern RGLSYMGLDRAWRANGEELEMENTSBASEVERTEXEXTPROC __rglgen_glDrawRangeElementsBaseVertexEXT;
|
||||
extern RGLSYMGLDRAWELEMENTSINSTANCEDBASEVERTEXEXTPROC __rglgen_glDrawElementsInstancedBaseVertexEXT;
|
||||
extern RGLSYMGLMULTIDRAWELEMENTSBASEVERTEXEXTPROC __rglgen_glMultiDrawElementsBaseVertexEXT;
|
||||
extern RGLSYMGLDRAWARRAYSINSTANCEDEXTPROC __rglgen_glDrawArraysInstancedEXT;
|
||||
extern RGLSYMGLDRAWELEMENTSINSTANCEDEXTPROC __rglgen_glDrawElementsInstancedEXT;
|
||||
extern RGLSYMGLFRAMEBUFFERTEXTUREEXTPROC __rglgen_glFramebufferTextureEXT;
|
||||
extern RGLSYMGLVERTEXATTRIBDIVISOREXTPROC __rglgen_glVertexAttribDivisorEXT;
|
||||
extern RGLSYMGLMAPBUFFERRANGEEXTPROC __rglgen_glMapBufferRangeEXT;
|
||||
extern RGLSYMGLFLUSHMAPPEDBUFFERRANGEEXTPROC __rglgen_glFlushMappedBufferRangeEXT;
|
||||
extern RGLSYMGLMULTIDRAWARRAYSEXTPROC __rglgen_glMultiDrawArraysEXT;
|
||||
extern RGLSYMGLMULTIDRAWELEMENTSEXTPROC __rglgen_glMultiDrawElementsEXT;
|
||||
extern RGLSYMGLMULTIDRAWARRAYSINDIRECTEXTPROC __rglgen_glMultiDrawArraysIndirectEXT;
|
||||
extern RGLSYMGLMULTIDRAWELEMENTSINDIRECTEXTPROC __rglgen_glMultiDrawElementsIndirectEXT;
|
||||
extern RGLSYMGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC __rglgen_glRenderbufferStorageMultisampleEXT;
|
||||
extern RGLSYMGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC __rglgen_glFramebufferTexture2DMultisampleEXT;
|
||||
extern RGLSYMGLREADBUFFERINDEXEDEXTPROC __rglgen_glReadBufferIndexedEXT;
|
||||
extern RGLSYMGLDRAWBUFFERSINDEXEDEXTPROC __rglgen_glDrawBuffersIndexedEXT;
|
||||
extern RGLSYMGLGETINTEGERI_VEXTPROC __rglgen_glGetIntegeri_vEXT;
|
||||
extern RGLSYMGLPOLYGONOFFSETCLAMPEXTPROC __rglgen_glPolygonOffsetClampEXT;
|
||||
extern RGLSYMGLPRIMITIVEBOUNDINGBOXEXTPROC __rglgen_glPrimitiveBoundingBoxEXT;
|
||||
extern RGLSYMGLRASTERSAMPLESEXTPROC __rglgen_glRasterSamplesEXT;
|
||||
extern RGLSYMGLGETGRAPHICSRESETSTATUSEXTPROC __rglgen_glGetGraphicsResetStatusEXT;
|
||||
extern RGLSYMGLREADNPIXELSEXTPROC __rglgen_glReadnPixelsEXT;
|
||||
extern RGLSYMGLGETNUNIFORMFVEXTPROC __rglgen_glGetnUniformfvEXT;
|
||||
extern RGLSYMGLGETNUNIFORMIVEXTPROC __rglgen_glGetnUniformivEXT;
|
||||
extern RGLSYMGLACTIVESHADERPROGRAMEXTPROC __rglgen_glActiveShaderProgramEXT;
|
||||
extern RGLSYMGLBINDPROGRAMPIPELINEEXTPROC __rglgen_glBindProgramPipelineEXT;
|
||||
extern RGLSYMGLCREATESHADERPROGRAMVEXTPROC __rglgen_glCreateShaderProgramvEXT;
|
||||
extern RGLSYMGLDELETEPROGRAMPIPELINESEXTPROC __rglgen_glDeleteProgramPipelinesEXT;
|
||||
extern RGLSYMGLGENPROGRAMPIPELINESEXTPROC __rglgen_glGenProgramPipelinesEXT;
|
||||
extern RGLSYMGLGETPROGRAMPIPELINEINFOLOGEXTPROC __rglgen_glGetProgramPipelineInfoLogEXT;
|
||||
extern RGLSYMGLGETPROGRAMPIPELINEIVEXTPROC __rglgen_glGetProgramPipelineivEXT;
|
||||
extern RGLSYMGLISPROGRAMPIPELINEEXTPROC __rglgen_glIsProgramPipelineEXT;
|
||||
extern RGLSYMGLPROGRAMPARAMETERIEXTPROC __rglgen_glProgramParameteriEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM1FEXTPROC __rglgen_glProgramUniform1fEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM1FVEXTPROC __rglgen_glProgramUniform1fvEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM1IEXTPROC __rglgen_glProgramUniform1iEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM1IVEXTPROC __rglgen_glProgramUniform1ivEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM2FEXTPROC __rglgen_glProgramUniform2fEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM2FVEXTPROC __rglgen_glProgramUniform2fvEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM2IEXTPROC __rglgen_glProgramUniform2iEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM2IVEXTPROC __rglgen_glProgramUniform2ivEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM3FEXTPROC __rglgen_glProgramUniform3fEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM3FVEXTPROC __rglgen_glProgramUniform3fvEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM3IEXTPROC __rglgen_glProgramUniform3iEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM3IVEXTPROC __rglgen_glProgramUniform3ivEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM4FEXTPROC __rglgen_glProgramUniform4fEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM4FVEXTPROC __rglgen_glProgramUniform4fvEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM4IEXTPROC __rglgen_glProgramUniform4iEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM4IVEXTPROC __rglgen_glProgramUniform4ivEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORMMATRIX2FVEXTPROC __rglgen_glProgramUniformMatrix2fvEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORMMATRIX3FVEXTPROC __rglgen_glProgramUniformMatrix3fvEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORMMATRIX4FVEXTPROC __rglgen_glProgramUniformMatrix4fvEXT;
|
||||
extern RGLSYMGLUSEPROGRAMSTAGESEXTPROC __rglgen_glUseProgramStagesEXT;
|
||||
extern RGLSYMGLVALIDATEPROGRAMPIPELINEEXTPROC __rglgen_glValidateProgramPipelineEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM1UIEXTPROC __rglgen_glProgramUniform1uiEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM2UIEXTPROC __rglgen_glProgramUniform2uiEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM3UIEXTPROC __rglgen_glProgramUniform3uiEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM4UIEXTPROC __rglgen_glProgramUniform4uiEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM1UIVEXTPROC __rglgen_glProgramUniform1uivEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM2UIVEXTPROC __rglgen_glProgramUniform2uivEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM3UIVEXTPROC __rglgen_glProgramUniform3uivEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM4UIVEXTPROC __rglgen_glProgramUniform4uivEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC __rglgen_glProgramUniformMatrix2x3fvEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC __rglgen_glProgramUniformMatrix3x2fvEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC __rglgen_glProgramUniformMatrix2x4fvEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC __rglgen_glProgramUniformMatrix4x2fvEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC __rglgen_glProgramUniformMatrix3x4fvEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC __rglgen_glProgramUniformMatrix4x3fvEXT;
|
||||
extern RGLSYMGLFRAMEBUFFERPIXELLOCALSTORAGESIZEEXTPROC __rglgen_glFramebufferPixelLocalStorageSizeEXT;
|
||||
extern RGLSYMGLGETFRAMEBUFFERPIXELLOCALSTORAGESIZEEXTPROC __rglgen_glGetFramebufferPixelLocalStorageSizeEXT;
|
||||
extern RGLSYMGLCLEARPIXELLOCALSTORAGEUIEXTPROC __rglgen_glClearPixelLocalStorageuiEXT;
|
||||
extern RGLSYMGLTEXPAGECOMMITMENTEXTPROC __rglgen_glTexPageCommitmentEXT;
|
||||
extern RGLSYMGLPATCHPARAMETERIEXTPROC __rglgen_glPatchParameteriEXT;
|
||||
extern RGLSYMGLTEXPARAMETERIIVEXTPROC __rglgen_glTexParameterIivEXT;
|
||||
extern RGLSYMGLTEXPARAMETERIUIVEXTPROC __rglgen_glTexParameterIuivEXT;
|
||||
extern RGLSYMGLGETTEXPARAMETERIIVEXTPROC __rglgen_glGetTexParameterIivEXT;
|
||||
extern RGLSYMGLGETTEXPARAMETERIUIVEXTPROC __rglgen_glGetTexParameterIuivEXT;
|
||||
extern RGLSYMGLSAMPLERPARAMETERIIVEXTPROC __rglgen_glSamplerParameterIivEXT;
|
||||
extern RGLSYMGLSAMPLERPARAMETERIUIVEXTPROC __rglgen_glSamplerParameterIuivEXT;
|
||||
extern RGLSYMGLGETSAMPLERPARAMETERIIVEXTPROC __rglgen_glGetSamplerParameterIivEXT;
|
||||
extern RGLSYMGLGETSAMPLERPARAMETERIUIVEXTPROC __rglgen_glGetSamplerParameterIuivEXT;
|
||||
extern RGLSYMGLTEXBUFFEREXTPROC __rglgen_glTexBufferEXT;
|
||||
extern RGLSYMGLTEXBUFFERRANGEEXTPROC __rglgen_glTexBufferRangeEXT;
|
||||
extern RGLSYMGLTEXSTORAGE1DEXTPROC __rglgen_glTexStorage1DEXT;
|
||||
extern RGLSYMGLTEXSTORAGE2DEXTPROC __rglgen_glTexStorage2DEXT;
|
||||
extern RGLSYMGLTEXSTORAGE3DEXTPROC __rglgen_glTexStorage3DEXT;
|
||||
extern RGLSYMGLTEXTURESTORAGE1DEXTPROC __rglgen_glTextureStorage1DEXT;
|
||||
extern RGLSYMGLTEXTURESTORAGE2DEXTPROC __rglgen_glTextureStorage2DEXT;
|
||||
extern RGLSYMGLTEXTURESTORAGE3DEXTPROC __rglgen_glTextureStorage3DEXT;
|
||||
extern RGLSYMGLTEXTUREVIEWEXTPROC __rglgen_glTextureViewEXT;
|
||||
extern RGLSYMGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC __rglgen_glFramebufferTextureMultiviewOVR;
|
||||
extern RGLSYMGLFRAMEBUFFERTEXTUREMULTISAMPLEMULTIVIEWOVRPROC __rglgen_glFramebufferTextureMultisampleMultiviewOVR;
|
||||
|
||||
struct rglgen_sym_map { const char *sym; void *ptr; };
|
||||
extern const struct rglgen_sym_map rglgen_symbol_map[];
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
650
src/minarch/libretro-common/include/glsym/glsym_es3.h
Normal file
650
src/minarch/libretro-common/include/glsym/glsym_es3.h
Normal file
|
|
@ -0,0 +1,650 @@
|
|||
#ifndef RGLGEN_DECL_H__
|
||||
#define RGLGEN_DECL_H__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#ifdef GL_APIENTRY
|
||||
typedef void (GL_APIENTRY *RGLGENGLDEBUGPROC)(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar*, GLvoid*);
|
||||
typedef void (GL_APIENTRY *RGLGENGLDEBUGPROCKHR)(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar*, GLvoid*);
|
||||
#else
|
||||
#ifndef APIENTRY
|
||||
#define APIENTRY
|
||||
#endif
|
||||
#ifndef APIENTRYP
|
||||
#define APIENTRYP APIENTRY *
|
||||
#endif
|
||||
typedef void (APIENTRY *RGLGENGLDEBUGPROCARB)(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar*, GLvoid*);
|
||||
typedef void (APIENTRY *RGLGENGLDEBUGPROC)(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar*, GLvoid*);
|
||||
#endif
|
||||
#ifndef GL_OES_EGL_image
|
||||
typedef void *GLeglImageOES;
|
||||
#endif
|
||||
#if !defined(GL_OES_fixed_point) && !defined(HAVE_OPENGLES2)
|
||||
typedef GLint GLfixed;
|
||||
#endif
|
||||
#if defined(OSX) && !defined(MAC_OS_X_VERSION_10_7)
|
||||
typedef long long int GLint64;
|
||||
typedef unsigned long long int GLuint64;
|
||||
typedef unsigned long long int GLuint64EXT;
|
||||
typedef struct __GLsync *GLsync;
|
||||
#endif
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBLENDBARRIERKHRPROC) (void);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDEBUGMESSAGECONTROLKHRPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDEBUGMESSAGEINSERTKHRPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDEBUGMESSAGECALLBACKKHRPROC) (RGLGENGLDEBUGPROCKHR callback, const void *userParam);
|
||||
typedef GLuint (GL_APIENTRYP RGLSYMGLGETDEBUGMESSAGELOGKHRPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPUSHDEBUGGROUPKHRPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPOPDEBUGGROUPKHRPROC) (void);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei length, const GLchar *label);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETPOINTERVKHRPROC) (GLenum pname, void **params);
|
||||
typedef GLenum (GL_APIENTRYP RGLSYMGLGETGRAPHICSRESETSTATUSKHRPROC) (void);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLREADNPIXELSKHRPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETNUNIFORMFVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETNUNIFORMIVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETNUNIFORMUIVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLCOPYIMAGESUBDATAOESPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLENABLEIOESPROC) (GLenum target, GLuint index);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDISABLEIOESPROC) (GLenum target, GLuint index);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBLENDEQUATIONIOESPROC) (GLuint buf, GLenum mode);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBLENDEQUATIONSEPARATEIOESPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBLENDFUNCIOESPROC) (GLuint buf, GLenum src, GLenum dst);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBLENDFUNCSEPARATEIOESPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLCOLORMASKIOESPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
|
||||
typedef GLboolean (GL_APIENTRYP RGLSYMGLISENABLEDIOESPROC) (GLenum target, GLuint index);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWELEMENTSBASEVERTEXOESPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWRANGEELEMENTSBASEVERTEXOESPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWELEMENTSINSTANCEDBASEVERTEXOESPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLMULTIDRAWELEMENTSBASEVERTEXOESPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, const GLint *basevertex);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLFRAMEBUFFERTEXTUREOESPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
|
||||
typedef void *(GL_APIENTRYP RGLSYMGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
|
||||
typedef GLboolean (GL_APIENTRYP RGLSYMGLUNMAPBUFFEROESPROC) (GLenum target);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void **params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPRIMITIVEBOUNDINGBOXOESPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLMINSAMPLESHADINGOESPROC) (GLfloat value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPATCHPARAMETERIOESPROC) (GLenum pname, GLint value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLFRAMEBUFFERTEXTURE3DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXPARAMETERIIVOESPROC) (GLenum target, GLenum pname, const GLint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXPARAMETERIUIVOESPROC) (GLenum target, GLenum pname, const GLuint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETTEXPARAMETERIIVOESPROC) (GLenum target, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETTEXPARAMETERIUIVOESPROC) (GLenum target, GLenum pname, GLuint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLSAMPLERPARAMETERIIVOESPROC) (GLuint sampler, GLenum pname, const GLint *param);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLSAMPLERPARAMETERIUIVOESPROC) (GLuint sampler, GLenum pname, const GLuint *param);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETSAMPLERPARAMETERIIVOESPROC) (GLuint sampler, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETSAMPLERPARAMETERIUIVOESPROC) (GLuint sampler, GLenum pname, GLuint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXBUFFEROESPROC) (GLenum target, GLenum internalformat, GLuint buffer);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXBUFFERRANGEOESPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXSTORAGE3DMULTISAMPLEOESPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXTUREVIEWOESPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBINDVERTEXARRAYOESPROC) (GLuint array);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
|
||||
typedef GLboolean (GL_APIENTRYP RGLSYMGLISVERTEXARRAYOESPROC) (GLuint array);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLVIEWPORTARRAYVOESPROC) (GLuint first, GLsizei count, const GLfloat *v);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLVIEWPORTINDEXEDFOESPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLVIEWPORTINDEXEDFVOESPROC) (GLuint index, const GLfloat *v);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLSCISSORARRAYVOESPROC) (GLuint first, GLsizei count, const GLint *v);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLSCISSORINDEXEDOESPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLSCISSORINDEXEDVOESPROC) (GLuint index, const GLint *v);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDEPTHRANGEARRAYFVOESPROC) (GLuint first, GLsizei count, const GLfloat *v);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDEPTHRANGEINDEXEDFOESPROC) (GLuint index, GLfloat n, GLfloat f);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETFLOATI_VOESPROC) (GLenum target, GLuint index, GLfloat *data);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWARRAYSINSTANCEDBASEINSTANCEEXTPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWELEMENTSINSTANCEDBASEINSTANCEEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBINDFRAGDATALOCATIONINDEXEDEXTPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
|
||||
typedef GLint (GL_APIENTRYP RGLSYMGLGETPROGRAMRESOURCELOCATIONINDEXEXTPROC) (GLuint program, GLenum programInterface, const GLchar *name);
|
||||
typedef GLint (GL_APIENTRYP RGLSYMGLGETFRAGDATAINDEXEXTPROC) (GLuint program, const GLchar *name);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBUFFERSTORAGEEXTPROC) (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLCLEARTEXIMAGEEXTPROC) (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLCLEARTEXSUBIMAGEEXTPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLCOPYIMAGESUBDATAEXTPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPOPGROUPMARKEREXTPROC) (void);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids);
|
||||
typedef GLboolean (GL_APIENTRYP RGLSYMGLISQUERYEXTPROC) (GLuint id);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBEGINQUERYEXTPROC) (GLenum target, GLuint id);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLENDQUERYEXTPROC) (GLenum target);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLQUERYCOUNTEREXTPROC) (GLuint id, GLenum target);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETQUERYOBJECTIVEXTPROC) (GLuint id, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWBUFFERSEXTPROC) (GLsizei n, const GLenum *bufs);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLENABLEIEXTPROC) (GLenum target, GLuint index);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDISABLEIEXTPROC) (GLenum target, GLuint index);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBLENDEQUATIONIEXTPROC) (GLuint buf, GLenum mode);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBLENDEQUATIONSEPARATEIEXTPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBLENDFUNCIEXTPROC) (GLuint buf, GLenum src, GLenum dst);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBLENDFUNCSEPARATEIEXTPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLCOLORMASKIEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
|
||||
typedef GLboolean (GL_APIENTRYP RGLSYMGLISENABLEDIEXTPROC) (GLenum target, GLuint index);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWELEMENTSBASEVERTEXEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWRANGEELEMENTSBASEVERTEXEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWELEMENTSINSTANCEDBASEVERTEXEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLMULTIDRAWELEMENTSBASEVERTEXEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, const GLint *basevertex);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLVERTEXATTRIBDIVISOREXTPROC) (GLuint index, GLuint divisor);
|
||||
typedef void *(GL_APIENTRYP RGLSYMGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLMULTIDRAWARRAYSINDIRECTEXTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLMULTIDRAWELEMENTSINDIRECTEXTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPOLYGONOFFSETCLAMPEXTPROC) (GLfloat factor, GLfloat units, GLfloat clamp);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPRIMITIVEBOUNDINGBOXEXTPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLRASTERSAMPLESEXTPROC) (GLuint samples, GLboolean fixedsamplelocations);
|
||||
typedef GLenum (GL_APIENTRYP RGLSYMGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
|
||||
typedef GLuint (GL_APIENTRYP RGLSYMGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params);
|
||||
typedef GLboolean (GL_APIENTRYP RGLSYMGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLFRAMEBUFFERPIXELLOCALSTORAGESIZEEXTPROC) (GLuint target, GLsizei size);
|
||||
typedef GLsizei (GL_APIENTRYP RGLSYMGLGETFRAMEBUFFERPIXELLOCALSTORAGESIZEEXTPROC) (GLuint target);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLCLEARPIXELLOCALSTORAGEUIEXTPROC) (GLsizei offset, GLsizei n, const GLuint *values);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXPAGECOMMITMENTEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLPATCHPARAMETERIEXTPROC) (GLenum pname, GLint value);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLSAMPLERPARAMETERIIVEXTPROC) (GLuint sampler, GLenum pname, const GLint *param);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLSAMPLERPARAMETERIUIVEXTPROC) (GLuint sampler, GLenum pname, const GLuint *param);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETSAMPLERPARAMETERIIVEXTPROC) (GLuint sampler, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLGETSAMPLERPARAMETERIUIVEXTPROC) (GLuint sampler, GLenum pname, GLuint *params);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXBUFFERRANGEEXTPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLTEXTUREVIEWEXTPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLWINDOWRECTANGLESEXTPROC) (GLenum mode, GLsizei count, const GLint *box);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews);
|
||||
typedef void (GL_APIENTRYP RGLSYMGLFRAMEBUFFERTEXTUREMULTISAMPLEMULTIVIEWOVRPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLsizei samples, GLint baseViewIndex, GLsizei numViews);
|
||||
|
||||
#define glBlendBarrierKHR __rglgen_glBlendBarrierKHR
|
||||
#define glDebugMessageControlKHR __rglgen_glDebugMessageControlKHR
|
||||
#define glDebugMessageInsertKHR __rglgen_glDebugMessageInsertKHR
|
||||
#define glDebugMessageCallbackKHR __rglgen_glDebugMessageCallbackKHR
|
||||
#define glGetDebugMessageLogKHR __rglgen_glGetDebugMessageLogKHR
|
||||
#define glPushDebugGroupKHR __rglgen_glPushDebugGroupKHR
|
||||
#define glPopDebugGroupKHR __rglgen_glPopDebugGroupKHR
|
||||
#define glObjectLabelKHR __rglgen_glObjectLabelKHR
|
||||
#define glGetObjectLabelKHR __rglgen_glGetObjectLabelKHR
|
||||
#define glObjectPtrLabelKHR __rglgen_glObjectPtrLabelKHR
|
||||
#define glGetObjectPtrLabelKHR __rglgen_glGetObjectPtrLabelKHR
|
||||
#define glGetPointervKHR __rglgen_glGetPointervKHR
|
||||
#define glGetGraphicsResetStatusKHR __rglgen_glGetGraphicsResetStatusKHR
|
||||
#define glReadnPixelsKHR __rglgen_glReadnPixelsKHR
|
||||
#define glGetnUniformfvKHR __rglgen_glGetnUniformfvKHR
|
||||
#define glGetnUniformivKHR __rglgen_glGetnUniformivKHR
|
||||
#define glGetnUniformuivKHR __rglgen_glGetnUniformuivKHR
|
||||
#define glEGLImageTargetTexture2DOES __rglgen_glEGLImageTargetTexture2DOES
|
||||
#define glEGLImageTargetRenderbufferStorageOES __rglgen_glEGLImageTargetRenderbufferStorageOES
|
||||
#define glCopyImageSubDataOES __rglgen_glCopyImageSubDataOES
|
||||
#define glEnableiOES __rglgen_glEnableiOES
|
||||
#define glDisableiOES __rglgen_glDisableiOES
|
||||
#define glBlendEquationiOES __rglgen_glBlendEquationiOES
|
||||
#define glBlendEquationSeparateiOES __rglgen_glBlendEquationSeparateiOES
|
||||
#define glBlendFunciOES __rglgen_glBlendFunciOES
|
||||
#define glBlendFuncSeparateiOES __rglgen_glBlendFuncSeparateiOES
|
||||
#define glColorMaskiOES __rglgen_glColorMaskiOES
|
||||
#define glIsEnablediOES __rglgen_glIsEnablediOES
|
||||
#define glDrawElementsBaseVertexOES __rglgen_glDrawElementsBaseVertexOES
|
||||
#define glDrawRangeElementsBaseVertexOES __rglgen_glDrawRangeElementsBaseVertexOES
|
||||
#define glDrawElementsInstancedBaseVertexOES __rglgen_glDrawElementsInstancedBaseVertexOES
|
||||
#define glMultiDrawElementsBaseVertexOES __rglgen_glMultiDrawElementsBaseVertexOES
|
||||
#define glFramebufferTextureOES __rglgen_glFramebufferTextureOES
|
||||
#define glGetProgramBinaryOES __rglgen_glGetProgramBinaryOES
|
||||
#define glProgramBinaryOES __rglgen_glProgramBinaryOES
|
||||
#define glMapBufferOES __rglgen_glMapBufferOES
|
||||
#define glUnmapBufferOES __rglgen_glUnmapBufferOES
|
||||
#define glGetBufferPointervOES __rglgen_glGetBufferPointervOES
|
||||
#define glPrimitiveBoundingBoxOES __rglgen_glPrimitiveBoundingBoxOES
|
||||
#define glMinSampleShadingOES __rglgen_glMinSampleShadingOES
|
||||
#define glPatchParameteriOES __rglgen_glPatchParameteriOES
|
||||
#define glTexImage3DOES __rglgen_glTexImage3DOES
|
||||
#define glTexSubImage3DOES __rglgen_glTexSubImage3DOES
|
||||
#define glCopyTexSubImage3DOES __rglgen_glCopyTexSubImage3DOES
|
||||
#define glCompressedTexImage3DOES __rglgen_glCompressedTexImage3DOES
|
||||
#define glCompressedTexSubImage3DOES __rglgen_glCompressedTexSubImage3DOES
|
||||
#define glFramebufferTexture3DOES __rglgen_glFramebufferTexture3DOES
|
||||
#define glTexParameterIivOES __rglgen_glTexParameterIivOES
|
||||
#define glTexParameterIuivOES __rglgen_glTexParameterIuivOES
|
||||
#define glGetTexParameterIivOES __rglgen_glGetTexParameterIivOES
|
||||
#define glGetTexParameterIuivOES __rglgen_glGetTexParameterIuivOES
|
||||
#define glSamplerParameterIivOES __rglgen_glSamplerParameterIivOES
|
||||
#define glSamplerParameterIuivOES __rglgen_glSamplerParameterIuivOES
|
||||
#define glGetSamplerParameterIivOES __rglgen_glGetSamplerParameterIivOES
|
||||
#define glGetSamplerParameterIuivOES __rglgen_glGetSamplerParameterIuivOES
|
||||
#define glTexBufferOES __rglgen_glTexBufferOES
|
||||
#define glTexBufferRangeOES __rglgen_glTexBufferRangeOES
|
||||
#define glTexStorage3DMultisampleOES __rglgen_glTexStorage3DMultisampleOES
|
||||
#define glTextureViewOES __rglgen_glTextureViewOES
|
||||
#define glBindVertexArrayOES __rglgen_glBindVertexArrayOES
|
||||
#define glDeleteVertexArraysOES __rglgen_glDeleteVertexArraysOES
|
||||
#define glGenVertexArraysOES __rglgen_glGenVertexArraysOES
|
||||
#define glIsVertexArrayOES __rglgen_glIsVertexArrayOES
|
||||
#define glViewportArrayvOES __rglgen_glViewportArrayvOES
|
||||
#define glViewportIndexedfOES __rglgen_glViewportIndexedfOES
|
||||
#define glViewportIndexedfvOES __rglgen_glViewportIndexedfvOES
|
||||
#define glScissorArrayvOES __rglgen_glScissorArrayvOES
|
||||
#define glScissorIndexedOES __rglgen_glScissorIndexedOES
|
||||
#define glScissorIndexedvOES __rglgen_glScissorIndexedvOES
|
||||
#define glDepthRangeArrayfvOES __rglgen_glDepthRangeArrayfvOES
|
||||
#define glDepthRangeIndexedfOES __rglgen_glDepthRangeIndexedfOES
|
||||
#define glGetFloati_vOES __rglgen_glGetFloati_vOES
|
||||
#define glDrawArraysInstancedBaseInstanceEXT __rglgen_glDrawArraysInstancedBaseInstanceEXT
|
||||
#define glDrawElementsInstancedBaseInstanceEXT __rglgen_glDrawElementsInstancedBaseInstanceEXT
|
||||
#define glDrawElementsInstancedBaseVertexBaseInstanceEXT __rglgen_glDrawElementsInstancedBaseVertexBaseInstanceEXT
|
||||
#define glBindFragDataLocationIndexedEXT __rglgen_glBindFragDataLocationIndexedEXT
|
||||
#define glBindFragDataLocationEXT __rglgen_glBindFragDataLocationEXT
|
||||
#define glGetProgramResourceLocationIndexEXT __rglgen_glGetProgramResourceLocationIndexEXT
|
||||
#define glGetFragDataIndexEXT __rglgen_glGetFragDataIndexEXT
|
||||
#define glBufferStorageEXT __rglgen_glBufferStorageEXT
|
||||
#define glClearTexImageEXT __rglgen_glClearTexImageEXT
|
||||
#define glClearTexSubImageEXT __rglgen_glClearTexSubImageEXT
|
||||
#define glCopyImageSubDataEXT __rglgen_glCopyImageSubDataEXT
|
||||
#define glLabelObjectEXT __rglgen_glLabelObjectEXT
|
||||
#define glGetObjectLabelEXT __rglgen_glGetObjectLabelEXT
|
||||
#define glInsertEventMarkerEXT __rglgen_glInsertEventMarkerEXT
|
||||
#define glPushGroupMarkerEXT __rglgen_glPushGroupMarkerEXT
|
||||
#define glPopGroupMarkerEXT __rglgen_glPopGroupMarkerEXT
|
||||
#define glDiscardFramebufferEXT __rglgen_glDiscardFramebufferEXT
|
||||
#define glGenQueriesEXT __rglgen_glGenQueriesEXT
|
||||
#define glDeleteQueriesEXT __rglgen_glDeleteQueriesEXT
|
||||
#define glIsQueryEXT __rglgen_glIsQueryEXT
|
||||
#define glBeginQueryEXT __rglgen_glBeginQueryEXT
|
||||
#define glEndQueryEXT __rglgen_glEndQueryEXT
|
||||
#define glQueryCounterEXT __rglgen_glQueryCounterEXT
|
||||
#define glGetQueryivEXT __rglgen_glGetQueryivEXT
|
||||
#define glGetQueryObjectivEXT __rglgen_glGetQueryObjectivEXT
|
||||
#define glGetQueryObjectuivEXT __rglgen_glGetQueryObjectuivEXT
|
||||
#define glGetQueryObjecti64vEXT __rglgen_glGetQueryObjecti64vEXT
|
||||
#define glGetQueryObjectui64vEXT __rglgen_glGetQueryObjectui64vEXT
|
||||
#define glDrawBuffersEXT __rglgen_glDrawBuffersEXT
|
||||
#define glEnableiEXT __rglgen_glEnableiEXT
|
||||
#define glDisableiEXT __rglgen_glDisableiEXT
|
||||
#define glBlendEquationiEXT __rglgen_glBlendEquationiEXT
|
||||
#define glBlendEquationSeparateiEXT __rglgen_glBlendEquationSeparateiEXT
|
||||
#define glBlendFunciEXT __rglgen_glBlendFunciEXT
|
||||
#define glBlendFuncSeparateiEXT __rglgen_glBlendFuncSeparateiEXT
|
||||
#define glColorMaskiEXT __rglgen_glColorMaskiEXT
|
||||
#define glIsEnablediEXT __rglgen_glIsEnablediEXT
|
||||
#define glDrawElementsBaseVertexEXT __rglgen_glDrawElementsBaseVertexEXT
|
||||
#define glDrawRangeElementsBaseVertexEXT __rglgen_glDrawRangeElementsBaseVertexEXT
|
||||
#define glDrawElementsInstancedBaseVertexEXT __rglgen_glDrawElementsInstancedBaseVertexEXT
|
||||
#define glMultiDrawElementsBaseVertexEXT __rglgen_glMultiDrawElementsBaseVertexEXT
|
||||
#define glDrawArraysInstancedEXT __rglgen_glDrawArraysInstancedEXT
|
||||
#define glDrawElementsInstancedEXT __rglgen_glDrawElementsInstancedEXT
|
||||
#define glFramebufferTextureEXT __rglgen_glFramebufferTextureEXT
|
||||
#define glVertexAttribDivisorEXT __rglgen_glVertexAttribDivisorEXT
|
||||
#define glMapBufferRangeEXT __rglgen_glMapBufferRangeEXT
|
||||
#define glFlushMappedBufferRangeEXT __rglgen_glFlushMappedBufferRangeEXT
|
||||
#define glMultiDrawArraysEXT __rglgen_glMultiDrawArraysEXT
|
||||
#define glMultiDrawElementsEXT __rglgen_glMultiDrawElementsEXT
|
||||
#define glMultiDrawArraysIndirectEXT __rglgen_glMultiDrawArraysIndirectEXT
|
||||
#define glMultiDrawElementsIndirectEXT __rglgen_glMultiDrawElementsIndirectEXT
|
||||
#define glRenderbufferStorageMultisampleEXT __rglgen_glRenderbufferStorageMultisampleEXT
|
||||
#define glFramebufferTexture2DMultisampleEXT __rglgen_glFramebufferTexture2DMultisampleEXT
|
||||
#define glReadBufferIndexedEXT __rglgen_glReadBufferIndexedEXT
|
||||
#define glDrawBuffersIndexedEXT __rglgen_glDrawBuffersIndexedEXT
|
||||
#define glGetIntegeri_vEXT __rglgen_glGetIntegeri_vEXT
|
||||
#define glPolygonOffsetClampEXT __rglgen_glPolygonOffsetClampEXT
|
||||
#define glPrimitiveBoundingBoxEXT __rglgen_glPrimitiveBoundingBoxEXT
|
||||
#define glRasterSamplesEXT __rglgen_glRasterSamplesEXT
|
||||
#define glGetGraphicsResetStatusEXT __rglgen_glGetGraphicsResetStatusEXT
|
||||
#define glReadnPixelsEXT __rglgen_glReadnPixelsEXT
|
||||
#define glGetnUniformfvEXT __rglgen_glGetnUniformfvEXT
|
||||
#define glGetnUniformivEXT __rglgen_glGetnUniformivEXT
|
||||
#define glActiveShaderProgramEXT __rglgen_glActiveShaderProgramEXT
|
||||
#define glBindProgramPipelineEXT __rglgen_glBindProgramPipelineEXT
|
||||
#define glCreateShaderProgramvEXT __rglgen_glCreateShaderProgramvEXT
|
||||
#define glDeleteProgramPipelinesEXT __rglgen_glDeleteProgramPipelinesEXT
|
||||
#define glGenProgramPipelinesEXT __rglgen_glGenProgramPipelinesEXT
|
||||
#define glGetProgramPipelineInfoLogEXT __rglgen_glGetProgramPipelineInfoLogEXT
|
||||
#define glGetProgramPipelineivEXT __rglgen_glGetProgramPipelineivEXT
|
||||
#define glIsProgramPipelineEXT __rglgen_glIsProgramPipelineEXT
|
||||
#define glProgramParameteriEXT __rglgen_glProgramParameteriEXT
|
||||
#define glProgramUniform1fEXT __rglgen_glProgramUniform1fEXT
|
||||
#define glProgramUniform1fvEXT __rglgen_glProgramUniform1fvEXT
|
||||
#define glProgramUniform1iEXT __rglgen_glProgramUniform1iEXT
|
||||
#define glProgramUniform1ivEXT __rglgen_glProgramUniform1ivEXT
|
||||
#define glProgramUniform2fEXT __rglgen_glProgramUniform2fEXT
|
||||
#define glProgramUniform2fvEXT __rglgen_glProgramUniform2fvEXT
|
||||
#define glProgramUniform2iEXT __rglgen_glProgramUniform2iEXT
|
||||
#define glProgramUniform2ivEXT __rglgen_glProgramUniform2ivEXT
|
||||
#define glProgramUniform3fEXT __rglgen_glProgramUniform3fEXT
|
||||
#define glProgramUniform3fvEXT __rglgen_glProgramUniform3fvEXT
|
||||
#define glProgramUniform3iEXT __rglgen_glProgramUniform3iEXT
|
||||
#define glProgramUniform3ivEXT __rglgen_glProgramUniform3ivEXT
|
||||
#define glProgramUniform4fEXT __rglgen_glProgramUniform4fEXT
|
||||
#define glProgramUniform4fvEXT __rglgen_glProgramUniform4fvEXT
|
||||
#define glProgramUniform4iEXT __rglgen_glProgramUniform4iEXT
|
||||
#define glProgramUniform4ivEXT __rglgen_glProgramUniform4ivEXT
|
||||
#define glProgramUniformMatrix2fvEXT __rglgen_glProgramUniformMatrix2fvEXT
|
||||
#define glProgramUniformMatrix3fvEXT __rglgen_glProgramUniformMatrix3fvEXT
|
||||
#define glProgramUniformMatrix4fvEXT __rglgen_glProgramUniformMatrix4fvEXT
|
||||
#define glUseProgramStagesEXT __rglgen_glUseProgramStagesEXT
|
||||
#define glValidateProgramPipelineEXT __rglgen_glValidateProgramPipelineEXT
|
||||
#define glProgramUniform1uiEXT __rglgen_glProgramUniform1uiEXT
|
||||
#define glProgramUniform2uiEXT __rglgen_glProgramUniform2uiEXT
|
||||
#define glProgramUniform3uiEXT __rglgen_glProgramUniform3uiEXT
|
||||
#define glProgramUniform4uiEXT __rglgen_glProgramUniform4uiEXT
|
||||
#define glProgramUniform1uivEXT __rglgen_glProgramUniform1uivEXT
|
||||
#define glProgramUniform2uivEXT __rglgen_glProgramUniform2uivEXT
|
||||
#define glProgramUniform3uivEXT __rglgen_glProgramUniform3uivEXT
|
||||
#define glProgramUniform4uivEXT __rglgen_glProgramUniform4uivEXT
|
||||
#define glProgramUniformMatrix2x3fvEXT __rglgen_glProgramUniformMatrix2x3fvEXT
|
||||
#define glProgramUniformMatrix3x2fvEXT __rglgen_glProgramUniformMatrix3x2fvEXT
|
||||
#define glProgramUniformMatrix2x4fvEXT __rglgen_glProgramUniformMatrix2x4fvEXT
|
||||
#define glProgramUniformMatrix4x2fvEXT __rglgen_glProgramUniformMatrix4x2fvEXT
|
||||
#define glProgramUniformMatrix3x4fvEXT __rglgen_glProgramUniformMatrix3x4fvEXT
|
||||
#define glProgramUniformMatrix4x3fvEXT __rglgen_glProgramUniformMatrix4x3fvEXT
|
||||
#define glFramebufferPixelLocalStorageSizeEXT __rglgen_glFramebufferPixelLocalStorageSizeEXT
|
||||
#define glGetFramebufferPixelLocalStorageSizeEXT __rglgen_glGetFramebufferPixelLocalStorageSizeEXT
|
||||
#define glClearPixelLocalStorageuiEXT __rglgen_glClearPixelLocalStorageuiEXT
|
||||
#define glTexPageCommitmentEXT __rglgen_glTexPageCommitmentEXT
|
||||
#define glPatchParameteriEXT __rglgen_glPatchParameteriEXT
|
||||
#define glTexParameterIivEXT __rglgen_glTexParameterIivEXT
|
||||
#define glTexParameterIuivEXT __rglgen_glTexParameterIuivEXT
|
||||
#define glGetTexParameterIivEXT __rglgen_glGetTexParameterIivEXT
|
||||
#define glGetTexParameterIuivEXT __rglgen_glGetTexParameterIuivEXT
|
||||
#define glSamplerParameterIivEXT __rglgen_glSamplerParameterIivEXT
|
||||
#define glSamplerParameterIuivEXT __rglgen_glSamplerParameterIuivEXT
|
||||
#define glGetSamplerParameterIivEXT __rglgen_glGetSamplerParameterIivEXT
|
||||
#define glGetSamplerParameterIuivEXT __rglgen_glGetSamplerParameterIuivEXT
|
||||
#define glTexBufferEXT __rglgen_glTexBufferEXT
|
||||
#define glTexBufferRangeEXT __rglgen_glTexBufferRangeEXT
|
||||
#define glTexStorage1DEXT __rglgen_glTexStorage1DEXT
|
||||
#define glTexStorage2DEXT __rglgen_glTexStorage2DEXT
|
||||
#define glTexStorage3DEXT __rglgen_glTexStorage3DEXT
|
||||
#define glTextureStorage1DEXT __rglgen_glTextureStorage1DEXT
|
||||
#define glTextureStorage2DEXT __rglgen_glTextureStorage2DEXT
|
||||
#define glTextureStorage3DEXT __rglgen_glTextureStorage3DEXT
|
||||
#define glTextureViewEXT __rglgen_glTextureViewEXT
|
||||
#define glesEXT __rglgen_glesEXT
|
||||
#define glFramebufferTextureMultiviewOVR __rglgen_glFramebufferTextureMultiviewOVR
|
||||
#define glFramebufferTextureMultisampleMultiviewOVR __rglgen_glFramebufferTextureMultisampleMultiviewOVR
|
||||
|
||||
extern RGLSYMGLBLENDBARRIERKHRPROC __rglgen_glBlendBarrierKHR;
|
||||
extern RGLSYMGLDEBUGMESSAGECONTROLKHRPROC __rglgen_glDebugMessageControlKHR;
|
||||
extern RGLSYMGLDEBUGMESSAGEINSERTKHRPROC __rglgen_glDebugMessageInsertKHR;
|
||||
extern RGLSYMGLDEBUGMESSAGECALLBACKKHRPROC __rglgen_glDebugMessageCallbackKHR;
|
||||
extern RGLSYMGLGETDEBUGMESSAGELOGKHRPROC __rglgen_glGetDebugMessageLogKHR;
|
||||
extern RGLSYMGLPUSHDEBUGGROUPKHRPROC __rglgen_glPushDebugGroupKHR;
|
||||
extern RGLSYMGLPOPDEBUGGROUPKHRPROC __rglgen_glPopDebugGroupKHR;
|
||||
extern RGLSYMGLOBJECTLABELKHRPROC __rglgen_glObjectLabelKHR;
|
||||
extern RGLSYMGLGETOBJECTLABELKHRPROC __rglgen_glGetObjectLabelKHR;
|
||||
extern RGLSYMGLOBJECTPTRLABELKHRPROC __rglgen_glObjectPtrLabelKHR;
|
||||
extern RGLSYMGLGETOBJECTPTRLABELKHRPROC __rglgen_glGetObjectPtrLabelKHR;
|
||||
extern RGLSYMGLGETPOINTERVKHRPROC __rglgen_glGetPointervKHR;
|
||||
extern RGLSYMGLGETGRAPHICSRESETSTATUSKHRPROC __rglgen_glGetGraphicsResetStatusKHR;
|
||||
extern RGLSYMGLREADNPIXELSKHRPROC __rglgen_glReadnPixelsKHR;
|
||||
extern RGLSYMGLGETNUNIFORMFVKHRPROC __rglgen_glGetnUniformfvKHR;
|
||||
extern RGLSYMGLGETNUNIFORMIVKHRPROC __rglgen_glGetnUniformivKHR;
|
||||
extern RGLSYMGLGETNUNIFORMUIVKHRPROC __rglgen_glGetnUniformuivKHR;
|
||||
extern RGLSYMGLEGLIMAGETARGETTEXTURE2DOESPROC __rglgen_glEGLImageTargetTexture2DOES;
|
||||
extern RGLSYMGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC __rglgen_glEGLImageTargetRenderbufferStorageOES;
|
||||
extern RGLSYMGLCOPYIMAGESUBDATAOESPROC __rglgen_glCopyImageSubDataOES;
|
||||
extern RGLSYMGLENABLEIOESPROC __rglgen_glEnableiOES;
|
||||
extern RGLSYMGLDISABLEIOESPROC __rglgen_glDisableiOES;
|
||||
extern RGLSYMGLBLENDEQUATIONIOESPROC __rglgen_glBlendEquationiOES;
|
||||
extern RGLSYMGLBLENDEQUATIONSEPARATEIOESPROC __rglgen_glBlendEquationSeparateiOES;
|
||||
extern RGLSYMGLBLENDFUNCIOESPROC __rglgen_glBlendFunciOES;
|
||||
extern RGLSYMGLBLENDFUNCSEPARATEIOESPROC __rglgen_glBlendFuncSeparateiOES;
|
||||
extern RGLSYMGLCOLORMASKIOESPROC __rglgen_glColorMaskiOES;
|
||||
extern RGLSYMGLISENABLEDIOESPROC __rglgen_glIsEnablediOES;
|
||||
extern RGLSYMGLDRAWELEMENTSBASEVERTEXOESPROC __rglgen_glDrawElementsBaseVertexOES;
|
||||
extern RGLSYMGLDRAWRANGEELEMENTSBASEVERTEXOESPROC __rglgen_glDrawRangeElementsBaseVertexOES;
|
||||
extern RGLSYMGLDRAWELEMENTSINSTANCEDBASEVERTEXOESPROC __rglgen_glDrawElementsInstancedBaseVertexOES;
|
||||
extern RGLSYMGLMULTIDRAWELEMENTSBASEVERTEXOESPROC __rglgen_glMultiDrawElementsBaseVertexOES;
|
||||
extern RGLSYMGLFRAMEBUFFERTEXTUREOESPROC __rglgen_glFramebufferTextureOES;
|
||||
extern RGLSYMGLGETPROGRAMBINARYOESPROC __rglgen_glGetProgramBinaryOES;
|
||||
extern RGLSYMGLPROGRAMBINARYOESPROC __rglgen_glProgramBinaryOES;
|
||||
extern RGLSYMGLMAPBUFFEROESPROC __rglgen_glMapBufferOES;
|
||||
extern RGLSYMGLUNMAPBUFFEROESPROC __rglgen_glUnmapBufferOES;
|
||||
extern RGLSYMGLGETBUFFERPOINTERVOESPROC __rglgen_glGetBufferPointervOES;
|
||||
extern RGLSYMGLPRIMITIVEBOUNDINGBOXOESPROC __rglgen_glPrimitiveBoundingBoxOES;
|
||||
extern RGLSYMGLMINSAMPLESHADINGOESPROC __rglgen_glMinSampleShadingOES;
|
||||
extern RGLSYMGLPATCHPARAMETERIOESPROC __rglgen_glPatchParameteriOES;
|
||||
extern RGLSYMGLTEXIMAGE3DOESPROC __rglgen_glTexImage3DOES;
|
||||
extern RGLSYMGLTEXSUBIMAGE3DOESPROC __rglgen_glTexSubImage3DOES;
|
||||
extern RGLSYMGLCOPYTEXSUBIMAGE3DOESPROC __rglgen_glCopyTexSubImage3DOES;
|
||||
extern RGLSYMGLCOMPRESSEDTEXIMAGE3DOESPROC __rglgen_glCompressedTexImage3DOES;
|
||||
extern RGLSYMGLCOMPRESSEDTEXSUBIMAGE3DOESPROC __rglgen_glCompressedTexSubImage3DOES;
|
||||
extern RGLSYMGLFRAMEBUFFERTEXTURE3DOESPROC __rglgen_glFramebufferTexture3DOES;
|
||||
extern RGLSYMGLTEXPARAMETERIIVOESPROC __rglgen_glTexParameterIivOES;
|
||||
extern RGLSYMGLTEXPARAMETERIUIVOESPROC __rglgen_glTexParameterIuivOES;
|
||||
extern RGLSYMGLGETTEXPARAMETERIIVOESPROC __rglgen_glGetTexParameterIivOES;
|
||||
extern RGLSYMGLGETTEXPARAMETERIUIVOESPROC __rglgen_glGetTexParameterIuivOES;
|
||||
extern RGLSYMGLSAMPLERPARAMETERIIVOESPROC __rglgen_glSamplerParameterIivOES;
|
||||
extern RGLSYMGLSAMPLERPARAMETERIUIVOESPROC __rglgen_glSamplerParameterIuivOES;
|
||||
extern RGLSYMGLGETSAMPLERPARAMETERIIVOESPROC __rglgen_glGetSamplerParameterIivOES;
|
||||
extern RGLSYMGLGETSAMPLERPARAMETERIUIVOESPROC __rglgen_glGetSamplerParameterIuivOES;
|
||||
extern RGLSYMGLTEXBUFFEROESPROC __rglgen_glTexBufferOES;
|
||||
extern RGLSYMGLTEXBUFFERRANGEOESPROC __rglgen_glTexBufferRangeOES;
|
||||
extern RGLSYMGLTEXSTORAGE3DMULTISAMPLEOESPROC __rglgen_glTexStorage3DMultisampleOES;
|
||||
extern RGLSYMGLTEXTUREVIEWOESPROC __rglgen_glTextureViewOES;
|
||||
extern RGLSYMGLBINDVERTEXARRAYOESPROC __rglgen_glBindVertexArrayOES;
|
||||
extern RGLSYMGLDELETEVERTEXARRAYSOESPROC __rglgen_glDeleteVertexArraysOES;
|
||||
extern RGLSYMGLGENVERTEXARRAYSOESPROC __rglgen_glGenVertexArraysOES;
|
||||
extern RGLSYMGLISVERTEXARRAYOESPROC __rglgen_glIsVertexArrayOES;
|
||||
extern RGLSYMGLVIEWPORTARRAYVOESPROC __rglgen_glViewportArrayvOES;
|
||||
extern RGLSYMGLVIEWPORTINDEXEDFOESPROC __rglgen_glViewportIndexedfOES;
|
||||
extern RGLSYMGLVIEWPORTINDEXEDFVOESPROC __rglgen_glViewportIndexedfvOES;
|
||||
extern RGLSYMGLSCISSORARRAYVOESPROC __rglgen_glScissorArrayvOES;
|
||||
extern RGLSYMGLSCISSORINDEXEDOESPROC __rglgen_glScissorIndexedOES;
|
||||
extern RGLSYMGLSCISSORINDEXEDVOESPROC __rglgen_glScissorIndexedvOES;
|
||||
extern RGLSYMGLDEPTHRANGEARRAYFVOESPROC __rglgen_glDepthRangeArrayfvOES;
|
||||
extern RGLSYMGLDEPTHRANGEINDEXEDFOESPROC __rglgen_glDepthRangeIndexedfOES;
|
||||
extern RGLSYMGLGETFLOATI_VOESPROC __rglgen_glGetFloati_vOES;
|
||||
extern RGLSYMGLDRAWARRAYSINSTANCEDBASEINSTANCEEXTPROC __rglgen_glDrawArraysInstancedBaseInstanceEXT;
|
||||
extern RGLSYMGLDRAWELEMENTSINSTANCEDBASEINSTANCEEXTPROC __rglgen_glDrawElementsInstancedBaseInstanceEXT;
|
||||
extern RGLSYMGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEEXTPROC __rglgen_glDrawElementsInstancedBaseVertexBaseInstanceEXT;
|
||||
extern RGLSYMGLBINDFRAGDATALOCATIONINDEXEDEXTPROC __rglgen_glBindFragDataLocationIndexedEXT;
|
||||
extern RGLSYMGLBINDFRAGDATALOCATIONEXTPROC __rglgen_glBindFragDataLocationEXT;
|
||||
extern RGLSYMGLGETPROGRAMRESOURCELOCATIONINDEXEXTPROC __rglgen_glGetProgramResourceLocationIndexEXT;
|
||||
extern RGLSYMGLGETFRAGDATAINDEXEXTPROC __rglgen_glGetFragDataIndexEXT;
|
||||
extern RGLSYMGLBUFFERSTORAGEEXTPROC __rglgen_glBufferStorageEXT;
|
||||
extern RGLSYMGLCLEARTEXIMAGEEXTPROC __rglgen_glClearTexImageEXT;
|
||||
extern RGLSYMGLCLEARTEXSUBIMAGEEXTPROC __rglgen_glClearTexSubImageEXT;
|
||||
extern RGLSYMGLCOPYIMAGESUBDATAEXTPROC __rglgen_glCopyImageSubDataEXT;
|
||||
extern RGLSYMGLLABELOBJECTEXTPROC __rglgen_glLabelObjectEXT;
|
||||
extern RGLSYMGLGETOBJECTLABELEXTPROC __rglgen_glGetObjectLabelEXT;
|
||||
extern RGLSYMGLINSERTEVENTMARKEREXTPROC __rglgen_glInsertEventMarkerEXT;
|
||||
extern RGLSYMGLPUSHGROUPMARKEREXTPROC __rglgen_glPushGroupMarkerEXT;
|
||||
extern RGLSYMGLPOPGROUPMARKEREXTPROC __rglgen_glPopGroupMarkerEXT;
|
||||
extern RGLSYMGLDISCARDFRAMEBUFFEREXTPROC __rglgen_glDiscardFramebufferEXT;
|
||||
extern RGLSYMGLGENQUERIESEXTPROC __rglgen_glGenQueriesEXT;
|
||||
extern RGLSYMGLDELETEQUERIESEXTPROC __rglgen_glDeleteQueriesEXT;
|
||||
extern RGLSYMGLISQUERYEXTPROC __rglgen_glIsQueryEXT;
|
||||
extern RGLSYMGLBEGINQUERYEXTPROC __rglgen_glBeginQueryEXT;
|
||||
extern RGLSYMGLENDQUERYEXTPROC __rglgen_glEndQueryEXT;
|
||||
extern RGLSYMGLQUERYCOUNTEREXTPROC __rglgen_glQueryCounterEXT;
|
||||
extern RGLSYMGLGETQUERYIVEXTPROC __rglgen_glGetQueryivEXT;
|
||||
extern RGLSYMGLGETQUERYOBJECTIVEXTPROC __rglgen_glGetQueryObjectivEXT;
|
||||
extern RGLSYMGLGETQUERYOBJECTUIVEXTPROC __rglgen_glGetQueryObjectuivEXT;
|
||||
extern RGLSYMGLGETQUERYOBJECTI64VEXTPROC __rglgen_glGetQueryObjecti64vEXT;
|
||||
extern RGLSYMGLGETQUERYOBJECTUI64VEXTPROC __rglgen_glGetQueryObjectui64vEXT;
|
||||
extern RGLSYMGLDRAWBUFFERSEXTPROC __rglgen_glDrawBuffersEXT;
|
||||
extern RGLSYMGLENABLEIEXTPROC __rglgen_glEnableiEXT;
|
||||
extern RGLSYMGLDISABLEIEXTPROC __rglgen_glDisableiEXT;
|
||||
extern RGLSYMGLBLENDEQUATIONIEXTPROC __rglgen_glBlendEquationiEXT;
|
||||
extern RGLSYMGLBLENDEQUATIONSEPARATEIEXTPROC __rglgen_glBlendEquationSeparateiEXT;
|
||||
extern RGLSYMGLBLENDFUNCIEXTPROC __rglgen_glBlendFunciEXT;
|
||||
extern RGLSYMGLBLENDFUNCSEPARATEIEXTPROC __rglgen_glBlendFuncSeparateiEXT;
|
||||
extern RGLSYMGLCOLORMASKIEXTPROC __rglgen_glColorMaskiEXT;
|
||||
extern RGLSYMGLISENABLEDIEXTPROC __rglgen_glIsEnablediEXT;
|
||||
extern RGLSYMGLDRAWELEMENTSBASEVERTEXEXTPROC __rglgen_glDrawElementsBaseVertexEXT;
|
||||
extern RGLSYMGLDRAWRANGEELEMENTSBASEVERTEXEXTPROC __rglgen_glDrawRangeElementsBaseVertexEXT;
|
||||
extern RGLSYMGLDRAWELEMENTSINSTANCEDBASEVERTEXEXTPROC __rglgen_glDrawElementsInstancedBaseVertexEXT;
|
||||
extern RGLSYMGLMULTIDRAWELEMENTSBASEVERTEXEXTPROC __rglgen_glMultiDrawElementsBaseVertexEXT;
|
||||
extern RGLSYMGLDRAWARRAYSINSTANCEDEXTPROC __rglgen_glDrawArraysInstancedEXT;
|
||||
extern RGLSYMGLDRAWELEMENTSINSTANCEDEXTPROC __rglgen_glDrawElementsInstancedEXT;
|
||||
extern RGLSYMGLFRAMEBUFFERTEXTUREEXTPROC __rglgen_glFramebufferTextureEXT;
|
||||
extern RGLSYMGLVERTEXATTRIBDIVISOREXTPROC __rglgen_glVertexAttribDivisorEXT;
|
||||
extern RGLSYMGLMAPBUFFERRANGEEXTPROC __rglgen_glMapBufferRangeEXT;
|
||||
extern RGLSYMGLFLUSHMAPPEDBUFFERRANGEEXTPROC __rglgen_glFlushMappedBufferRangeEXT;
|
||||
extern RGLSYMGLMULTIDRAWARRAYSEXTPROC __rglgen_glMultiDrawArraysEXT;
|
||||
extern RGLSYMGLMULTIDRAWELEMENTSEXTPROC __rglgen_glMultiDrawElementsEXT;
|
||||
extern RGLSYMGLMULTIDRAWARRAYSINDIRECTEXTPROC __rglgen_glMultiDrawArraysIndirectEXT;
|
||||
extern RGLSYMGLMULTIDRAWELEMENTSINDIRECTEXTPROC __rglgen_glMultiDrawElementsIndirectEXT;
|
||||
extern RGLSYMGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC __rglgen_glRenderbufferStorageMultisampleEXT;
|
||||
extern RGLSYMGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC __rglgen_glFramebufferTexture2DMultisampleEXT;
|
||||
extern RGLSYMGLREADBUFFERINDEXEDEXTPROC __rglgen_glReadBufferIndexedEXT;
|
||||
extern RGLSYMGLDRAWBUFFERSINDEXEDEXTPROC __rglgen_glDrawBuffersIndexedEXT;
|
||||
extern RGLSYMGLGETINTEGERI_VEXTPROC __rglgen_glGetIntegeri_vEXT;
|
||||
extern RGLSYMGLPOLYGONOFFSETCLAMPEXTPROC __rglgen_glPolygonOffsetClampEXT;
|
||||
extern RGLSYMGLPRIMITIVEBOUNDINGBOXEXTPROC __rglgen_glPrimitiveBoundingBoxEXT;
|
||||
extern RGLSYMGLRASTERSAMPLESEXTPROC __rglgen_glRasterSamplesEXT;
|
||||
extern RGLSYMGLGETGRAPHICSRESETSTATUSEXTPROC __rglgen_glGetGraphicsResetStatusEXT;
|
||||
extern RGLSYMGLREADNPIXELSEXTPROC __rglgen_glReadnPixelsEXT;
|
||||
extern RGLSYMGLGETNUNIFORMFVEXTPROC __rglgen_glGetnUniformfvEXT;
|
||||
extern RGLSYMGLGETNUNIFORMIVEXTPROC __rglgen_glGetnUniformivEXT;
|
||||
extern RGLSYMGLACTIVESHADERPROGRAMEXTPROC __rglgen_glActiveShaderProgramEXT;
|
||||
extern RGLSYMGLBINDPROGRAMPIPELINEEXTPROC __rglgen_glBindProgramPipelineEXT;
|
||||
extern RGLSYMGLCREATESHADERPROGRAMVEXTPROC __rglgen_glCreateShaderProgramvEXT;
|
||||
extern RGLSYMGLDELETEPROGRAMPIPELINESEXTPROC __rglgen_glDeleteProgramPipelinesEXT;
|
||||
extern RGLSYMGLGENPROGRAMPIPELINESEXTPROC __rglgen_glGenProgramPipelinesEXT;
|
||||
extern RGLSYMGLGETPROGRAMPIPELINEINFOLOGEXTPROC __rglgen_glGetProgramPipelineInfoLogEXT;
|
||||
extern RGLSYMGLGETPROGRAMPIPELINEIVEXTPROC __rglgen_glGetProgramPipelineivEXT;
|
||||
extern RGLSYMGLISPROGRAMPIPELINEEXTPROC __rglgen_glIsProgramPipelineEXT;
|
||||
extern RGLSYMGLPROGRAMPARAMETERIEXTPROC __rglgen_glProgramParameteriEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM1FEXTPROC __rglgen_glProgramUniform1fEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM1FVEXTPROC __rglgen_glProgramUniform1fvEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM1IEXTPROC __rglgen_glProgramUniform1iEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM1IVEXTPROC __rglgen_glProgramUniform1ivEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM2FEXTPROC __rglgen_glProgramUniform2fEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM2FVEXTPROC __rglgen_glProgramUniform2fvEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM2IEXTPROC __rglgen_glProgramUniform2iEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM2IVEXTPROC __rglgen_glProgramUniform2ivEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM3FEXTPROC __rglgen_glProgramUniform3fEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM3FVEXTPROC __rglgen_glProgramUniform3fvEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM3IEXTPROC __rglgen_glProgramUniform3iEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM3IVEXTPROC __rglgen_glProgramUniform3ivEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM4FEXTPROC __rglgen_glProgramUniform4fEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM4FVEXTPROC __rglgen_glProgramUniform4fvEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM4IEXTPROC __rglgen_glProgramUniform4iEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM4IVEXTPROC __rglgen_glProgramUniform4ivEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORMMATRIX2FVEXTPROC __rglgen_glProgramUniformMatrix2fvEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORMMATRIX3FVEXTPROC __rglgen_glProgramUniformMatrix3fvEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORMMATRIX4FVEXTPROC __rglgen_glProgramUniformMatrix4fvEXT;
|
||||
extern RGLSYMGLUSEPROGRAMSTAGESEXTPROC __rglgen_glUseProgramStagesEXT;
|
||||
extern RGLSYMGLVALIDATEPROGRAMPIPELINEEXTPROC __rglgen_glValidateProgramPipelineEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM1UIEXTPROC __rglgen_glProgramUniform1uiEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM2UIEXTPROC __rglgen_glProgramUniform2uiEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM3UIEXTPROC __rglgen_glProgramUniform3uiEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM4UIEXTPROC __rglgen_glProgramUniform4uiEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM1UIVEXTPROC __rglgen_glProgramUniform1uivEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM2UIVEXTPROC __rglgen_glProgramUniform2uivEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM3UIVEXTPROC __rglgen_glProgramUniform3uivEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORM4UIVEXTPROC __rglgen_glProgramUniform4uivEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC __rglgen_glProgramUniformMatrix2x3fvEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC __rglgen_glProgramUniformMatrix3x2fvEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC __rglgen_glProgramUniformMatrix2x4fvEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC __rglgen_glProgramUniformMatrix4x2fvEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC __rglgen_glProgramUniformMatrix3x4fvEXT;
|
||||
extern RGLSYMGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC __rglgen_glProgramUniformMatrix4x3fvEXT;
|
||||
extern RGLSYMGLFRAMEBUFFERPIXELLOCALSTORAGESIZEEXTPROC __rglgen_glFramebufferPixelLocalStorageSizeEXT;
|
||||
extern RGLSYMGLGETFRAMEBUFFERPIXELLOCALSTORAGESIZEEXTPROC __rglgen_glGetFramebufferPixelLocalStorageSizeEXT;
|
||||
extern RGLSYMGLCLEARPIXELLOCALSTORAGEUIEXTPROC __rglgen_glClearPixelLocalStorageuiEXT;
|
||||
extern RGLSYMGLTEXPAGECOMMITMENTEXTPROC __rglgen_glTexPageCommitmentEXT;
|
||||
extern RGLSYMGLPATCHPARAMETERIEXTPROC __rglgen_glPatchParameteriEXT;
|
||||
extern RGLSYMGLTEXPARAMETERIIVEXTPROC __rglgen_glTexParameterIivEXT;
|
||||
extern RGLSYMGLTEXPARAMETERIUIVEXTPROC __rglgen_glTexParameterIuivEXT;
|
||||
extern RGLSYMGLGETTEXPARAMETERIIVEXTPROC __rglgen_glGetTexParameterIivEXT;
|
||||
extern RGLSYMGLGETTEXPARAMETERIUIVEXTPROC __rglgen_glGetTexParameterIuivEXT;
|
||||
extern RGLSYMGLSAMPLERPARAMETERIIVEXTPROC __rglgen_glSamplerParameterIivEXT;
|
||||
extern RGLSYMGLSAMPLERPARAMETERIUIVEXTPROC __rglgen_glSamplerParameterIuivEXT;
|
||||
extern RGLSYMGLGETSAMPLERPARAMETERIIVEXTPROC __rglgen_glGetSamplerParameterIivEXT;
|
||||
extern RGLSYMGLGETSAMPLERPARAMETERIUIVEXTPROC __rglgen_glGetSamplerParameterIuivEXT;
|
||||
extern RGLSYMGLTEXBUFFEREXTPROC __rglgen_glTexBufferEXT;
|
||||
extern RGLSYMGLTEXBUFFERRANGEEXTPROC __rglgen_glTexBufferRangeEXT;
|
||||
extern RGLSYMGLTEXSTORAGE1DEXTPROC __rglgen_glTexStorage1DEXT;
|
||||
extern RGLSYMGLTEXSTORAGE2DEXTPROC __rglgen_glTexStorage2DEXT;
|
||||
extern RGLSYMGLTEXSTORAGE3DEXTPROC __rglgen_glTexStorage3DEXT;
|
||||
extern RGLSYMGLTEXTURESTORAGE1DEXTPROC __rglgen_glTextureStorage1DEXT;
|
||||
extern RGLSYMGLTEXTURESTORAGE2DEXTPROC __rglgen_glTextureStorage2DEXT;
|
||||
extern RGLSYMGLTEXTURESTORAGE3DEXTPROC __rglgen_glTextureStorage3DEXT;
|
||||
extern RGLSYMGLTEXTUREVIEWEXTPROC __rglgen_glTextureViewEXT;
|
||||
extern RGLSYMGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC __rglgen_glFramebufferTextureMultiviewOVR;
|
||||
extern RGLSYMGLFRAMEBUFFERTEXTUREMULTISAMPLEMULTIVIEWOVRPROC __rglgen_glFramebufferTextureMultisampleMultiviewOVR;
|
||||
|
||||
struct rglgen_sym_map { const char *sym; void *ptr; };
|
||||
extern const struct rglgen_sym_map rglgen_symbol_map[];
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
3140
src/minarch/libretro-common/include/glsym/glsym_gl.h
Normal file
3140
src/minarch/libretro-common/include/glsym/glsym_gl.h
Normal file
File diff suppressed because it is too large
Load diff
46
src/minarch/libretro-common/include/glsym/rglgen.h
Normal file
46
src/minarch/libretro-common/include/glsym/rglgen.h
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this libretro SDK code part (glsym).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef RGLGEN_H__
|
||||
#define RGLGEN_H__
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include "rglgen_headers.h"
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
struct rglgen_sym_map;
|
||||
|
||||
typedef void (*rglgen_func_t)(void);
|
||||
typedef rglgen_func_t (*rglgen_proc_address_t)(const char*);
|
||||
void rglgen_resolve_symbols(rglgen_proc_address_t proc);
|
||||
void rglgen_resolve_symbols_custom(rglgen_proc_address_t proc,
|
||||
const struct rglgen_sym_map *map);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
53
src/minarch/libretro-common/include/glsym/rglgen_headers.h
Normal file
53
src/minarch/libretro-common/include/glsym/rglgen_headers.h
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this libretro SDK code part (glsym).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef RGLGEN_HEADERS_H__
|
||||
#define RGLGEN_HEADERS_H__
|
||||
|
||||
#ifdef HAVE_EGL
|
||||
#include <EGL/egl.h>
|
||||
#include <EGL/eglext.h>
|
||||
#endif
|
||||
|
||||
#include "rglgen_private_headers.h"
|
||||
|
||||
#ifndef GL_MAP_WRITE_BIT
|
||||
#define GL_MAP_WRITE_BIT 0x0002
|
||||
#endif
|
||||
|
||||
#ifndef GL_MAP_INVALIDATE_BUFFER_BIT
|
||||
#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008
|
||||
#endif
|
||||
|
||||
#ifndef GL_RED_INTEGER
|
||||
#define GL_RED_INTEGER 0x8D94
|
||||
#endif
|
||||
|
||||
#ifndef GL_BGRA_EXT
|
||||
#define GL_BGRA_EXT GL_BGRA
|
||||
#endif
|
||||
|
||||
#ifndef GL_LUMINANCE_ALPHA
|
||||
#define GL_LUMINANCE_ALPHA 0x190A
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this libretro SDK code part (glsym).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef RGLGEN_PRIVATE_HEADERS_H__
|
||||
#define RGLGEN_PRIVATE_HEADERS_H__
|
||||
|
||||
#if defined(IOS)
|
||||
|
||||
#if defined(HAVE_OPENGLES3)
|
||||
#include <OpenGLES/ES3/gl.h>
|
||||
#include <OpenGLES/ES3/glext.h>
|
||||
#else
|
||||
#include <OpenGLES/ES2/gl.h>
|
||||
#include <OpenGLES/ES2/glext.h>
|
||||
#endif
|
||||
|
||||
#elif defined(__APPLE__)
|
||||
#include <compat/apple_compat.h>
|
||||
#if MAC_OS_X_VERSION_10_7
|
||||
#include <OpenGL/gl3.h>
|
||||
#include <OpenGL/gl3ext.h>
|
||||
#else
|
||||
#include <OpenGL/gl.h>
|
||||
#include <OpenGL/glext.h>
|
||||
#endif
|
||||
#elif defined(HAVE_PSGL)
|
||||
#include <PSGL/psgl.h>
|
||||
#include <GLES/glext.h>
|
||||
#elif defined(HAVE_OPENGL_MODERN)
|
||||
#include <GL3/gl3.h>
|
||||
#include <GL3/gl3ext.h>
|
||||
#elif defined(HAVE_OPENGLES3)
|
||||
#include <GLES3/gl3.h>
|
||||
#define __gl2_h_
|
||||
#include <GLES2/gl2ext.h>
|
||||
#elif defined(HAVE_OPENGLES2)
|
||||
#include <GLES2/gl2.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
#elif defined(HAVE_OPENGLES1)
|
||||
#include <GLES/gl.h>
|
||||
#include <GLES/glext.h>
|
||||
#else
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#ifndef HAVE_LIBNX
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glext.h>
|
||||
#else
|
||||
/* We need to avoid including <GL/gl.h> on this platform */
|
||||
#include "switch/nx_gl.h"
|
||||
#include <GL/glext.h>
|
||||
#endif /* SWITCH */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
848
src/minarch/libretro-common/include/glsym/switch/nx_gl.h
Normal file
848
src/minarch/libretro-common/include/glsym/switch/nx_gl.h
Normal file
|
|
@ -0,0 +1,848 @@
|
|||
/* Copyright (C) 2018-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this libretro SDK code part (nx_gl.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __NX_GL_H__
|
||||
#define __NX_GL_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef APIENTRY
|
||||
#define APIENTRY
|
||||
#endif
|
||||
|
||||
#ifndef APIENTRYP
|
||||
#define APIENTRYP APIENTRY *
|
||||
#endif
|
||||
|
||||
// GL.h types
|
||||
typedef unsigned int GLenum;
|
||||
typedef unsigned char GLboolean;
|
||||
typedef unsigned int GLbitfield;
|
||||
typedef void GLvoid;
|
||||
typedef signed char GLbyte; /* 1-byte signed */
|
||||
typedef short GLshort; /* 2-byte signed */
|
||||
typedef int GLint; /* 4-byte signed */
|
||||
typedef unsigned char GLubyte; /* 1-byte unsigned */
|
||||
typedef unsigned short GLushort; /* 2-byte unsigned */
|
||||
typedef unsigned int GLuint; /* 4-byte unsigned */
|
||||
typedef int GLsizei; /* 4-byte signed */
|
||||
typedef float GLfloat; /* single precision float */
|
||||
typedef float GLclampf; /* single precision float in [0,1] */
|
||||
typedef double GLdouble; /* double precision float */
|
||||
typedef double GLclampd; /* double precision float in [0,1] */
|
||||
|
||||
// GL.h defines
|
||||
#define GL_ARB_imaging 1
|
||||
#define GL_FALSE 0
|
||||
#define GL_TRUE 1
|
||||
#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_2_BYTES 0x1407
|
||||
#define GL_3_BYTES 0x1408
|
||||
#define GL_4_BYTES 0x1409
|
||||
#define GL_DOUBLE 0x140A
|
||||
#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
|
||||
#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
|
||||
#define GL_EDGE_FLAG_ARRAY 0x8079
|
||||
#define GL_VERTEX_ARRAY_SIZE 0x807A
|
||||
#define GL_VERTEX_ARRAY_TYPE 0x807B
|
||||
#define GL_VERTEX_ARRAY_STRIDE 0x807C
|
||||
#define GL_NORMAL_ARRAY_TYPE 0x807E
|
||||
#define GL_NORMAL_ARRAY_STRIDE 0x807F
|
||||
#define GL_COLOR_ARRAY_SIZE 0x8081
|
||||
#define GL_COLOR_ARRAY_TYPE 0x8082
|
||||
#define GL_COLOR_ARRAY_STRIDE 0x8083
|
||||
#define GL_INDEX_ARRAY_TYPE 0x8085
|
||||
#define GL_INDEX_ARRAY_STRIDE 0x8086
|
||||
#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
|
||||
#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
|
||||
#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
|
||||
#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
|
||||
#define GL_VERTEX_ARRAY_POINTER 0x808E
|
||||
#define GL_NORMAL_ARRAY_POINTER 0x808F
|
||||
#define GL_COLOR_ARRAY_POINTER 0x8090
|
||||
#define GL_INDEX_ARRAY_POINTER 0x8091
|
||||
#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
|
||||
#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
|
||||
#define GL_V2F 0x2A20
|
||||
#define GL_V3F 0x2A21
|
||||
#define GL_C4UB_V2F 0x2A22
|
||||
#define GL_C4UB_V3F 0x2A23
|
||||
#define GL_C3F_V3F 0x2A24
|
||||
#define GL_N3F_V3F 0x2A25
|
||||
#define GL_C4F_N3F_V3F 0x2A26
|
||||
#define GL_T2F_V3F 0x2A27
|
||||
#define GL_T4F_V4F 0x2A28
|
||||
#define GL_T2F_C4UB_V3F 0x2A29
|
||||
#define GL_T2F_C3F_V3F 0x2A2A
|
||||
#define GL_T2F_N3F_V3F 0x2A2B
|
||||
#define GL_T2F_C4F_N3F_V3F 0x2A2C
|
||||
#define GL_T4F_C4F_N3F_V4F 0x2A2D
|
||||
#define GL_MATRIX_MODE 0x0BA0
|
||||
#define GL_MODELVIEW 0x1700
|
||||
#define GL_PROJECTION 0x1701
|
||||
#define GL_TEXTURE 0x1702
|
||||
#define GL_POINT_SMOOTH 0x0B10
|
||||
#define GL_POINT_SIZE 0x0B11
|
||||
#define GL_POINT_SIZE_GRANULARITY 0x0B13
|
||||
#define GL_POINT_SIZE_RANGE 0x0B12
|
||||
#define GL_LINE_SMOOTH 0x0B20
|
||||
#define GL_LINE_STIPPLE 0x0B24
|
||||
#define GL_LINE_STIPPLE_PATTERN 0x0B25
|
||||
#define GL_LINE_STIPPLE_REPEAT 0x0B26
|
||||
#define GL_LINE_WIDTH 0x0B21
|
||||
#define GL_LINE_WIDTH_GRANULARITY 0x0B23
|
||||
#define GL_LINE_WIDTH_RANGE 0x0B22
|
||||
#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 GL_COMPILE 0x1300
|
||||
#define GL_COMPILE_AND_EXECUTE 0x1301
|
||||
#define GL_LIST_BASE 0x0B32
|
||||
#define GL_LIST_INDEX 0x0B33
|
||||
#define GL_LIST_MODE 0x0B30
|
||||
#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
|
||||
#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_SPOT_EXPONENT 0x1205
|
||||
#define GL_SPOT_CUTOFF 0x1206
|
||||
#define GL_CONSTANT_ATTENUATION 0x1207
|
||||
#define GL_LINEAR_ATTENUATION 0x1208
|
||||
#define GL_QUADRATIC_ATTENUATION 0x1209
|
||||
#define GL_AMBIENT 0x1200
|
||||
#define GL_DIFFUSE 0x1201
|
||||
#define GL_SPECULAR 0x1202
|
||||
#define GL_SHININESS 0x1601
|
||||
#define GL_EMISSION 0x1600
|
||||
#define GL_POSITION 0x1203
|
||||
#define GL_SPOT_DIRECTION 0x1204
|
||||
#define GL_AMBIENT_AND_DIFFUSE 0x1602
|
||||
#define GL_COLOR_INDEXES 0x1603
|
||||
#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_SHADE_MODEL 0x0B54
|
||||
#define GL_FLAT 0x1D00
|
||||
#define GL_SMOOTH 0x1D01
|
||||
#define GL_COLOR_MATERIAL 0x0B57
|
||||
#define GL_COLOR_MATERIAL_FACE 0x0B55
|
||||
#define GL_COLOR_MATERIAL_PARAMETER 0x0B56
|
||||
#define GL_NORMALIZE 0x0BA1
|
||||
#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
|
||||
#define GL_ACCUM_RED_BITS 0x0D58
|
||||
#define GL_ACCUM_GREEN_BITS 0x0D59
|
||||
#define GL_ACCUM_BLUE_BITS 0x0D5A
|
||||
#define GL_ACCUM_ALPHA_BITS 0x0D5B
|
||||
#define GL_ACCUM_CLEAR_VALUE 0x0B80
|
||||
#define GL_ACCUM 0x0100
|
||||
#define GL_ADD 0x0104
|
||||
#define GL_LOAD 0x0101
|
||||
#define GL_MULT 0x0103
|
||||
#define GL_RETURN 0x0102
|
||||
#define GL_ALPHA_TEST 0x0BC0
|
||||
#define GL_ALPHA_TEST_REF 0x0BC2
|
||||
#define GL_ALPHA_TEST_FUNC 0x0BC1
|
||||
#define GL_BLEND 0x0BE2
|
||||
#define GL_BLEND_SRC 0x0BE1
|
||||
#define GL_BLEND_DST 0x0BE0
|
||||
#define GL_ZERO 0
|
||||
#define GL_ONE 1
|
||||
#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
|
||||
#define GL_FEEDBACK 0x1C01
|
||||
#define GL_RENDER 0x1C00
|
||||
#define GL_SELECT 0x1C02
|
||||
#define GL_2D 0x0600
|
||||
#define GL_3D 0x0601
|
||||
#define GL_3D_COLOR 0x0602
|
||||
#define GL_3D_COLOR_TEXTURE 0x0603
|
||||
#define GL_4D_COLOR_TEXTURE 0x0604
|
||||
#define GL_POINT_TOKEN 0x0701
|
||||
#define GL_LINE_TOKEN 0x0702
|
||||
#define GL_LINE_RESET_TOKEN 0x0707
|
||||
#define GL_POLYGON_TOKEN 0x0703
|
||||
#define GL_BITMAP_TOKEN 0x0704
|
||||
#define GL_DRAW_PIXEL_TOKEN 0x0705
|
||||
#define GL_COPY_PIXEL_TOKEN 0x0706
|
||||
#define GL_PASS_THROUGH_TOKEN 0x0700
|
||||
#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
|
||||
#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
|
||||
#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
|
||||
#define GL_SELECTION_BUFFER_POINTER 0x0DF3
|
||||
#define GL_SELECTION_BUFFER_SIZE 0x0DF4
|
||||
#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
|
||||
#define GL_LOGIC_OP 0x0BF1
|
||||
#define GL_INDEX_LOGIC_OP 0x0BF1
|
||||
#define GL_COLOR_LOGIC_OP 0x0BF2
|
||||
#define GL_LOGIC_OP_MODE 0x0BF0
|
||||
#define GL_CLEAR 0x1500
|
||||
#define GL_SET 0x150F
|
||||
#define GL_COPY 0x1503
|
||||
#define GL_COPY_INVERTED 0x150C
|
||||
#define GL_NOOP 0x1505
|
||||
#define GL_INVERT 0x150A
|
||||
#define GL_AND 0x1501
|
||||
#define GL_NAND 0x150E
|
||||
#define GL_OR 0x1507
|
||||
#define GL_NOR 0x1508
|
||||
#define GL_XOR 0x1506
|
||||
#define GL_EQUIV 0x1509
|
||||
#define GL_AND_REVERSE 0x1502
|
||||
#define GL_AND_INVERTED 0x1504
|
||||
#define GL_OR_REVERSE 0x150B
|
||||
#define GL_OR_INVERTED 0x150D
|
||||
#define GL_STENCIL_BITS 0x0D57
|
||||
#define GL_STENCIL_TEST 0x0B90
|
||||
#define GL_STENCIL_CLEAR_VALUE 0x0B91
|
||||
#define GL_STENCIL_FUNC 0x0B92
|
||||
#define GL_STENCIL_VALUE_MASK 0x0B93
|
||||
#define GL_STENCIL_FAIL 0x0B94
|
||||
#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
|
||||
#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
|
||||
#define GL_STENCIL_REF 0x0B97
|
||||
#define GL_STENCIL_WRITEMASK 0x0B98
|
||||
#define GL_STENCIL_INDEX 0x1901
|
||||
#define GL_KEEP 0x1E00
|
||||
#define GL_REPLACE 0x1E01
|
||||
#define GL_INCR 0x1E02
|
||||
#define GL_DECR 0x1E03
|
||||
#define GL_NONE 0
|
||||
#define GL_LEFT 0x0406
|
||||
#define GL_RIGHT 0x0407
|
||||
#define GL_FRONT_LEFT 0x0400
|
||||
#define GL_FRONT_RIGHT 0x0401
|
||||
#define GL_BACK_LEFT 0x0402
|
||||
#define GL_BACK_RIGHT 0x0403
|
||||
#define GL_AUX0 0x0409
|
||||
#define GL_AUX1 0x040A
|
||||
#define GL_AUX2 0x040B
|
||||
#define GL_AUX3 0x040C
|
||||
#define GL_COLOR_INDEX 0x1900
|
||||
#define GL_RED 0x1903
|
||||
#define GL_GREEN 0x1904
|
||||
#define GL_BLUE 0x1905
|
||||
#define GL_ALPHA 0x1906
|
||||
#define GL_LUMINANCE 0x1909
|
||||
#define GL_LUMINANCE_ALPHA 0x190A
|
||||
#define GL_ALPHA_BITS 0x0D55
|
||||
#define GL_RED_BITS 0x0D52
|
||||
#define GL_GREEN_BITS 0x0D53
|
||||
#define GL_BLUE_BITS 0x0D54
|
||||
#define GL_INDEX_BITS 0x0D51
|
||||
#define GL_SUBPIXEL_BITS 0x0D50
|
||||
#define GL_AUX_BUFFERS 0x0C00
|
||||
#define GL_READ_BUFFER 0x0C02
|
||||
#define GL_DRAW_BUFFER 0x0C01
|
||||
#define GL_DOUBLEBUFFER 0x0C32
|
||||
#define GL_STEREO 0x0C33
|
||||
#define GL_BITMAP 0x1A00
|
||||
#define GL_COLOR 0x1800
|
||||
#define GL_DEPTH 0x1801
|
||||
#define GL_STENCIL 0x1802
|
||||
#define GL_DITHER 0x0BD0
|
||||
#define GL_RGB 0x1907
|
||||
#define GL_RGBA 0x1908
|
||||
#define GL_MAX_LIST_NESTING 0x0B31
|
||||
#define GL_MAX_EVAL_ORDER 0x0D30
|
||||
#define GL_MAX_LIGHTS 0x0D31
|
||||
#define GL_MAX_CLIP_PLANES 0x0D32
|
||||
#define GL_MAX_TEXTURE_SIZE 0x0D33
|
||||
#define GL_MAX_PIXEL_MAP_TABLE 0x0D34
|
||||
#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
|
||||
#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
|
||||
#define GL_MAX_NAME_STACK_DEPTH 0x0D37
|
||||
#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
|
||||
#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
|
||||
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
|
||||
#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
|
||||
#define GL_ATTRIB_STACK_DEPTH 0x0BB0
|
||||
#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
|
||||
#define GL_COLOR_CLEAR_VALUE 0x0C22
|
||||
#define GL_COLOR_WRITEMASK 0x0C23
|
||||
#define GL_CURRENT_INDEX 0x0B01
|
||||
#define GL_CURRENT_COLOR 0x0B00
|
||||
#define GL_CURRENT_NORMAL 0x0B02
|
||||
#define GL_CURRENT_RASTER_COLOR 0x0B04
|
||||
#define GL_CURRENT_RASTER_DISTANCE 0x0B09
|
||||
#define GL_CURRENT_RASTER_INDEX 0x0B05
|
||||
#define GL_CURRENT_RASTER_POSITION 0x0B07
|
||||
#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
|
||||
#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
|
||||
#define GL_CURRENT_TEXTURE_COORDS 0x0B03
|
||||
#define GL_INDEX_CLEAR_VALUE 0x0C20
|
||||
#define GL_INDEX_MODE 0x0C30
|
||||
#define GL_INDEX_WRITEMASK 0x0C21
|
||||
#define GL_MODELVIEW_MATRIX 0x0BA6
|
||||
#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
|
||||
#define GL_NAME_STACK_DEPTH 0x0D70
|
||||
#define GL_PROJECTION_MATRIX 0x0BA7
|
||||
#define GL_PROJECTION_STACK_DEPTH 0x0BA4
|
||||
#define GL_RENDER_MODE 0x0C40
|
||||
#define GL_RGBA_MODE 0x0C31
|
||||
#define GL_TEXTURE_MATRIX 0x0BA8
|
||||
#define GL_TEXTURE_STACK_DEPTH 0x0BA5
|
||||
#define GL_VIEWPORT 0x0BA2
|
||||
#define GL_AUTO_NORMAL 0x0D80
|
||||
#define GL_MAP1_COLOR_4 0x0D90
|
||||
#define GL_MAP1_INDEX 0x0D91
|
||||
#define GL_MAP1_NORMAL 0x0D92
|
||||
#define GL_MAP1_TEXTURE_COORD_1 0x0D93
|
||||
#define GL_MAP1_TEXTURE_COORD_2 0x0D94
|
||||
#define GL_MAP1_TEXTURE_COORD_3 0x0D95
|
||||
#define GL_MAP1_TEXTURE_COORD_4 0x0D96
|
||||
#define GL_MAP1_VERTEX_3 0x0D97
|
||||
#define GL_MAP1_VERTEX_4 0x0D98
|
||||
#define GL_MAP2_COLOR_4 0x0DB0
|
||||
#define GL_MAP2_INDEX 0x0DB1
|
||||
#define GL_MAP2_NORMAL 0x0DB2
|
||||
#define GL_MAP2_TEXTURE_COORD_1 0x0DB3
|
||||
#define GL_MAP2_TEXTURE_COORD_2 0x0DB4
|
||||
#define GL_MAP2_TEXTURE_COORD_3 0x0DB5
|
||||
#define GL_MAP2_TEXTURE_COORD_4 0x0DB6
|
||||
#define GL_MAP2_VERTEX_3 0x0DB7
|
||||
#define GL_MAP2_VERTEX_4 0x0DB8
|
||||
#define GL_MAP1_GRID_DOMAIN 0x0DD0
|
||||
#define GL_MAP1_GRID_SEGMENTS 0x0DD1
|
||||
#define GL_MAP2_GRID_DOMAIN 0x0DD2
|
||||
#define GL_MAP2_GRID_SEGMENTS 0x0DD3
|
||||
#define GL_COEFF 0x0A00
|
||||
#define GL_ORDER 0x0A01
|
||||
#define GL_DOMAIN 0x0A02
|
||||
#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
|
||||
#define GL_DONT_CARE 0x1100
|
||||
#define GL_FASTEST 0x1101
|
||||
#define GL_NICEST 0x1102
|
||||
#define GL_SCISSOR_BOX 0x0C10
|
||||
#define GL_SCISSOR_TEST 0x0C11
|
||||
#define GL_MAP_COLOR 0x0D10
|
||||
#define GL_MAP_STENCIL 0x0D11
|
||||
#define GL_INDEX_SHIFT 0x0D12
|
||||
#define GL_INDEX_OFFSET 0x0D13
|
||||
#define GL_RED_SCALE 0x0D14
|
||||
#define GL_RED_BIAS 0x0D15
|
||||
#define GL_GREEN_SCALE 0x0D18
|
||||
#define GL_GREEN_BIAS 0x0D19
|
||||
#define GL_BLUE_SCALE 0x0D1A
|
||||
#define GL_BLUE_BIAS 0x0D1B
|
||||
#define GL_ALPHA_SCALE 0x0D1C
|
||||
#define GL_ALPHA_BIAS 0x0D1D
|
||||
#define GL_DEPTH_SCALE 0x0D1E
|
||||
#define GL_DEPTH_BIAS 0x0D1F
|
||||
#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
|
||||
#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
|
||||
#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
|
||||
#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
|
||||
#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
|
||||
#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
|
||||
#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
|
||||
#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
|
||||
#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
|
||||
#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
|
||||
#define GL_PIXEL_MAP_S_TO_S 0x0C71
|
||||
#define GL_PIXEL_MAP_I_TO_I 0x0C70
|
||||
#define GL_PIXEL_MAP_I_TO_R 0x0C72
|
||||
#define GL_PIXEL_MAP_I_TO_G 0x0C73
|
||||
#define GL_PIXEL_MAP_I_TO_B 0x0C74
|
||||
#define GL_PIXEL_MAP_I_TO_A 0x0C75
|
||||
#define GL_PIXEL_MAP_R_TO_R 0x0C76
|
||||
#define GL_PIXEL_MAP_G_TO_G 0x0C77
|
||||
#define GL_PIXEL_MAP_B_TO_B 0x0C78
|
||||
#define GL_PIXEL_MAP_A_TO_A 0x0C79
|
||||
#define GL_PACK_ALIGNMENT 0x0D05
|
||||
#define GL_PACK_LSB_FIRST 0x0D01
|
||||
#define GL_PACK_ROW_LENGTH 0x0D02
|
||||
#define GL_PACK_SKIP_PIXELS 0x0D04
|
||||
#define GL_PACK_SKIP_ROWS 0x0D03
|
||||
#define GL_PACK_SWAP_BYTES 0x0D00
|
||||
#define GL_UNPACK_ALIGNMENT 0x0CF5
|
||||
#define GL_UNPACK_LSB_FIRST 0x0CF1
|
||||
#define GL_UNPACK_ROW_LENGTH 0x0CF2
|
||||
#define GL_UNPACK_SKIP_PIXELS 0x0CF4
|
||||
#define GL_UNPACK_SKIP_ROWS 0x0CF3
|
||||
#define GL_UNPACK_SWAP_BYTES 0x0CF0
|
||||
#define GL_ZOOM_X 0x0D16
|
||||
#define GL_ZOOM_Y 0x0D17
|
||||
#define GL_TEXTURE_ENV 0x2300
|
||||
#define GL_TEXTURE_ENV_MODE 0x2200
|
||||
#define GL_TEXTURE_1D 0x0DE0
|
||||
#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_TEXTURE_ENV_COLOR 0x2201
|
||||
#define GL_TEXTURE_GEN_S 0x0C60
|
||||
#define GL_TEXTURE_GEN_T 0x0C61
|
||||
#define GL_TEXTURE_GEN_R 0x0C62
|
||||
#define GL_TEXTURE_GEN_Q 0x0C63
|
||||
#define GL_TEXTURE_GEN_MODE 0x2500
|
||||
#define GL_TEXTURE_BORDER_COLOR 0x1004
|
||||
#define GL_TEXTURE_WIDTH 0x1000
|
||||
#define GL_TEXTURE_HEIGHT 0x1001
|
||||
#define GL_TEXTURE_BORDER 0x1005
|
||||
#define GL_TEXTURE_COMPONENTS 0x1003
|
||||
#define GL_TEXTURE_RED_SIZE 0x805C
|
||||
#define GL_TEXTURE_GREEN_SIZE 0x805D
|
||||
#define GL_TEXTURE_BLUE_SIZE 0x805E
|
||||
#define GL_TEXTURE_ALPHA_SIZE 0x805F
|
||||
#define GL_TEXTURE_LUMINANCE_SIZE 0x8060
|
||||
#define GL_TEXTURE_INTENSITY_SIZE 0x8061
|
||||
#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_OBJECT_LINEAR 0x2401
|
||||
#define GL_OBJECT_PLANE 0x2501
|
||||
#define GL_EYE_LINEAR 0x2400
|
||||
#define GL_EYE_PLANE 0x2502
|
||||
#define GL_SPHERE_MAP 0x2402
|
||||
#define GL_DECAL 0x2101
|
||||
#define GL_MODULATE 0x2100
|
||||
#define GL_NEAREST 0x2600
|
||||
#define GL_REPEAT 0x2901
|
||||
#define GL_CLAMP 0x2900
|
||||
#define GL_S 0x2000
|
||||
#define GL_T 0x2001
|
||||
#define GL_R 0x2002
|
||||
#define GL_Q 0x2003
|
||||
#define GL_VENDOR 0x1F00
|
||||
#define GL_RENDERER 0x1F01
|
||||
#define GL_VERSION 0x1F02
|
||||
#define GL_EXTENSIONS 0x1F03
|
||||
#define GL_NO_ERROR 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
|
||||
#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 0xFFFFFFFF
|
||||
#define GL_PROXY_TEXTURE_1D 0x8063
|
||||
#define GL_PROXY_TEXTURE_2D 0x8064
|
||||
#define GL_TEXTURE_PRIORITY 0x8066
|
||||
#define GL_TEXTURE_RESIDENT 0x8067
|
||||
#define GL_TEXTURE_BINDING_1D 0x8068
|
||||
#define GL_TEXTURE_BINDING_2D 0x8069
|
||||
#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
|
||||
#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_INTENSITY 0x8049
|
||||
#define GL_INTENSITY4 0x804A
|
||||
#define GL_INTENSITY8 0x804B
|
||||
#define GL_INTENSITY12 0x804C
|
||||
#define GL_INTENSITY16 0x804D
|
||||
#define GL_R3_G3_B2 0x2A10
|
||||
#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_CLIENT_PIXEL_STORE_BIT 0x00000001
|
||||
#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
|
||||
#define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF
|
||||
#define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF
|
||||
#define GL_RESCALE_NORMAL 0x803A
|
||||
#define GL_CLAMP_TO_EDGE 0x812F
|
||||
#define GL_MAX_ELEMENTS_VERTICES 0x80E8
|
||||
#define GL_MAX_ELEMENTS_INDICES 0x80E9
|
||||
#define GL_BGR 0x80E0
|
||||
#define GL_BGRA 0x80E1
|
||||
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
|
||||
#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
|
||||
#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 0x8033
|
||||
#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
|
||||
#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
|
||||
#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
|
||||
#define GL_UNSIGNED_INT_8_8_8_8 0x8035
|
||||
#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
|
||||
#define GL_UNSIGNED_INT_10_10_10_2 0x8036
|
||||
#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
|
||||
#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
|
||||
#define GL_SINGLE_COLOR 0x81F9
|
||||
#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
|
||||
#define GL_TEXTURE_MIN_LOD 0x813A
|
||||
#define GL_TEXTURE_MAX_LOD 0x813B
|
||||
#define GL_TEXTURE_BASE_LEVEL 0x813C
|
||||
#define GL_TEXTURE_MAX_LEVEL 0x813D
|
||||
#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
|
||||
#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
|
||||
#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
|
||||
#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
|
||||
#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
|
||||
#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
|
||||
#define GL_PACK_SKIP_IMAGES 0x806B
|
||||
#define GL_PACK_IMAGE_HEIGHT 0x806C
|
||||
#define GL_UNPACK_SKIP_IMAGES 0x806D
|
||||
#define GL_UNPACK_IMAGE_HEIGHT 0x806E
|
||||
#define GL_TEXTURE_3D 0x806F
|
||||
#define GL_PROXY_TEXTURE_3D 0x8070
|
||||
#define GL_TEXTURE_DEPTH 0x8071
|
||||
#define GL_TEXTURE_WRAP_R 0x8072
|
||||
#define GL_MAX_3D_TEXTURE_SIZE 0x8073
|
||||
#define GL_TEXTURE_BINDING_3D 0x806A
|
||||
#define GL_CONSTANT_COLOR 0x8001
|
||||
#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
|
||||
#define GL_CONSTANT_ALPHA 0x8003
|
||||
#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
|
||||
#define GL_COLOR_TABLE 0x80D0
|
||||
#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
|
||||
#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
|
||||
#define GL_PROXY_COLOR_TABLE 0x80D3
|
||||
#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
|
||||
#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
|
||||
#define GL_COLOR_TABLE_SCALE 0x80D6
|
||||
#define GL_COLOR_TABLE_BIAS 0x80D7
|
||||
#define GL_COLOR_TABLE_FORMAT 0x80D8
|
||||
#define GL_COLOR_TABLE_WIDTH 0x80D9
|
||||
#define GL_COLOR_TABLE_RED_SIZE 0x80DA
|
||||
#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
|
||||
#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
|
||||
#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
|
||||
#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
|
||||
#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
|
||||
#define GL_CONVOLUTION_1D 0x8010
|
||||
#define GL_CONVOLUTION_2D 0x8011
|
||||
#define GL_SEPARABLE_2D 0x8012
|
||||
#define GL_CONVOLUTION_BORDER_MODE 0x8013
|
||||
#define GL_CONVOLUTION_FILTER_SCALE 0x8014
|
||||
#define GL_CONVOLUTION_FILTER_BIAS 0x8015
|
||||
#define GL_REDUCE 0x8016
|
||||
#define GL_CONVOLUTION_FORMAT 0x8017
|
||||
#define GL_CONVOLUTION_WIDTH 0x8018
|
||||
#define GL_CONVOLUTION_HEIGHT 0x8019
|
||||
#define GL_MAX_CONVOLUTION_WIDTH 0x801A
|
||||
#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
|
||||
#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
|
||||
#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
|
||||
#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
|
||||
#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
|
||||
#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
|
||||
#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
|
||||
#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
|
||||
#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
|
||||
#define GL_CONSTANT_BORDER 0x8151
|
||||
#define GL_REPLICATE_BORDER 0x8153
|
||||
#define GL_CONVOLUTION_BORDER_COLOR 0x8154
|
||||
#define GL_COLOR_MATRIX 0x80B1
|
||||
#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
|
||||
#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
|
||||
#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
|
||||
#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
|
||||
#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
|
||||
#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
|
||||
#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
|
||||
#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
|
||||
#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
|
||||
#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
|
||||
#define GL_HISTOGRAM 0x8024
|
||||
#define GL_PROXY_HISTOGRAM 0x8025
|
||||
#define GL_HISTOGRAM_WIDTH 0x8026
|
||||
#define GL_HISTOGRAM_FORMAT 0x8027
|
||||
#define GL_HISTOGRAM_RED_SIZE 0x8028
|
||||
#define GL_HISTOGRAM_GREEN_SIZE 0x8029
|
||||
#define GL_HISTOGRAM_BLUE_SIZE 0x802A
|
||||
#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
|
||||
#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
|
||||
#define GL_HISTOGRAM_SINK 0x802D
|
||||
#define GL_MINMAX 0x802E
|
||||
#define GL_MINMAX_FORMAT 0x802F
|
||||
#define GL_MINMAX_SINK 0x8030
|
||||
#define GL_TABLE_TOO_LARGE 0x8031
|
||||
#define GL_BLEND_EQUATION 0x8009
|
||||
#define GL_MIN 0x8007
|
||||
#define GL_MAX 0x8008
|
||||
#define GL_FUNC_ADD 0x8006
|
||||
#define GL_FUNC_SUBTRACT 0x800A
|
||||
#define GL_FUNC_REVERSE_SUBTRACT 0x800B
|
||||
#define GL_BLEND_COLOR 0x8005
|
||||
#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_MAX_TEXTURE_UNITS 0x84E2
|
||||
#define GL_NORMAL_MAP 0x8511
|
||||
#define GL_REFLECTION_MAP 0x8512
|
||||
#define GL_TEXTURE_CUBE_MAP 0x8513
|
||||
#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
|
||||
#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
|
||||
#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
|
||||
#define GL_COMPRESSED_ALPHA 0x84E9
|
||||
#define GL_COMPRESSED_LUMINANCE 0x84EA
|
||||
#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
|
||||
#define GL_COMPRESSED_INTENSITY 0x84EC
|
||||
#define GL_COMPRESSED_RGB 0x84ED
|
||||
#define GL_COMPRESSED_RGBA 0x84EE
|
||||
#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
|
||||
#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
|
||||
#define GL_TEXTURE_COMPRESSED 0x86A1
|
||||
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
|
||||
#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
|
||||
#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 GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
|
||||
#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
|
||||
#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
|
||||
#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
|
||||
#define GL_COMBINE 0x8570
|
||||
#define GL_COMBINE_RGB 0x8571
|
||||
#define GL_COMBINE_ALPHA 0x8572
|
||||
#define GL_SOURCE0_RGB 0x8580
|
||||
#define GL_SOURCE1_RGB 0x8581
|
||||
#define GL_SOURCE2_RGB 0x8582
|
||||
#define GL_SOURCE0_ALPHA 0x8588
|
||||
#define GL_SOURCE1_ALPHA 0x8589
|
||||
#define GL_SOURCE2_ALPHA 0x858A
|
||||
#define GL_OPERAND0_RGB 0x8590
|
||||
#define GL_OPERAND1_RGB 0x8591
|
||||
#define GL_OPERAND2_RGB 0x8592
|
||||
#define GL_OPERAND0_ALPHA 0x8598
|
||||
#define GL_OPERAND1_ALPHA 0x8599
|
||||
#define GL_OPERAND2_ALPHA 0x859A
|
||||
#define GL_RGB_SCALE 0x8573
|
||||
#define GL_ADD_SIGNED 0x8574
|
||||
#define GL_INTERPOLATE 0x8575
|
||||
#define GL_SUBTRACT 0x84E7
|
||||
#define GL_CONSTANT 0x8576
|
||||
#define GL_PRIMARY_COLOR 0x8577
|
||||
#define GL_PREVIOUS 0x8578
|
||||
#define GL_DOT3_RGB 0x86AE
|
||||
#define GL_DOT3_RGBA 0x86AF
|
||||
#define GL_CLAMP_TO_BORDER 0x812D
|
||||
#define GL_ARB_multitexture 1
|
||||
#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_MESA_packed_depth_stencil 1
|
||||
#define GL_DEPTH_STENCIL_MESA 0x8750
|
||||
#define GL_UNSIGNED_INT_24_8_MESA 0x8751
|
||||
#define GL_UNSIGNED_INT_8_24_REV_MESA 0x8752
|
||||
#define GL_UNSIGNED_SHORT_15_1_MESA 0x8753
|
||||
#define GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754
|
||||
#define GL_ATI_blend_equation_separate 1
|
||||
#define GL_ALPHA_BLEND_EQUATION_ATI 0x883D
|
||||
#define GL_OES_EGL_image 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __NX_GL_H__
|
||||
928
src/minarch/libretro-common/include/glsym/switch/nx_glsym.h
Normal file
928
src/minarch/libretro-common/include/glsym/switch/nx_glsym.h
Normal file
|
|
@ -0,0 +1,928 @@
|
|||
#ifndef __NX_GLSYM_H__
|
||||
#define __NX_GLSYM_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void *GLeglImageOES;
|
||||
typedef void (APIENTRYP RGLSYMGLCLEARINDEXPROC) ( GLfloat c );
|
||||
typedef void (APIENTRYP RGLSYMGLCLEARCOLORPROC) ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
|
||||
typedef void (APIENTRYP RGLSYMGLCLEARPROC) ( GLbitfield mask );
|
||||
typedef void (APIENTRYP RGLSYMGLINDEXMASKPROC) ( GLuint mask );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLORMASKPROC) ( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
|
||||
typedef void (APIENTRYP RGLSYMGLALPHAFUNCPROC) ( GLenum func, GLclampf ref );
|
||||
typedef void (APIENTRYP RGLSYMGLBLENDFUNCPROC) ( GLenum sfactor, GLenum dfactor );
|
||||
typedef void (APIENTRYP RGLSYMGLLOGICOPPROC) ( GLenum opcode );
|
||||
typedef void (APIENTRYP RGLSYMGLCULLFACEPROC) ( GLenum mode );
|
||||
typedef void (APIENTRYP RGLSYMGLFRONTFACEPROC) ( GLenum mode );
|
||||
typedef void (APIENTRYP RGLSYMGLPOINTSIZEPROC) ( GLfloat size );
|
||||
typedef void (APIENTRYP RGLSYMGLLINEWIDTHPROC) ( GLfloat width );
|
||||
typedef void (APIENTRYP RGLSYMGLLINESTIPPLEPROC) ( GLint factor, GLushort pattern );
|
||||
typedef void (APIENTRYP RGLSYMGLPOLYGONMODEPROC) ( GLenum face, GLenum mode );
|
||||
typedef void (APIENTRYP RGLSYMGLPOLYGONOFFSETPROC) ( GLfloat factor, GLfloat units );
|
||||
typedef void (APIENTRYP RGLSYMGLPOLYGONSTIPPLEPROC) ( const GLubyte *mask );
|
||||
typedef void (APIENTRYP RGLSYMGLGETPOLYGONSTIPPLEPROC) ( GLubyte *mask );
|
||||
typedef void (APIENTRYP RGLSYMGLEDGEFLAGPROC) ( GLboolean flag );
|
||||
typedef void (APIENTRYP RGLSYMGLEDGEFLAGVPROC) ( const GLboolean *flag );
|
||||
typedef void (APIENTRYP RGLSYMGLSCISSORPROC) ( GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
typedef void (APIENTRYP RGLSYMGLCLIPPLANEPROC) ( GLenum plane, const GLdouble *equation );
|
||||
typedef void (APIENTRYP RGLSYMGLGETCLIPPLANEPROC) ( GLenum plane, GLdouble *equation );
|
||||
typedef void (APIENTRYP RGLSYMGLDRAWBUFFERPROC) ( GLenum mode );
|
||||
typedef void (APIENTRYP RGLSYMGLREADBUFFERPROC) ( GLenum mode );
|
||||
typedef void (APIENTRYP RGLSYMGLENABLEPROC) ( GLenum cap );
|
||||
typedef void (APIENTRYP RGLSYMGLDISABLEPROC) ( GLenum cap );
|
||||
typedef GLboolean (APIENTRYP RGLSYMGLISENABLEDPROC) ( GLenum cap );
|
||||
typedef void (APIENTRYP RGLSYMGLENABLECLIENTSTATEPROC) ( GLenum cap );
|
||||
typedef void (APIENTRYP RGLSYMGLDISABLECLIENTSTATEPROC) ( GLenum cap );
|
||||
typedef void (APIENTRYP RGLSYMGLGETBOOLEANVPROC) ( GLenum pname, GLboolean *params );
|
||||
typedef void (APIENTRYP RGLSYMGLGETDOUBLEVPROC) ( GLenum pname, GLdouble *params );
|
||||
typedef void (APIENTRYP RGLSYMGLGETFLOATVPROC) ( GLenum pname, GLfloat *params );
|
||||
typedef void (APIENTRYP RGLSYMGLGETINTEGERVPROC) ( GLenum pname, GLint *params );
|
||||
typedef void (APIENTRYP RGLSYMGLPUSHATTRIBPROC) ( GLbitfield mask );
|
||||
typedef void (APIENTRYP RGLSYMGLPOPATTRIBPROC) ( void );
|
||||
typedef void (APIENTRYP RGLSYMGLPUSHCLIENTATTRIBPROC) ( GLbitfield mask );
|
||||
typedef void (APIENTRYP RGLSYMGLPOPCLIENTATTRIBPROC) ( void );
|
||||
typedef GLint (APIENTRYP RGLSYMGLRENDERMODEPROC) ( GLenum mode );
|
||||
typedef GLenum (APIENTRYP RGLSYMGLGETERRORPROC) ( void );
|
||||
typedef const GLubyte * (APIENTRYP RGLSYMGLGETSTRINGPROC) ( GLenum name );
|
||||
typedef void (APIENTRYP RGLSYMGLFINISHPROC) ( void );
|
||||
typedef void (APIENTRYP RGLSYMGLFLUSHPROC) ( void );
|
||||
typedef void (APIENTRYP RGLSYMGLHINTPROC) ( GLenum target, GLenum mode );
|
||||
typedef void (APIENTRYP RGLSYMGLCLEARDEPTHPROC) ( GLclampd depth );
|
||||
typedef void (APIENTRYP RGLSYMGLDEPTHFUNCPROC) ( GLenum func );
|
||||
typedef void (APIENTRYP RGLSYMGLDEPTHMASKPROC) ( GLboolean flag );
|
||||
typedef void (APIENTRYP RGLSYMGLDEPTHRANGEPROC) ( GLclampd near_val, GLclampd far_val );
|
||||
typedef void (APIENTRYP RGLSYMGLCLEARACCUMPROC) ( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
|
||||
typedef void (APIENTRYP RGLSYMGLACCUMPROC) ( GLenum op, GLfloat value );
|
||||
typedef void (APIENTRYP RGLSYMGLMATRIXMODEPROC) ( GLenum mode );
|
||||
typedef void (APIENTRYP RGLSYMGLORTHOPROC) ( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val );
|
||||
typedef void (APIENTRYP RGLSYMGLFRUSTUMPROC) ( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val );
|
||||
typedef void (APIENTRYP RGLSYMGLVIEWPORTPROC) ( GLint x, GLint y, GLsizei width, GLsizei height );
|
||||
typedef void (APIENTRYP RGLSYMGLPUSHMATRIXPROC) ( void );
|
||||
typedef void (APIENTRYP RGLSYMGLPOPMATRIXPROC) ( void );
|
||||
typedef void (APIENTRYP RGLSYMGLLOADIDENTITYPROC) ( void );
|
||||
typedef void (APIENTRYP RGLSYMGLLOADMATRIXDPROC) ( const GLdouble *m );
|
||||
typedef void (APIENTRYP RGLSYMGLLOADMATRIXFPROC) ( const GLfloat *m );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTMATRIXDPROC) ( const GLdouble *m );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTMATRIXFPROC) ( const GLfloat *m );
|
||||
typedef void (APIENTRYP RGLSYMGLROTATEDPROC) ( GLdouble angle, GLdouble x, GLdouble y, GLdouble z );
|
||||
typedef void (APIENTRYP RGLSYMGLROTATEFPROC) ( GLfloat angle, GLfloat x, GLfloat y, GLfloat z );
|
||||
typedef void (APIENTRYP RGLSYMGLSCALEDPROC) ( GLdouble x, GLdouble y, GLdouble z );
|
||||
typedef void (APIENTRYP RGLSYMGLSCALEFPROC) ( GLfloat x, GLfloat y, GLfloat z );
|
||||
typedef void (APIENTRYP RGLSYMGLTRANSLATEDPROC) ( GLdouble x, GLdouble y, GLdouble z );
|
||||
typedef void (APIENTRYP RGLSYMGLTRANSLATEFPROC) ( GLfloat x, GLfloat y, GLfloat z );
|
||||
typedef GLboolean (APIENTRYP RGLSYMGLISLISTPROC) ( GLuint list );
|
||||
typedef void (APIENTRYP RGLSYMGLDELETELISTSPROC) ( GLuint list, GLsizei range );
|
||||
typedef GLuint (APIENTRYP RGLSYMGLGENLISTSPROC) ( GLsizei range );
|
||||
typedef void (APIENTRYP RGLSYMGLNEWLISTPROC) ( GLuint list, GLenum mode );
|
||||
typedef void (APIENTRYP RGLSYMGLENDLISTPROC) ( void );
|
||||
typedef void (APIENTRYP RGLSYMGLCALLLISTPROC) ( GLuint list );
|
||||
typedef void (APIENTRYP RGLSYMGLCALLLISTSPROC) ( GLsizei n, GLenum type, const GLvoid *lists );
|
||||
typedef void (APIENTRYP RGLSYMGLLISTBASEPROC) ( GLuint base );
|
||||
typedef void (APIENTRYP RGLSYMGLBEGINPROC) ( GLenum mode );
|
||||
typedef void (APIENTRYP RGLSYMGLENDPROC) ( void );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEX2DPROC) ( GLdouble x, GLdouble y );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEX2FPROC) ( GLfloat x, GLfloat y );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEX2IPROC) ( GLint x, GLint y );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEX2SPROC) ( GLshort x, GLshort y );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEX3DPROC) ( GLdouble x, GLdouble y, GLdouble z );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEX3FPROC) ( GLfloat x, GLfloat y, GLfloat z );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEX3IPROC) ( GLint x, GLint y, GLint z );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEX3SPROC) ( GLshort x, GLshort y, GLshort z );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEX4DPROC) ( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEX4FPROC) ( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEX4IPROC) ( GLint x, GLint y, GLint z, GLint w );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEX4SPROC) ( GLshort x, GLshort y, GLshort z, GLshort w );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEX2DVPROC) ( const GLdouble *v );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEX2FVPROC) ( const GLfloat *v );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEX2IVPROC) ( const GLint *v );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEX2SVPROC) ( const GLshort *v );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEX3DVPROC) ( const GLdouble *v );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEX3FVPROC) ( const GLfloat *v );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEX3IVPROC) ( const GLint *v );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEX3SVPROC) ( const GLshort *v );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEX4DVPROC) ( const GLdouble *v );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEX4FVPROC) ( const GLfloat *v );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEX4IVPROC) ( const GLint *v );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEX4SVPROC) ( const GLshort *v );
|
||||
typedef void (APIENTRYP RGLSYMGLNORMAL3BPROC) ( GLbyte nx, GLbyte ny, GLbyte nz );
|
||||
typedef void (APIENTRYP RGLSYMGLNORMAL3DPROC) ( GLdouble nx, GLdouble ny, GLdouble nz );
|
||||
typedef void (APIENTRYP RGLSYMGLNORMAL3FPROC) ( GLfloat nx, GLfloat ny, GLfloat nz );
|
||||
typedef void (APIENTRYP RGLSYMGLNORMAL3IPROC) ( GLint nx, GLint ny, GLint nz );
|
||||
typedef void (APIENTRYP RGLSYMGLNORMAL3SPROC) ( GLshort nx, GLshort ny, GLshort nz );
|
||||
typedef void (APIENTRYP RGLSYMGLNORMAL3BVPROC) ( const GLbyte *v );
|
||||
typedef void (APIENTRYP RGLSYMGLNORMAL3DVPROC) ( const GLdouble *v );
|
||||
typedef void (APIENTRYP RGLSYMGLNORMAL3FVPROC) ( const GLfloat *v );
|
||||
typedef void (APIENTRYP RGLSYMGLNORMAL3IVPROC) ( const GLint *v );
|
||||
typedef void (APIENTRYP RGLSYMGLNORMAL3SVPROC) ( const GLshort *v );
|
||||
typedef void (APIENTRYP RGLSYMGLINDEXDPROC) ( GLdouble c );
|
||||
typedef void (APIENTRYP RGLSYMGLINDEXFPROC) ( GLfloat c );
|
||||
typedef void (APIENTRYP RGLSYMGLINDEXIPROC) ( GLint c );
|
||||
typedef void (APIENTRYP RGLSYMGLINDEXSPROC) ( GLshort c );
|
||||
typedef void (APIENTRYP RGLSYMGLINDEXUBPROC) ( GLubyte c );
|
||||
typedef void (APIENTRYP RGLSYMGLINDEXDVPROC) ( const GLdouble *c );
|
||||
typedef void (APIENTRYP RGLSYMGLINDEXFVPROC) ( const GLfloat *c );
|
||||
typedef void (APIENTRYP RGLSYMGLINDEXIVPROC) ( const GLint *c );
|
||||
typedef void (APIENTRYP RGLSYMGLINDEXSVPROC) ( const GLshort *c );
|
||||
typedef void (APIENTRYP RGLSYMGLINDEXUBVPROC) ( const GLubyte *c );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR3BPROC) ( GLbyte red, GLbyte green, GLbyte blue );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR3DPROC) ( GLdouble red, GLdouble green, GLdouble blue );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR3FPROC) ( GLfloat red, GLfloat green, GLfloat blue );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR3IPROC) ( GLint red, GLint green, GLint blue );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR3SPROC) ( GLshort red, GLshort green, GLshort blue );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR3UBPROC) ( GLubyte red, GLubyte green, GLubyte blue );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR3UIPROC) ( GLuint red, GLuint green, GLuint blue );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR3USPROC) ( GLushort red, GLushort green, GLushort blue );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR4BPROC) ( GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR4DPROC) ( GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR4FPROC) ( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR4IPROC) ( GLint red, GLint green, GLint blue, GLint alpha );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR4SPROC) ( GLshort red, GLshort green, GLshort blue, GLshort alpha );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR4UBPROC) ( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR4UIPROC) ( GLuint red, GLuint green, GLuint blue, GLuint alpha );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR4USPROC) ( GLushort red, GLushort green, GLushort blue, GLushort alpha );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR3BVPROC) ( const GLbyte *v );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR3DVPROC) ( const GLdouble *v );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR3FVPROC) ( const GLfloat *v );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR3IVPROC) ( const GLint *v );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR3SVPROC) ( const GLshort *v );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR3UBVPROC) ( const GLubyte *v );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR3UIVPROC) ( const GLuint *v );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR3USVPROC) ( const GLushort *v );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR4BVPROC) ( const GLbyte *v );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR4DVPROC) ( const GLdouble *v );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR4FVPROC) ( const GLfloat *v );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR4IVPROC) ( const GLint *v );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR4SVPROC) ( const GLshort *v );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR4UBVPROC) ( const GLubyte *v );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR4UIVPROC) ( const GLuint *v );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLOR4USVPROC) ( const GLushort *v );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD1DPROC) ( GLdouble s );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD1FPROC) ( GLfloat s );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD1IPROC) ( GLint s );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD1SPROC) ( GLshort s );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD2DPROC) ( GLdouble s, GLdouble t );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD2FPROC) ( GLfloat s, GLfloat t );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD2IPROC) ( GLint s, GLint t );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD2SPROC) ( GLshort s, GLshort t );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD3DPROC) ( GLdouble s, GLdouble t, GLdouble r );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD3FPROC) ( GLfloat s, GLfloat t, GLfloat r );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD3IPROC) ( GLint s, GLint t, GLint r );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD3SPROC) ( GLshort s, GLshort t, GLshort r );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD4DPROC) ( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD4FPROC) ( GLfloat s, GLfloat t, GLfloat r, GLfloat q );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD4IPROC) ( GLint s, GLint t, GLint r, GLint q );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD4SPROC) ( GLshort s, GLshort t, GLshort r, GLshort q );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD1DVPROC) ( const GLdouble *v );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD1FVPROC) ( const GLfloat *v );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD1IVPROC) ( const GLint *v );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD1SVPROC) ( const GLshort *v );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD2DVPROC) ( const GLdouble *v );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD2FVPROC) ( const GLfloat *v );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD2IVPROC) ( const GLint *v );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD2SVPROC) ( const GLshort *v );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD3DVPROC) ( const GLdouble *v );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD3FVPROC) ( const GLfloat *v );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD3IVPROC) ( const GLint *v );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD3SVPROC) ( const GLshort *v );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD4DVPROC) ( const GLdouble *v );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD4FVPROC) ( const GLfloat *v );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD4IVPROC) ( const GLint *v );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORD4SVPROC) ( const GLshort *v );
|
||||
typedef void (APIENTRYP RGLSYMGLRASTERPOS2DPROC) ( GLdouble x, GLdouble y );
|
||||
typedef void (APIENTRYP RGLSYMGLRASTERPOS2FPROC) ( GLfloat x, GLfloat y );
|
||||
typedef void (APIENTRYP RGLSYMGLRASTERPOS2IPROC) ( GLint x, GLint y );
|
||||
typedef void (APIENTRYP RGLSYMGLRASTERPOS2SPROC) ( GLshort x, GLshort y );
|
||||
typedef void (APIENTRYP RGLSYMGLRASTERPOS3DPROC) ( GLdouble x, GLdouble y, GLdouble z );
|
||||
typedef void (APIENTRYP RGLSYMGLRASTERPOS3FPROC) ( GLfloat x, GLfloat y, GLfloat z );
|
||||
typedef void (APIENTRYP RGLSYMGLRASTERPOS3IPROC) ( GLint x, GLint y, GLint z );
|
||||
typedef void (APIENTRYP RGLSYMGLRASTERPOS3SPROC) ( GLshort x, GLshort y, GLshort z );
|
||||
typedef void (APIENTRYP RGLSYMGLRASTERPOS4DPROC) ( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
|
||||
typedef void (APIENTRYP RGLSYMGLRASTERPOS4FPROC) ( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
|
||||
typedef void (APIENTRYP RGLSYMGLRASTERPOS4IPROC) ( GLint x, GLint y, GLint z, GLint w );
|
||||
typedef void (APIENTRYP RGLSYMGLRASTERPOS4SPROC) ( GLshort x, GLshort y, GLshort z, GLshort w );
|
||||
typedef void (APIENTRYP RGLSYMGLRASTERPOS2DVPROC) ( const GLdouble *v );
|
||||
typedef void (APIENTRYP RGLSYMGLRASTERPOS2FVPROC) ( const GLfloat *v );
|
||||
typedef void (APIENTRYP RGLSYMGLRASTERPOS2IVPROC) ( const GLint *v );
|
||||
typedef void (APIENTRYP RGLSYMGLRASTERPOS2SVPROC) ( const GLshort *v );
|
||||
typedef void (APIENTRYP RGLSYMGLRASTERPOS3DVPROC) ( const GLdouble *v );
|
||||
typedef void (APIENTRYP RGLSYMGLRASTERPOS3FVPROC) ( const GLfloat *v );
|
||||
typedef void (APIENTRYP RGLSYMGLRASTERPOS3IVPROC) ( const GLint *v );
|
||||
typedef void (APIENTRYP RGLSYMGLRASTERPOS3SVPROC) ( const GLshort *v );
|
||||
typedef void (APIENTRYP RGLSYMGLRASTERPOS4DVPROC) ( const GLdouble *v );
|
||||
typedef void (APIENTRYP RGLSYMGLRASTERPOS4FVPROC) ( const GLfloat *v );
|
||||
typedef void (APIENTRYP RGLSYMGLRASTERPOS4IVPROC) ( const GLint *v );
|
||||
typedef void (APIENTRYP RGLSYMGLRASTERPOS4SVPROC) ( const GLshort *v );
|
||||
typedef void (APIENTRYP RGLSYMGLRECTDPROC) ( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );
|
||||
typedef void (APIENTRYP RGLSYMGLRECTFPROC) ( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
|
||||
typedef void (APIENTRYP RGLSYMGLRECTIPROC) ( GLint x1, GLint y1, GLint x2, GLint y2 );
|
||||
typedef void (APIENTRYP RGLSYMGLRECTSPROC) ( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );
|
||||
typedef void (APIENTRYP RGLSYMGLRECTDVPROC) ( const GLdouble *v1, const GLdouble *v2 );
|
||||
typedef void (APIENTRYP RGLSYMGLRECTFVPROC) ( const GLfloat *v1, const GLfloat *v2 );
|
||||
typedef void (APIENTRYP RGLSYMGLRECTIVPROC) ( const GLint *v1, const GLint *v2 );
|
||||
typedef void (APIENTRYP RGLSYMGLRECTSVPROC) ( const GLshort *v1, const GLshort *v2 );
|
||||
typedef void (APIENTRYP RGLSYMGLVERTEXPOINTERPROC) ( GLint size, GLenum type, GLsizei stride, const GLvoid *ptr );
|
||||
typedef void (APIENTRYP RGLSYMGLNORMALPOINTERPROC) ( GLenum type, GLsizei stride, const GLvoid *ptr );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLORPOINTERPROC) ( GLint size, GLenum type, GLsizei stride, const GLvoid *ptr );
|
||||
typedef void (APIENTRYP RGLSYMGLINDEXPOINTERPROC) ( GLenum type, GLsizei stride, const GLvoid *ptr );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXCOORDPOINTERPROC) ( GLint size, GLenum type, GLsizei stride, const GLvoid *ptr );
|
||||
typedef void (APIENTRYP RGLSYMGLEDGEFLAGPOINTERPROC) ( GLsizei stride, const GLvoid *ptr );
|
||||
typedef void (APIENTRYP RGLSYMGLGETPOINTERVPROC) ( GLenum pname, GLvoid **params );
|
||||
typedef void (APIENTRYP RGLSYMGLARRAYELEMENTPROC) ( GLint i );
|
||||
typedef void (APIENTRYP RGLSYMGLDRAWARRAYSPROC) ( GLenum mode, GLint first, GLsizei count );
|
||||
typedef void (APIENTRYP RGLSYMGLDRAWELEMENTSPROC) ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices );
|
||||
typedef void (APIENTRYP RGLSYMGLINTERLEAVEDARRAYSPROC) ( GLenum format, GLsizei stride, const GLvoid *pointer );
|
||||
typedef void (APIENTRYP RGLSYMGLSHADEMODELPROC) ( GLenum mode );
|
||||
typedef void (APIENTRYP RGLSYMGLLIGHTFPROC) ( GLenum light, GLenum pname, GLfloat param );
|
||||
typedef void (APIENTRYP RGLSYMGLLIGHTIPROC) ( GLenum light, GLenum pname, GLint param );
|
||||
typedef void (APIENTRYP RGLSYMGLLIGHTFVPROC) ( GLenum light, GLenum pname, const GLfloat *params );
|
||||
typedef void (APIENTRYP RGLSYMGLLIGHTIVPROC) ( GLenum light, GLenum pname, const GLint *params );
|
||||
typedef void (APIENTRYP RGLSYMGLGETLIGHTFVPROC) ( GLenum light, GLenum pname, GLfloat *params );
|
||||
typedef void (APIENTRYP RGLSYMGLGETLIGHTIVPROC) ( GLenum light, GLenum pname, GLint *params );
|
||||
typedef void (APIENTRYP RGLSYMGLLIGHTMODELFPROC) ( GLenum pname, GLfloat param );
|
||||
typedef void (APIENTRYP RGLSYMGLLIGHTMODELIPROC) ( GLenum pname, GLint param );
|
||||
typedef void (APIENTRYP RGLSYMGLLIGHTMODELFVPROC) ( GLenum pname, const GLfloat *params );
|
||||
typedef void (APIENTRYP RGLSYMGLLIGHTMODELIVPROC) ( GLenum pname, const GLint *params );
|
||||
typedef void (APIENTRYP RGLSYMGLMATERIALFPROC) ( GLenum face, GLenum pname, GLfloat param );
|
||||
typedef void (APIENTRYP RGLSYMGLMATERIALIPROC) ( GLenum face, GLenum pname, GLint param );
|
||||
typedef void (APIENTRYP RGLSYMGLMATERIALFVPROC) ( GLenum face, GLenum pname, const GLfloat *params );
|
||||
typedef void (APIENTRYP RGLSYMGLMATERIALIVPROC) ( GLenum face, GLenum pname, const GLint *params );
|
||||
typedef void (APIENTRYP RGLSYMGLGETMATERIALFVPROC) ( GLenum face, GLenum pname, GLfloat *params );
|
||||
typedef void (APIENTRYP RGLSYMGLGETMATERIALIVPROC) ( GLenum face, GLenum pname, GLint *params );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLORMATERIALPROC) ( GLenum face, GLenum mode );
|
||||
typedef void (APIENTRYP RGLSYMGLPIXELZOOMPROC) ( GLfloat xfactor, GLfloat yfactor );
|
||||
typedef void (APIENTRYP RGLSYMGLPIXELSTOREFPROC) ( GLenum pname, GLfloat param );
|
||||
typedef void (APIENTRYP RGLSYMGLPIXELSTOREIPROC) ( GLenum pname, GLint param );
|
||||
typedef void (APIENTRYP RGLSYMGLPIXELTRANSFERFPROC) ( GLenum pname, GLfloat param );
|
||||
typedef void (APIENTRYP RGLSYMGLPIXELTRANSFERIPROC) ( GLenum pname, GLint param );
|
||||
typedef void (APIENTRYP RGLSYMGLPIXELMAPFVPROC) ( GLenum map, GLsizei mapsize, const GLfloat *values );
|
||||
typedef void (APIENTRYP RGLSYMGLPIXELMAPUIVPROC) ( GLenum map, GLsizei mapsize, const GLuint *values );
|
||||
typedef void (APIENTRYP RGLSYMGLPIXELMAPUSVPROC) ( GLenum map, GLsizei mapsize, const GLushort *values );
|
||||
typedef void (APIENTRYP RGLSYMGLGETPIXELMAPFVPROC) ( GLenum map, GLfloat *values );
|
||||
typedef void (APIENTRYP RGLSYMGLGETPIXELMAPUIVPROC) ( GLenum map, GLuint *values );
|
||||
typedef void (APIENTRYP RGLSYMGLGETPIXELMAPUSVPROC) ( GLenum map, GLushort *values );
|
||||
typedef void (APIENTRYP RGLSYMGLBITMAPPROC) ( GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap );
|
||||
typedef void (APIENTRYP RGLSYMGLREADPIXELSPROC) ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels );
|
||||
typedef void (APIENTRYP RGLSYMGLDRAWPIXELSPROC) ( GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels );
|
||||
typedef void (APIENTRYP RGLSYMGLCOPYPIXELSPROC) ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum type );
|
||||
typedef void (APIENTRYP RGLSYMGLSTENCILFUNCPROC) ( GLenum func, GLint ref, GLuint mask );
|
||||
typedef void (APIENTRYP RGLSYMGLSTENCILMASKPROC) ( GLuint mask );
|
||||
typedef void (APIENTRYP RGLSYMGLSTENCILOPPROC) ( GLenum fail, GLenum zfail, GLenum zpass );
|
||||
typedef void (APIENTRYP RGLSYMGLCLEARSTENCILPROC) ( GLint s );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXGENDPROC) ( GLenum coord, GLenum pname, GLdouble param );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXGENFPROC) ( GLenum coord, GLenum pname, GLfloat param );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXGENIPROC) ( GLenum coord, GLenum pname, GLint param );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXGENDVPROC) ( GLenum coord, GLenum pname, const GLdouble *params );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXGENFVPROC) ( GLenum coord, GLenum pname, const GLfloat *params );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXGENIVPROC) ( GLenum coord, GLenum pname, const GLint *params );
|
||||
typedef void (APIENTRYP RGLSYMGLGETTEXGENDVPROC) ( GLenum coord, GLenum pname, GLdouble *params );
|
||||
typedef void (APIENTRYP RGLSYMGLGETTEXGENFVPROC) ( GLenum coord, GLenum pname, GLfloat *params );
|
||||
typedef void (APIENTRYP RGLSYMGLGETTEXGENIVPROC) ( GLenum coord, GLenum pname, GLint *params );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXENVFPROC) ( GLenum target, GLenum pname, GLfloat param );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXENVIPROC) ( GLenum target, GLenum pname, GLint param );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXENVFVPROC) ( GLenum target, GLenum pname, const GLfloat *params );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXENVIVPROC) ( GLenum target, GLenum pname, const GLint *params );
|
||||
typedef void (APIENTRYP RGLSYMGLGETTEXENVFVPROC) ( GLenum target, GLenum pname, GLfloat *params );
|
||||
typedef void (APIENTRYP RGLSYMGLGETTEXENVIVPROC) ( GLenum target, GLenum pname, GLint *params );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXPARAMETERFPROC) ( GLenum target, GLenum pname, GLfloat param );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXPARAMETERIPROC) ( GLenum target, GLenum pname, GLint param );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXPARAMETERFVPROC) ( GLenum target, GLenum pname, const GLfloat *params );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXPARAMETERIVPROC) ( GLenum target, GLenum pname, const GLint *params );
|
||||
typedef void (APIENTRYP RGLSYMGLGETTEXPARAMETERFVPROC) ( GLenum target, GLenum pname, GLfloat *params);
|
||||
typedef void (APIENTRYP RGLSYMGLGETTEXPARAMETERIVPROC) ( GLenum target, GLenum pname, GLint *params );
|
||||
typedef void (APIENTRYP RGLSYMGLGETTEXLEVELPARAMETERFVPROC) ( GLenum target, GLint level, GLenum pname, GLfloat *params );
|
||||
typedef void (APIENTRYP RGLSYMGLGETTEXLEVELPARAMETERIVPROC) ( GLenum target, GLint level, GLenum pname, GLint *params );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXIMAGE1DPROC) ( GLenum target, GLint level, GLint internalFormat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXIMAGE2DPROC) ( GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels );
|
||||
typedef void (APIENTRYP RGLSYMGLGETTEXIMAGEPROC) ( GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels );
|
||||
typedef void (APIENTRYP RGLSYMGLGENTEXTURESPROC) ( GLsizei n, GLuint *textures );
|
||||
typedef void (APIENTRYP RGLSYMGLDELETETEXTURESPROC) ( GLsizei n, const GLuint *textures);
|
||||
typedef void (APIENTRYP RGLSYMGLBINDTEXTUREPROC) ( GLenum target, GLuint texture );
|
||||
typedef void (APIENTRYP RGLSYMGLPRIORITIZETEXTURESPROC) ( GLsizei n, const GLuint *textures, const GLclampf *priorities );
|
||||
typedef GLboolean (APIENTRYP RGLSYMGLARETEXTURESRESIDENTPROC) ( GLsizei n, const GLuint *textures, GLboolean *residences );
|
||||
typedef GLboolean (APIENTRYP RGLSYMGLISTEXTUREPROC) ( GLuint texture );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXSUBIMAGE1DPROC) ( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXSUBIMAGE2DPROC) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels );
|
||||
typedef void (APIENTRYP RGLSYMGLCOPYTEXIMAGE1DPROC) ( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border );
|
||||
typedef void (APIENTRYP RGLSYMGLCOPYTEXIMAGE2DPROC) ( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border );
|
||||
typedef void (APIENTRYP RGLSYMGLCOPYTEXSUBIMAGE1DPROC) ( GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width );
|
||||
typedef void (APIENTRYP RGLSYMGLCOPYTEXSUBIMAGE2DPROC) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height );
|
||||
typedef void (APIENTRYP RGLSYMGLMAP1DPROC) ( GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points );
|
||||
typedef void (APIENTRYP RGLSYMGLMAP1FPROC) ( GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points );
|
||||
typedef void (APIENTRYP RGLSYMGLMAP2DPROC) ( GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points );
|
||||
typedef void (APIENTRYP RGLSYMGLMAP2FPROC) ( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points );
|
||||
typedef void (APIENTRYP RGLSYMGLGETMAPDVPROC) ( GLenum target, GLenum query, GLdouble *v );
|
||||
typedef void (APIENTRYP RGLSYMGLGETMAPFVPROC) ( GLenum target, GLenum query, GLfloat *v );
|
||||
typedef void (APIENTRYP RGLSYMGLGETMAPIVPROC) ( GLenum target, GLenum query, GLint *v );
|
||||
typedef void (APIENTRYP RGLSYMGLEVALCOORD1DPROC) ( GLdouble u );
|
||||
typedef void (APIENTRYP RGLSYMGLEVALCOORD1FPROC) ( GLfloat u );
|
||||
typedef void (APIENTRYP RGLSYMGLEVALCOORD1DVPROC) ( const GLdouble *u );
|
||||
typedef void (APIENTRYP RGLSYMGLEVALCOORD1FVPROC) ( const GLfloat *u );
|
||||
typedef void (APIENTRYP RGLSYMGLEVALCOORD2DPROC) ( GLdouble u, GLdouble v );
|
||||
typedef void (APIENTRYP RGLSYMGLEVALCOORD2FPROC) ( GLfloat u, GLfloat v );
|
||||
typedef void (APIENTRYP RGLSYMGLEVALCOORD2DVPROC) ( const GLdouble *u );
|
||||
typedef void (APIENTRYP RGLSYMGLEVALCOORD2FVPROC) ( const GLfloat *u );
|
||||
typedef void (APIENTRYP RGLSYMGLMAPGRID1DPROC) ( GLint un, GLdouble u1, GLdouble u2 );
|
||||
typedef void (APIENTRYP RGLSYMGLMAPGRID1FPROC) ( GLint un, GLfloat u1, GLfloat u2 );
|
||||
typedef void (APIENTRYP RGLSYMGLMAPGRID2DPROC) ( GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2 );
|
||||
typedef void (APIENTRYP RGLSYMGLMAPGRID2FPROC) ( GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2 );
|
||||
typedef void (APIENTRYP RGLSYMGLEVALPOINT1PROC) ( GLint i );
|
||||
typedef void (APIENTRYP RGLSYMGLEVALPOINT2PROC) ( GLint i, GLint j );
|
||||
typedef void (APIENTRYP RGLSYMGLEVALMESH1PROC) ( GLenum mode, GLint i1, GLint i2 );
|
||||
typedef void (APIENTRYP RGLSYMGLEVALMESH2PROC) ( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
|
||||
typedef void (APIENTRYP RGLSYMGLFOGFPROC) ( GLenum pname, GLfloat param );
|
||||
typedef void (APIENTRYP RGLSYMGLFOGIPROC) ( GLenum pname, GLint param );
|
||||
typedef void (APIENTRYP RGLSYMGLFOGFVPROC) ( GLenum pname, const GLfloat *params );
|
||||
typedef void (APIENTRYP RGLSYMGLFOGIVPROC) ( GLenum pname, const GLint *params );
|
||||
typedef void (APIENTRYP RGLSYMGLFEEDBACKBUFFERPROC) ( GLsizei size, GLenum type, GLfloat *buffer );
|
||||
typedef void (APIENTRYP RGLSYMGLPASSTHROUGHPROC) ( GLfloat token );
|
||||
typedef void (APIENTRYP RGLSYMGLSELECTBUFFERPROC) ( GLsizei size, GLuint *buffer );
|
||||
typedef void (APIENTRYP RGLSYMGLINITNAMESPROC) ( void );
|
||||
typedef void (APIENTRYP RGLSYMGLLOADNAMEPROC) ( GLuint name );
|
||||
typedef void (APIENTRYP RGLSYMGLPUSHNAMEPROC) ( GLuint name );
|
||||
typedef void (APIENTRYP RGLSYMGLPOPNAMEPROC) ( void );
|
||||
typedef void (APIENTRYP RGLSYMGLDRAWRANGEELEMENTSPROC) ( GLenum mode, GLuint start,GLuint end, GLsizei count, GLenum type, const GLvoid *indices );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXIMAGE3DPROC) ( GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels );
|
||||
typedef void (APIENTRYP RGLSYMGLTEXSUBIMAGE3DPROC) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
|
||||
typedef void (APIENTRYP RGLSYMGLCOPYTEXSUBIMAGE3DPROC) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLORTABLEPROC) ( GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLORSUBTABLEPROC) ( GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data );
|
||||
typedef void (APIENTRYP RGLSYMGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
|
||||
typedef void (APIENTRYP RGLSYMGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
|
||||
typedef void (APIENTRYP RGLSYMGLCOPYCOLORSUBTABLEPROC) ( GLenum target, GLsizei start, GLint x, GLint y, GLsizei width );
|
||||
typedef void (APIENTRYP RGLSYMGLCOPYCOLORTABLEPROC) ( GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width );
|
||||
typedef void (APIENTRYP RGLSYMGLGETCOLORTABLEPROC) ( GLenum target, GLenum format, GLenum type, GLvoid *table );
|
||||
typedef void (APIENTRYP RGLSYMGLGETCOLORTABLEPARAMETERFVPROC) ( GLenum target, GLenum pname, GLfloat *params );
|
||||
typedef void (APIENTRYP RGLSYMGLGETCOLORTABLEPARAMETERIVPROC) ( GLenum target, GLenum pname, GLint *params );
|
||||
typedef void (APIENTRYP RGLSYMGLBLENDEQUATIONPROC) ( GLenum mode );
|
||||
typedef void (APIENTRYP RGLSYMGLBLENDCOLORPROC) ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
|
||||
typedef void (APIENTRYP RGLSYMGLHISTOGRAMPROC) ( GLenum target, GLsizei width, GLenum internalformat, GLboolean sink );
|
||||
typedef void (APIENTRYP RGLSYMGLRESETHISTOGRAMPROC) ( GLenum target );
|
||||
typedef void (APIENTRYP RGLSYMGLGETHISTOGRAMPROC) ( GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values );
|
||||
typedef void (APIENTRYP RGLSYMGLGETHISTOGRAMPARAMETERFVPROC) ( GLenum target, GLenum pname, GLfloat *params );
|
||||
typedef void (APIENTRYP RGLSYMGLGETHISTOGRAMPARAMETERIVPROC) ( GLenum target, GLenum pname, GLint *params );
|
||||
typedef void (APIENTRYP RGLSYMGLMINMAXPROC) ( GLenum target, GLenum internalformat,GLboolean sink );
|
||||
typedef void (APIENTRYP RGLSYMGLRESETMINMAXPROC) ( GLenum target );
|
||||
typedef void (APIENTRYP RGLSYMGLGETMINMAXPROC) ( GLenum target, GLboolean reset, GLenum format, GLenum types, GLvoid *values );
|
||||
typedef void (APIENTRYP RGLSYMGLGETMINMAXPARAMETERFVPROC) ( GLenum target, GLenum pname, GLfloat *params );
|
||||
typedef void (APIENTRYP RGLSYMGLGETMINMAXPARAMETERIVPROC) ( GLenum target, GLenum pname, GLint *params );
|
||||
typedef void (APIENTRYP RGLSYMGLCONVOLUTIONFILTER1DPROC) ( GLenum target,GLenum internalformat, GLsizei width, GLenum format, GLenum type,const GLvoid *image );
|
||||
typedef void (APIENTRYP RGLSYMGLCONVOLUTIONFILTER2DPROC) ( GLenum target,GLenum internalformat, GLsizei width, GLsizei height, GLenum format,GLenum type, const GLvoid *image );
|
||||
typedef void (APIENTRYP RGLSYMGLCONVOLUTIONPARAMETERFPROC) ( GLenum target, GLenum pname,GLfloat params );
|
||||
typedef void (APIENTRYP RGLSYMGLCONVOLUTIONPARAMETERFVPROC) ( GLenum target, GLenum pname,const GLfloat *params );
|
||||
typedef void (APIENTRYP RGLSYMGLCONVOLUTIONPARAMETERIPROC) ( GLenum target, GLenum pname,GLint params );
|
||||
typedef void (APIENTRYP RGLSYMGLCONVOLUTIONPARAMETERIVPROC) ( GLenum target, GLenum pname,const GLint *params );
|
||||
typedef void (APIENTRYP RGLSYMGLCOPYCONVOLUTIONFILTER1DPROC) ( GLenum target,GLenum internalformat, GLint x, GLint y, GLsizei width );
|
||||
typedef void (APIENTRYP RGLSYMGLCOPYCONVOLUTIONFILTER2DPROC) ( GLenum target,GLenum internalformat, GLint x, GLint y, GLsizei width,GLsizei height);
|
||||
typedef void (APIENTRYP RGLSYMGLGETCONVOLUTIONFILTERPROC) ( GLenum target, GLenum format,GLenum type, GLvoid *image );
|
||||
typedef void (APIENTRYP RGLSYMGLGETCONVOLUTIONPARAMETERFVPROC) ( GLenum target, GLenum pname,GLfloat *params );
|
||||
typedef void (APIENTRYP RGLSYMGLGETCONVOLUTIONPARAMETERIVPROC) ( GLenum target, GLenum pname,GLint *params );
|
||||
typedef void (APIENTRYP RGLSYMGLSEPARABLEFILTER2DPROC) ( GLenum target,GLenum internalformat, GLsizei width, GLsizei height, GLenum format,GLenum type, const GLvoid *row, const GLvoid *column );
|
||||
typedef void (APIENTRYP RGLSYMGLGETSEPARABLEFILTERPROC) ( GLenum target, GLenum format,GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
|
||||
typedef void (APIENTRYP RGLSYMGLACTIVETEXTUREPROC) ( GLenum texture );
|
||||
typedef void (APIENTRYP RGLSYMGLCLIENTACTIVETEXTUREPROC) ( GLenum texture );
|
||||
typedef void (APIENTRYP RGLSYMGLCOMPRESSEDTEXIMAGE1DPROC) ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data );
|
||||
typedef void (APIENTRYP RGLSYMGLCOMPRESSEDTEXIMAGE2DPROC) ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data );
|
||||
typedef void (APIENTRYP RGLSYMGLCOMPRESSEDTEXIMAGE3DPROC) ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data );
|
||||
typedef void (APIENTRYP RGLSYMGLCOMPRESSEDTEXSUBIMAGE1DPROC) ( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data );
|
||||
typedef void (APIENTRYP RGLSYMGLCOMPRESSEDTEXSUBIMAGE2DPROC) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data );
|
||||
typedef void (APIENTRYP RGLSYMGLCOMPRESSEDTEXSUBIMAGE3DPROC) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data );
|
||||
typedef void (APIENTRYP RGLSYMGLGETCOMPRESSEDTEXIMAGEPROC) ( GLenum target, GLint lod, GLvoid *img );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD1DPROC) ( GLenum target, GLdouble s );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD1DVPROC) ( GLenum target, const GLdouble *v );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD1FPROC) ( GLenum target, GLfloat s );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD1FVPROC) ( GLenum target, const GLfloat *v );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD1IPROC) ( GLenum target, GLint s );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD1IVPROC) ( GLenum target, const GLint *v );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD1SPROC) ( GLenum target, GLshort s );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD1SVPROC) ( GLenum target, const GLshort *v );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD2DPROC) ( GLenum target, GLdouble s, GLdouble t );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD2DVPROC) ( GLenum target, const GLdouble *v );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD2FPROC) ( GLenum target, GLfloat s, GLfloat t );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD2FVPROC) ( GLenum target, const GLfloat *v );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD2IPROC) ( GLenum target, GLint s, GLint t );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD2IVPROC) ( GLenum target, const GLint *v );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD2SPROC) ( GLenum target, GLshort s, GLshort t );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD2SVPROC) ( GLenum target, const GLshort *v );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD3DPROC) ( GLenum target, GLdouble s, GLdouble t, GLdouble r );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD3DVPROC) ( GLenum target, const GLdouble *v );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD3FPROC) ( GLenum target, GLfloat s, GLfloat t, GLfloat r );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD3FVPROC) ( GLenum target, const GLfloat *v );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD3IPROC) ( GLenum target, GLint s, GLint t, GLint r );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD3IVPROC) ( GLenum target, const GLint *v );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD3SPROC) ( GLenum target, GLshort s, GLshort t, GLshort r );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD3SVPROC) ( GLenum target, const GLshort *v );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD4DPROC) ( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD4DVPROC) ( GLenum target, const GLdouble *v );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD4FPROC) ( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD4FVPROC) ( GLenum target, const GLfloat *v );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD4IPROC) ( GLenum target, GLint s, GLint t, GLint r, GLint q );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD4IVPROC) ( GLenum target, const GLint *v );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD4SPROC) ( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD4SVPROC) ( GLenum target, const GLshort *v );
|
||||
typedef void (APIENTRYP RGLSYMGLLOADTRANSPOSEMATRIXDPROC) ( const GLdouble m[16] );
|
||||
typedef void (APIENTRYP RGLSYMGLLOADTRANSPOSEMATRIXFPROC) ( const GLfloat m[16] );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTTRANSPOSEMATRIXDPROC) ( const GLdouble m[16] );
|
||||
typedef void (APIENTRYP RGLSYMGLMULTTRANSPOSEMATRIXFPROC) ( const GLfloat m[16] );
|
||||
typedef void (APIENTRYP RGLSYMGLSAMPLECOVERAGEPROC) ( GLclampf value, GLboolean invert );
|
||||
typedef void (APIENTRYP RGLSYMGLACTIVETEXTUREARBPROC) (GLenum texture);
|
||||
typedef void (APIENTRYP RGLSYMGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
|
||||
typedef void (APIENTRYP RGLSYMGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
|
||||
typedef void (APIENTRYP RGLSYMGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
|
||||
typedef void (APIENTRYP RGLSYMGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
|
||||
typedef void (APIENTRYP RGLSYMGLBINDTEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures);
|
||||
|
||||
RGLSYMGLCLEARINDEXPROC glClearIndex;
|
||||
RGLSYMGLCLEARCOLORPROC glClearColor;
|
||||
RGLSYMGLCLEARPROC glClear;
|
||||
RGLSYMGLINDEXMASKPROC glIndexMask;
|
||||
RGLSYMGLCOLORMASKPROC glColorMask;
|
||||
RGLSYMGLALPHAFUNCPROC glAlphaFunc;
|
||||
RGLSYMGLBLENDFUNCPROC glBlendFunc;
|
||||
RGLSYMGLLOGICOPPROC glLogicOp;
|
||||
RGLSYMGLCULLFACEPROC glCullFace;
|
||||
RGLSYMGLFRONTFACEPROC glFrontFace;
|
||||
RGLSYMGLPOINTSIZEPROC glPointSize;
|
||||
RGLSYMGLLINEWIDTHPROC glLineWidth;
|
||||
RGLSYMGLLINESTIPPLEPROC glLineStipple;
|
||||
RGLSYMGLPOLYGONMODEPROC glPolygonMode;
|
||||
RGLSYMGLPOLYGONOFFSETPROC glPolygonOffset;
|
||||
RGLSYMGLPOLYGONSTIPPLEPROC glPolygonStipple;
|
||||
RGLSYMGLGETPOLYGONSTIPPLEPROC glGetPolygonStipple;
|
||||
RGLSYMGLEDGEFLAGPROC glEdgeFlag;
|
||||
RGLSYMGLEDGEFLAGVPROC glEdgeFlagv;
|
||||
RGLSYMGLSCISSORPROC glScissor;
|
||||
RGLSYMGLCLIPPLANEPROC glClipPlane;
|
||||
RGLSYMGLGETCLIPPLANEPROC glGetClipPlane;
|
||||
RGLSYMGLDRAWBUFFERPROC glDrawBuffer;
|
||||
RGLSYMGLREADBUFFERPROC glReadBuffer;
|
||||
RGLSYMGLENABLEPROC glEnable;
|
||||
RGLSYMGLDISABLEPROC glDisable;
|
||||
RGLSYMGLISENABLEDPROC glIsEnabled;
|
||||
RGLSYMGLENABLECLIENTSTATEPROC glEnableClientState;
|
||||
RGLSYMGLDISABLECLIENTSTATEPROC glDisableClientState;
|
||||
RGLSYMGLGETBOOLEANVPROC glGetBooleanv;
|
||||
RGLSYMGLGETDOUBLEVPROC glGetDoublev;
|
||||
RGLSYMGLGETFLOATVPROC glGetFloatv;
|
||||
RGLSYMGLGETINTEGERVPROC glGetIntegerv;
|
||||
RGLSYMGLPUSHATTRIBPROC glPushAttrib;
|
||||
RGLSYMGLPOPATTRIBPROC glPopAttrib;
|
||||
RGLSYMGLPUSHCLIENTATTRIBPROC glPushClientAttrib;
|
||||
RGLSYMGLPOPCLIENTATTRIBPROC glPopClientAttrib;
|
||||
RGLSYMGLRENDERMODEPROC glRenderMode;
|
||||
RGLSYMGLGETERRORPROC glGetError;
|
||||
RGLSYMGLGETSTRINGPROC glGetString;
|
||||
RGLSYMGLFINISHPROC glFinish;
|
||||
RGLSYMGLFLUSHPROC glFlush;
|
||||
RGLSYMGLHINTPROC glHint;
|
||||
RGLSYMGLCLEARDEPTHPROC glClearDepth;
|
||||
RGLSYMGLDEPTHFUNCPROC glDepthFunc;
|
||||
RGLSYMGLDEPTHMASKPROC glDepthMask;
|
||||
RGLSYMGLDEPTHRANGEPROC glDepthRange;
|
||||
RGLSYMGLCLEARACCUMPROC glClearAccum;
|
||||
RGLSYMGLACCUMPROC glAccum;
|
||||
RGLSYMGLMATRIXMODEPROC glMatrixMode;
|
||||
RGLSYMGLORTHOPROC glOrtho;
|
||||
RGLSYMGLFRUSTUMPROC glFrustum;
|
||||
RGLSYMGLVIEWPORTPROC glViewport;
|
||||
RGLSYMGLPUSHMATRIXPROC glPushMatrix;
|
||||
RGLSYMGLPOPMATRIXPROC glPopMatrix;
|
||||
RGLSYMGLLOADIDENTITYPROC glLoadIdentity;
|
||||
RGLSYMGLLOADMATRIXDPROC glLoadMatrixd;
|
||||
RGLSYMGLLOADMATRIXFPROC glLoadMatrixf;
|
||||
RGLSYMGLMULTMATRIXDPROC glMultMatrixd;
|
||||
RGLSYMGLMULTMATRIXFPROC glMultMatrixf;
|
||||
RGLSYMGLROTATEDPROC glRotated;
|
||||
RGLSYMGLROTATEFPROC glRotatef;
|
||||
RGLSYMGLSCALEDPROC glScaled;
|
||||
RGLSYMGLSCALEFPROC glScalef;
|
||||
RGLSYMGLTRANSLATEDPROC glTranslated;
|
||||
RGLSYMGLTRANSLATEFPROC glTranslatef;
|
||||
RGLSYMGLISLISTPROC glIsList;
|
||||
RGLSYMGLDELETELISTSPROC glDeleteLists;
|
||||
RGLSYMGLGENLISTSPROC glGenLists;
|
||||
RGLSYMGLNEWLISTPROC glNewList;
|
||||
RGLSYMGLENDLISTPROC glEndList;
|
||||
RGLSYMGLCALLLISTPROC glCallList;
|
||||
RGLSYMGLCALLLISTSPROC glCallLists;
|
||||
RGLSYMGLLISTBASEPROC glListBase;
|
||||
RGLSYMGLBEGINPROC glBegin;
|
||||
RGLSYMGLENDPROC glEnd;
|
||||
RGLSYMGLVERTEX2DPROC glVertex2d;
|
||||
RGLSYMGLVERTEX2FPROC glVertex2f;
|
||||
RGLSYMGLVERTEX2IPROC glVertex2i;
|
||||
RGLSYMGLVERTEX2SPROC glVertex2s;
|
||||
RGLSYMGLVERTEX3DPROC glVertex3d;
|
||||
RGLSYMGLVERTEX3FPROC glVertex3f;
|
||||
RGLSYMGLVERTEX3IPROC glVertex3i;
|
||||
RGLSYMGLVERTEX3SPROC glVertex3s;
|
||||
RGLSYMGLVERTEX4DPROC glVertex4d;
|
||||
RGLSYMGLVERTEX4FPROC glVertex4f;
|
||||
RGLSYMGLVERTEX4IPROC glVertex4i;
|
||||
RGLSYMGLVERTEX4SPROC glVertex4s;
|
||||
RGLSYMGLVERTEX2DVPROC glVertex2dv;
|
||||
RGLSYMGLVERTEX2FVPROC glVertex2fv;
|
||||
RGLSYMGLVERTEX2IVPROC glVertex2iv;
|
||||
RGLSYMGLVERTEX2SVPROC glVertex2sv;
|
||||
RGLSYMGLVERTEX3DVPROC glVertex3dv;
|
||||
RGLSYMGLVERTEX3FVPROC glVertex3fv;
|
||||
RGLSYMGLVERTEX3IVPROC glVertex3iv;
|
||||
RGLSYMGLVERTEX3SVPROC glVertex3sv;
|
||||
RGLSYMGLVERTEX4DVPROC glVertex4dv;
|
||||
RGLSYMGLVERTEX4FVPROC glVertex4fv;
|
||||
RGLSYMGLVERTEX4IVPROC glVertex4iv;
|
||||
RGLSYMGLVERTEX4SVPROC glVertex4sv;
|
||||
RGLSYMGLNORMAL3BPROC glNormal3b;
|
||||
RGLSYMGLNORMAL3DPROC glNormal3d;
|
||||
RGLSYMGLNORMAL3FPROC glNormal3f;
|
||||
RGLSYMGLNORMAL3IPROC glNormal3i;
|
||||
RGLSYMGLNORMAL3SPROC glNormal3s;
|
||||
RGLSYMGLNORMAL3BVPROC glNormal3bv;
|
||||
RGLSYMGLNORMAL3DVPROC glNormal3dv;
|
||||
RGLSYMGLNORMAL3FVPROC glNormal3fv;
|
||||
RGLSYMGLNORMAL3IVPROC glNormal3iv;
|
||||
RGLSYMGLNORMAL3SVPROC glNormal3sv;
|
||||
RGLSYMGLINDEXDPROC glIndexd;
|
||||
RGLSYMGLINDEXFPROC glIndexf;
|
||||
RGLSYMGLINDEXIPROC glIndexi;
|
||||
RGLSYMGLINDEXSPROC glIndexs;
|
||||
RGLSYMGLINDEXUBPROC glIndexub;
|
||||
RGLSYMGLINDEXDVPROC glIndexdv;
|
||||
RGLSYMGLINDEXFVPROC glIndexfv;
|
||||
RGLSYMGLINDEXIVPROC glIndexiv;
|
||||
RGLSYMGLINDEXSVPROC glIndexsv;
|
||||
RGLSYMGLINDEXUBVPROC glIndexubv;
|
||||
RGLSYMGLCOLOR3BPROC glColor3b;
|
||||
RGLSYMGLCOLOR3DPROC glColor3d;
|
||||
RGLSYMGLCOLOR3FPROC glColor3f;
|
||||
RGLSYMGLCOLOR3IPROC glColor3i;
|
||||
RGLSYMGLCOLOR3SPROC glColor3s;
|
||||
RGLSYMGLCOLOR3UBPROC glColor3ub;
|
||||
RGLSYMGLCOLOR3UIPROC glColor3ui;
|
||||
RGLSYMGLCOLOR3USPROC glColor3us;
|
||||
RGLSYMGLCOLOR4BPROC glColor4b;
|
||||
RGLSYMGLCOLOR4DPROC glColor4d;
|
||||
RGLSYMGLCOLOR4FPROC glColor4f;
|
||||
RGLSYMGLCOLOR4IPROC glColor4i;
|
||||
RGLSYMGLCOLOR4SPROC glColor4s;
|
||||
RGLSYMGLCOLOR4UBPROC glColor4ub;
|
||||
RGLSYMGLCOLOR4UIPROC glColor4ui;
|
||||
RGLSYMGLCOLOR4USPROC glColor4us;
|
||||
RGLSYMGLCOLOR3BVPROC glColor3bv;
|
||||
RGLSYMGLCOLOR3DVPROC glColor3dv;
|
||||
RGLSYMGLCOLOR3FVPROC glColor3fv;
|
||||
RGLSYMGLCOLOR3IVPROC glColor3iv;
|
||||
RGLSYMGLCOLOR3SVPROC glColor3sv;
|
||||
RGLSYMGLCOLOR3UBVPROC glColor3ubv;
|
||||
RGLSYMGLCOLOR3UIVPROC glColor3uiv;
|
||||
RGLSYMGLCOLOR3USVPROC glColor3usv;
|
||||
RGLSYMGLCOLOR4BVPROC glColor4bv;
|
||||
RGLSYMGLCOLOR4DVPROC glColor4dv;
|
||||
RGLSYMGLCOLOR4FVPROC glColor4fv;
|
||||
RGLSYMGLCOLOR4IVPROC glColor4iv;
|
||||
RGLSYMGLCOLOR4SVPROC glColor4sv;
|
||||
RGLSYMGLCOLOR4UBVPROC glColor4ubv;
|
||||
RGLSYMGLCOLOR4UIVPROC glColor4uiv;
|
||||
RGLSYMGLCOLOR4USVPROC glColor4usv;
|
||||
RGLSYMGLTEXCOORD1DPROC glTexCoord1d;
|
||||
RGLSYMGLTEXCOORD1FPROC glTexCoord1f;
|
||||
RGLSYMGLTEXCOORD1IPROC glTexCoord1i;
|
||||
RGLSYMGLTEXCOORD1SPROC glTexCoord1s;
|
||||
RGLSYMGLTEXCOORD2DPROC glTexCoord2d;
|
||||
RGLSYMGLTEXCOORD2FPROC glTexCoord2f;
|
||||
RGLSYMGLTEXCOORD2IPROC glTexCoord2i;
|
||||
RGLSYMGLTEXCOORD2SPROC glTexCoord2s;
|
||||
RGLSYMGLTEXCOORD3DPROC glTexCoord3d;
|
||||
RGLSYMGLTEXCOORD3FPROC glTexCoord3f;
|
||||
RGLSYMGLTEXCOORD3IPROC glTexCoord3i;
|
||||
RGLSYMGLTEXCOORD3SPROC glTexCoord3s;
|
||||
RGLSYMGLTEXCOORD4DPROC glTexCoord4d;
|
||||
RGLSYMGLTEXCOORD4FPROC glTexCoord4f;
|
||||
RGLSYMGLTEXCOORD4IPROC glTexCoord4i;
|
||||
RGLSYMGLTEXCOORD4SPROC glTexCoord4s;
|
||||
RGLSYMGLTEXCOORD1DVPROC glTexCoord1dv;
|
||||
RGLSYMGLTEXCOORD1FVPROC glTexCoord1fv;
|
||||
RGLSYMGLTEXCOORD1IVPROC glTexCoord1iv;
|
||||
RGLSYMGLTEXCOORD1SVPROC glTexCoord1sv;
|
||||
RGLSYMGLTEXCOORD2DVPROC glTexCoord2dv;
|
||||
RGLSYMGLTEXCOORD2FVPROC glTexCoord2fv;
|
||||
RGLSYMGLTEXCOORD2IVPROC glTexCoord2iv;
|
||||
RGLSYMGLTEXCOORD2SVPROC glTexCoord2sv;
|
||||
RGLSYMGLTEXCOORD3DVPROC glTexCoord3dv;
|
||||
RGLSYMGLTEXCOORD3FVPROC glTexCoord3fv;
|
||||
RGLSYMGLTEXCOORD3IVPROC glTexCoord3iv;
|
||||
RGLSYMGLTEXCOORD3SVPROC glTexCoord3sv;
|
||||
RGLSYMGLTEXCOORD4DVPROC glTexCoord4dv;
|
||||
RGLSYMGLTEXCOORD4FVPROC glTexCoord4fv;
|
||||
RGLSYMGLTEXCOORD4IVPROC glTexCoord4iv;
|
||||
RGLSYMGLTEXCOORD4SVPROC glTexCoord4sv;
|
||||
RGLSYMGLRASTERPOS2DPROC glRasterPos2d;
|
||||
RGLSYMGLRASTERPOS2FPROC glRasterPos2f;
|
||||
RGLSYMGLRASTERPOS2IPROC glRasterPos2i;
|
||||
RGLSYMGLRASTERPOS2SPROC glRasterPos2s;
|
||||
RGLSYMGLRASTERPOS3DPROC glRasterPos3d;
|
||||
RGLSYMGLRASTERPOS3FPROC glRasterPos3f;
|
||||
RGLSYMGLRASTERPOS3IPROC glRasterPos3i;
|
||||
RGLSYMGLRASTERPOS3SPROC glRasterPos3s;
|
||||
RGLSYMGLRASTERPOS4DPROC glRasterPos4d;
|
||||
RGLSYMGLRASTERPOS4FPROC glRasterPos4f;
|
||||
RGLSYMGLRASTERPOS4IPROC glRasterPos4i;
|
||||
RGLSYMGLRASTERPOS4SPROC glRasterPos4s;
|
||||
RGLSYMGLRASTERPOS2DVPROC glRasterPos2dv;
|
||||
RGLSYMGLRASTERPOS2FVPROC glRasterPos2fv;
|
||||
RGLSYMGLRASTERPOS2IVPROC glRasterPos2iv;
|
||||
RGLSYMGLRASTERPOS2SVPROC glRasterPos2sv;
|
||||
RGLSYMGLRASTERPOS3DVPROC glRasterPos3dv;
|
||||
RGLSYMGLRASTERPOS3FVPROC glRasterPos3fv;
|
||||
RGLSYMGLRASTERPOS3IVPROC glRasterPos3iv;
|
||||
RGLSYMGLRASTERPOS3SVPROC glRasterPos3sv;
|
||||
RGLSYMGLRASTERPOS4DVPROC glRasterPos4dv;
|
||||
RGLSYMGLRASTERPOS4FVPROC glRasterPos4fv;
|
||||
RGLSYMGLRASTERPOS4IVPROC glRasterPos4iv;
|
||||
RGLSYMGLRASTERPOS4SVPROC glRasterPos4sv;
|
||||
RGLSYMGLRECTDPROC glRectd;
|
||||
RGLSYMGLRECTFPROC glRectf;
|
||||
RGLSYMGLRECTIPROC glRecti;
|
||||
RGLSYMGLRECTSPROC glRects;
|
||||
RGLSYMGLRECTDVPROC glRectdv;
|
||||
RGLSYMGLRECTFVPROC glRectfv;
|
||||
RGLSYMGLRECTIVPROC glRectiv;
|
||||
RGLSYMGLRECTSVPROC glRectsv;
|
||||
RGLSYMGLVERTEXPOINTERPROC glVertexPointer;
|
||||
RGLSYMGLNORMALPOINTERPROC glNormalPointer;
|
||||
RGLSYMGLCOLORPOINTERPROC glColorPointer;
|
||||
RGLSYMGLINDEXPOINTERPROC glIndexPointer;
|
||||
RGLSYMGLTEXCOORDPOINTERPROC glTexCoordPointer;
|
||||
RGLSYMGLEDGEFLAGPOINTERPROC glEdgeFlagPointer;
|
||||
RGLSYMGLGETPOINTERVPROC glGetPointerv;
|
||||
RGLSYMGLARRAYELEMENTPROC glArrayElement;
|
||||
RGLSYMGLDRAWARRAYSPROC glDrawArrays;
|
||||
RGLSYMGLDRAWELEMENTSPROC glDrawElements;
|
||||
RGLSYMGLINTERLEAVEDARRAYSPROC glInterleavedArrays;
|
||||
RGLSYMGLSHADEMODELPROC glShadeModel;
|
||||
RGLSYMGLLIGHTFPROC glLightf;
|
||||
RGLSYMGLLIGHTIPROC glLighti;
|
||||
RGLSYMGLLIGHTFVPROC glLightfv;
|
||||
RGLSYMGLLIGHTIVPROC glLightiv;
|
||||
RGLSYMGLGETLIGHTFVPROC glGetLightfv;
|
||||
RGLSYMGLGETLIGHTIVPROC glGetLightiv;
|
||||
RGLSYMGLLIGHTMODELFPROC glLightModelf;
|
||||
RGLSYMGLLIGHTMODELIPROC glLightModeli;
|
||||
RGLSYMGLLIGHTMODELFVPROC glLightModelfv;
|
||||
RGLSYMGLLIGHTMODELIVPROC glLightModeliv;
|
||||
RGLSYMGLMATERIALFPROC glMaterialf;
|
||||
RGLSYMGLMATERIALIPROC glMateriali;
|
||||
RGLSYMGLMATERIALFVPROC glMaterialfv;
|
||||
RGLSYMGLMATERIALIVPROC glMaterialiv;
|
||||
RGLSYMGLGETMATERIALFVPROC glGetMaterialfv;
|
||||
RGLSYMGLGETMATERIALIVPROC glGetMaterialiv;
|
||||
RGLSYMGLCOLORMATERIALPROC glColorMaterial;
|
||||
RGLSYMGLPIXELZOOMPROC glPixelZoom;
|
||||
RGLSYMGLPIXELSTOREFPROC glPixelStoref;
|
||||
RGLSYMGLPIXELSTOREIPROC glPixelStorei;
|
||||
RGLSYMGLPIXELTRANSFERFPROC glPixelTransferf;
|
||||
RGLSYMGLPIXELTRANSFERIPROC glPixelTransferi;
|
||||
RGLSYMGLPIXELMAPFVPROC glPixelMapfv;
|
||||
RGLSYMGLPIXELMAPUIVPROC glPixelMapuiv;
|
||||
RGLSYMGLPIXELMAPUSVPROC glPixelMapusv;
|
||||
RGLSYMGLGETPIXELMAPFVPROC glGetPixelMapfv;
|
||||
RGLSYMGLGETPIXELMAPUIVPROC glGetPixelMapuiv;
|
||||
RGLSYMGLGETPIXELMAPUSVPROC glGetPixelMapusv;
|
||||
RGLSYMGLBITMAPPROC glBitmap;
|
||||
RGLSYMGLREADPIXELSPROC glReadPixels;
|
||||
RGLSYMGLDRAWPIXELSPROC glDrawPixels;
|
||||
RGLSYMGLCOPYPIXELSPROC glCopyPixels;
|
||||
RGLSYMGLSTENCILFUNCPROC glStencilFunc;
|
||||
RGLSYMGLSTENCILMASKPROC glStencilMask;
|
||||
RGLSYMGLSTENCILOPPROC glStencilOp;
|
||||
RGLSYMGLCLEARSTENCILPROC glClearStencil;
|
||||
RGLSYMGLTEXGENDPROC glTexGend;
|
||||
RGLSYMGLTEXGENFPROC glTexGenf;
|
||||
RGLSYMGLTEXGENIPROC glTexGeni;
|
||||
RGLSYMGLTEXGENDVPROC glTexGendv;
|
||||
RGLSYMGLTEXGENFVPROC glTexGenfv;
|
||||
RGLSYMGLTEXGENIVPROC glTexGeniv;
|
||||
RGLSYMGLGETTEXGENDVPROC glGetTexGendv;
|
||||
RGLSYMGLGETTEXGENFVPROC glGetTexGenfv;
|
||||
RGLSYMGLGETTEXGENIVPROC glGetTexGeniv;
|
||||
RGLSYMGLTEXENVFPROC glTexEnvf;
|
||||
RGLSYMGLTEXENVIPROC glTexEnvi;
|
||||
RGLSYMGLTEXENVFVPROC glTexEnvfv;
|
||||
RGLSYMGLTEXENVIVPROC glTexEnviv;
|
||||
RGLSYMGLGETTEXENVFVPROC glGetTexEnvfv;
|
||||
RGLSYMGLGETTEXENVIVPROC glGetTexEnviv;
|
||||
RGLSYMGLTEXPARAMETERFPROC glTexParameterf;
|
||||
RGLSYMGLTEXPARAMETERIPROC glTexParameteri;
|
||||
RGLSYMGLTEXPARAMETERFVPROC glTexParameterfv;
|
||||
RGLSYMGLTEXPARAMETERIVPROC glTexParameteriv;
|
||||
RGLSYMGLGETTEXPARAMETERFVPROC glGetTexParameterfv;
|
||||
RGLSYMGLGETTEXPARAMETERIVPROC glGetTexParameteriv;
|
||||
RGLSYMGLGETTEXLEVELPARAMETERFVPROC glGetTexLevelParameterfv;
|
||||
RGLSYMGLGETTEXLEVELPARAMETERIVPROC glGetTexLevelParameteriv;
|
||||
RGLSYMGLTEXIMAGE1DPROC glTexImage1D;
|
||||
RGLSYMGLTEXIMAGE2DPROC glTexImage2D;
|
||||
RGLSYMGLGETTEXIMAGEPROC glGetTexImage;
|
||||
RGLSYMGLGENTEXTURESPROC glGenTextures;
|
||||
RGLSYMGLDELETETEXTURESPROC glDeleteTextures;
|
||||
RGLSYMGLBINDTEXTUREPROC glBindTexture;
|
||||
RGLSYMGLPRIORITIZETEXTURESPROC glPrioritizeTextures;
|
||||
RGLSYMGLARETEXTURESRESIDENTPROC glAreTexturesResident;
|
||||
RGLSYMGLISTEXTUREPROC glIsTexture;
|
||||
RGLSYMGLTEXSUBIMAGE1DPROC glTexSubImage1D;
|
||||
RGLSYMGLTEXSUBIMAGE2DPROC glTexSubImage2D;
|
||||
RGLSYMGLCOPYTEXIMAGE1DPROC glCopyTexImage1D;
|
||||
RGLSYMGLCOPYTEXIMAGE2DPROC glCopyTexImage2D;
|
||||
RGLSYMGLCOPYTEXSUBIMAGE1DPROC glCopyTexSubImage1D;
|
||||
RGLSYMGLCOPYTEXSUBIMAGE2DPROC glCopyTexSubImage2D;
|
||||
RGLSYMGLMAP1DPROC glMap1d;
|
||||
RGLSYMGLMAP1FPROC glMap1f;
|
||||
RGLSYMGLMAP2DPROC glMap2d;
|
||||
RGLSYMGLMAP2FPROC glMap2f;
|
||||
RGLSYMGLGETMAPDVPROC glGetMapdv;
|
||||
RGLSYMGLGETMAPFVPROC glGetMapfv;
|
||||
RGLSYMGLGETMAPIVPROC glGetMapiv;
|
||||
RGLSYMGLEVALCOORD1DPROC glEvalCoord1d;
|
||||
RGLSYMGLEVALCOORD1FPROC glEvalCoord1f;
|
||||
RGLSYMGLEVALCOORD1DVPROC glEvalCoord1dv;
|
||||
RGLSYMGLEVALCOORD1FVPROC glEvalCoord1fv;
|
||||
RGLSYMGLEVALCOORD2DPROC glEvalCoord2d;
|
||||
RGLSYMGLEVALCOORD2FPROC glEvalCoord2f;
|
||||
RGLSYMGLEVALCOORD2DVPROC glEvalCoord2dv;
|
||||
RGLSYMGLEVALCOORD2FVPROC glEvalCoord2fv;
|
||||
RGLSYMGLMAPGRID1DPROC glMapGrid1d;
|
||||
RGLSYMGLMAPGRID1FPROC glMapGrid1f;
|
||||
RGLSYMGLMAPGRID2DPROC glMapGrid2d;
|
||||
RGLSYMGLMAPGRID2FPROC glMapGrid2f;
|
||||
RGLSYMGLEVALPOINT1PROC glEvalPoint1;
|
||||
RGLSYMGLEVALPOINT2PROC glEvalPoint2;
|
||||
RGLSYMGLEVALMESH1PROC glEvalMesh1;
|
||||
RGLSYMGLEVALMESH2PROC glEvalMesh2;
|
||||
RGLSYMGLFOGFPROC glFogf;
|
||||
RGLSYMGLFOGIPROC glFogi;
|
||||
RGLSYMGLFOGFVPROC glFogfv;
|
||||
RGLSYMGLFOGIVPROC glFogiv;
|
||||
RGLSYMGLFEEDBACKBUFFERPROC glFeedbackBuffer;
|
||||
RGLSYMGLPASSTHROUGHPROC glPassThrough;
|
||||
RGLSYMGLSELECTBUFFERPROC glSelectBuffer;
|
||||
RGLSYMGLINITNAMESPROC glInitNames;
|
||||
RGLSYMGLLOADNAMEPROC glLoadName;
|
||||
RGLSYMGLPUSHNAMEPROC glPushName;
|
||||
RGLSYMGLPOPNAMEPROC glPopName;
|
||||
RGLSYMGLDRAWRANGEELEMENTSPROC glDrawRangeElements;
|
||||
RGLSYMGLTEXIMAGE3DPROC glTexImage3D;
|
||||
RGLSYMGLTEXSUBIMAGE3DPROC glTexSubImage3D;
|
||||
RGLSYMGLCOPYTEXSUBIMAGE3DPROC glCopyTexSubImage3D;
|
||||
RGLSYMGLCOLORTABLEPROC glColorTable;
|
||||
RGLSYMGLCOLORSUBTABLEPROC glColorSubTable;
|
||||
RGLSYMGLCOLORTABLEPARAMETERIVPROC glColorTableParameteriv;
|
||||
RGLSYMGLCOLORTABLEPARAMETERFVPROC glColorTableParameterfv;
|
||||
RGLSYMGLCOPYCOLORSUBTABLEPROC glCopyColorSubTable;
|
||||
RGLSYMGLCOPYCOLORTABLEPROC glCopyColorTable;
|
||||
RGLSYMGLGETCOLORTABLEPROC glGetColorTable;
|
||||
RGLSYMGLGETCOLORTABLEPARAMETERFVPROC glGetColorTableParameterfv;
|
||||
RGLSYMGLGETCOLORTABLEPARAMETERIVPROC glGetColorTableParameteriv;
|
||||
RGLSYMGLBLENDEQUATIONPROC glBlendEquation;
|
||||
RGLSYMGLBLENDCOLORPROC glBlendColor;
|
||||
RGLSYMGLHISTOGRAMPROC glHistogram;
|
||||
RGLSYMGLRESETHISTOGRAMPROC glResetHistogram;
|
||||
RGLSYMGLGETHISTOGRAMPROC glGetHistogram;
|
||||
RGLSYMGLGETHISTOGRAMPARAMETERFVPROC glGetHistogramParameterfv;
|
||||
RGLSYMGLGETHISTOGRAMPARAMETERIVPROC glGetHistogramParameteriv;
|
||||
RGLSYMGLMINMAXPROC glMinmax;
|
||||
RGLSYMGLRESETMINMAXPROC glResetMinmax;
|
||||
RGLSYMGLGETMINMAXPROC glGetMinmax;
|
||||
RGLSYMGLGETMINMAXPARAMETERFVPROC glGetMinmaxParameterfv;
|
||||
RGLSYMGLGETMINMAXPARAMETERIVPROC glGetMinmaxParameteriv;
|
||||
RGLSYMGLCONVOLUTIONFILTER1DPROC glConvolutionFilter1D;
|
||||
RGLSYMGLCONVOLUTIONFILTER2DPROC glConvolutionFilter2D;
|
||||
RGLSYMGLCONVOLUTIONPARAMETERFPROC glConvolutionParameterf;
|
||||
RGLSYMGLCONVOLUTIONPARAMETERFVPROC glConvolutionParameterfv;
|
||||
RGLSYMGLCONVOLUTIONPARAMETERIPROC glConvolutionParameteri;
|
||||
RGLSYMGLCONVOLUTIONPARAMETERIVPROC glConvolutionParameteriv;
|
||||
RGLSYMGLCOPYCONVOLUTIONFILTER1DPROC glCopyConvolutionFilter1D;
|
||||
RGLSYMGLCOPYCONVOLUTIONFILTER2DPROC glCopyConvolutionFilter2D;
|
||||
RGLSYMGLGETCONVOLUTIONFILTERPROC glGetConvolutionFilter;
|
||||
RGLSYMGLGETCONVOLUTIONPARAMETERFVPROC glGetConvolutionParameterfv;
|
||||
RGLSYMGLGETCONVOLUTIONPARAMETERIVPROC glGetConvolutionParameteriv;
|
||||
RGLSYMGLSEPARABLEFILTER2DPROC glSeparableFilter2D;
|
||||
RGLSYMGLGETSEPARABLEFILTERPROC glGetSeparableFilter;
|
||||
RGLSYMGLACTIVETEXTUREPROC glActiveTexture;
|
||||
RGLSYMGLCLIENTACTIVETEXTUREPROC glClientActiveTexture;
|
||||
RGLSYMGLCOMPRESSEDTEXIMAGE1DPROC glCompressedTexImage1D;
|
||||
RGLSYMGLCOMPRESSEDTEXIMAGE2DPROC glCompressedTexImage2D;
|
||||
RGLSYMGLCOMPRESSEDTEXIMAGE3DPROC glCompressedTexImage3D;
|
||||
RGLSYMGLCOMPRESSEDTEXSUBIMAGE1DPROC glCompressedTexSubImage1D;
|
||||
RGLSYMGLCOMPRESSEDTEXSUBIMAGE2DPROC glCompressedTexSubImage2D;
|
||||
RGLSYMGLCOMPRESSEDTEXSUBIMAGE3DPROC glCompressedTexSubImage3D;
|
||||
RGLSYMGLGETCOMPRESSEDTEXIMAGEPROC glGetCompressedTexImage;
|
||||
RGLSYMGLMULTITEXCOORD1DPROC glMultiTexCoord1d;
|
||||
RGLSYMGLMULTITEXCOORD1DVPROC glMultiTexCoord1dv;
|
||||
RGLSYMGLMULTITEXCOORD1FPROC glMultiTexCoord1f;
|
||||
RGLSYMGLMULTITEXCOORD1FVPROC glMultiTexCoord1fv;
|
||||
RGLSYMGLMULTITEXCOORD1IPROC glMultiTexCoord1i;
|
||||
RGLSYMGLMULTITEXCOORD1IVPROC glMultiTexCoord1iv;
|
||||
RGLSYMGLMULTITEXCOORD1SPROC glMultiTexCoord1s;
|
||||
RGLSYMGLMULTITEXCOORD1SVPROC glMultiTexCoord1sv;
|
||||
RGLSYMGLMULTITEXCOORD2DPROC glMultiTexCoord2d;
|
||||
RGLSYMGLMULTITEXCOORD2DVPROC glMultiTexCoord2dv;
|
||||
RGLSYMGLMULTITEXCOORD2FPROC glMultiTexCoord2f;
|
||||
RGLSYMGLMULTITEXCOORD2FVPROC glMultiTexCoord2fv;
|
||||
RGLSYMGLMULTITEXCOORD2IPROC glMultiTexCoord2i;
|
||||
RGLSYMGLMULTITEXCOORD2IVPROC glMultiTexCoord2iv;
|
||||
RGLSYMGLMULTITEXCOORD2SPROC glMultiTexCoord2s;
|
||||
RGLSYMGLMULTITEXCOORD2SVPROC glMultiTexCoord2sv;
|
||||
RGLSYMGLMULTITEXCOORD3DPROC glMultiTexCoord3d;
|
||||
RGLSYMGLMULTITEXCOORD3DVPROC glMultiTexCoord3dv;
|
||||
RGLSYMGLMULTITEXCOORD3FPROC glMultiTexCoord3f;
|
||||
RGLSYMGLMULTITEXCOORD3FVPROC glMultiTexCoord3fv;
|
||||
RGLSYMGLMULTITEXCOORD3IPROC glMultiTexCoord3i;
|
||||
RGLSYMGLMULTITEXCOORD3IVPROC glMultiTexCoord3iv;
|
||||
RGLSYMGLMULTITEXCOORD3SPROC glMultiTexCoord3s;
|
||||
RGLSYMGLMULTITEXCOORD3SVPROC glMultiTexCoord3sv;
|
||||
RGLSYMGLMULTITEXCOORD4DPROC glMultiTexCoord4d;
|
||||
RGLSYMGLMULTITEXCOORD4DVPROC glMultiTexCoord4dv;
|
||||
RGLSYMGLMULTITEXCOORD4FPROC glMultiTexCoord4f;
|
||||
RGLSYMGLMULTITEXCOORD4FVPROC glMultiTexCoord4fv;
|
||||
RGLSYMGLMULTITEXCOORD4IPROC glMultiTexCoord4i;
|
||||
RGLSYMGLMULTITEXCOORD4IVPROC glMultiTexCoord4iv;
|
||||
RGLSYMGLMULTITEXCOORD4SPROC glMultiTexCoord4s;
|
||||
RGLSYMGLMULTITEXCOORD4SVPROC glMultiTexCoord4sv;
|
||||
RGLSYMGLLOADTRANSPOSEMATRIXDPROC glLoadTransposeMatrixd;
|
||||
RGLSYMGLLOADTRANSPOSEMATRIXFPROC glLoadTransposeMatrixf;
|
||||
RGLSYMGLMULTTRANSPOSEMATRIXDPROC glMultTransposeMatrixd;
|
||||
RGLSYMGLMULTTRANSPOSEMATRIXFPROC glMultTransposeMatrixf;
|
||||
RGLSYMGLSAMPLECOVERAGEPROC glSampleCoverage;
|
||||
RGLSYMGLACTIVETEXTUREARBPROC glActiveTextureARB;
|
||||
RGLSYMGLCLIENTACTIVETEXTUREARBPROC glClientActiveTextureARB;
|
||||
RGLSYMGLMULTITEXCOORD1DARBPROC glMultiTexCoord1dARB;
|
||||
RGLSYMGLMULTITEXCOORD1DVARBPROC glMultiTexCoord1dvARB;
|
||||
RGLSYMGLMULTITEXCOORD1FARBPROC glMultiTexCoord1fARB;
|
||||
RGLSYMGLMULTITEXCOORD1FVARBPROC glMultiTexCoord1fvARB;
|
||||
RGLSYMGLMULTITEXCOORD1IARBPROC glMultiTexCoord1iARB;
|
||||
RGLSYMGLMULTITEXCOORD1IVARBPROC glMultiTexCoord1ivARB;
|
||||
RGLSYMGLMULTITEXCOORD1SARBPROC glMultiTexCoord1sARB;
|
||||
RGLSYMGLMULTITEXCOORD1SVARBPROC glMultiTexCoord1svARB;
|
||||
RGLSYMGLMULTITEXCOORD2DARBPROC glMultiTexCoord2dARB;
|
||||
RGLSYMGLMULTITEXCOORD2DVARBPROC glMultiTexCoord2dvARB;
|
||||
RGLSYMGLMULTITEXCOORD2FARBPROC glMultiTexCoord2fARB;
|
||||
RGLSYMGLMULTITEXCOORD2FVARBPROC glMultiTexCoord2fvARB;
|
||||
RGLSYMGLMULTITEXCOORD2IARBPROC glMultiTexCoord2iARB;
|
||||
RGLSYMGLMULTITEXCOORD2IVARBPROC glMultiTexCoord2ivARB;
|
||||
RGLSYMGLMULTITEXCOORD2SARBPROC glMultiTexCoord2sARB;
|
||||
RGLSYMGLMULTITEXCOORD2SVARBPROC glMultiTexCoord2svARB;
|
||||
RGLSYMGLMULTITEXCOORD3DARBPROC glMultiTexCoord3dARB;
|
||||
RGLSYMGLMULTITEXCOORD3DVARBPROC glMultiTexCoord3dvARB;
|
||||
RGLSYMGLMULTITEXCOORD3FARBPROC glMultiTexCoord3fARB;
|
||||
RGLSYMGLMULTITEXCOORD3FVARBPROC glMultiTexCoord3fvARB;
|
||||
RGLSYMGLMULTITEXCOORD3IARBPROC glMultiTexCoord3iARB;
|
||||
RGLSYMGLMULTITEXCOORD3IVARBPROC glMultiTexCoord3ivARB;
|
||||
RGLSYMGLMULTITEXCOORD3SARBPROC glMultiTexCoord3sARB;
|
||||
RGLSYMGLMULTITEXCOORD3SVARBPROC glMultiTexCoord3svARB;
|
||||
RGLSYMGLMULTITEXCOORD4DARBPROC glMultiTexCoord4dARB;
|
||||
RGLSYMGLMULTITEXCOORD4DVARBPROC glMultiTexCoord4dvARB;
|
||||
RGLSYMGLMULTITEXCOORD4FARBPROC glMultiTexCoord4fARB;
|
||||
RGLSYMGLMULTITEXCOORD4FVARBPROC glMultiTexCoord4fvARB;
|
||||
RGLSYMGLMULTITEXCOORD4IARBPROC glMultiTexCoord4iARB;
|
||||
RGLSYMGLMULTITEXCOORD4IVARBPROC glMultiTexCoord4ivARB;
|
||||
RGLSYMGLMULTITEXCOORD4SARBPROC glMultiTexCoord4sARB;
|
||||
RGLSYMGLMULTITEXCOORD4SVARBPROC glMultiTexCoord4svARB;
|
||||
RGLSYMGLEGLIMAGETARGETTEXTURE2DOESPROC glEGLImageTargetTexture2DOES;
|
||||
RGLSYMGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC glEGLImageTargetRenderbufferStorageOES;
|
||||
RGLSYMGLBINDTEXTURESPROC glBindTextures;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // __NX_GLSYM_H__
|
||||
42
src/minarch/libretro-common/include/libchdr/bitstream.h
Normal file
42
src/minarch/libretro-common/include/libchdr/bitstream.h
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/* license:BSD-3-Clause
|
||||
* copyright-holders:Aaron Giles
|
||||
***************************************************************************
|
||||
|
||||
bitstream.h
|
||||
|
||||
Helper classes for reading/writing at the bit level.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __BITSTREAM_H__
|
||||
#define __BITSTREAM_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/***************************************************************************
|
||||
* TYPE DEFINITIONS
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
/* helper class for reading from a bit buffer */
|
||||
struct bitstream
|
||||
{
|
||||
uint32_t buffer; /* current bit accumulator */
|
||||
int bits; /* number of bits in the accumulator */
|
||||
const uint8_t * read; /* read pointer */
|
||||
uint32_t doffset; /* byte offset within the data */
|
||||
uint32_t dlength; /* length of the data */
|
||||
};
|
||||
|
||||
struct bitstream* create_bitstream(const void *src, uint32_t srclength);
|
||||
int bitstream_overflow(struct bitstream* bitstream);
|
||||
uint32_t bitstream_read_offset(struct bitstream* bitstream);
|
||||
|
||||
uint32_t bitstream_read(struct bitstream* bitstream, int numbits);
|
||||
uint32_t bitstream_peek(struct bitstream* bitstream, int numbits);
|
||||
void bitstream_remove(struct bitstream* bitstream, int numbits);
|
||||
uint32_t bitstream_flush(struct bitstream* bitstream);
|
||||
|
||||
#endif
|
||||
69
src/minarch/libretro-common/include/libchdr/cdrom.h
Normal file
69
src/minarch/libretro-common/include/libchdr/cdrom.h
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
/* license:BSD-3-Clause
|
||||
* copyright-holders:Aaron Giles
|
||||
***************************************************************************
|
||||
|
||||
cdrom.h
|
||||
|
||||
Generic MAME cd-rom implementation
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __CDROM_H__
|
||||
#define __CDROM_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/***************************************************************************
|
||||
CONSTANTS
|
||||
***************************************************************************/
|
||||
|
||||
/* tracks are padded to a multiple of this many frames */
|
||||
#define CD_TRACK_PADDING (4)
|
||||
|
||||
#define CD_MAX_TRACKS (99) /* AFAIK the theoretical limit */
|
||||
#define CD_MAX_SECTOR_DATA (2352)
|
||||
#define CD_MAX_SUBCODE_DATA (96)
|
||||
|
||||
#define CD_FRAME_SIZE (CD_MAX_SECTOR_DATA + CD_MAX_SUBCODE_DATA)
|
||||
#define CD_FRAMES_PER_HUNK (8)
|
||||
|
||||
#define CD_METADATA_WORDS (1+(CD_MAX_TRACKS * 6))
|
||||
|
||||
enum
|
||||
{
|
||||
CD_TRACK_MODE1 = 0, /* mode 1 2048 bytes/sector */
|
||||
CD_TRACK_MODE1_RAW, /* mode 1 2352 bytes/sector */
|
||||
CD_TRACK_MODE2, /* mode 2 2336 bytes/sector */
|
||||
CD_TRACK_MODE2_FORM1, /* mode 2 2048 bytes/sector */
|
||||
CD_TRACK_MODE2_FORM2, /* mode 2 2324 bytes/sector */
|
||||
CD_TRACK_MODE2_FORM_MIX, /* mode 2 2336 bytes/sector */
|
||||
CD_TRACK_MODE2_RAW, /* mode 2 2352 bytes / sector */
|
||||
CD_TRACK_AUDIO, /* redbook audio track 2352 bytes/sector (588 samples) */
|
||||
|
||||
CD_TRACK_RAW_DONTCARE /* special flag for cdrom_read_data: just return me whatever is there */
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CD_SUB_NORMAL = 0, /* "cooked" 96 bytes per sector */
|
||||
CD_SUB_RAW, /* raw uninterleaved 96 bytes per sector */
|
||||
CD_SUB_NONE /* no subcode data stored */
|
||||
};
|
||||
|
||||
#define CD_FLAG_GDROM 0x00000001 /* disc is a GD-ROM, all tracks should be stored with GD-ROM metadata */
|
||||
#define CD_FLAG_GDROMLE 0x00000002 /* legacy GD-ROM, with little-endian CDDA data */
|
||||
|
||||
/***************************************************************************
|
||||
FUNCTION PROTOTYPES
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef WANT_RAW_DATA_SECTOR
|
||||
/* ECC utilities */
|
||||
int ecc_verify(const uint8_t *sector);
|
||||
void ecc_generate(uint8_t *sector);
|
||||
void ecc_clear(uint8_t *sector);
|
||||
#endif
|
||||
|
||||
#endif /* __CDROM_H__ */
|
||||
397
src/minarch/libretro-common/include/libchdr/chd.h
Normal file
397
src/minarch/libretro-common/include/libchdr/chd.h
Normal file
|
|
@ -0,0 +1,397 @@
|
|||
/***************************************************************************
|
||||
|
||||
chd.h
|
||||
|
||||
MAME Compressed Hunks of Data file format
|
||||
|
||||
****************************************************************************
|
||||
|
||||
Copyright Aaron Giles
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* Neither the name 'MAME' nor the names of its contributors may be
|
||||
used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __CHD_H__
|
||||
#define __CHD_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "coretypes.h"
|
||||
#include <streams/file_stream.h>
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Compressed Hunks of Data header format. All numbers are stored in
|
||||
Motorola (big-endian) byte ordering. The header is 76 (V1) or 80 (V2)
|
||||
bytes long.
|
||||
|
||||
V1 header:
|
||||
|
||||
[ 0] char tag[8]; // 'MComprHD'
|
||||
[ 8] UINT32 length; // length of header (including tag and length fields)
|
||||
[ 12] UINT32 version; // drive format version
|
||||
[ 16] UINT32 flags; // flags (see below)
|
||||
[ 20] UINT32 compression; // compression type
|
||||
[ 24] UINT32 hunksize; // 512-byte sectors per hunk
|
||||
[ 28] UINT32 totalhunks; // total # of hunks represented
|
||||
[ 32] UINT32 cylinders; // number of cylinders on hard disk
|
||||
[ 36] UINT32 heads; // number of heads on hard disk
|
||||
[ 40] UINT32 sectors; // number of sectors on hard disk
|
||||
[ 44] UINT8 md5[16]; // MD5 checksum of raw data
|
||||
[ 60] UINT8 parentmd5[16]; // MD5 checksum of parent file
|
||||
[ 76] (V1 header length)
|
||||
|
||||
V2 header:
|
||||
|
||||
[ 0] char tag[8]; // 'MComprHD'
|
||||
[ 8] UINT32 length; // length of header (including tag and length fields)
|
||||
[ 12] UINT32 version; // drive format version
|
||||
[ 16] UINT32 flags; // flags (see below)
|
||||
[ 20] UINT32 compression; // compression type
|
||||
[ 24] UINT32 hunksize; // seclen-byte sectors per hunk
|
||||
[ 28] UINT32 totalhunks; // total # of hunks represented
|
||||
[ 32] UINT32 cylinders; // number of cylinders on hard disk
|
||||
[ 36] UINT32 heads; // number of heads on hard disk
|
||||
[ 40] UINT32 sectors; // number of sectors on hard disk
|
||||
[ 44] UINT8 md5[16]; // MD5 checksum of raw data
|
||||
[ 60] UINT8 parentmd5[16]; // MD5 checksum of parent file
|
||||
[ 76] UINT32 seclen; // number of bytes per sector
|
||||
[ 80] (V2 header length)
|
||||
|
||||
V3 header:
|
||||
|
||||
[ 0] char tag[8]; // 'MComprHD'
|
||||
[ 8] UINT32 length; // length of header (including tag and length fields)
|
||||
[ 12] UINT32 version; // drive format version
|
||||
[ 16] UINT32 flags; // flags (see below)
|
||||
[ 20] UINT32 compression; // compression type
|
||||
[ 24] UINT32 totalhunks; // total # of hunks represented
|
||||
[ 28] UINT64 logicalbytes; // logical size of the data (in bytes)
|
||||
[ 36] UINT64 metaoffset; // offset to the first blob of metadata
|
||||
[ 44] UINT8 md5[16]; // MD5 checksum of raw data
|
||||
[ 60] UINT8 parentmd5[16]; // MD5 checksum of parent file
|
||||
[ 76] UINT32 hunkbytes; // number of bytes per hunk
|
||||
[ 80] UINT8 sha1[20]; // SHA1 checksum of raw data
|
||||
[100] UINT8 parentsha1[20];// SHA1 checksum of parent file
|
||||
[120] (V3 header length)
|
||||
|
||||
V4 header:
|
||||
|
||||
[ 0] char tag[8]; // 'MComprHD'
|
||||
[ 8] UINT32 length; // length of header (including tag and length fields)
|
||||
[ 12] UINT32 version; // drive format version
|
||||
[ 16] UINT32 flags; // flags (see below)
|
||||
[ 20] UINT32 compression; // compression type
|
||||
[ 24] UINT32 totalhunks; // total # of hunks represented
|
||||
[ 28] UINT64 logicalbytes; // logical size of the data (in bytes)
|
||||
[ 36] UINT64 metaoffset; // offset to the first blob of metadata
|
||||
[ 44] UINT32 hunkbytes; // number of bytes per hunk
|
||||
[ 48] UINT8 sha1[20]; // combined raw+meta SHA1
|
||||
[ 68] UINT8 parentsha1[20];// combined raw+meta SHA1 of parent
|
||||
[ 88] UINT8 rawsha1[20]; // raw data SHA1
|
||||
[108] (V4 header length)
|
||||
|
||||
Flags:
|
||||
0x00000001 - set if this drive has a parent
|
||||
0x00000002 - set if this drive allows writes
|
||||
|
||||
=========================================================================
|
||||
|
||||
V5 header:
|
||||
|
||||
[ 0] char tag[8]; // 'MComprHD'
|
||||
[ 8] uint32_t length; // length of header (including tag and length fields)
|
||||
[ 12] uint32_t version; // drive format version
|
||||
[ 16] uint32_t compressors[4];// which custom compressors are used?
|
||||
[ 32] uint64_t logicalbytes; // logical size of the data (in bytes)
|
||||
[ 40] uint64_t mapoffset; // offset to the map
|
||||
[ 48] uint64_t metaoffset; // offset to the first blob of metadata
|
||||
[ 56] uint32_t hunkbytes; // number of bytes per hunk (512k maximum)
|
||||
[ 60] uint32_t unitbytes; // number of bytes per unit within each hunk
|
||||
[ 64] uint8_t rawsha1[20]; // raw data SHA1
|
||||
[ 84] uint8_t sha1[20]; // combined raw+meta SHA1
|
||||
[104] uint8_t parentsha1[20];// combined raw+meta SHA1 of parent
|
||||
[124] (V5 header length)
|
||||
|
||||
If parentsha1 != 0, we have a parent (no need for flags)
|
||||
If compressors[0] == 0, we are uncompressed (including maps)
|
||||
|
||||
V5 uncompressed map format:
|
||||
|
||||
[ 0] uint32_t offset; // starting offset / hunk size
|
||||
|
||||
V5 compressed map format header:
|
||||
|
||||
[ 0] uint32_t length; // length of compressed map
|
||||
[ 4] UINT48 datastart; // offset of first block
|
||||
[ 10] uint16_t crc; // crc-16 of the map
|
||||
[ 12] uint8_t lengthbits; // bits used to encode complength
|
||||
[ 13] uint8_t hunkbits; // bits used to encode self-refs
|
||||
[ 14] uint8_t parentunitbits; // bits used to encode parent unit refs
|
||||
[ 15] uint8_t reserved; // future use
|
||||
[ 16] (compressed header length)
|
||||
|
||||
Each compressed map entry, once expanded, looks like:
|
||||
|
||||
[ 0] uint8_t compression; // compression type
|
||||
[ 1] UINT24 complength; // compressed length
|
||||
[ 4] UINT48 offset; // offset
|
||||
[ 10] uint16_t crc; // crc-16 of the data
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
CONSTANTS
|
||||
***************************************************************************/
|
||||
|
||||
/* header information */
|
||||
#define CHD_HEADER_VERSION 5
|
||||
#define CHD_V1_HEADER_SIZE 76
|
||||
#define CHD_V2_HEADER_SIZE 80
|
||||
#define CHD_V3_HEADER_SIZE 120
|
||||
#define CHD_V4_HEADER_SIZE 108
|
||||
#define CHD_V5_HEADER_SIZE 124
|
||||
|
||||
#define CHD_MAX_HEADER_SIZE CHD_V5_HEADER_SIZE
|
||||
|
||||
/* checksumming information */
|
||||
#define CHD_MD5_BYTES 16
|
||||
#define CHD_SHA1_BYTES 20
|
||||
|
||||
/* CHD global flags */
|
||||
#define CHDFLAGS_HAS_PARENT 0x00000001
|
||||
#define CHDFLAGS_IS_WRITEABLE 0x00000002
|
||||
#define CHDFLAGS_UNDEFINED 0xfffffffc
|
||||
|
||||
#define CHD_MAKE_TAG(a,b,c,d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d))
|
||||
|
||||
/* compression types */
|
||||
#define CHDCOMPRESSION_NONE 0
|
||||
#define CHDCOMPRESSION_ZLIB 1
|
||||
#define CHDCOMPRESSION_ZLIB_PLUS 2
|
||||
#define CHDCOMPRESSION_AV 3
|
||||
|
||||
#define CHD_CODEC_ZLIB CHD_MAKE_TAG('z','l','i','b')
|
||||
|
||||
/* general codecs with CD frontend */
|
||||
#define CHD_CODEC_CD_ZLIB CHD_MAKE_TAG('c','d','z','l')
|
||||
#define CHD_CODEC_CD_LZMA CHD_MAKE_TAG('c','d','l','z')
|
||||
#define CHD_CODEC_CD_FLAC CHD_MAKE_TAG('c','d','f','l')
|
||||
|
||||
/* A/V codec configuration parameters */
|
||||
#define AV_CODEC_COMPRESS_CONFIG 1
|
||||
#define AV_CODEC_DECOMPRESS_CONFIG 2
|
||||
|
||||
/* metadata parameters */
|
||||
#define CHDMETATAG_WILDCARD 0
|
||||
#define CHD_METAINDEX_APPEND ((UINT32)-1)
|
||||
|
||||
/* metadata flags */
|
||||
#define CHD_MDFLAGS_CHECKSUM 0x01 /* indicates data is checksummed */
|
||||
|
||||
/* standard hard disk metadata */
|
||||
#define HARD_DISK_METADATA_TAG CHD_MAKE_TAG('G','D','D','D')
|
||||
#define HARD_DISK_METADATA_FORMAT "CYLS:%u,HEADS:%u,SECS:%u,BPS:%u"
|
||||
|
||||
/* hard disk identify information */
|
||||
#define HARD_DISK_IDENT_METADATA_TAG CHD_MAKE_TAG('I','D','N','T')
|
||||
|
||||
/* hard disk key information */
|
||||
#define HARD_DISK_KEY_METADATA_TAG CHD_MAKE_TAG('K','E','Y',' ')
|
||||
|
||||
/* pcmcia CIS information */
|
||||
#define PCMCIA_CIS_METADATA_TAG CHD_MAKE_TAG('C','I','S',' ')
|
||||
|
||||
/* standard CD-ROM metadata */
|
||||
#define CDROM_OLD_METADATA_TAG CHD_MAKE_TAG('C','H','C','D')
|
||||
#define CDROM_TRACK_METADATA_TAG CHD_MAKE_TAG('C','H','T','R')
|
||||
#define CDROM_TRACK_METADATA_FORMAT "TRACK:%u TYPE:%s SUBTYPE:%s FRAMES:%u"
|
||||
#define CDROM_TRACK_METADATA2_TAG CHD_MAKE_TAG('C','H','T','2')
|
||||
#define CDROM_TRACK_METADATA2_FORMAT "TRACK:%u TYPE:%s SUBTYPE:%s FRAMES:%u PREGAP:%u PGTYPE:%s PGSUB:%s POSTGAP:%u"
|
||||
#define GDROM_OLD_METADATA_TAG CHD_MAKE_TAG('C','H','G','T')
|
||||
#define GDROM_TRACK_METADATA_TAG CHD_MAKE_TAG('C', 'H', 'G', 'D')
|
||||
#define GDROM_TRACK_METADATA_FORMAT "TRACK:%u TYPE:%s SUBTYPE:%s FRAMES:%u PAD:%u PREGAP:%u PGTYPE:%s PGSUB:%s POSTGAP:%u"
|
||||
|
||||
/* standard A/V metadata */
|
||||
#define AV_METADATA_TAG CHD_MAKE_TAG('A','V','A','V')
|
||||
#define AV_METADATA_FORMAT "FPS:%d.%06d WIDTH:%d HEIGHT:%d INTERLACED:%d CHANNELS:%d SAMPLERATE:%d"
|
||||
|
||||
/* A/V laserdisc frame metadata */
|
||||
#define AV_LD_METADATA_TAG CHD_MAKE_TAG('A','V','L','D')
|
||||
|
||||
/* CHD open values */
|
||||
#define CHD_OPEN_READ 1
|
||||
#define CHD_OPEN_READWRITE 2
|
||||
|
||||
/* error types */
|
||||
enum _chd_error
|
||||
{
|
||||
CHDERR_NONE,
|
||||
CHDERR_NO_INTERFACE,
|
||||
CHDERR_OUT_OF_MEMORY,
|
||||
CHDERR_INVALID_FILE,
|
||||
CHDERR_INVALID_PARAMETER,
|
||||
CHDERR_INVALID_DATA,
|
||||
CHDERR_FILE_NOT_FOUND,
|
||||
CHDERR_REQUIRES_PARENT,
|
||||
CHDERR_FILE_NOT_WRITEABLE,
|
||||
CHDERR_READ_ERROR,
|
||||
CHDERR_WRITE_ERROR,
|
||||
CHDERR_CODEC_ERROR,
|
||||
CHDERR_INVALID_PARENT,
|
||||
CHDERR_HUNK_OUT_OF_RANGE,
|
||||
CHDERR_DECOMPRESSION_ERROR,
|
||||
CHDERR_COMPRESSION_ERROR,
|
||||
CHDERR_CANT_CREATE_FILE,
|
||||
CHDERR_CANT_VERIFY,
|
||||
CHDERR_NOT_SUPPORTED,
|
||||
CHDERR_METADATA_NOT_FOUND,
|
||||
CHDERR_INVALID_METADATA_SIZE,
|
||||
CHDERR_UNSUPPORTED_VERSION,
|
||||
CHDERR_VERIFY_INCOMPLETE,
|
||||
CHDERR_INVALID_METADATA,
|
||||
CHDERR_INVALID_STATE,
|
||||
CHDERR_OPERATION_PENDING,
|
||||
CHDERR_NO_ASYNC_OPERATION,
|
||||
CHDERR_UNSUPPORTED_FORMAT
|
||||
};
|
||||
typedef enum _chd_error chd_error;
|
||||
|
||||
/***************************************************************************
|
||||
TYPE DEFINITIONS
|
||||
***************************************************************************/
|
||||
|
||||
/* opaque types */
|
||||
typedef struct _chd_file chd_file;
|
||||
|
||||
/* extract header structure (NOT the on-disk header structure) */
|
||||
typedef struct _chd_header chd_header;
|
||||
struct _chd_header
|
||||
{
|
||||
UINT32 length; /* length of header data */
|
||||
UINT32 version; /* drive format version */
|
||||
UINT32 flags; /* flags field */
|
||||
UINT32 compression[4]; /* compression type */
|
||||
UINT32 hunkbytes; /* number of bytes per hunk */
|
||||
UINT32 totalhunks; /* total # of hunks represented */
|
||||
UINT64 logicalbytes; /* logical size of the data */
|
||||
UINT64 metaoffset; /* offset in file of first metadata */
|
||||
UINT64 mapoffset; /* TOOD V5 */
|
||||
UINT8 md5[CHD_MD5_BYTES]; /* overall MD5 checksum */
|
||||
UINT8 parentmd5[CHD_MD5_BYTES]; /* overall MD5 checksum of parent */
|
||||
UINT8 sha1[CHD_SHA1_BYTES]; /* overall SHA1 checksum */
|
||||
UINT8 rawsha1[CHD_SHA1_BYTES]; /* SHA1 checksum of raw data */
|
||||
UINT8 parentsha1[CHD_SHA1_BYTES]; /* overall SHA1 checksum of parent */
|
||||
UINT32 unitbytes; /* TODO V5 */
|
||||
UINT64 unitcount; /* TODO V5 */
|
||||
UINT32 hunkcount; /* TODO V5 */
|
||||
|
||||
/* map information */
|
||||
UINT32 mapentrybytes; /* length of each entry in a map (V5) */
|
||||
UINT8* rawmap; /* raw map data */
|
||||
|
||||
UINT32 obsolete_cylinders; /* obsolete field -- do not use! */
|
||||
UINT32 obsolete_sectors; /* obsolete field -- do not use! */
|
||||
UINT32 obsolete_heads; /* obsolete field -- do not use! */
|
||||
UINT32 obsolete_hunksize; /* obsolete field -- do not use! */
|
||||
};
|
||||
|
||||
/* structure for returning information about a verification pass */
|
||||
typedef struct _chd_verify_result chd_verify_result;
|
||||
struct _chd_verify_result
|
||||
{
|
||||
UINT8 md5[CHD_MD5_BYTES]; /* overall MD5 checksum */
|
||||
UINT8 sha1[CHD_SHA1_BYTES]; /* overall SHA1 checksum */
|
||||
UINT8 rawsha1[CHD_SHA1_BYTES]; /* SHA1 checksum of raw data */
|
||||
UINT8 metasha1[CHD_SHA1_BYTES]; /* SHA1 checksum of metadata */
|
||||
};
|
||||
|
||||
/***************************************************************************
|
||||
FUNCTION PROTOTYPES
|
||||
***************************************************************************/
|
||||
|
||||
/* ----- CHD file management ----- */
|
||||
|
||||
/* create a new CHD file fitting the given description */
|
||||
/* chd_error chd_create(const char *filename, UINT64 logicalbytes, UINT32 hunkbytes, UINT32 compression, chd_file *parent); */
|
||||
|
||||
/* same as chd_create(), but accepts an already-opened core_file object */
|
||||
/* chd_error chd_create_file(core_file *file, UINT64 logicalbytes, UINT32 hunkbytes, UINT32 compression, chd_file *parent); */
|
||||
|
||||
/* open an existing CHD file */
|
||||
chd_error chd_open_file(RFILE *file, int mode, chd_file *parent, chd_file **chd);
|
||||
|
||||
chd_error chd_open(const char *filename, int mode, chd_file *parent, chd_file **chd);
|
||||
|
||||
/* precache underlying file */
|
||||
chd_error chd_precache(chd_file *chd);
|
||||
|
||||
/* close a CHD file */
|
||||
void chd_close(chd_file *chd);
|
||||
|
||||
/* return the associated core_file */
|
||||
RFILE *chd_core_file(chd_file *chd);
|
||||
|
||||
/* return an error string for the given CHD error */
|
||||
const char *chd_error_string(chd_error err);
|
||||
|
||||
/* ----- CHD header management ----- */
|
||||
|
||||
/* return a pointer to the extracted CHD header data */
|
||||
const chd_header *chd_get_header(chd_file *chd);
|
||||
|
||||
/* ----- core data read/write ----- */
|
||||
|
||||
/* read one hunk from the CHD file */
|
||||
chd_error chd_read(chd_file *chd, UINT32 hunknum, void *buffer);
|
||||
|
||||
/* ----- metadata management ----- */
|
||||
|
||||
/* get indexed metadata of a particular sort */
|
||||
chd_error chd_get_metadata(chd_file *chd, UINT32 searchtag, UINT32 searchindex, void *output, UINT32 outputlen, UINT32 *resultlen, UINT32 *resulttag, UINT8 *resultflags);
|
||||
|
||||
/* ----- codec interfaces ----- */
|
||||
|
||||
/* set internal codec parameters */
|
||||
chd_error chd_codec_config(chd_file *chd, int param, void *config);
|
||||
|
||||
/* return a string description of a codec */
|
||||
const char *chd_get_codec_name(UINT32 codec);
|
||||
|
||||
extern const uint8_t s_cd_sync_header[12];
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __CHD_H__ */
|
||||
22
src/minarch/libretro-common/include/libchdr/coretypes.h
Normal file
22
src/minarch/libretro-common/include/libchdr/coretypes.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#ifndef __CORETYPES_H__
|
||||
#define __CORETYPES_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
typedef uint64_t UINT64;
|
||||
#ifndef OSD_CPU_H
|
||||
typedef uint32_t UINT32;
|
||||
typedef uint16_t UINT16;
|
||||
typedef uint8_t UINT8;
|
||||
#endif
|
||||
|
||||
typedef int64_t INT64;
|
||||
#ifndef OSD_CPU_H
|
||||
typedef int32_t INT32;
|
||||
typedef int16_t INT16;
|
||||
typedef int8_t INT8;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
70
src/minarch/libretro-common/include/libchdr/flac.h
Normal file
70
src/minarch/libretro-common/include/libchdr/flac.h
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
/* license:BSD-3-Clause
|
||||
* copyright-holders:Aaron Giles
|
||||
***************************************************************************
|
||||
|
||||
flac.h
|
||||
|
||||
FLAC compression wrappers
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __FLAC_H__
|
||||
#define __FLAC_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include "libchdr_zlib.h"
|
||||
#include "FLAC/ordinals.h"
|
||||
#include "FLAC/stream_decoder.h"
|
||||
|
||||
/***************************************************************************
|
||||
* TYPE DEFINITIONS
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
typedef struct _flac_decoder flac_decoder;
|
||||
struct _flac_decoder {
|
||||
/* output state */
|
||||
FLAC__StreamDecoder* decoder; /* actual encoder */
|
||||
uint32_t sample_rate; /* decoded sample rate */
|
||||
uint8_t channels; /* decoded number of channels */
|
||||
uint8_t bits_per_sample; /* decoded bits per sample */
|
||||
uint32_t compressed_offset; /* current offset in compressed data */
|
||||
const FLAC__byte * compressed_start; /* start of compressed data */
|
||||
uint32_t compressed_length; /* length of compressed data */
|
||||
const FLAC__byte * compressed2_start; /* start of compressed data */
|
||||
uint32_t compressed2_length; /* length of compressed data */
|
||||
int16_t * uncompressed_start[8]; /* pointer to start of uncompressed data (up to 8 streams) */
|
||||
uint32_t uncompressed_offset; /* current position in uncompressed data */
|
||||
uint32_t uncompressed_length; /* length of uncompressed data */
|
||||
int uncompressed_swap; /* swap uncompressed sample data */
|
||||
uint8_t custom_header[0x2a]; /* custom header */
|
||||
};
|
||||
|
||||
/* ======================> flac_decoder */
|
||||
|
||||
void flac_decoder_init(flac_decoder* decoder);
|
||||
void flac_decoder_free(flac_decoder* decoder);
|
||||
int flac_decoder_reset(flac_decoder* decoder, uint32_t sample_rate, uint8_t num_channels, uint32_t block_size, const void *buffer, uint32_t length);
|
||||
int flac_decoder_decode_interleaved(flac_decoder* decoder, int16_t *samples, uint32_t num_samples, int swap_endian);
|
||||
uint32_t flac_decoder_finish(flac_decoder* decoder);
|
||||
|
||||
/* codec-private data for the CDFL codec */
|
||||
typedef struct _cdfl_codec_data cdfl_codec_data;
|
||||
struct _cdfl_codec_data {
|
||||
/* internal state */
|
||||
int swap_endian;
|
||||
flac_decoder decoder;
|
||||
#ifdef WANT_SUBCODE
|
||||
zlib_codec_data subcode_decompressor;
|
||||
#endif
|
||||
uint8_t* buffer;
|
||||
};
|
||||
|
||||
/* cdfl compression codec */
|
||||
chd_error cdfl_codec_init(void* codec, uint32_t hunkbytes);
|
||||
void cdfl_codec_free(void* codec);
|
||||
chd_error cdfl_codec_decompress(void *codec, const uint8_t *src, uint32_t complen, uint8_t *dest, uint32_t destlen);
|
||||
|
||||
#endif /* __FLAC_H__ */
|
||||
89
src/minarch/libretro-common/include/libchdr/huffman.h
Normal file
89
src/minarch/libretro-common/include/libchdr/huffman.h
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
/* license:BSD-3-Clause
|
||||
* copyright-holders:Aaron Giles
|
||||
***************************************************************************
|
||||
|
||||
huffman.h
|
||||
|
||||
Static Huffman compression and decompression helpers.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __HUFFMAN_H__
|
||||
#define __HUFFMAN_H__
|
||||
|
||||
#include "bitstream.h"
|
||||
|
||||
/***************************************************************************
|
||||
* CONSTANTS
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
enum huffman_error
|
||||
{
|
||||
HUFFERR_NONE = 0,
|
||||
HUFFERR_TOO_MANY_BITS,
|
||||
HUFFERR_INVALID_DATA,
|
||||
HUFFERR_INPUT_BUFFER_TOO_SMALL,
|
||||
HUFFERR_OUTPUT_BUFFER_TOO_SMALL,
|
||||
HUFFERR_INTERNAL_INCONSISTENCY,
|
||||
HUFFERR_TOO_MANY_CONTEXTS
|
||||
};
|
||||
|
||||
/***************************************************************************
|
||||
* TYPE DEFINITIONS
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
typedef uint16_t lookup_value;
|
||||
|
||||
/* a node in the huffman tree */
|
||||
struct node_t
|
||||
{
|
||||
struct node_t* parent; /* pointer to parent node */
|
||||
uint32_t count; /* number of hits on this node */
|
||||
uint32_t weight; /* assigned weight of this node */
|
||||
uint32_t bits; /* bits used to encode the node */
|
||||
uint8_t numbits; /* number of bits needed for this node */
|
||||
};
|
||||
|
||||
/* ======================> huffman_context_base */
|
||||
|
||||
/* context class for decoding */
|
||||
struct huffman_decoder
|
||||
{
|
||||
/* internal state */
|
||||
uint32_t numcodes; /* number of total codes being processed */
|
||||
uint8_t maxbits; /* maximum bits per code */
|
||||
uint8_t prevdata; /* value of the previous data (for delta-RLE encoding) */
|
||||
int rleremaining; /* number of RLE bytes remaining (for delta-RLE encoding) */
|
||||
lookup_value * lookup; /* pointer to the lookup table */
|
||||
struct node_t * huffnode; /* array of nodes */
|
||||
uint32_t * datahisto; /* histogram of data values */
|
||||
|
||||
/* array versions of the info we need */
|
||||
#if 0
|
||||
node_t* huffnode_array; /* [_NumCodes]; */
|
||||
lookup_value* lookup_array; /* [1 << _MaxBits]; */
|
||||
#endif
|
||||
};
|
||||
|
||||
/* ======================> huffman_decoder */
|
||||
|
||||
struct huffman_decoder* create_huffman_decoder(int numcodes, int maxbits);
|
||||
void delete_huffman_decoder(struct huffman_decoder* decoder);
|
||||
|
||||
/* single item operations */
|
||||
uint32_t huffman_decode_one(struct huffman_decoder* decoder, struct bitstream* bitbuf);
|
||||
|
||||
enum huffman_error huffman_import_tree_rle(struct huffman_decoder* decoder, struct bitstream* bitbuf);
|
||||
enum huffman_error huffman_import_tree_huffman(struct huffman_decoder* decoder, struct bitstream* bitbuf);
|
||||
|
||||
int huffman_build_tree(struct huffman_decoder* decoder, uint32_t totaldata, uint32_t totalweight);
|
||||
enum huffman_error huffman_assign_canonical_codes(struct huffman_decoder* decoder);
|
||||
enum huffman_error huffman_compute_tree_from_histo(struct huffman_decoder* decoder);
|
||||
|
||||
void huffman_build_lookup_table(struct huffman_decoder* decoder);
|
||||
|
||||
#endif
|
||||
69
src/minarch/libretro-common/include/libchdr/libchdr_zlib.h
Normal file
69
src/minarch/libretro-common/include/libchdr/libchdr_zlib.h
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
/* license:BSD-3-Clause
|
||||
* copyright-holders:Aaron Giles
|
||||
***************************************************************************
|
||||
|
||||
libchr_zlib.h
|
||||
|
||||
Zlib compression wrappers
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __LIBCHDR_ZLIB_H__
|
||||
#define __LIBCHDR_ZLIB_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <zlib.h>
|
||||
#include "coretypes.h"
|
||||
#include "chd.h"
|
||||
|
||||
#define MAX_ZLIB_ALLOCS 64
|
||||
|
||||
/* codec-private data for the ZLIB codec */
|
||||
|
||||
typedef struct _zlib_allocator zlib_allocator;
|
||||
struct _zlib_allocator
|
||||
{
|
||||
UINT32 * allocptr[MAX_ZLIB_ALLOCS];
|
||||
UINT32 * allocptr2[MAX_ZLIB_ALLOCS];
|
||||
};
|
||||
|
||||
typedef struct _zlib_codec_data zlib_codec_data;
|
||||
struct _zlib_codec_data
|
||||
{
|
||||
z_stream inflater;
|
||||
zlib_allocator allocator;
|
||||
};
|
||||
|
||||
/* codec-private data for the CDZL codec */
|
||||
typedef struct _cdzl_codec_data cdzl_codec_data;
|
||||
struct _cdzl_codec_data {
|
||||
/* internal state */
|
||||
zlib_codec_data base_decompressor;
|
||||
#ifdef WANT_SUBCODE
|
||||
zlib_codec_data subcode_decompressor;
|
||||
#endif
|
||||
uint8_t* buffer;
|
||||
};
|
||||
|
||||
/* zlib compression codec */
|
||||
chd_error zlib_codec_init(void *codec, uint32_t hunkbytes);
|
||||
|
||||
void zlib_codec_free(void *codec);
|
||||
|
||||
chd_error zlib_codec_decompress(void *codec, const uint8_t *src, uint32_t complen, uint8_t *dest, uint32_t destlen);
|
||||
|
||||
voidpf zlib_fast_alloc(voidpf opaque, uInt items, uInt size);
|
||||
|
||||
void zlib_fast_free(voidpf opaque, voidpf address);
|
||||
|
||||
/* cdzl compression codec */
|
||||
chd_error cdzl_codec_init(void* codec, uint32_t hunkbytes);
|
||||
|
||||
void cdzl_codec_free(void* codec);
|
||||
|
||||
chd_error cdzl_codec_decompress(void *codec, const uint8_t *src, uint32_t complen, uint8_t *dest, uint32_t destlen);
|
||||
|
||||
#endif /* __LIBCHDR_ZLIB_H__ */
|
||||
73
src/minarch/libretro-common/include/libchdr/lzma.h
Normal file
73
src/minarch/libretro-common/include/libchdr/lzma.h
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
/* license:BSD-3-Clause
|
||||
* copyright-holders:Aaron Giles
|
||||
***************************************************************************
|
||||
|
||||
lzma.h
|
||||
|
||||
LZMA compression wrappers
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __LIBCHDR_LZMA_H__
|
||||
#define __LIBCHDR_LZMA_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <LzmaEnc.h>
|
||||
#include <LzmaDec.h>
|
||||
|
||||
#include <libchdr/libchdr_zlib.h>
|
||||
|
||||
/* codec-private data for the LZMA codec */
|
||||
#define MAX_LZMA_ALLOCS 64
|
||||
|
||||
typedef struct _lzma_allocator lzma_allocator;
|
||||
struct _lzma_allocator
|
||||
{
|
||||
void *(*Alloc)(void *p, size_t size);
|
||||
void (*Free)(void *p, void *address); /* address can be 0 */
|
||||
void (*FreeSz)(void *p, void *address, size_t size); /* address can be 0 */
|
||||
uint32_t* allocptr[MAX_LZMA_ALLOCS];
|
||||
uint32_t* allocptr2[MAX_LZMA_ALLOCS];
|
||||
};
|
||||
|
||||
typedef struct _lzma_codec_data lzma_codec_data;
|
||||
struct _lzma_codec_data
|
||||
{
|
||||
CLzmaDec decoder;
|
||||
lzma_allocator allocator;
|
||||
};
|
||||
|
||||
/* codec-private data for the CDLZ codec */
|
||||
typedef struct _cdlz_codec_data cdlz_codec_data;
|
||||
struct _cdlz_codec_data {
|
||||
/* internal state */
|
||||
lzma_codec_data base_decompressor;
|
||||
#ifdef WANT_SUBCODE
|
||||
zlib_codec_data subcode_decompressor;
|
||||
#endif
|
||||
uint8_t* buffer;
|
||||
};
|
||||
|
||||
chd_error lzma_codec_init(void* codec, uint32_t hunkbytes);
|
||||
|
||||
void lzma_codec_free(void* codec);
|
||||
|
||||
/*-------------------------------------------------
|
||||
* decompress - decompress data using the LZMA
|
||||
* codec
|
||||
*-------------------------------------------------
|
||||
*/
|
||||
|
||||
chd_error lzma_codec_decompress(void* codec, const uint8_t *src,
|
||||
uint32_t complen, uint8_t *dest, uint32_t destlen);
|
||||
|
||||
chd_error cdlz_codec_init(void* codec, uint32_t hunkbytes);
|
||||
|
||||
void cdlz_codec_free(void* codec);
|
||||
|
||||
chd_error cdlz_codec_decompress(void *codec, const uint8_t *src, uint32_t complen, uint8_t *dest, uint32_t destlen);
|
||||
|
||||
#endif /* __LIBCHDR_LZMA_H__ */
|
||||
21
src/minarch/libretro-common/include/libchdr/minmax.h
Normal file
21
src/minarch/libretro-common/include/libchdr/minmax.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* license:BSD-3-Clause
|
||||
* copyright-holders:Aaron Giles
|
||||
***************************************************************************
|
||||
|
||||
minmax.h
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __MINMAX_H__
|
||||
#define __MINMAX_H__
|
||||
|
||||
#if defined(RARCH_INTERNAL) || defined(__LIBRETRO__)
|
||||
#include <retro_miscellaneous.h>
|
||||
#else
|
||||
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
|
||||
#define MIN(x, y) ((x) < (y) ? (x) : (y))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
79
src/minarch/libretro-common/include/libco.h
Normal file
79
src/minarch/libretro-common/include/libco.h
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (libco.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef LIBCO_H
|
||||
#define LIBCO_H
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#ifdef LIBCO_C
|
||||
#ifdef LIBCO_MP
|
||||
#define thread_local __thread
|
||||
#else
|
||||
#define thread_local
|
||||
#endif
|
||||
#endif
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef void* cothread_t;
|
||||
|
||||
/**
|
||||
* co_active:
|
||||
*
|
||||
* Gets the currently active context.
|
||||
*
|
||||
* Returns: active context.
|
||||
**/
|
||||
cothread_t co_active(void);
|
||||
|
||||
/**
|
||||
* co_create:
|
||||
* @int : stack size
|
||||
* @funcptr : thread entry function callback
|
||||
*
|
||||
* Create a co_thread.
|
||||
*
|
||||
* Returns: cothread if successful, otherwise NULL.
|
||||
*/
|
||||
cothread_t co_create(unsigned int, void (*)(void));
|
||||
|
||||
/**
|
||||
* co_delete:
|
||||
* @cothread : cothread object
|
||||
*
|
||||
* Frees a co_thread.
|
||||
*/
|
||||
void co_delete(cothread_t cothread);
|
||||
|
||||
/**
|
||||
* co_switch:
|
||||
* @cothread : cothread object to switch to
|
||||
*
|
||||
* Do a context switch to @cothread.
|
||||
*/
|
||||
void co_switch(cothread_t cothread);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
/* ifndef LIBCO_H */
|
||||
#endif
|
||||
3935
src/minarch/libretro-common/include/libretro.h
Normal file
3935
src/minarch/libretro-common/include/libretro.h
Normal file
File diff suppressed because it is too large
Load diff
59
src/minarch/libretro-common/include/libretro_d3d.h
Normal file
59
src/minarch/libretro-common/include/libretro_d3d.h
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this libretro API header (libretro_d3d.h)
|
||||
* ---------------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the
|
||||
* "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef LIBRETRO_DIRECT3D_H__
|
||||
#define LIBRETRO_DIRECT3D_H__
|
||||
|
||||
#include "libretro.h"
|
||||
|
||||
#ifdef HAVE_D3D11
|
||||
|
||||
#include <d3d11.h>
|
||||
#include <d3dcompiler.h>
|
||||
|
||||
#define RETRO_HW_RENDER_INTERFACE_D3D11_VERSION 1
|
||||
|
||||
struct retro_hw_render_interface_d3d11
|
||||
{
|
||||
/* Must be set to RETRO_HW_RENDER_INTERFACE_D3D11. */
|
||||
enum retro_hw_render_interface_type interface_type;
|
||||
/* Must be set to RETRO_HW_RENDER_INTERFACE_D3D11_VERSION. */
|
||||
unsigned interface_version;
|
||||
|
||||
/* Opaque handle to the d3d11 backend in the frontend
|
||||
* which must be passed along to all function pointers
|
||||
* in this interface.
|
||||
*/
|
||||
void* handle;
|
||||
ID3D11Device *device;
|
||||
ID3D11DeviceContext *context;
|
||||
D3D_FEATURE_LEVEL featureLevel;
|
||||
pD3DCompile D3DCompile;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* LIBRETRO_DIRECT3D_H__ */
|
||||
187
src/minarch/libretro-common/include/libretro_dspfilter.h
Normal file
187
src/minarch/libretro-common/include/libretro_dspfilter.h
Normal file
|
|
@ -0,0 +1,187 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this libretro API header (libretro_dspfilter.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef LIBRETRO_DSPFILTER_API_H__
|
||||
#define LIBRETRO_DSPFILTER_API_H__
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
#define DSPFILTER_SIMD_SSE (1 << 0)
|
||||
#define DSPFILTER_SIMD_SSE2 (1 << 1)
|
||||
#define DSPFILTER_SIMD_VMX (1 << 2)
|
||||
#define DSPFILTER_SIMD_VMX128 (1 << 3)
|
||||
#define DSPFILTER_SIMD_AVX (1 << 4)
|
||||
#define DSPFILTER_SIMD_NEON (1 << 5)
|
||||
#define DSPFILTER_SIMD_SSE3 (1 << 6)
|
||||
#define DSPFILTER_SIMD_SSSE3 (1 << 7)
|
||||
#define DSPFILTER_SIMD_MMX (1 << 8)
|
||||
#define DSPFILTER_SIMD_MMXEXT (1 << 9)
|
||||
#define DSPFILTER_SIMD_SSE4 (1 << 10)
|
||||
#define DSPFILTER_SIMD_SSE42 (1 << 11)
|
||||
#define DSPFILTER_SIMD_AVX2 (1 << 12)
|
||||
#define DSPFILTER_SIMD_VFPU (1 << 13)
|
||||
#define DSPFILTER_SIMD_PS (1 << 14)
|
||||
|
||||
/* A bit-mask of all supported SIMD instruction sets.
|
||||
* Allows an implementation to pick different
|
||||
* dspfilter_implementation structs.
|
||||
*/
|
||||
typedef unsigned dspfilter_simd_mask_t;
|
||||
|
||||
/* Dynamic library endpoint. */
|
||||
typedef const struct dspfilter_implementation *(
|
||||
*dspfilter_get_implementation_t)(dspfilter_simd_mask_t mask);
|
||||
|
||||
/* The same SIMD mask argument is forwarded to create() callback
|
||||
* as well to avoid having to keep lots of state around. */
|
||||
const struct dspfilter_implementation *dspfilter_get_implementation(
|
||||
dspfilter_simd_mask_t mask);
|
||||
|
||||
#define DSPFILTER_API_VERSION 1
|
||||
|
||||
struct dspfilter_info
|
||||
{
|
||||
/* Input sample rate that the DSP plugin receives. */
|
||||
float input_rate;
|
||||
};
|
||||
|
||||
struct dspfilter_output
|
||||
{
|
||||
/* The DSP plugin has to provide the buffering for the
|
||||
* output samples or reuse the input buffer directly.
|
||||
*
|
||||
* The samples are laid out in interleaving order: LRLRLRLR
|
||||
* The range of the samples are [-1.0, 1.0].
|
||||
*
|
||||
* It is not necessary to manually clip values. */
|
||||
float *samples;
|
||||
|
||||
/* Frames which the DSP plugin outputted for the current process.
|
||||
*
|
||||
* One frame is here defined as a combined sample of
|
||||
* left and right channels.
|
||||
*
|
||||
* (I.e. 44.1kHz, 16bit stereo will have
|
||||
* 88.2k samples/sec and 44.1k frames/sec.)
|
||||
*/
|
||||
unsigned frames;
|
||||
};
|
||||
|
||||
struct dspfilter_input
|
||||
{
|
||||
/* Input data for the DSP. The samples are interleaved in order: LRLRLRLR
|
||||
*
|
||||
* It is valid for a DSP plug to use this buffer for output as long as
|
||||
* the output size is less or equal to the input.
|
||||
*
|
||||
* This is useful for filters which can output one sample for each
|
||||
* input sample and do not need to maintain its own buffers.
|
||||
*
|
||||
* Block based filters must provide their own buffering scheme.
|
||||
*
|
||||
* The input size is not bound, but it can be safely assumed that it
|
||||
* will not exceed ~100ms worth of audio at a time. */
|
||||
float *samples;
|
||||
|
||||
/* Number of frames for input data.
|
||||
* One frame is here defined as a combined sample of
|
||||
* left and right channels.
|
||||
*
|
||||
* (I.e. 44.1kHz, 16bit stereo will have
|
||||
* 88.2k samples/sec and 44.1k frames/sec.)
|
||||
*/
|
||||
unsigned frames;
|
||||
};
|
||||
|
||||
/* Returns true if config key was found. Otherwise,
|
||||
* returns false, and sets value to default value.
|
||||
*/
|
||||
typedef int (*dspfilter_config_get_float_t)(void *userdata,
|
||||
const char *key, float *value, float default_value);
|
||||
|
||||
typedef int (*dspfilter_config_get_int_t)(void *userdata,
|
||||
const char *key, int *value, int default_value);
|
||||
|
||||
/* Allocates an array with values. free() with dspfilter_config_free_t. */
|
||||
typedef int (*dspfilter_config_get_float_array_t)(void *userdata,
|
||||
const char *key, float **values, unsigned *out_num_values,
|
||||
const float *default_values, unsigned num_default_values);
|
||||
|
||||
typedef int (*dspfilter_config_get_int_array_t)(void *userdata,
|
||||
const char *key, int **values, unsigned *out_num_values,
|
||||
const int *default_values, unsigned num_default_values);
|
||||
|
||||
typedef int (*dspfilter_config_get_string_t)(void *userdata,
|
||||
const char *key, char **output, const char *default_output);
|
||||
|
||||
/* Calls free() in host runtime. Sometimes needed on Windows.
|
||||
* free() on NULL is fine. */
|
||||
typedef void (*dspfilter_config_free_t)(void *ptr);
|
||||
|
||||
struct dspfilter_config
|
||||
{
|
||||
dspfilter_config_get_float_t get_float;
|
||||
dspfilter_config_get_int_t get_int;
|
||||
|
||||
dspfilter_config_get_float_array_t get_float_array;
|
||||
dspfilter_config_get_int_array_t get_int_array;
|
||||
|
||||
dspfilter_config_get_string_t get_string;
|
||||
/* Avoid problems where DSP plug and host are
|
||||
* linked against different C runtimes. */
|
||||
dspfilter_config_free_t free;
|
||||
};
|
||||
|
||||
/* Creates a handle of the plugin. Returns NULL if failed. */
|
||||
typedef void *(*dspfilter_init_t)(const struct dspfilter_info *info,
|
||||
const struct dspfilter_config *config, void *userdata);
|
||||
|
||||
/* Frees the handle. */
|
||||
typedef void (*dspfilter_free_t)(void *data);
|
||||
|
||||
/* Processes input data.
|
||||
* The plugin is allowed to return variable sizes for output data. */
|
||||
typedef void (*dspfilter_process_t)(void *data,
|
||||
struct dspfilter_output *output, const struct dspfilter_input *input);
|
||||
|
||||
struct dspfilter_implementation
|
||||
{
|
||||
dspfilter_init_t init;
|
||||
dspfilter_process_t process;
|
||||
dspfilter_free_t free;
|
||||
|
||||
/* Must be DSPFILTER_API_VERSION */
|
||||
unsigned api_version;
|
||||
|
||||
/* Human readable identifier of implementation. */
|
||||
const char *ident;
|
||||
|
||||
/* Computer-friendly short version of ident.
|
||||
* Lower case, no spaces and special characters, etc. */
|
||||
const char *short_ident;
|
||||
};
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
66
src/minarch/libretro-common/include/libretro_gskit_ps2.h
Normal file
66
src/minarch/libretro-common/include/libretro_gskit_ps2.h
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this libretro API header (libretro_d3d.h)
|
||||
* ---------------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the
|
||||
* "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef LIBRETRO_GSKIT_PS2_H_
|
||||
#define LIBRETRO_GSKIT_PS2_H_
|
||||
|
||||
#include "libretro.h"
|
||||
|
||||
#if defined(PS2)
|
||||
|
||||
#include <gsKit.h>
|
||||
|
||||
#define RETRO_HW_RENDER_INTERFACE_GSKIT_PS2_VERSION 2
|
||||
|
||||
struct retro_hw_ps2_insets
|
||||
{
|
||||
float top;
|
||||
float left;
|
||||
float bottom;
|
||||
float right;
|
||||
};
|
||||
|
||||
#define empty_ps2_insets (struct retro_hw_ps2_insets){0.f, 0.f, 0.f, 0.f}
|
||||
|
||||
struct retro_hw_render_interface_gskit_ps2
|
||||
{
|
||||
/* Must be set to RETRO_HW_RENDER_INTERFACE_GSKIT_PS2. */
|
||||
enum retro_hw_render_interface_type interface_type;
|
||||
/* Must be set to RETRO_HW_RENDER_INTERFACE_GSKIT_PS2_VERSION. */
|
||||
unsigned interface_version;
|
||||
|
||||
/* Opaque handle to the GSKit_PS2 backend in the frontend
|
||||
* which must be passed along to all function pointers
|
||||
* in this interface.
|
||||
*/
|
||||
GSTEXTURE *coreTexture;
|
||||
struct retro_hw_ps2_insets padding;
|
||||
};
|
||||
typedef struct retro_hw_render_interface_gskit_ps2 RETRO_HW_RENDER_INTEFACE_GSKIT_PS2;
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* LIBRETRO_GSKIT_PS2_H_ */
|
||||
397
src/minarch/libretro-common/include/libretro_vulkan.h
Normal file
397
src/minarch/libretro-common/include/libretro_vulkan.h
Normal file
|
|
@ -0,0 +1,397 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this libretro API header (libretro_vulkan.h)
|
||||
* ---------------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef LIBRETRO_VULKAN_H__
|
||||
#define LIBRETRO_VULKAN_H__
|
||||
|
||||
#include <libretro.h>
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
#define RETRO_HW_RENDER_INTERFACE_VULKAN_VERSION 5
|
||||
#define RETRO_HW_RENDER_CONTEXT_NEGOTIATION_INTERFACE_VULKAN_VERSION 1
|
||||
|
||||
struct retro_vulkan_image
|
||||
{
|
||||
VkImageView image_view;
|
||||
VkImageLayout image_layout;
|
||||
VkImageViewCreateInfo create_info;
|
||||
};
|
||||
|
||||
typedef void (*retro_vulkan_set_image_t)(void *handle,
|
||||
const struct retro_vulkan_image *image,
|
||||
uint32_t num_semaphores,
|
||||
const VkSemaphore *semaphores,
|
||||
uint32_t src_queue_family);
|
||||
|
||||
typedef uint32_t (*retro_vulkan_get_sync_index_t)(void *handle);
|
||||
typedef uint32_t (*retro_vulkan_get_sync_index_mask_t)(void *handle);
|
||||
typedef void (*retro_vulkan_set_command_buffers_t)(void *handle,
|
||||
uint32_t num_cmd,
|
||||
const VkCommandBuffer *cmd);
|
||||
typedef void (*retro_vulkan_wait_sync_index_t)(void *handle);
|
||||
typedef void (*retro_vulkan_lock_queue_t)(void *handle);
|
||||
typedef void (*retro_vulkan_unlock_queue_t)(void *handle);
|
||||
typedef void (*retro_vulkan_set_signal_semaphore_t)(void *handle, VkSemaphore semaphore);
|
||||
|
||||
typedef const VkApplicationInfo *(*retro_vulkan_get_application_info_t)(void);
|
||||
|
||||
struct retro_vulkan_context
|
||||
{
|
||||
VkPhysicalDevice gpu;
|
||||
VkDevice device;
|
||||
VkQueue queue;
|
||||
uint32_t queue_family_index;
|
||||
VkQueue presentation_queue;
|
||||
uint32_t presentation_queue_family_index;
|
||||
};
|
||||
|
||||
typedef bool (*retro_vulkan_create_device_t)(
|
||||
struct retro_vulkan_context *context,
|
||||
VkInstance instance,
|
||||
VkPhysicalDevice gpu,
|
||||
VkSurfaceKHR surface,
|
||||
PFN_vkGetInstanceProcAddr get_instance_proc_addr,
|
||||
const char **required_device_extensions,
|
||||
unsigned num_required_device_extensions,
|
||||
const char **required_device_layers,
|
||||
unsigned num_required_device_layers,
|
||||
const VkPhysicalDeviceFeatures *required_features);
|
||||
|
||||
typedef void (*retro_vulkan_destroy_device_t)(void);
|
||||
|
||||
/* Note on thread safety:
|
||||
* The Vulkan API is heavily designed around multi-threading, and
|
||||
* the libretro interface for it should also be threading friendly.
|
||||
* A core should be able to build command buffers and submit
|
||||
* command buffers to the GPU from any thread.
|
||||
*/
|
||||
|
||||
struct retro_hw_render_context_negotiation_interface_vulkan
|
||||
{
|
||||
/* Must be set to RETRO_HW_RENDER_CONTEXT_NEGOTIATION_INTERFACE_VULKAN. */
|
||||
enum retro_hw_render_context_negotiation_interface_type interface_type;
|
||||
/* Must be set to RETRO_HW_RENDER_CONTEXT_NEGOTIATION_INTERFACE_VULKAN_VERSION. */
|
||||
unsigned interface_version;
|
||||
|
||||
/* If non-NULL, returns a VkApplicationInfo struct that the frontend can use instead of
|
||||
* its "default" application info.
|
||||
*/
|
||||
retro_vulkan_get_application_info_t get_application_info;
|
||||
|
||||
/* If non-NULL, the libretro core will choose one or more physical devices,
|
||||
* create one or more logical devices and create one or more queues.
|
||||
* The core must prepare a designated PhysicalDevice, Device, Queue and queue family index
|
||||
* which the frontend will use for its internal operation.
|
||||
*
|
||||
* If gpu is not VK_NULL_HANDLE, the physical device provided to the frontend must be this PhysicalDevice.
|
||||
* The core is still free to use other physical devices.
|
||||
*
|
||||
* The frontend will request certain extensions and layers for a device which is created.
|
||||
* The core must ensure that the queue and queue_family_index support GRAPHICS and COMPUTE.
|
||||
*
|
||||
* If surface is not VK_NULL_HANDLE, the core must consider presentation when creating the queues.
|
||||
* If presentation to "surface" is supported on the queue, presentation_queue must be equal to queue.
|
||||
* If not, a second queue must be provided in presentation_queue and presentation_queue_index.
|
||||
* If surface is not VK_NULL_HANDLE, the instance from frontend will have been created with supported for
|
||||
* VK_KHR_surface extension.
|
||||
*
|
||||
* The core is free to set its own queue priorities.
|
||||
* Device provided to frontend is owned by the frontend, but any additional device resources must be freed by core
|
||||
* in destroy_device callback.
|
||||
*
|
||||
* If this function returns true, a PhysicalDevice, Device and Queues are initialized.
|
||||
* If false, none of the above have been initialized and the frontend will attempt
|
||||
* to fallback to "default" device creation, as if this function was never called.
|
||||
*/
|
||||
retro_vulkan_create_device_t create_device;
|
||||
|
||||
/* If non-NULL, this callback is called similar to context_destroy for HW_RENDER_INTERFACE.
|
||||
* However, it will be called even if context_reset was not called.
|
||||
* This can happen if the context never succeeds in being created.
|
||||
* destroy_device will always be called before the VkInstance
|
||||
* of the frontend is destroyed if create_device was called successfully so that the core has a chance of
|
||||
* tearing down its own device resources.
|
||||
*
|
||||
* Only auxillary resources should be freed here, i.e. resources which are not part of retro_vulkan_context.
|
||||
*/
|
||||
retro_vulkan_destroy_device_t destroy_device;
|
||||
};
|
||||
|
||||
struct retro_hw_render_interface_vulkan
|
||||
{
|
||||
/* Must be set to RETRO_HW_RENDER_INTERFACE_VULKAN. */
|
||||
enum retro_hw_render_interface_type interface_type;
|
||||
/* Must be set to RETRO_HW_RENDER_INTERFACE_VULKAN_VERSION. */
|
||||
unsigned interface_version;
|
||||
|
||||
/* Opaque handle to the Vulkan backend in the frontend
|
||||
* which must be passed along to all function pointers
|
||||
* in this interface.
|
||||
*
|
||||
* The rationale for including a handle here (which libretro v1
|
||||
* doesn't currently do in general) is:
|
||||
*
|
||||
* - Vulkan cores should be able to be freely threaded without lots of fuzz.
|
||||
* This would break frontends which currently rely on TLS
|
||||
* to deal with multiple cores loaded at the same time.
|
||||
* - Fixing this in general is TODO for an eventual libretro v2.
|
||||
*/
|
||||
void *handle;
|
||||
|
||||
/* The Vulkan instance the context is using. */
|
||||
VkInstance instance;
|
||||
/* The physical device used. */
|
||||
VkPhysicalDevice gpu;
|
||||
/* The logical device used. */
|
||||
VkDevice device;
|
||||
|
||||
/* Allows a core to fetch all its needed symbols without having to link
|
||||
* against the loader itself. */
|
||||
PFN_vkGetDeviceProcAddr get_device_proc_addr;
|
||||
PFN_vkGetInstanceProcAddr get_instance_proc_addr;
|
||||
|
||||
/* The queue the core must use to submit data.
|
||||
* This queue and index must remain constant throughout the lifetime
|
||||
* of the context.
|
||||
*
|
||||
* This queue will be the queue that supports graphics and compute
|
||||
* if the device supports compute.
|
||||
*/
|
||||
VkQueue queue;
|
||||
unsigned queue_index;
|
||||
|
||||
/* Before calling retro_video_refresh_t with RETRO_HW_FRAME_BUFFER_VALID,
|
||||
* set which image to use for this frame.
|
||||
*
|
||||
* If num_semaphores is non-zero, the frontend will wait for the
|
||||
* semaphores provided to be signaled before using the results further
|
||||
* in the pipeline.
|
||||
*
|
||||
* Semaphores provided by a single call to set_image will only be
|
||||
* waited for once (waiting for a semaphore resets it).
|
||||
* E.g. set_image, video_refresh, and then another
|
||||
* video_refresh without set_image,
|
||||
* but same image will only wait for semaphores once.
|
||||
*
|
||||
* For this reason, ownership transfer will only occur if semaphores
|
||||
* are waited on for a particular frame in the frontend.
|
||||
*
|
||||
* Using semaphores is optional for synchronization purposes,
|
||||
* but if not using
|
||||
* semaphores, an image memory barrier in vkCmdPipelineBarrier
|
||||
* should be used in the graphics_queue.
|
||||
* Example:
|
||||
*
|
||||
* vkCmdPipelineBarrier(cmd,
|
||||
* srcStageMask = VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
|
||||
* dstStageMask = VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT,
|
||||
* image_memory_barrier = {
|
||||
* srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT,
|
||||
* dstAccessMask = VK_ACCESS_SHADER_READ_BIT,
|
||||
* });
|
||||
*
|
||||
* The use of pipeline barriers instead of semaphores is encouraged
|
||||
* as it is simpler and more fine-grained. A layout transition
|
||||
* must generally happen anyways which requires a
|
||||
* pipeline barrier.
|
||||
*
|
||||
* The image passed to set_image must have imageUsage flags set to at least
|
||||
* VK_IMAGE_USAGE_TRANSFER_SRC_BIT and VK_IMAGE_USAGE_SAMPLED_BIT.
|
||||
* The core will naturally want to use flags such as
|
||||
* VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT and/or
|
||||
* VK_IMAGE_USAGE_TRANSFER_DST_BIT depending
|
||||
* on how the final image is created.
|
||||
*
|
||||
* The image must also have been created with MUTABLE_FORMAT bit set if
|
||||
* 8-bit formats are used, so that the frontend can reinterpret sRGB
|
||||
* formats as it sees fit.
|
||||
*
|
||||
* Images passed to set_image should be created with TILING_OPTIMAL.
|
||||
* The image layout should be transitioned to either
|
||||
* VK_IMAGE_LAYOUT_GENERIC or VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL.
|
||||
* The actual image layout used must be set in image_layout.
|
||||
*
|
||||
* The image must be a 2D texture which may or not be layered
|
||||
* and/or mipmapped.
|
||||
*
|
||||
* The image must be suitable for linear sampling.
|
||||
* While the image_view is typically the only field used,
|
||||
* the frontend may want to reinterpret the texture as sRGB vs.
|
||||
* non-sRGB for example so the VkImageViewCreateInfo used to
|
||||
* create the image view must also be passed in.
|
||||
*
|
||||
* The data in the pointer to the image struct will not be copied
|
||||
* as the pNext field in create_info cannot be reliably deep-copied.
|
||||
* The image pointer passed to set_image must be valid until
|
||||
* retro_video_refresh_t has returned.
|
||||
*
|
||||
* If frame duping is used when passing NULL to retro_video_refresh_t,
|
||||
* the frontend is free to either use the latest image passed to
|
||||
* set_image or reuse the older pointer passed to set_image the
|
||||
* frame RETRO_HW_FRAME_BUFFER_VALID was last used.
|
||||
*
|
||||
* Essentially, the lifetime of the pointer passed to
|
||||
* retro_video_refresh_t should be extended if frame duping is used
|
||||
* so that the frontend can reuse the older pointer.
|
||||
*
|
||||
* The image itself however, must not be touched by the core until
|
||||
* wait_sync_index has been completed later. The frontend may perform
|
||||
* layout transitions on the image, so even read-only access is not defined.
|
||||
* The exception to read-only rule is if GENERAL layout is used for the image.
|
||||
* In this case, the frontend is not allowed to perform any layout transitions,
|
||||
* so concurrent reads from core and frontend are allowed.
|
||||
*
|
||||
* If frame duping is used, or if set_command_buffers is used,
|
||||
* the frontend will not wait for any semaphores.
|
||||
*
|
||||
* The src_queue_family is used to specify which queue family
|
||||
* the image is currently owned by. If using multiple queue families
|
||||
* (e.g. async compute), the frontend will need to acquire ownership of the
|
||||
* image before rendering with it and release the image afterwards.
|
||||
*
|
||||
* If src_queue_family is equal to the queue family (queue_index),
|
||||
* no ownership transfer will occur.
|
||||
* Similarly, if src_queue_family is VK_QUEUE_FAMILY_IGNORED,
|
||||
* no ownership transfer will occur.
|
||||
*
|
||||
* The frontend will always release ownership back to src_queue_family.
|
||||
* Waiting for frontend to complete with wait_sync_index() ensures that
|
||||
* the frontend has released ownership back to the application.
|
||||
* Note that in Vulkan, transfering ownership is a two-part process.
|
||||
*
|
||||
* Example frame:
|
||||
* - core releases ownership from src_queue_index to queue_index with VkImageMemoryBarrier.
|
||||
* - core calls set_image with src_queue_index.
|
||||
* - Frontend will acquire the image with src_queue_index -> queue_index as well, completing the ownership transfer.
|
||||
* - Frontend renders the frame.
|
||||
* - Frontend releases ownership with queue_index -> src_queue_index.
|
||||
* - Next time image is used, core must acquire ownership from queue_index ...
|
||||
*
|
||||
* Since the frontend releases ownership, we cannot necessarily dupe the frame because
|
||||
* the core needs to make the roundtrip of ownership transfer.
|
||||
*/
|
||||
retro_vulkan_set_image_t set_image;
|
||||
|
||||
/* Get the current sync index for this frame which is obtained in
|
||||
* frontend by calling e.g. vkAcquireNextImageKHR before calling
|
||||
* retro_run().
|
||||
*
|
||||
* This index will correspond to which swapchain buffer is currently
|
||||
* the active one.
|
||||
*
|
||||
* Knowing this index is very useful for maintaining safe asynchronous CPU
|
||||
* and GPU operation without stalling.
|
||||
*
|
||||
* The common pattern for synchronization is to receive fences when
|
||||
* submitting command buffers to Vulkan (vkQueueSubmit) and add this fence
|
||||
* to a list of fences for frame number get_sync_index().
|
||||
*
|
||||
* Next time we receive the same get_sync_index(), we can wait for the
|
||||
* fences from before, which will usually return immediately as the
|
||||
* frontend will generally also avoid letting the GPU run ahead too much.
|
||||
*
|
||||
* After the fence has signaled, we know that the GPU has completed all
|
||||
* GPU work related to work submitted in the frame we last saw get_sync_index().
|
||||
*
|
||||
* This means we can safely reuse or free resources allocated in this frame.
|
||||
*
|
||||
* In theory, even if we wait for the fences correctly, it is not technically
|
||||
* safe to write to the image we earlier passed to the frontend since we're
|
||||
* not waiting for the frontend GPU jobs to complete.
|
||||
*
|
||||
* The frontend will guarantee that the appropriate pipeline barrier
|
||||
* in graphics_queue has been used such that
|
||||
* VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT cannot
|
||||
* start until the frontend is done with the image.
|
||||
*/
|
||||
retro_vulkan_get_sync_index_t get_sync_index;
|
||||
|
||||
/* Returns a bitmask of how many swapchain images we currently have
|
||||
* in the frontend.
|
||||
*
|
||||
* If bit #N is set in the return value, get_sync_index can return N.
|
||||
* Knowing this value is useful for preallocating per-frame management
|
||||
* structures ahead of time.
|
||||
*
|
||||
* While this value will typically remain constant throughout the
|
||||
* applications lifecycle, it may for example change if the frontend
|
||||
* suddently changes fullscreen state and/or latency.
|
||||
*
|
||||
* If this value ever changes, it is safe to assume that the device
|
||||
* is completely idle and all synchronization objects can be deleted
|
||||
* right away as desired.
|
||||
*/
|
||||
retro_vulkan_get_sync_index_mask_t get_sync_index_mask;
|
||||
|
||||
/* Instead of submitting the command buffer to the queue first, the core
|
||||
* can pass along its command buffer to the frontend, and the frontend
|
||||
* will submit the command buffer together with the frontends command buffers.
|
||||
*
|
||||
* This has the advantage that the overhead of vkQueueSubmit can be
|
||||
* amortized into a single call. For this mode, semaphores in set_image
|
||||
* will be ignored, so vkCmdPipelineBarrier must be used to synchronize
|
||||
* the core and frontend.
|
||||
*
|
||||
* The command buffers in set_command_buffers are only executed once,
|
||||
* even if frame duping is used.
|
||||
*
|
||||
* If frame duping is used, set_image should be used for the frames
|
||||
* which should be duped instead.
|
||||
*
|
||||
* Command buffers passed to the frontend with set_command_buffers
|
||||
* must not actually be submitted to the GPU until retro_video_refresh_t
|
||||
* is called.
|
||||
*
|
||||
* The frontend must submit the command buffer before submitting any
|
||||
* other command buffers provided by set_command_buffers. */
|
||||
retro_vulkan_set_command_buffers_t set_command_buffers;
|
||||
|
||||
/* Waits on CPU for device activity for the current sync index to complete.
|
||||
* This is useful since the core will not have a relevant fence to sync with
|
||||
* when the frontend is submitting the command buffers. */
|
||||
retro_vulkan_wait_sync_index_t wait_sync_index;
|
||||
|
||||
/* If the core submits command buffers itself to any of the queues provided
|
||||
* in this interface, the core must lock and unlock the frontend from
|
||||
* racing on the VkQueue.
|
||||
*
|
||||
* Queue submission can happen on any thread.
|
||||
* Even if queue submission happens on the same thread as retro_run(),
|
||||
* the lock/unlock functions must still be called.
|
||||
*
|
||||
* NOTE: Queue submissions are heavy-weight. */
|
||||
retro_vulkan_lock_queue_t lock_queue;
|
||||
retro_vulkan_unlock_queue_t unlock_queue;
|
||||
|
||||
/* Sets a semaphore which is signaled when the image in set_image can safely be reused.
|
||||
* The semaphore is consumed next call to retro_video_refresh_t.
|
||||
* The semaphore will be signalled even for duped frames.
|
||||
* The semaphore will be signalled only once, so set_signal_semaphore should be called every frame.
|
||||
* The semaphore may be VK_NULL_HANDLE, which disables semaphore signalling for next call to retro_video_refresh_t.
|
||||
*
|
||||
* This is mostly useful to support use cases where you're rendering to a single image that
|
||||
* is recycled in a ping-pong fashion with the frontend to save memory (but potentially less throughput).
|
||||
*/
|
||||
retro_vulkan_set_signal_semaphore_t set_signal_semaphore;
|
||||
};
|
||||
|
||||
#endif
|
||||
100
src/minarch/libretro-common/include/lists/dir_list.h
Normal file
100
src/minarch/libretro-common/include/lists/dir_list.h
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (dir_list.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_DIR_LIST_H
|
||||
#define __LIBRETRO_SDK_DIR_LIST_H
|
||||
|
||||
#include <retro_common_api.h>
|
||||
#include <boolean.h>
|
||||
|
||||
#include <lists/string_list.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* dir_list_append:
|
||||
* @list : existing list to append to.
|
||||
* @dir : directory path.
|
||||
* @ext : allowed extensions of file directory entries to include.
|
||||
* @include_dirs : include directories as part of the finished directory listing?
|
||||
* @include_hidden : include hidden files and directories as part of the finished directory listing?
|
||||
* @include_compressed : Only include files which match ext. Do not try to match compressed files, etc.
|
||||
* @recursive : list directory contents recursively
|
||||
*
|
||||
* Create a directory listing, appending to an existing list
|
||||
*
|
||||
* @return Returns true on success, otherwise false.
|
||||
**/
|
||||
bool dir_list_append(struct string_list *list, const char *dir, const char *ext,
|
||||
bool include_dirs, bool include_hidden, bool include_compressed, bool recursive);
|
||||
|
||||
/**
|
||||
* dir_list_new:
|
||||
* @dir : directory path.
|
||||
* @ext : allowed extensions of file directory entries to include.
|
||||
* @include_dirs : include directories as part of the finished directory listing?
|
||||
* @include_hidden : include hidden files and directories as part of the finished directory listing?
|
||||
* @include_compressed : include compressed files, even when not part of ext.
|
||||
* @recursive : list directory contents recursively
|
||||
*
|
||||
* Create a directory listing.
|
||||
*
|
||||
* @return pointer to a directory listing of type 'struct string_list *' on success,
|
||||
* NULL in case of error. Has to be freed manually.
|
||||
**/
|
||||
struct string_list *dir_list_new(const char *dir, const char *ext,
|
||||
bool include_dirs, bool include_hidden, bool include_compressed, bool recursive);
|
||||
|
||||
/**
|
||||
* dir_list_initialize:
|
||||
*
|
||||
* NOTE: @list must zero initialised before
|
||||
* calling this function, otherwise UB.
|
||||
**/
|
||||
bool dir_list_initialize(struct string_list *list,
|
||||
const char *dir,
|
||||
const char *ext, bool include_dirs,
|
||||
bool include_hidden, bool include_compressed,
|
||||
bool recursive);
|
||||
|
||||
/**
|
||||
* dir_list_sort:
|
||||
* @list : pointer to the directory listing.
|
||||
* @dir_first : move the directories in the listing to the top?
|
||||
*
|
||||
* Sorts a directory listing.
|
||||
**/
|
||||
void dir_list_sort(struct string_list *list, bool dir_first);
|
||||
|
||||
/**
|
||||
* dir_list_free:
|
||||
* @list : pointer to the directory listing
|
||||
*
|
||||
* Frees a directory listing.
|
||||
**/
|
||||
void dir_list_free(struct string_list *list);
|
||||
|
||||
bool dir_list_deinitialize(struct string_list *list);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
117
src/minarch/libretro-common/include/lists/file_list.h
Normal file
117
src/minarch/libretro-common/include/lists/file_list.h
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (file_list.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_FILE_LIST_H__
|
||||
#define __LIBRETRO_SDK_FILE_LIST_H__
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
struct item_file
|
||||
{
|
||||
void *userdata;
|
||||
void *actiondata;
|
||||
char *path;
|
||||
char *label;
|
||||
char *alt;
|
||||
size_t directory_ptr;
|
||||
size_t entry_idx;
|
||||
unsigned type;
|
||||
};
|
||||
|
||||
typedef struct file_list
|
||||
{
|
||||
struct item_file *list;
|
||||
|
||||
size_t capacity;
|
||||
size_t size;
|
||||
} file_list_t;
|
||||
|
||||
void *file_list_get_userdata_at_offset(const file_list_t *list,
|
||||
size_t index);
|
||||
|
||||
void *file_list_get_actiondata_at_offset(const file_list_t *list,
|
||||
size_t index);
|
||||
|
||||
/**
|
||||
* @brief frees the list
|
||||
*
|
||||
* NOTE: This function will also free() the entries actiondata
|
||||
* and userdata fields if they are non-null. If you store complex
|
||||
* or non-contiguous data there, make sure you free it's fields
|
||||
* before calling this function or you might get a memory leak.
|
||||
*
|
||||
* @param list List to be freed
|
||||
*/
|
||||
void file_list_free(file_list_t *list);
|
||||
|
||||
bool file_list_deinitialize(file_list_t *list);
|
||||
|
||||
/**
|
||||
* @brief makes the list big enough to contain at least nitems
|
||||
*
|
||||
* This function will not change the capacity if nitems is smaller
|
||||
* than the current capacity.
|
||||
*
|
||||
* @param list The list to open for input
|
||||
* @param nitems Number of items to reserve space for
|
||||
* @return whether or not the operation succeeded
|
||||
*/
|
||||
bool file_list_reserve(file_list_t *list, size_t nitems);
|
||||
|
||||
bool file_list_append(file_list_t *userdata, const char *path,
|
||||
const char *label, unsigned type, size_t current_directory_ptr,
|
||||
size_t entry_index);
|
||||
|
||||
bool file_list_insert(file_list_t *list,
|
||||
const char *path, const char *label,
|
||||
unsigned type, size_t directory_ptr,
|
||||
size_t entry_idx,
|
||||
size_t idx);
|
||||
|
||||
void file_list_pop(file_list_t *list, size_t *directory_ptr);
|
||||
|
||||
void file_list_clear(file_list_t *list);
|
||||
|
||||
void file_list_free_userdata(const file_list_t *list, size_t index);
|
||||
|
||||
void file_list_free_actiondata(const file_list_t *list, size_t idx);
|
||||
|
||||
void file_list_set_alt_at_offset(file_list_t *list, size_t index,
|
||||
const char *alt);
|
||||
|
||||
void file_list_sort_on_alt(file_list_t *list);
|
||||
|
||||
void file_list_sort_on_type(file_list_t *list);
|
||||
|
||||
bool file_list_search(const file_list_t *list, const char *needle,
|
||||
size_t *index);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
298
src/minarch/libretro-common/include/lists/linked_list.h
Normal file
298
src/minarch/libretro-common/include/lists/linked_list.h
Normal file
|
|
@ -0,0 +1,298 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (linked_list.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_LINKED_LIST_H
|
||||
#define __LIBRETRO_SDK_LINKED_LIST_H
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include <boolean.h>
|
||||
#include <stddef.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* Represents a linked list. Contains any number of elements.
|
||||
*/
|
||||
typedef struct linked_list linked_list_t;
|
||||
|
||||
/**
|
||||
* Represents an iterator for iterating over a linked list. The iterator can
|
||||
* go through the linked list forwards or backwards.
|
||||
*/
|
||||
typedef struct linked_list_iterator linked_list_iterator_t;
|
||||
|
||||
/**
|
||||
* Creates a new linked list with no elements.
|
||||
*
|
||||
* @return New linked list
|
||||
*/
|
||||
linked_list_t *linked_list_new(void);
|
||||
|
||||
/**
|
||||
* @brief frees the memory used by the linked list
|
||||
*
|
||||
* Frees all of the memory used by this linked list. The values of all
|
||||
* remaining elements are freed using the "free_value" function. Does
|
||||
* nothing if "list" is NULL.
|
||||
*
|
||||
* @param list linked list to free
|
||||
* @param free_value function to use to free remaining values
|
||||
*/
|
||||
void linked_list_free(linked_list_t *list, void (*free_value)(void *value));
|
||||
|
||||
/**
|
||||
* @brief adds an element to the linked list
|
||||
*
|
||||
* Add a new element to the end of this linked list. Does nothing if
|
||||
* "list" is NULL.
|
||||
*
|
||||
* @param list list to add the element to
|
||||
* @param value new value to add to the linked list
|
||||
*/
|
||||
void linked_list_add(linked_list_t *list, void *value);
|
||||
|
||||
/**
|
||||
* @brief inserts a value into the linked list
|
||||
*
|
||||
* Inserts a value into the linked list at the specified index. Does
|
||||
* nothing if "list" is NULL.
|
||||
*
|
||||
* @param list list to insert the value into
|
||||
* @param index index where the value should be inserted at (can be equal to list size)
|
||||
* @param value value to insert into the linked list
|
||||
*/
|
||||
void linked_list_insert(linked_list_t *list, size_t index, void *value);
|
||||
|
||||
/**
|
||||
* @brief Get the value in the linked list at the provided index.
|
||||
*
|
||||
* Return the value vstored in the linked list at the provided index. Does
|
||||
* nothing if "list" is NULL.
|
||||
*
|
||||
* @param list list to get the value from
|
||||
* @param index index of the value to return
|
||||
* @return value in the list at the provided index
|
||||
*/
|
||||
void *linked_list_get(linked_list_t *list, size_t index);
|
||||
|
||||
/**
|
||||
* @brief Get the first value that is matched by the provided function
|
||||
*
|
||||
* Return the first value that the function matches. The matches function
|
||||
* parameters are value from the linked list and the provided state.
|
||||
*
|
||||
* @param list list to get the value from
|
||||
* @param matches function to test the values with
|
||||
* @param usrptr user data to pass to the matches function
|
||||
* @return first value that matches otherwise NULL
|
||||
*/
|
||||
void *linked_list_get_first_matching(linked_list_t *list, bool (*matches)(void *item, void *usrptr), void *usrptr);
|
||||
|
||||
/**
|
||||
* @brief Get the last value that is matched by the provided function
|
||||
*
|
||||
* Return the last value that the function matches. The matches function
|
||||
* parameters are value from the linked list and the provided state.
|
||||
*
|
||||
* @param list list to get the value from
|
||||
* @param matches function to test the values with
|
||||
* @param usrptr user data to pass to the matches function
|
||||
* @return last value that matches otherwise NULL
|
||||
*/
|
||||
void *linked_list_get_last_matching(linked_list_t *list, bool (*matches)(void *item, void *usrptr), void *usrptr);
|
||||
|
||||
/**
|
||||
* @brief Remove the element at the provided index
|
||||
*
|
||||
* Removes the element of the linked list at the provided index.
|
||||
*
|
||||
* @param list linked list to remove the element from
|
||||
* @param index index of the element to remove
|
||||
* @return value of the element that was removed, NULL if list is NULL or
|
||||
* index is invalid
|
||||
*/
|
||||
void *linked_list_remove_at(linked_list_t *list, size_t index);
|
||||
|
||||
/**
|
||||
* @brief Remove the first element with the provided value
|
||||
*
|
||||
* Removes the first element with a value equal to the provided value.
|
||||
* Does nothing if "list" is NULL.
|
||||
*
|
||||
* @param list linked list to remove the element from
|
||||
* @param value value of the element to remove
|
||||
* @return value if a matching element was removed
|
||||
*/
|
||||
void *linked_list_remove_first(linked_list_t *list, void *value);
|
||||
|
||||
/**
|
||||
* @brief Remove the last element with the provided value
|
||||
*
|
||||
* Removes the last element with a value equal to the provided value.
|
||||
* Does nothing if "list" is NULL.
|
||||
*
|
||||
* @param list linked list to remove the element from
|
||||
* @param value value of the element to remove
|
||||
* @return value if a matching element was removed
|
||||
*/
|
||||
void *linked_list_remove_last(linked_list_t *list, void *value);
|
||||
|
||||
/**
|
||||
* @brief Remove all elements with the provided value
|
||||
*
|
||||
* Removes all elements with a value equal to the provided value.
|
||||
* Does nothing if "list" is NULL.
|
||||
*
|
||||
* @param list linked list to remove the elements from
|
||||
* @param value value of the elements to remove
|
||||
* @return value if any matching element(s) where removed
|
||||
*/
|
||||
void *linked_list_remove_all(linked_list_t *list, void *value);
|
||||
|
||||
/**
|
||||
* @brief Remove the first matching element
|
||||
*
|
||||
* Removes the first matching element from the linked list. The "matches" function
|
||||
* is used to test for matching element values. Does nothing if "list" is NULL.
|
||||
*
|
||||
* @param list linked list to remove the element from
|
||||
* @param matches function to use for testing element values for a match
|
||||
* @return value if a matching element was removed
|
||||
*/
|
||||
void *linked_list_remove_first_matching(linked_list_t *list, bool (*matches)(void *value));
|
||||
|
||||
/**
|
||||
* @brief Remove the last matching element
|
||||
*
|
||||
* Removes the last matching element from the linked list. The "matches" function
|
||||
* is used to test for matching element values.
|
||||
*
|
||||
* @param list linked list to remove the element from
|
||||
* @param matches function to use for testing element value for a match
|
||||
* @return value if a matching element was removed
|
||||
*/
|
||||
void *linked_list_remove_last_matching(linked_list_t *list, bool (*matches)(void *value));
|
||||
|
||||
/**
|
||||
* @brief Remove all matching elements
|
||||
*
|
||||
* Removes all matching elements from the linked list. The "matches" function
|
||||
* is used to test for matching element values. Does nothing if "list" is NULL.
|
||||
*
|
||||
* @param list linked list to remove the elements from
|
||||
* @param matches function to use for testing element values for a match
|
||||
*/
|
||||
void linked_list_remove_all_matching(linked_list_t *list, bool (*matches)(void *value));
|
||||
|
||||
/**
|
||||
* @brief Replace the value of the element at the provided index
|
||||
*
|
||||
* Replaces the value of the element at the provided index. The linked list must
|
||||
* contain an element at the index.
|
||||
*
|
||||
* @param list linked list to replace the value in
|
||||
* @param index index of the element to replace the value of
|
||||
* @param value new value for the selected element
|
||||
* @return whether an element was updated
|
||||
*/
|
||||
bool linked_list_set_at(linked_list_t *list, size_t index, void *value);
|
||||
|
||||
/**
|
||||
* @brief Get the size of the linked list
|
||||
*
|
||||
* Returns the number of elements in the linked list.
|
||||
*
|
||||
* @param linked list to get the size of
|
||||
* @return number of elements in the linked list, 0 if linked list is NULL
|
||||
*/
|
||||
size_t linked_list_size(linked_list_t *list);
|
||||
|
||||
/**
|
||||
* @brief Get an iterator for the linked list
|
||||
*
|
||||
* Returns a new iterator for the linked list. Can be either a forward or backward
|
||||
* iterator.
|
||||
*
|
||||
* @param list linked list to iterate over
|
||||
* @param forward true for a forward iterator, false for backwards
|
||||
* @return new iterator for the linked list in the specified direction, NULL if
|
||||
* "list" is NULL
|
||||
*/
|
||||
linked_list_iterator_t *linked_list_iterator(linked_list_t *list, bool forward);
|
||||
|
||||
/**
|
||||
* @brief Move to the next element in the linked list
|
||||
*
|
||||
* Moves the iterator to the next element in the linked list. The direction is
|
||||
* specified when retrieving a new iterator.
|
||||
*
|
||||
* @param iterator iterator for the current element
|
||||
* @return iterator for the next element, NULL if iterator is NULL or "iterator"
|
||||
* is at the last element
|
||||
*/
|
||||
linked_list_iterator_t *linked_list_iterator_next(linked_list_iterator_t *iterator);
|
||||
|
||||
/**
|
||||
* @brief Get the value of the element for the iterator
|
||||
*
|
||||
* Returns the value of the element that the iterator is at.
|
||||
*
|
||||
* @param iterator iterator for the current element
|
||||
* @return value of the element for the iterator
|
||||
*/
|
||||
void *linked_list_iterator_value(linked_list_iterator_t *iterator);
|
||||
|
||||
/**
|
||||
* @brief Remove the element that the iterator is at
|
||||
*
|
||||
* Removes the element that the iterator is at. The iterator is updated to the
|
||||
* next element.
|
||||
*
|
||||
* @param iterator iterator for the current element
|
||||
* @return updated iterator or NULL if the last element was removed
|
||||
*/
|
||||
linked_list_iterator_t *linked_list_iterator_remove(linked_list_iterator_t *iterator);
|
||||
|
||||
/**
|
||||
* @brief Release the memory for the iterator
|
||||
*
|
||||
* Frees the memory for the provided iterator. Does nothing if "iterator" is NULL.
|
||||
*
|
||||
* @param iterator iterator to free
|
||||
*/
|
||||
void linked_list_iterator_free(linked_list_iterator_t *iterator);
|
||||
|
||||
/**
|
||||
* @brief Apply the provided function to all values in the linked list
|
||||
*
|
||||
* Apply the provied function to all values in the linked list. The values are applied
|
||||
* in the forward direction. Does nothing if "list" is NULL.
|
||||
*
|
||||
* @param list linked list to apply the function to
|
||||
* @param fn function to apply to all elements
|
||||
*/
|
||||
void linked_list_foreach(linked_list_t *list, void (*fn)(size_t index, void *value));
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
242
src/minarch/libretro-common/include/lists/nested_list.h
Normal file
242
src/minarch/libretro-common/include/lists/nested_list.h
Normal file
|
|
@ -0,0 +1,242 @@
|
|||
/* Copyright (C) 2010-2020 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (nested_list.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_NESTED_LIST_H__
|
||||
#define __LIBRETRO_SDK_NESTED_LIST_H__
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include <boolean.h>
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
/* Prevent direct access to nested_list_* members */
|
||||
typedef struct nested_list_item nested_list_item_t;
|
||||
typedef struct nested_list nested_list_t;
|
||||
|
||||
/**************************************/
|
||||
/* Initialisation / De-Initialisation */
|
||||
/**************************************/
|
||||
|
||||
/**
|
||||
* nested_list_init:
|
||||
*
|
||||
* Creates a new empty nested list. Returned pointer
|
||||
* must be freed using nested_list_free.
|
||||
*
|
||||
* Returns: Valid nested_list_t pointer if successful,
|
||||
* otherwise NULL.
|
||||
*/
|
||||
nested_list_t *nested_list_init(void);
|
||||
|
||||
/**
|
||||
* nested_list_free:
|
||||
*
|
||||
* @list : pointer to nested_list_t object
|
||||
*
|
||||
* Frees specified nested list.
|
||||
*/
|
||||
void nested_list_free(nested_list_t *list);
|
||||
|
||||
/***********/
|
||||
/* Setters */
|
||||
/***********/
|
||||
|
||||
/**
|
||||
* nested_list_add_item:
|
||||
*
|
||||
* @list : pointer to nested_list_t object
|
||||
* @address : a delimited list of item identifiers,
|
||||
* corresponding to item 'levels'
|
||||
* @delim : delimiter to use when splitting @address
|
||||
* into individual ids
|
||||
* @value : optional value (user data) associated with
|
||||
* new list item. This is added to the last
|
||||
* item specified by @address
|
||||
*
|
||||
* Appends a new item to the specified nested list.
|
||||
* If @delim is NULL, item is added to the top level
|
||||
* list (@list itself) with id equal to @address.
|
||||
* Otherwise, @address is split by @delim and each
|
||||
* id is added as new 'layer'. For example:
|
||||
*
|
||||
* > @address = "one:two:three", @delim = ":" will
|
||||
* produce:
|
||||
* top_level_list:one
|
||||
* `- "one" list:two
|
||||
* `- "two" list:three
|
||||
* where @value is assigned to the "two" list:three
|
||||
* item.
|
||||
*
|
||||
* Returns: true if successful, otherwise false. Will
|
||||
* always return false if item specified by @address
|
||||
* already exists in the nested list.
|
||||
*/
|
||||
bool nested_list_add_item(nested_list_t *list,
|
||||
const char *address, const char *delim, const void *value);
|
||||
|
||||
/***********/
|
||||
/* Getters */
|
||||
/***********/
|
||||
|
||||
/**
|
||||
* nested_list_get_size:
|
||||
*
|
||||
* @list : pointer to nested_list_t object
|
||||
*
|
||||
* Fetches the current size (number of items) in
|
||||
* the specified list.
|
||||
*
|
||||
* Returns: list size.
|
||||
*/
|
||||
size_t nested_list_get_size(nested_list_t *list);
|
||||
|
||||
/**
|
||||
* nested_list_get_item:
|
||||
*
|
||||
* @list : pointer to nested_list_t object
|
||||
* @address : a delimited list of item identifiers,
|
||||
* corresponding to item 'levels'
|
||||
* @delim : delimiter to use when splitting @address
|
||||
* into individual ids
|
||||
*
|
||||
* Searches for (and returns) the list item corresponding
|
||||
* to @address. If @delim is NULL, the top level list
|
||||
* (@list itself) is searched for an item with an id
|
||||
* equal to @address. Otherwise, @address is split by
|
||||
* @delim and each id is searched for in a subsequent
|
||||
* list level.
|
||||
*
|
||||
* Returns: valid nested_list_item_t pointer if item
|
||||
* is found, otherwise NULL.
|
||||
*/
|
||||
nested_list_item_t *nested_list_get_item(nested_list_t *list,
|
||||
const char *address, const char *delim);
|
||||
|
||||
/**
|
||||
* nested_list_get_item_idx:
|
||||
*
|
||||
* @list : pointer to nested_list_t object
|
||||
* @idx : item index
|
||||
*
|
||||
* Fetches the item corresponding to index @idx in
|
||||
* the top level list (@list itself) of the specified
|
||||
* nested list.
|
||||
*
|
||||
* Returns: valid nested_list_item_t pointer if item
|
||||
* exists, otherwise NULL.
|
||||
*/
|
||||
nested_list_item_t *nested_list_get_item_idx(nested_list_t *list,
|
||||
size_t idx);
|
||||
|
||||
/**
|
||||
* nested_list_item_get_parent:
|
||||
*
|
||||
* @list_item : pointer to nested_list_item_t object
|
||||
*
|
||||
* Fetches the parent item of the specified nested
|
||||
* list item. If returned value is NULL, specified
|
||||
* nested list item belongs to a top level list.
|
||||
*
|
||||
* Returns: valid nested_list_item_t pointer if item
|
||||
* has a parent, otherwise NULL.
|
||||
*/
|
||||
nested_list_item_t *nested_list_item_get_parent(nested_list_item_t *list_item);
|
||||
|
||||
/**
|
||||
* nested_list_item_get_parent_list:
|
||||
*
|
||||
* @list_item : pointer to nested_list_item_t object
|
||||
*
|
||||
* Fetches a pointer to the nested list of which the
|
||||
* specified list item is a direct member.
|
||||
*
|
||||
* Returns: valid nested_list_t pointer if successful,
|
||||
* otherwise NULL.
|
||||
*/
|
||||
nested_list_t *nested_list_item_get_parent_list(nested_list_item_t *list_item);
|
||||
|
||||
/**
|
||||
* nested_list_item_get_children:
|
||||
*
|
||||
* @list_item : pointer to nested_list_item_t object
|
||||
*
|
||||
* Fetches a pointer to the nested list of child items
|
||||
* belonging to the specified list item.
|
||||
*
|
||||
* Returns: valid nested_list_t pointer if item has
|
||||
* children, otherwise NULL.
|
||||
*/
|
||||
nested_list_t *nested_list_item_get_children(nested_list_item_t *list_item);
|
||||
|
||||
/**
|
||||
* nested_list_item_get_id:
|
||||
*
|
||||
* @list_item : pointer to nested_list_item_t object
|
||||
*
|
||||
* Fetches the id string of the specified list item,
|
||||
* as set by nested_list_add_item().
|
||||
*
|
||||
* Returns: item id if successful, otherwise NULL.
|
||||
*/
|
||||
const char *nested_list_item_get_id(nested_list_item_t *list_item);
|
||||
|
||||
/**
|
||||
* nested_list_item_get_address:
|
||||
*
|
||||
* @list_item : pointer to nested_list_item_t object
|
||||
* @delim : delimiter to use when concatenating
|
||||
* individual item ids into a an @address
|
||||
* string
|
||||
* @address : a delimited list of item identifiers,
|
||||
* corresponding to item 'levels'
|
||||
* @len : length of supplied @address char array
|
||||
|
||||
* Fetches a compound @address string corresponding to
|
||||
* the specified item's 'position' in the top level
|
||||
* nested list of which it is a member. The resultant
|
||||
* @address may be used to find the item when calling
|
||||
* nested_list_get_item() on the top level nested list.
|
||||
*
|
||||
* Returns: true if successful, otherwise false.
|
||||
*/
|
||||
bool nested_list_item_get_address(nested_list_item_t *list_item,
|
||||
const char *delim, char *address, size_t len);
|
||||
|
||||
/**
|
||||
* nested_list_item_get_value:
|
||||
*
|
||||
* @list_item : pointer to nested_list_item_t object
|
||||
*
|
||||
* Fetches the value (user data) associated with the
|
||||
* specified list item.
|
||||
*
|
||||
* Returns: pointer to user data if set, otherwise
|
||||
* NULL.
|
||||
*/
|
||||
const void *nested_list_item_get_value(nested_list_item_t *list_item);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue