mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 18:32:44 +00:00
Move gl_capabilities to libretro-common
This commit is contained in:
parent
09067e67c3
commit
213e357918
@ -720,7 +720,7 @@ endif
|
||||
ifeq ($(HAVE_GL_CONTEXT), 1)
|
||||
DEFINES += -DHAVE_OPENGL -DHAVE_GLSL
|
||||
OBJ += gfx/drivers/gl.o \
|
||||
gfx/drivers/gl_capabilities.o \
|
||||
$(LIBRETRO_COMM_DIR)/gfx/gl_capabilities.o \
|
||||
gfx/drivers/gl_renderchains/render_chain_gl_legacy.o \
|
||||
gfx/common/gl_common.o \
|
||||
gfx/drivers_font/gl_raster_font.o \
|
||||
|
@ -37,7 +37,8 @@
|
||||
#include <string/stdstring.h>
|
||||
#include <libretro.h>
|
||||
|
||||
#include "gl_capabilities.h"
|
||||
#include <gfx/gl_capabilities.h>
|
||||
|
||||
#include "gl_renderchains/render_chain_gl.h"
|
||||
|
||||
#include "../../configuration.h"
|
||||
|
@ -1,59 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2016 - Daniel De Matteis
|
||||
* Copyright (C) 2012-2015 - Michael Lelli
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _GL_CAPABILITIES_H
|
||||
#define _GL_CAPABILITIES_H
|
||||
|
||||
#include <boolean.h>
|
||||
#include <retro_common_api.h>
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
bool gl_check_error(char **error_string);
|
||||
|
||||
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_check_capability(enum gl_capability_enum enum_idx);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
@ -37,7 +37,7 @@
|
||||
#include <string/stdstring.h>
|
||||
#include <libretro.h>
|
||||
|
||||
#include "../gl_capabilities.h"
|
||||
#include <gfx/gl_capabilities.h>
|
||||
|
||||
#include "../../../driver.h"
|
||||
#include "../../../configuration.h"
|
||||
|
@ -1,18 +1,23 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2016 - Daniel De Matteis
|
||||
* Copyright (C) 2012-2015 - Michael Lelli
|
||||
/* Copyright (C) 2010-2016 The RetroArch team
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (gl_capabilities.c).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
* 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:
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
@ -24,10 +29,10 @@
|
||||
|
||||
#include <glsym/glsym.h>
|
||||
|
||||
#include "gl_capabilities.h"
|
||||
#include <gfx/gl_capabilities.h>
|
||||
|
||||
#ifdef RARCH_INTERNAL
|
||||
#include "../video_driver.h"
|
||||
#include "../../gfx/video_driver.h"
|
||||
#endif
|
||||
|
||||
static bool gl_core_context = false;
|
64
libretro-common/include/gfx/gl_capabilities.h
Normal file
64
libretro-common/include/gfx/gl_capabilities.h
Normal file
@ -0,0 +1,64 @@
|
||||
/* Copyright (C) 2010-2016 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>
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
bool gl_check_error(char **error_string);
|
||||
|
||||
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_check_capability(enum gl_capability_enum enum_idx);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user