2023-03-25 09:11:09 +01:00
|
|
|
// Copyright (C) 2023 Vitaliy Lobachevskiy
|
|
|
|
// Copyright (C) 2015 Patryk Nadrowski
|
|
|
|
// This file is part of the "Irrlicht Engine".
|
|
|
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2024-02-16 23:24:53 +01:00
|
|
|
#include "irrTypes.h"
|
|
|
|
// even though we have mt_opengl.h our driver code still uses GL_* constants
|
2024-02-17 00:14:01 +01:00
|
|
|
#if defined(_IRR_COMPILE_WITH_SDL_DEVICE_)
|
2024-03-20 19:35:52 +01:00
|
|
|
#include <SDL_video.h>
|
|
|
|
#include <SDL_opengl.h>
|
2024-02-16 23:24:53 +01:00
|
|
|
#else
|
2024-03-20 19:35:52 +01:00
|
|
|
#include "vendor/gl.h"
|
2024-02-16 23:24:53 +01:00
|
|
|
#endif
|
2023-03-25 09:11:09 +01:00
|
|
|
|
|
|
|
namespace irr
|
|
|
|
{
|
|
|
|
namespace video
|
|
|
|
{
|
|
|
|
|
2024-03-20 19:35:52 +01:00
|
|
|
// Forward declarations.
|
2023-03-25 09:11:09 +01:00
|
|
|
|
2024-03-20 19:35:52 +01:00
|
|
|
class COpenGLCoreFeature;
|
2023-03-25 09:11:09 +01:00
|
|
|
|
2024-03-20 19:35:52 +01:00
|
|
|
template <class TOpenGLDriver>
|
|
|
|
class COpenGLCoreTexture;
|
2023-03-25 09:11:09 +01:00
|
|
|
|
2024-03-20 19:35:52 +01:00
|
|
|
template <class TOpenGLDriver, class TOpenGLTexture>
|
|
|
|
class COpenGLCoreRenderTarget;
|
2023-03-25 09:11:09 +01:00
|
|
|
|
2024-03-20 19:35:52 +01:00
|
|
|
template <class TOpenGLDriver, class TOpenGLTexture>
|
|
|
|
class COpenGLCoreCacheHandler;
|
2023-03-25 09:11:09 +01:00
|
|
|
|
2024-03-20 19:35:52 +01:00
|
|
|
class COpenGL3DriverBase;
|
|
|
|
typedef COpenGLCoreTexture<COpenGL3DriverBase> COpenGL3Texture;
|
|
|
|
typedef COpenGLCoreRenderTarget<COpenGL3DriverBase, COpenGL3Texture> COpenGL3RenderTarget;
|
|
|
|
typedef COpenGLCoreCacheHandler<COpenGL3DriverBase, COpenGL3Texture> COpenGL3CacheHandler;
|
2023-03-25 09:11:09 +01:00
|
|
|
|
2024-03-20 19:35:52 +01:00
|
|
|
enum class OpenGLSpec : u8
|
|
|
|
{
|
|
|
|
Core,
|
|
|
|
Compat,
|
|
|
|
ES,
|
|
|
|
// WebGL, // TODO
|
|
|
|
};
|
2023-04-15 15:52:15 +02:00
|
|
|
|
2024-03-20 19:35:52 +01:00
|
|
|
struct OpenGLVersion
|
|
|
|
{
|
|
|
|
OpenGLSpec Spec;
|
|
|
|
u8 Major;
|
|
|
|
u8 Minor;
|
|
|
|
u8 Release;
|
|
|
|
};
|
2023-04-15 15:52:15 +02:00
|
|
|
|
2023-03-25 09:11:09 +01:00
|
|
|
}
|
|
|
|
}
|