godot/drivers/gles3/rasterizer_gles3.cpp

/**************************************************************************/
/*  rasterizer_gles3.cpp                                                  */
/**************************************************************************/
/*                         This file is part of:                          */
/*                             GODOT ENGINE                               */
/*                        https://godotengine.org                         */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
/*                                                                        */
/* 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.                 */
/**************************************************************************/

#include "rasterizer_gles3.h"
#include "storage/utilities.h"

#ifdef GLES3_ENABLED

#include "core/config/project_settings.h"
#include "core/io/dir_access.h"
#include "core/io/image.h"
#include "core/os/os.h"
#include "storage/texture_storage.h"

#define _EXT_DEBUG_OUTPUT_SYNCHRONOUS_ARB
#define _EXT_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB
#define _EXT_DEBUG_CALLBACK_FUNCTION_ARB
#define _EXT_DEBUG_CALLBACK_USER_PARAM_ARB
#define _EXT_DEBUG_SOURCE_API_ARB
#define _EXT_DEBUG_SOURCE_WINDOW_SYSTEM_ARB
#define _EXT_DEBUG_SOURCE_SHADER_COMPILER_ARB
#define _EXT_DEBUG_SOURCE_THIRD_PARTY_ARB
#define _EXT_DEBUG_SOURCE_APPLICATION_ARB
#define _EXT_DEBUG_SOURCE_OTHER_ARB
#define _EXT_DEBUG_TYPE_ERROR_ARB
#define _EXT_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB
#define _EXT_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB
#define _EXT_DEBUG_TYPE_PORTABILITY_ARB
#define _EXT_DEBUG_TYPE_PERFORMANCE_ARB
#define _EXT_DEBUG_TYPE_OTHER_ARB
#define _EXT_MAX_DEBUG_MESSAGE_LENGTH_ARB
#define _EXT_MAX_DEBUG_LOGGED_MESSAGES_ARB
#define _EXT_DEBUG_LOGGED_MESSAGES_ARB
#define _EXT_DEBUG_SEVERITY_HIGH_ARB
#define _EXT_DEBUG_SEVERITY_MEDIUM_ARB
#define _EXT_DEBUG_SEVERITY_LOW_ARB
#define _EXT_DEBUG_OUTPUT

#ifndef GL_FRAMEBUFFER_SRGB
#define GL_FRAMEBUFFER_SRGB
#endif

#ifndef GLAPIENTRY
#if defined(WINDOWS_ENABLED)
#define GLAPIENTRY
#else
#define GLAPIENTRY
#endif
#endif

#if !defined(IOS_ENABLED) && !defined(WEB_ENABLED)
// We include EGL below to get debug callback on GLES2 platforms,
// but EGL is not available on iOS or the web.
#define CAN_DEBUG
#endif

#include "platform_gl.h"

#if defined(MINGW_ENABLED) || defined(_MSC_VER)
#define strcpy
#endif

#ifdef WINDOWS_ENABLED
bool RasterizerGLES3::screen_flipped_y = false;
#endif

bool RasterizerGLES3::gles_over_gl =;

void RasterizerGLES3::begin_frame(double frame_step) {}

void RasterizerGLES3::end_frame(bool p_swap_buffers) {}

void RasterizerGLES3::gl_end_frame(bool p_swap_buffers) {}

void RasterizerGLES3::clear_depth(float p_depth) {}

#ifdef CAN_DEBUG
static void GLAPIENTRY _gl_debug_print(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const GLvoid *userParam) {}
#endif

DEBUGPROCARB;

DebugMessageCallbackARB;

void RasterizerGLES3::initialize() {}

void RasterizerGLES3::finalize() {}

RasterizerGLES3 *RasterizerGLES3::singleton =;

#ifdef EGL_ENABLED
void *_egl_load_function_wrapper(const char *p_name) {}
#endif

RasterizerGLES3::RasterizerGLES3() {}

RasterizerGLES3::~RasterizerGLES3() {}

void RasterizerGLES3::_blit_render_target_to_screen(RID p_render_target, DisplayServer::WindowID p_screen, const Rect2 &p_screen_rect, uint32_t p_layer, bool p_first) {}

// is this p_screen useless in a multi window environment?
void RasterizerGLES3::blit_render_targets_to_screen(DisplayServer::WindowID p_screen, const BlitToScreen *p_render_targets, int p_amount) {}

void RasterizerGLES3::set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale, bool p_use_filter) {}

#endif // GLES3_ENABLED