mirror of https://github.com/mosra/magnum.git
209 changed files with 17190 additions and 3892 deletions
@ -1,55 +0,0 @@
|
||||
/*
|
||||
This file is part of Magnum. |
||||
|
||||
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, |
||||
2020, 2021, 2022 Vladimír Vondruš <mosra@centrum.cz> |
||||
|
||||
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 <Corrade/Utility/Arguments.h> |
||||
|
||||
#include "Magnum/Platform/WindowlessWindowsEglApplication.h" |
||||
|
||||
namespace Magnum { namespace Platform { namespace Test { namespace { |
||||
|
||||
struct WindowlessWindowsEglApplicationTest: Platform::WindowlessApplication { |
||||
explicit WindowlessWindowsEglApplicationTest(const Arguments& arguments); |
||||
int exec() override { return 0; } |
||||
}; |
||||
|
||||
WindowlessWindowsEglApplicationTest::WindowlessWindowsEglApplicationTest(const Arguments& arguments): Platform::WindowlessApplication{arguments, NoCreate} { |
||||
Utility::Arguments args; |
||||
args.addSkippedPrefix("magnum", "engine-specific options") |
||||
.addBooleanOption("quiet").setHelp("quiet", "like --magnum-log quiet, but specified via a Context::Configuration instead") |
||||
.addBooleanOption("gpu-validation").setHelp("gpu-validation", "like --magnum-gpu-validation, but specified via a Context::Configuration instead") |
||||
.parse(arguments.argc, arguments.argv); |
||||
|
||||
Configuration conf; |
||||
if(args.isSet("quiet")) |
||||
conf.addFlags(Configuration::Flag::QuietLog); |
||||
/* No verbose logs in this app */ |
||||
if(args.isSet("gpu-validation")) |
||||
conf.addFlags(Configuration::Flag::GpuValidation); |
||||
createContext(conf); |
||||
} |
||||
|
||||
}}}} |
||||
|
||||
MAGNUM_WINDOWLESSAPPLICATION_MAIN(Magnum::Platform::Test::WindowlessWindowsEglApplicationTest) |
||||
@ -1,238 +0,0 @@
|
||||
/*
|
||||
This file is part of Magnum. |
||||
|
||||
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, |
||||
2020, 2021, 2022 Vladimír Vondruš <mosra@centrum.cz> |
||||
|
||||
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 "WindowlessWindowsEglApplication.h" |
||||
|
||||
#include <Corrade/Utility/Assert.h> |
||||
#include <Corrade/Utility/Debug.h> |
||||
|
||||
#include "Magnum/GL/Version.h" |
||||
|
||||
#include "Implementation/Egl.h" |
||||
|
||||
#ifndef EGL_KHR_create_context_no_error |
||||
#define EGL_CONTEXT_OPENGL_NO_ERROR_KHR 0x31B3 |
||||
#endif |
||||
|
||||
namespace Magnum { namespace Platform { |
||||
|
||||
WindowlessWindowsEglContext::WindowlessWindowsEglContext(const Configuration& configuration, GLContext* const magnumContext) { |
||||
/** @todo device selection and skipping of eglInitialize()/Terminate() the
|
||||
same way as with WindowlessEglContext */ |
||||
|
||||
/* Register the window class (if not yet done) */ |
||||
WNDCLASSW wc; |
||||
if(!GetClassInfoW(GetModuleHandleW(nullptr), L"Magnum Windowless Application", &wc)) { |
||||
wc = WNDCLASSW{ |
||||
0, |
||||
DefWindowProcW, |
||||
0, |
||||
0, |
||||
GetModuleHandleW(nullptr), |
||||
nullptr, |
||||
nullptr, |
||||
HBRUSH(COLOR_BACKGROUND), |
||||
nullptr, |
||||
L"Magnum Windowless Application" |
||||
}; |
||||
|
||||
if(!RegisterClassW(&wc)) { |
||||
Error() << "Platform::WindowlessWglContext: cannot create window class:" << GetLastError(); |
||||
return; |
||||
} |
||||
} |
||||
|
||||
/* Create the window */ |
||||
_window = CreateWindowW(wc.lpszClassName, L"Magnum Windowless Application", |
||||
WS_OVERLAPPEDWINDOW, 0, 0, 32, 32, 0, 0, wc.hInstance, 0); |
||||
|
||||
/* Initialize */ |
||||
_display = eglGetDisplay(GetDC(_window)); |
||||
if(!eglInitialize(_display, nullptr, nullptr)) { |
||||
Error() << "Platform::WindowlessWindowsEglApplication::tryCreateContext(): cannot initialize EGL:" << Implementation::eglErrorString(eglGetError()); |
||||
return; |
||||
} |
||||
|
||||
const EGLenum api = |
||||
#ifndef MAGNUM_TARGET_GLES |
||||
EGL_OPENGL_API |
||||
#else |
||||
EGL_OPENGL_ES_API |
||||
#endif |
||||
; |
||||
if(!eglBindAPI(api)) { |
||||
Error() << "Platform::WindowlessWindowsEglApplication::tryCreateContext(): cannot bind EGL API:" << Implementation::eglErrorString(eglGetError()); |
||||
return; |
||||
} |
||||
|
||||
/* Choose EGL config */ |
||||
static const EGLint attribs[] = { |
||||
EGL_RED_SIZE, 1, |
||||
EGL_GREEN_SIZE, 1, |
||||
EGL_BLUE_SIZE, 1, |
||||
EGL_DEPTH_SIZE, 1, |
||||
#ifndef MAGNUM_TARGET_GLES |
||||
EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT, |
||||
#elif defined(MAGNUM_TARGET_GLES3) |
||||
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES3_BIT, |
||||
#elif defined(MAGNUM_TARGET_GLES2) |
||||
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, |
||||
#else |
||||
#error unsupported OpenGL edition |
||||
#endif |
||||
EGL_NONE |
||||
}; |
||||
EGLint configCount; |
||||
EGLConfig config; |
||||
if(!eglChooseConfig(_display, attribs, &config, 1, &configCount)) { |
||||
Error() << "Platform::WindowlessWindowsEglApplication::tryCreateContext(): cannot get EGL visual config:" << Implementation::eglErrorString(eglGetError()); |
||||
return; |
||||
} |
||||
|
||||
if(!configCount) { |
||||
Error() << "Platform::WindowlessWindowsEglApplication::tryCreateContext(): no matching EGL visual config available"; |
||||
return; |
||||
} |
||||
|
||||
/* Request debug context if GpuValidation is enabled either via the
|
||||
configuration or via command-line */ |
||||
Configuration::Flags flags = configuration.flags(); |
||||
if((flags & Configuration::Flag::GpuValidation) || (magnumContext && magnumContext->configurationFlags() & GL::Context::Configuration::Flag::GpuValidation)) |
||||
flags |= Configuration::Flag::Debug; |
||||
else if((flags & Configuration::Flag::GpuValidationNoError) || (magnumContext && magnumContext->configurationFlags() & GL::Context::Configuration::Flag::GpuValidationNoError)) |
||||
flags |= Configuration::Flag::NoError; |
||||
|
||||
/** @todo needs a growable DynamicArray with disabled alloc or somesuch */ |
||||
EGLint attributes[7] = { |
||||
#ifdef MAGNUM_TARGET_GLES |
||||
EGL_CONTEXT_CLIENT_VERSION, |
||||
#ifdef MAGNUM_TARGET_GLES3 |
||||
3, |
||||
#elif defined(MAGNUM_TARGET_GLES2) |
||||
2, |
||||
#else |
||||
#error unsupported OpenGL ES version |
||||
#endif |
||||
#endif |
||||
/* Mask out the upper 32bits used for other flags */ |
||||
EGL_CONTEXT_FLAGS_KHR, EGLint(UnsignedLong(flags) & 0xffffffffu), |
||||
|
||||
/* The rest is added optionally */ |
||||
EGL_NONE, EGL_NONE, /* EGL_CONTEXT_OPENGL_NO_ERROR_KHR */ |
||||
EGL_NONE |
||||
}; |
||||
|
||||
std::size_t nextAttribute = 4; |
||||
CORRADE_INTERNAL_ASSERT(attributes[nextAttribute] == EGL_NONE); |
||||
|
||||
if(flags & Configuration::Flag::NoError) { |
||||
attributes[nextAttribute++] = EGL_CONTEXT_OPENGL_NO_ERROR_KHR; |
||||
attributes[nextAttribute++] = true; |
||||
} |
||||
|
||||
CORRADE_INTERNAL_ASSERT(nextAttribute < Containers::arraySize(attributes)); |
||||
|
||||
if(!(_context = eglCreateContext(_display, config, configuration.sharedContext(), attributes))) { |
||||
Error() << "Platform::WindowlessWindowsEglContext: cannot create EGL context:" << Implementation::eglErrorString(eglGetError()); |
||||
return; |
||||
} |
||||
|
||||
if(!(_surface = eglCreateWindowSurface(_display, config, _window, nullptr))) |
||||
Error() << "Platform::WindowlessWindowsEglContext: cannot create window surface:" << Implementation::eglErrorString(eglGetError()); |
||||
} |
||||
|
||||
WindowlessWindowsEglContext::WindowlessWindowsEglContext(WindowlessWindowsEglContext&& other) noexcept: _window{other._window}, _display{other._display}, _surface{other._surface}, _context{other._context} { |
||||
other._window = {}; |
||||
other._display = {}; |
||||
other._surface = {}; |
||||
other._context = {}; |
||||
} |
||||
|
||||
WindowlessWindowsEglContext::~WindowlessWindowsEglContext() { |
||||
if(_context) eglDestroyContext(_display, _context); |
||||
if(_surface) eglDestroySurface(_display, _surface); |
||||
if(_display) eglTerminate(_display); |
||||
if(_window) DestroyWindow(_window); |
||||
} |
||||
|
||||
WindowlessWindowsEglContext& WindowlessWindowsEglContext::operator=(WindowlessWindowsEglContext&& other) noexcept { |
||||
using std::swap; |
||||
swap(other._window, _window); |
||||
swap(other._display, _display); |
||||
swap(other._surface, _surface); |
||||
swap(other._context, _context); |
||||
return *this; |
||||
} |
||||
|
||||
bool WindowlessWindowsEglContext::makeCurrent() { |
||||
if(eglMakeCurrent(_display, _surface, _surface, _context)) |
||||
return true; |
||||
|
||||
Error() << "Platform::WindowlessWindowsEglContext::makeCurrent(): cannot make context current:" << GetLastError(); |
||||
return false; |
||||
} |
||||
|
||||
bool WindowlessWindowsEglContext::release() { |
||||
if(eglMakeCurrent(_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT)) |
||||
return true; |
||||
|
||||
Error() << "Platform::WindowlessWindowsEglApplication::release(): cannot release current context:" << GetLastError(); |
||||
return false; |
||||
} |
||||
|
||||
WindowlessWindowsEglContext::Configuration::Configuration() { |
||||
GL::Context::Configuration::addFlags(GL::Context::Configuration::Flag::Windowless); |
||||
} |
||||
|
||||
#ifndef DOXYGEN_GENERATING_OUTPUT |
||||
WindowlessWindowsEglApplication::WindowlessWindowsEglApplication(const Arguments& arguments): WindowlessWindowsEglApplication{arguments, Configuration{}} {} |
||||
#endif |
||||
|
||||
WindowlessWindowsEglApplication::WindowlessWindowsEglApplication(const Arguments& arguments, const Configuration& configuration): WindowlessWindowsEglApplication{arguments, NoCreate} { |
||||
createContext(configuration); |
||||
} |
||||
|
||||
WindowlessWindowsEglApplication::WindowlessWindowsEglApplication(const Arguments& arguments, NoCreateT): _glContext{NoCreate}, _context{NoCreate, arguments.argc, arguments.argv} {} |
||||
|
||||
void WindowlessWindowsEglApplication::createContext() { createContext({}); } |
||||
|
||||
void WindowlessWindowsEglApplication::createContext(const Configuration& configuration) { |
||||
if(!tryCreateContext(configuration)) std::exit(1); |
||||
} |
||||
|
||||
bool WindowlessWindowsEglApplication::tryCreateContext(const Configuration& configuration) { |
||||
CORRADE_ASSERT(_context.version() == Version::None, "Platform::WindowlessWindowsEglApplication::tryCreateContext(): context already created", false); |
||||
|
||||
WindowlessWindowsEglContext glContext{configuration, &_context}; |
||||
if(!glContext.isCreated() || !glContext.makeCurrent() || !_context.tryCreate(configuration)) |
||||
return false; |
||||
|
||||
_glContext = std::move(glContext); |
||||
return true; |
||||
} |
||||
|
||||
WindowlessWindowsEglApplication::~WindowlessWindowsEglApplication() = default; |
||||
|
||||
}} |
||||
@ -1,538 +0,0 @@
|
||||
#ifndef Magnum_Platform_WindowlessWindowsEglApplication_h |
||||
#define Magnum_Platform_WindowlessWindowsEglApplication_h |
||||
/*
|
||||
This file is part of Magnum. |
||||
|
||||
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, |
||||
2020, 2021, 2022 Vladimír Vondruš <mosra@centrum.cz> |
||||
|
||||
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. |
||||
*/ |
||||
|
||||
/** @file
|
||||
* @brief Class @ref Magnum::Platform::WindowlessWindowsEglApplication, @ref Magnum::Platform::WindowlessWindowsEglContext, macro @ref MAGNUM_WINDOWLESSWINDOWSEGLAPPLICATION_MAIN() |
||||
*/ |
||||
|
||||
#include "Magnum/configure.h" |
||||
|
||||
#ifdef MAGNUM_TARGET_GL |
||||
#ifndef DOXYGEN_GENERATING_OUTPUT |
||||
#define WIN32_LEAN_AND_MEAN 1 |
||||
#define VC_EXTRALEAN |
||||
#endif |
||||
#include <windows.h> |
||||
#include <EGL/egl.h> |
||||
#include <EGL/eglext.h> |
||||
#include <Corrade/Containers/EnumSet.h> |
||||
|
||||
#include "Magnum/Magnum.h" |
||||
#include "Magnum/Tags.h" |
||||
#include "Magnum/Platform/GLContext.h" |
||||
|
||||
namespace Magnum { namespace Platform { |
||||
|
||||
/**
|
||||
@brief Windowless Windows/EGL context |
||||
|
||||
@m_keywords{WindowlessGLContext EGL} |
||||
|
||||
GL context using pure WINAPI and EGL, used in @ref WindowlessWindowsEglApplication. |
||||
|
||||
Meant to be used when there is a need to manage (multiple) GL contexts |
||||
manually. See @ref platform-windowless-contexts for more information. If no |
||||
other application header is included, this class is also aliased to |
||||
@cpp Platform::WindowlessGLContext @ce. |
||||
|
||||
@note This class is available only if Magnum is compiled with |
||||
@ref MAGNUM_TARGET_GL enabled (done by default). See @ref building-features |
||||
for more information. |
||||
*/ |
||||
class WindowlessWindowsEglContext { |
||||
public: |
||||
class Configuration; |
||||
|
||||
/**
|
||||
* @brief Constructor |
||||
* @param configuration Context configuration |
||||
* @param context Optional Magnum context instance constructed |
||||
* using @ref NoCreate to manage driver workarounds |
||||
* |
||||
* Once the context is created, make it current using |
||||
* @ref makeCurrent() and create @ref Platform::GLContext instance to |
||||
* be able to use Magnum. |
||||
* @see @ref isCreated() |
||||
*/ |
||||
explicit WindowlessWindowsEglContext(const Configuration& configuration, GLContext* context = nullptr); |
||||
|
||||
/**
|
||||
* @brief Construct without creating the context |
||||
* |
||||
* Move a instance with created context over to make it usable. |
||||
*/ |
||||
explicit WindowlessWindowsEglContext(NoCreateT) {} |
||||
|
||||
/** @brief Copying is not allowed */ |
||||
WindowlessWindowsEglContext(const WindowlessWindowsEglContext&) = delete; |
||||
|
||||
/** @brief Move constructor */ |
||||
WindowlessWindowsEglContext(WindowlessWindowsEglContext&& other) noexcept; |
||||
|
||||
/** @brief Copying is not allowed */ |
||||
WindowlessWindowsEglContext& operator=(const WindowlessWindowsEglContext&) = delete; |
||||
|
||||
/** @brief Move assignment */ |
||||
WindowlessWindowsEglContext& operator=(WindowlessWindowsEglContext&& other) noexcept; |
||||
|
||||
/**
|
||||
* @brief Destructor |
||||
* |
||||
* Destroys the context, if any. |
||||
*/ |
||||
~WindowlessWindowsEglContext(); |
||||
|
||||
/** @brief Whether the context is created */ |
||||
bool isCreated() const { return _context; } |
||||
|
||||
/**
|
||||
* @brief Make the context current |
||||
* |
||||
* Prints error message and returns @cpp false @ce on failure, |
||||
* otherwise returns @cpp true @ce. If the context is current on |
||||
* another thread, you have to @ref release() it there first --- an |
||||
* OpenGL context can't be current in multiple threads at the same |
||||
* time. |
||||
*/ |
||||
bool makeCurrent(); |
||||
|
||||
/**
|
||||
* @brief Release current context |
||||
* @m_since_latest |
||||
* |
||||
* Releases a context previously made current using @ref makeCurrent(). |
||||
* Prints error message and returns @cpp false @ce on failure, |
||||
* otherwise returns @cpp true @ce. |
||||
*/ |
||||
bool release(); |
||||
|
||||
/**
|
||||
* @brief Underlying OpenGL context |
||||
* @m_since{2020,06} |
||||
* |
||||
* Use in case you need to call EGL functionality directly or in order |
||||
* to create a shared context. Returns @cpp nullptr @ce in case the |
||||
* context was not created yet. |
||||
* @see @ref Configuration::setSharedContext() |
||||
*/ |
||||
EGLContext glContext() { return _context; } |
||||
|
||||
private: |
||||
HWND _window{}; |
||||
EGLDisplay _display{}; |
||||
EGLSurface _surface{}; |
||||
EGLContext _context{}; |
||||
}; |
||||
|
||||
/**
|
||||
@brief Configuration |
||||
|
||||
@see @ref WindowlessWindowsEglContext(), |
||||
@ref WindowlessWindowsEglApplication::WindowlessWindowsEglApplication(), |
||||
@ref WindowlessWindowsEglApplication::createContext(), |
||||
@ref WindowlessWindowsEglApplication::tryCreateContext() |
||||
*/ |
||||
class WindowlessWindowsEglContext::Configuration: public GL::Context::Configuration { |
||||
public: |
||||
/**
|
||||
* @brief Context flag |
||||
* |
||||
* Includes also everything from @ref GL::Context::Configuration::Flag |
||||
* except for @relativeref{GL::Context::Configuration,Flag::Windowless}, |
||||
* which is enabled implicitly by default. |
||||
* @see @ref Flags, @ref setFlags(), @ref GL::Context::Flag |
||||
*/ |
||||
enum class Flag: UnsignedLong { |
||||
/**
|
||||
* Debug context. Enabled automatically if supported by the driver |
||||
* and the @ref Flag::GpuValidation flag is set or if the |
||||
* `--magnum-gpu-validation` @ref GL-Context-usage-command-line "command-line option" |
||||
* is set to `on`. |
||||
*/ |
||||
Debug = EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR, |
||||
|
||||
/**
|
||||
* Context without error reporting. Might result in better |
||||
* performance, but situations that would have generated errors |
||||
* instead cause undefined behavior. Enabled automatically if |
||||
* supported by the driver and the @ref Flag::GpuValidationNoError |
||||
* flag is set or if the `--magnum-gpu-validation` @ref GL-Context-usage-command-line "command-line option" |
||||
* is set to `no-error`. |
||||
* @m_since_latest |
||||
*/ |
||||
/* Treated as a separate attribute and not a flag in EGL, thus
|
||||
handling manually. */ |
||||
NoError = 1ull << 32, |
||||
|
||||
/**
|
||||
* @copydoc GL::Context::Configuration::Flag::QuietLog |
||||
* @m_since_latest |
||||
*/ |
||||
QuietLog = UnsignedLong(GL::Context::Configuration::Flag::QuietLog), |
||||
|
||||
/**
|
||||
* @copydoc GL::Context::Configuration::Flag::VerboseLog |
||||
* @m_since_latest |
||||
*/ |
||||
VerboseLog = UnsignedLong(GL::Context::Configuration::Flag::VerboseLog), |
||||
|
||||
/**
|
||||
* @copydoc GL::Context::Configuration::Flag::GpuValidation |
||||
* @m_since_latest |
||||
*/ |
||||
GpuValidation = UnsignedLong(GL::Context::Configuration::Flag::GpuValidation), |
||||
|
||||
/**
|
||||
* @copydoc GL::Context::Configuration::Flag::GpuValidationNoError |
||||
* @m_since_latest |
||||
*/ |
||||
GpuValidationNoError = UnsignedLong(GL::Context::Configuration::Flag::GpuValidationNoError) |
||||
}; |
||||
|
||||
/**
|
||||
* @brief Context flags |
||||
* |
||||
* @see @ref setFlags(), @ref Context::Flags |
||||
*/ |
||||
typedef Containers::EnumSet<Flag> Flags; |
||||
|
||||
/*implicit*/ Configuration(); |
||||
|
||||
/** @brief Context flags */ |
||||
Flags flags() const { |
||||
return Flag(UnsignedLong(GL::Context::Configuration::flags())); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Set context flags |
||||
* @return Reference to self (for method chaining) |
||||
* |
||||
* Default is no flag. To avoid clearing default flags by accident, |
||||
* prefer to use @ref addFlags() and @ref clearFlags() instead. |
||||
* @see @ref GL::Context::flags() |
||||
*/ |
||||
Configuration& setFlags(Flags flags) { |
||||
GL::Context::Configuration::setFlags(GL::Context::Configuration::Flag(UnsignedLong(flags))); |
||||
return *this; |
||||
} |
||||
|
||||
/**
|
||||
* @brief Add context flags |
||||
* @return Reference to self (for method chaining) |
||||
* |
||||
* Unlike @ref setFlags(), ORs the flags with existing instead of |
||||
* replacing them. Useful for preserving the defaults. |
||||
* @see @ref clearFlags() |
||||
*/ |
||||
Configuration& addFlags(Flags flags) { |
||||
GL::Context::Configuration::addFlags(GL::Context::Configuration::Flag(UnsignedLong(flags))); |
||||
return *this; |
||||
} |
||||
|
||||
/**
|
||||
* @brief Clear context flags |
||||
* @return Reference to self (for method chaining) |
||||
* |
||||
* Unlike @ref setFlags(), ANDs the inverse of @p flags with existing |
||||
* instead of replacing them. Useful for removing default flags. |
||||
* @see @ref addFlags() |
||||
*/ |
||||
Configuration& clearFlags(Flags flags) { |
||||
GL::Context::Configuration::clearFlags(GL::Context::Configuration::Flag(UnsignedLong(flags))); |
||||
return *this; |
||||
} |
||||
|
||||
/**
|
||||
* @brief Create a shared context |
||||
* @return Reference to self (for method chaining) |
||||
* @m_since{2020,06} |
||||
* |
||||
* When set, the created context will share a subset of OpenGL objects |
||||
* with @p context, instead of being independent. Many caveats and |
||||
* limitations apply to shared OpenGL contexts, please consult the |
||||
* OpenGL specification for details. Default is `EGL_NO_CONTEXT`, i.e. |
||||
* no sharing. |
||||
* @see @ref WindowlessWindowsEglContext::glContext(), |
||||
* @ref WindowlessWindowsEglApplication::glContext() |
||||
*/ |
||||
Configuration& setSharedContext(EGLContext context) { |
||||
_sharedContext = context; |
||||
return *this; |
||||
} |
||||
|
||||
/**
|
||||
* @brief Shared context |
||||
* @m_since{2020,06} |
||||
*/ |
||||
EGLContext sharedContext() const { return _sharedContext; } |
||||
|
||||
/* Overloads to remove WTF-factor from method chaining order */ |
||||
#ifndef DOXYGEN_GENERATING_OUTPUT |
||||
MAGNUM_GL_CONTEXT_CONFIGURATION_SUBCLASS_IMPLEMENTATION(Configuration) |
||||
#endif |
||||
|
||||
private: |
||||
EGLContext _sharedContext = EGL_NO_CONTEXT; |
||||
}; |
||||
|
||||
CORRADE_ENUMSET_OPERATORS(WindowlessWindowsEglContext::Configuration::Flags) |
||||
|
||||
/**
|
||||
@brief Windowless Windows/EGL application |
||||
|
||||
@m_keywords{WindowlessApplication EGL} |
||||
|
||||
Application for offscreen rendering using @ref WindowlessWindowsEglContext. |
||||
This application library is available on OpenGL ES (also ANGLE) on Windows. |
||||
|
||||
@section Platform-WindowlessWindowsEglApplication-bootstrap Bootstrap application |
||||
|
||||
Fully contained windowless application using @ref WindowlessWindowsEglApplication |
||||
along with CMake setup is available in `windowless` branch of |
||||
[Magnum Bootstrap](https://github.com/mosra/magnum-bootstrap) repository,
|
||||
download it as [tar.gz](https://github.com/mosra/magnum-bootstrap/archive/windowless.tar.gz)
|
||||
or [zip](https://github.com/mosra/magnum-bootstrap/archive/windowless.zip)
|
||||
file. After extracting the downloaded archive you can build and run the |
||||
application with these four commands: |
||||
|
||||
@code{.sh} |
||||
mkdir build && cd build |
||||
cmake .. |
||||
cmake --build . |
||||
./src/MyApplication # or ./src/Debug/MyApplication |
||||
@endcode |
||||
|
||||
See @ref cmake for more information. |
||||
|
||||
@section Platform-WindowlessWindowsEglApplication-usage General usage |
||||
|
||||
This application library is built if `MAGNUM_WITH_WINDOWLESSWINDOWSEGLAPPLICATION` |
||||
is enabled when building Magnum. To use this library from CMake, put |
||||
[FindEGL.cmake](https://github.com/mosra/magnum/blob/master/modules/FindEGL.cmake)
|
||||
into your `modules/` directory, request the `WindowlessWindowsEglApplication` |
||||
component of the `Magnum` package and link to the |
||||
`Magnum::WindowlessWindowsEglApplication` target: |
||||
|
||||
@code{.cmake} |
||||
find_package(Magnum REQUIRED) |
||||
if(CORRADE_TARGET_WINDOWS) |
||||
find_package(Magnum REQUIRED WindowlessWindowsEglApplication) |
||||
endif() |
||||
|
||||
# ... |
||||
if(CORRADE_TARGET_WINDOWS) |
||||
target_link_libraries(your-app PRIVATE Magnum::WindowlessWindowsEglApplication) |
||||
endif() |
||||
@endcode |
||||
|
||||
Additionally, if you're using Magnum as a CMake subproject, do the following |
||||
* *before* calling @cmake find_package() @ce to ensure it's enabled, as the |
||||
library is not built by default: |
||||
|
||||
@code{.cmake} |
||||
set(MAGNUM_WITH_WINDOWLESSWINDOWSEGLAPPLICATION ON CACHE BOOL "" FORCE) |
||||
add_subdirectory(magnum EXCLUDE_FROM_ALL) |
||||
@endcode |
||||
|
||||
If no other application is requested, you can also use the generic |
||||
`Magnum::WindowlessApplication` alias to simplify porting. Again, see |
||||
@ref building and @ref cmake for more information. |
||||
|
||||
Place your code into @ref exec(). The subclass can be then used in main |
||||
function using @ref MAGNUM_WINDOWLESSWINDOWSEGLAPPLICATION_MAIN() macro. See |
||||
@ref platform for more information. |
||||
|
||||
@code{.cpp} |
||||
class MyApplication: public Platform::WindowlessWindowsEglApplication { |
||||
// implement required methods...
|
||||
}; |
||||
MAGNUM_WINDOWLESSWINDOWSEGLAPPLICATION_MAIN(MyApplication) |
||||
@endcode |
||||
|
||||
If no other application header is included, this class is also aliased to |
||||
@cpp Platform::WindowlessApplication @ce and the macro is aliased to |
||||
@cpp MAGNUM_WINDOWLESSAPPLICATION_MAIN() @ce to simplify porting. |
||||
|
||||
@note This class is available only if Magnum is compiled with |
||||
@ref MAGNUM_TARGET_GL enabled (done by default). See @ref building-features |
||||
for more information. |
||||
*/ |
||||
class WindowlessWindowsEglApplication { |
||||
public: |
||||
/** @brief Application arguments */ |
||||
struct Arguments { |
||||
/** @brief Constructor */ |
||||
/*implicit*/ constexpr Arguments(int& argc, char** argv) noexcept: argc{argc}, argv{argv} {} |
||||
|
||||
int& argc; /**< @brief Argument count */ |
||||
char** argv; /**< @brief Argument values */ |
||||
}; |
||||
|
||||
/**
|
||||
* @brief Configuration |
||||
* |
||||
* @see @ref WindowlessWindowsEglApplication(), @ref createContext(), |
||||
* @ref tryCreateContext() |
||||
*/ |
||||
typedef WindowlessWindowsEglContext::Configuration Configuration; |
||||
|
||||
/**
|
||||
* @brief Default constructor |
||||
* @param arguments Application arguments |
||||
* @param configuration Configuration |
||||
* |
||||
* Creates application with default or user-specified configuration. |
||||
* See @ref Configuration for more information. The program exits if |
||||
* the context cannot be created, see @ref tryCreateContext() for an |
||||
* alternative. |
||||
*/ |
||||
#ifdef DOXYGEN_GENERATING_OUTPUT |
||||
explicit WindowlessWindowsEglApplication(const Arguments& arguments, const Configuration& configuration = Configuration()); |
||||
#else |
||||
/* To avoid "invalid use of incomplete type" */ |
||||
explicit WindowlessWindowsEglApplication(const Arguments& arguments, const Configuration& configuration); |
||||
explicit WindowlessWindowsEglApplication(const Arguments& arguments); |
||||
#endif |
||||
|
||||
/**
|
||||
* @brief Constructor |
||||
* @param arguments Application arguments |
||||
* |
||||
* Unlike above, the context is not created and must be created later |
||||
* with @ref createContext() or @ref tryCreateContext(). |
||||
*/ |
||||
explicit WindowlessWindowsEglApplication(const Arguments& arguments, NoCreateT); |
||||
|
||||
/** @brief Copying is not allowed */ |
||||
WindowlessWindowsEglApplication(const WindowlessWindowsEglApplication&) = delete; |
||||
|
||||
/** @brief Moving is not allowed */ |
||||
WindowlessWindowsEglApplication(WindowlessWindowsEglApplication&&) = delete; |
||||
|
||||
/** @brief Copying is not allowed */ |
||||
WindowlessWindowsEglApplication& operator=(const WindowlessWindowsEglApplication&) = delete; |
||||
|
||||
/** @brief Moving is not allowed */ |
||||
WindowlessWindowsEglApplication& operator=(WindowlessWindowsEglApplication&&) = delete; |
||||
|
||||
/**
|
||||
* @brief Execute application |
||||
* @return Value for returning from @cpp main() @ce |
||||
* |
||||
* See @ref MAGNUM_WINDOWLESSWINDOWSEGLAPPLICATION_MAIN() for usage |
||||
* information. |
||||
*/ |
||||
virtual int exec() = 0; |
||||
|
||||
/**
|
||||
* @brief Underlying OpenGL context |
||||
* @m_since{2020,06} |
||||
* |
||||
* Use in case you need to call EGL functionality directly or in order |
||||
* to create a shared context. Returns @cpp nullptr @ce in case the |
||||
* context was not created yet. |
||||
* @see @ref Configuration::setSharedContext() |
||||
*/ |
||||
EGLContext glContext() { return _glContext.glContext(); } |
||||
|
||||
protected: |
||||
/* Nobody will need to have (and delete) WindowlessWindowsEglApplication*,
|
||||
thus this is faster than public pure virtual destructor */ |
||||
~WindowlessWindowsEglApplication(); |
||||
|
||||
/**
|
||||
* @brief Create context with given configuration |
||||
* |
||||
* Must be called if and only if the context wasn't created by the |
||||
* constructor itself. Error message is printed and the program exits |
||||
* if the context cannot be created, see @ref tryCreateContext() for an |
||||
* alternative. |
||||
*/ |
||||
#ifdef DOXYGEN_GENERATING_OUTPUT |
||||
void createContext(const Configuration& configuration = Configuration()); |
||||
#else |
||||
/* To avoid "invalid use of incomplete type" */ |
||||
void createContext(const Configuration& configuration); |
||||
void createContext(); |
||||
#endif |
||||
|
||||
/**
|
||||
* @brief Try to create context with given configuration |
||||
* |
||||
* Unlike @ref createContext() returns @cpp false @ce if the context |
||||
* cannot be created, @cpp true @ce otherwise. |
||||
*/ |
||||
bool tryCreateContext(const Configuration& configuration); |
||||
|
||||
private: |
||||
WindowlessWindowsEglContext _glContext; |
||||
Platform::GLContext _context; |
||||
}; |
||||
|
||||
/** @hideinitializer
|
||||
@brief Entry point for windowless Windows/EGL application |
||||
@param className Class name |
||||
|
||||
@m_keywords{MAGNUM_WINDOWLESSAPPLICATION_MAIN()} |
||||
|
||||
See @ref Magnum::Platform::WindowlessWindowsEglApplication "Platform::WindowlessWindowsEglApplication" |
||||
for usage information.This macro abstracts out platform-specific entry point |
||||
code and is equivalent to the following, see @ref portability-applications for |
||||
more information. |
||||
|
||||
@code{.cpp} |
||||
int main(int argc, char** argv) { |
||||
className app({argc, argv}); |
||||
return app.exec(); |
||||
} |
||||
@endcode |
||||
|
||||
When no other windowless application header is included this macro is also |
||||
aliased to @cpp MAGNUM_WINDOWLESSAPPLICATION_MAIN() @ce. |
||||
*/ |
||||
#define MAGNUM_WINDOWLESSWINDOWSEGLAPPLICATION_MAIN(className) \ |
||||
int main(int argc, char** argv) { \
|
||||
className app({argc, argv}); \
|
||||
return app.exec(); \
|
||||
} |
||||
|
||||
#ifndef DOXYGEN_GENERATING_OUTPUT |
||||
#ifndef MAGNUM_WINDOWLESSAPPLICATION_MAIN |
||||
typedef WindowlessWindowsEglApplication WindowlessApplication; |
||||
typedef WindowlessWindowsEglContext WindowlessGLContext; |
||||
#define MAGNUM_WINDOWLESSAPPLICATION_MAIN(className) MAGNUM_WINDOWLESSWINDOWSEGLAPPLICATION_MAIN(className) |
||||
#else |
||||
#undef MAGNUM_WINDOWLESSAPPLICATION_MAIN |
||||
#endif |
||||
#endif |
||||
|
||||
}} |
||||
#else |
||||
#error this header is available only in the OpenGL build |
||||
#endif |
||||
|
||||
#endif |
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,3 @@
|
||||
# A point with two indices |
||||
v 1 2 3 |
||||
p 5 5 |
||||
@ -0,0 +1,22 @@
|
||||
{ |
||||
"asset": { |
||||
"version": "2.0" |
||||
}, |
||||
"scenes": [ |
||||
{ |
||||
"nodes": [0] |
||||
} |
||||
], |
||||
"meshes": [ |
||||
{ |
||||
"primitives": [ |
||||
{} |
||||
] |
||||
} |
||||
], |
||||
"nodes": [ |
||||
{ |
||||
"mesh": 1 |
||||
} |
||||
] |
||||
} |
||||
@ -0,0 +1,5 @@
|
||||
{ |
||||
"asset": { |
||||
"version": "2.0" |
||||
} |
||||
} |
||||
@ -0,0 +1,12 @@
|
||||
Animation 0: |
||||
Duration: {0.5, 1.25} (0.1 kB) |
||||
Track 0: Translation2D @ Vector2, 3 keyframes |
||||
Interpolation: Linear, DefaultConstructed, Constant |
||||
Track 1: Rotation2D @ CubicHermite2D -> Vector2, 3 keyframes |
||||
Interpolation: Constant, Extrapolated, Extrapolated |
||||
Animation 1: Custom track duration and interpolator function |
||||
Duration: {0.1, 1.3} (0.1 kB, ExternallyOwned) |
||||
Track 0: Scaling3D @ Vector3, 5 keyframes |
||||
Duration: {0.75, 1.25} |
||||
Interpolation: Custom, DefaultConstructed, Constant |
||||
Total animation data size: 0.2 kB |
||||
@ -0,0 +1,12 @@
|
||||
Camera 0: Orthographic 2D |
||||
Type: Orthographic2D |
||||
Size: {5, 6} |
||||
Aspect ratio: 0.833333 |
||||
Camera 1: |
||||
Type: Orthographic3D |
||||
Size: {2, 3}, -1 - 0.5 |
||||
Aspect ratio: 0.666667 |
||||
Camera 2: |
||||
Type: Perspective3D |
||||
FoV: 35°, 0.01 - 100 |
||||
Aspect ratio: 1.33333 |
||||
@ -0,0 +1,6 @@
|
||||
Ignoring output file for --info: whatever.ply |
||||
Mesh 0: |
||||
Level 0: 1 vertices @ Points (0.0 kB) |
||||
Position @ Vector3, offset 0, stride 12 |
||||
1 indices @ UnsignedInt, offset 0, stride 4 (0.0 kB) |
||||
Total mesh data size: 0.0 kB |
||||
@ -0,0 +1,3 @@
|
||||
1D image 0: |
||||
Level 0: {1024} @ R32F (4.0 kB) |
||||
Total image data size: 4.0 kB |
||||
@ -0,0 +1,8 @@
|
||||
Light 0: |
||||
Type: Spot, 55° - 85° |
||||
Color: {0.203922, 0.341176, 1} * 15 |
||||
Attenuation: {1.2, 0.3, 0.04} |
||||
Range: 100 |
||||
Light 1: Directional light with always-implicit attenuation and range |
||||
Type: Directional |
||||
Color: {1, 0.341176, 0.203922} * 5 |
||||
@ -0,0 +1,28 @@
|
||||
Material 0: |
||||
Type: PbrMetallicRoughness |
||||
Base layer: |
||||
BaseColor @ Vector4: {0.231373, 0.823529, 0.403922, 0.6} |
||||
DoubleSided @ Bool: true |
||||
EmissiveColor @ Vector3: {0.054902, 0.619608, 0.792157} |
||||
RoughnessTexture @ UnsignedInt: 67 |
||||
RoughnessTextureMatrix @ Matrix3x3: {1, 0, 0.25, |
||||
0, 1, 0.75, |
||||
0, 0, 1} |
||||
RoughnessTextureSwizzle @ TextureSwizzle: B |
||||
deadBeef @ Pointer: 0xdeadbeef |
||||
notAColour3 @ Vector3: {0.2, 0.3, 0.4} |
||||
notAColour4 @ Vector4: {0.1, 0.2, 0.3, 0.4} |
||||
reflectionAngle @ Deg: 35 |
||||
undeadBeef @ MutablePointer: 0xbeefbeef |
||||
Material 1: Lots o' laierz |
||||
Type: Phong|PbrClearCoat |
||||
Base layer: |
||||
DiffuseColor @ Vector4: {0.780392, 0.811765, 0.184314, 0.6} |
||||
Layer 1: ClearCoat |
||||
LayerFactor @ Float: 0.5 |
||||
LayerFactorTexture @ UnsignedInt: 3 |
||||
Layer 2: anEmptyLayer |
||||
Layer 3: |
||||
LayerFactor @ Float: 0.25 |
||||
LayerFactorTexture @ UnsignedInt: 2 |
||||
yes @ String: a string |
||||
@ -0,0 +1,21 @@
|
||||
Mesh 0: |
||||
Level 0: 2 vertices @ Lines (0.2 kB, {}) |
||||
Position @ Vector3, offset 0, stride 12 |
||||
Bounds: ({0.1, -0.1, -0.2}, {0.2, 0, 0.2}) |
||||
Tangent @ Vector3, offset 24, stride 12 |
||||
Bounds: ({0.2, -0.2, 0.2}, {0.3, 0.8, 0.8}) |
||||
Bitangent @ Vector3, offset 48, stride 12 |
||||
Bounds: ({0.3, 0.2, 0}, {0.4, 0.9, 1}) |
||||
ObjectId @ UnsignedShort, offset 72, stride 2 |
||||
Bounds: (12, 155) |
||||
Normal @ Vector3, offset 76, stride 12 |
||||
Bounds: ({0, 0, 0}, {1, 1, 1}) |
||||
TextureCoordinates @ Vector2, offset 100, stride 8 |
||||
Bounds: ({0.5, 0.5}, {1.5, 0.5}) |
||||
Color @ Vector4, offset 116, stride 16 |
||||
Bounds: ({0.6, 0.2, 0.2, 0}, {1, 0.4, 0.4, 0.2}) |
||||
ObjectId @ UnsignedInt, offset 148, stride 4 |
||||
Bounds: (15, 337) |
||||
3 indices @ UnsignedByte, offset 0, stride 1 (0.0 kB, {}) |
||||
Bounds: (3, 176) |
||||
Total mesh data size: 0.2 kB |
||||
@ -0,0 +1,16 @@
|
||||
Mesh 0: |
||||
Level 0: 50 vertices @ Points (0.6 kB, ExternallyOwned|Mutable) |
||||
Position @ Vector3, offset 0, stride 12 |
||||
70 indices @ UnsignedShort, offset 0, stride 2 (0.1 kB, ExternallyOwned) |
||||
Mesh 1: LODs? No, meshets. |
||||
Level 0: 250 vertices @ Triangles (6.8 kB) |
||||
Position @ Vector3, offset 0, stride 12 |
||||
Tangent @ Vector4, offset 3000, stride 16 |
||||
Level 1: 135 vertices @ Meshlets (83.8 kB) |
||||
Custom(25:vertices) @ UnsignedInt[64], offset 0, stride 256 |
||||
Custom(26:triangles) @ Vector3ub[126], offset 34560, stride 378 |
||||
Custom(37:) @ UnsignedByte, offset 85590, stride 1 |
||||
Custom(116:vertexCount) @ UnsignedByte, offset 85725, stride 1 |
||||
Mesh 2: |
||||
Level 0: 15 vertices @ Instances (0.0 kB) |
||||
Total mesh data size: 91.4 kB |
||||
@ -0,0 +1,5 @@
|
||||
Object 0: Parent-less mesh |
||||
Object 2: Two meshes, shared among two scenes |
||||
Object 4: Two custom arrays |
||||
Object 6: Only in the second scene, but no fields, thus same as unreferenced |
||||
Object 8: Not in any scene |
||||
@ -0,0 +1,111 @@
|
||||
Scene 0: |
||||
Bound: 2 objects @ UnsignedInt (0.1 kB, {}) |
||||
Fields: |
||||
Transformation @ Matrix4x4, 0 entries |
||||
Mesh @ UnsignedInt, 4 entries |
||||
MeshMaterial @ Int, 4 entries |
||||
Light @ UnsignedInt, 4 entries |
||||
Camera @ UnsignedInt, 4 entries |
||||
Skin @ UnsignedInt, 4 entries |
||||
Scene 1: |
||||
Bound: 4 objects @ UnsignedInt (0.0 kB, {}) |
||||
Fields: |
||||
Transformation @ Matrix3x3, 0 entries |
||||
Mesh @ UnsignedInt, 3 entries |
||||
Skin @ UnsignedInt, 3 entries |
||||
Total scene data size: 0.1 kB |
||||
Object 0 (referenced by 1 scenes): |
||||
Fields: Mesh, MeshMaterial, Light, Camera, Skin |
||||
Object 1 (referenced by 2 scenes): |
||||
Fields: Mesh[2], MeshMaterial[2], Light[2], Camera[2], Skin[2], Mesh, Skin |
||||
Object 2 (referenced by 0 scenes): Not referenced |
||||
Object 3 (referenced by 1 scenes): |
||||
Fields: Mesh, Skin |
||||
2D skin 0 (referenced by 1 objects): |
||||
2 joints |
||||
2D skin 1 (referenced by 1 objects): |
||||
3 joints |
||||
2D skin 2 (referenced by 0 objects): Not referenced |
||||
1 joints |
||||
3D skin 0 (referenced by 0 objects): Not referenced |
||||
2 joints |
||||
3D skin 1 (referenced by 2 objects): |
||||
1 joints |
||||
3D skin 2 (referenced by 1 objects): |
||||
3 joints |
||||
Light 0 (referenced by 2 objects): |
||||
Type: Directional |
||||
Color: {0.341176, 1, 0.203922} * 5 |
||||
Light 1 (referenced by 0 objects): Not referenced |
||||
Type: Ambient |
||||
Color: {1, 0.341176, 0.203922} * 0.1 |
||||
Light 2 (referenced by 1 objects): |
||||
Type: Directional |
||||
Color: {0.203922, 0.341176, 1} |
||||
Camera 0 (referenced by 0 objects): Not referenced |
||||
Type: Orthographic3D |
||||
Size: {2, 3}, -1 - 0.5 |
||||
Aspect ratio: 0.666667 |
||||
Camera 1 (referenced by 2 objects): |
||||
Type: Orthographic3D |
||||
Size: {2, 2}, 0 - 1 |
||||
Aspect ratio: 1 |
||||
Camera 2 (referenced by 1 objects): |
||||
Type: Orthographic2D |
||||
Size: {2, 2} |
||||
Aspect ratio: 1 |
||||
Material 0 (referenced by 2 objects): |
||||
Type: {} |
||||
Base layer: |
||||
BaseColorTexture @ UnsignedInt: 2 |
||||
DiffuseTexture @ UnsignedInt: 2 |
||||
Material 1 (referenced by 1 objects): |
||||
Type: {} |
||||
Base layer: |
||||
EmissiveTexture @ UnsignedInt: 4 |
||||
NormalTexture @ UnsignedInt: 17 |
||||
lookupTexture @ UnsignedInt: 0 |
||||
volumeTexture @ UnsignedInt: 3 |
||||
Material 2 (referenced by 0 objects): Not referenced |
||||
Type: {} |
||||
Base layer: |
||||
Mesh 0 (referenced by 2 objects): |
||||
Level 0: 5 vertices @ Points (0.0 kB) |
||||
Mesh 1 (referenced by 0 objects): Not referenced |
||||
Level 0: 4 vertices @ Lines (0.0 kB) |
||||
Mesh 2 (referenced by 3 objects): |
||||
Level 0: 4 vertices @ TriangleFan (0.0 kB) |
||||
Total mesh data size: 0.0 kB |
||||
Texture 0 (referenced by 1 material attributes): |
||||
Type: Texture1D, image 1 |
||||
Minification, mipmap and magnification: Nearest, Nearest, Linear |
||||
Wrapping: {Repeat, Repeat, Repeat} |
||||
Texture 1 (referenced by 0 material attributes): Not referenced |
||||
Type: Texture1DArray, image 225 |
||||
Minification, mipmap and magnification: Nearest, Nearest, Linear |
||||
Wrapping: {Repeat, Repeat, Repeat} |
||||
Texture 2 (referenced by 2 material attributes): |
||||
Type: Texture2D, image 0 |
||||
Minification, mipmap and magnification: Nearest, Nearest, Linear |
||||
Wrapping: {Repeat, Repeat, Repeat} |
||||
Texture 3 (referenced by 1 material attributes): |
||||
Type: Texture3D, image 1 |
||||
Minification, mipmap and magnification: Nearest, Nearest, Linear |
||||
Wrapping: {Repeat, Repeat, Repeat} |
||||
Texture 4 (referenced by 1 material attributes): |
||||
Type: Texture2D, image 0 |
||||
Minification, mipmap and magnification: Nearest, Nearest, Linear |
||||
Wrapping: {Repeat, Repeat, Repeat} |
||||
1D image 0 (referenced by 0 textures): Not referenced |
||||
Level 0: {1} @ RGBA8I (0.0 kB) |
||||
1D image 1 (referenced by 1 textures): |
||||
Level 0: {4} @ R8I (0.0 kB) |
||||
2D image 0 (referenced by 2 textures): |
||||
Level 0: {1, 2} @ RGBA8I (0.0 kB) |
||||
2D image 1 (referenced by 0 textures): Not referenced |
||||
Level 0: {4, 1} @ R8I (0.0 kB) |
||||
3D image 0 (referenced by 0 textures): Not referenced |
||||
Level 0: {1, 2, 1} @ RGBA8I (0.0 kB) |
||||
3D image 1 (referenced by 1 textures): |
||||
Level 0: {4, 1, 1} @ R8I (0.0 kB) |
||||
Total image data size: 0.0 kB |
||||
@ -0,0 +1,25 @@
|
||||
Scene 0: A simple scene |
||||
Bound: 4 objects @ UnsignedInt (0.1 kB) |
||||
Fields: |
||||
Parent @ Int, 3 entries |
||||
Mesh @ UnsignedInt, OrderedMapping, 4 entries |
||||
Scene 1: |
||||
Bound: 8 objects @ UnsignedByte (0.0 kB, ExternallyOwned|Mutable) |
||||
Fields: |
||||
Custom(42:) @ Double, 2 entries |
||||
Custom(1337:DirectionVector) @ Short[3], 3 entries |
||||
Total scene data size: 0.1 kB |
||||
Object 0 (referenced by 1 scenes): Parent-less mesh |
||||
Fields: Mesh |
||||
Object 1 (referenced by 1 scenes): |
||||
Fields: Parent, Mesh |
||||
Object 2 (referenced by 2 scenes): Two meshes, shared among two scenes |
||||
Fields: Parent, Mesh[2], Custom(1337:DirectionVector) |
||||
Object 3 (referenced by 2 scenes): |
||||
Fields: Parent, Custom(42:) |
||||
Object 4 (referenced by 1 scenes): Two custom arrays |
||||
Fields: Custom(1337:DirectionVector)[2] |
||||
Object 6 (referenced by 0 scenes): Only in the second scene, but no fields, thus same as unreferenced |
||||
Object 7 (referenced by 1 scenes): |
||||
Fields: Custom(42:) |
||||
Object 8 (referenced by 0 scenes): Not in any scene |
||||
@ -0,0 +1,11 @@
|
||||
Scene 0: A simple scene |
||||
Bound: 4 objects @ UnsignedInt (0.1 kB) |
||||
Fields: |
||||
Parent @ Int, 3 entries |
||||
Mesh @ UnsignedInt, OrderedMapping, 4 entries |
||||
Scene 1: |
||||
Bound: 8 objects @ UnsignedByte (0.0 kB, ExternallyOwned|Mutable) |
||||
Fields: |
||||
Custom(42:) @ Double, 2 entries |
||||
Custom(1337:DirectionVector) @ Short[3], 3 entries |
||||
Total scene data size: 0.1 kB |
||||
@ -0,0 +1,10 @@
|
||||
2D skin 0: |
||||
5 joints |
||||
2D skin 1: Second 2D skin, external data |
||||
15 joints |
||||
3D skin 0: First 3D skin, external data |
||||
12 joints |
||||
3D skin 1: |
||||
2 joints |
||||
3D skin 2: |
||||
1 joints |
||||
@ -0,0 +1,8 @@
|
||||
Texture 0: |
||||
Type: Texture1D, image 666 |
||||
Minification, mipmap and magnification: Nearest, Nearest, Linear |
||||
Wrapping: {Repeat, Repeat, Repeat} |
||||
Texture 1: Name! |
||||
Type: Texture2DArray, image 3 |
||||
Minification, mipmap and magnification: Linear, Linear, Nearest |
||||
Wrapping: {MirroredRepeat, ClampToEdge, ClampToEdge} |
||||
@ -0,0 +1,5 @@
|
||||
Mesh 0: |
||||
Level 0: 1 vertices @ Points (0.0 kB) |
||||
Position @ Vector3, offset 0, stride 12 |
||||
1 indices @ UnsignedInt, offset 0, stride 4 (0.0 kB) |
||||
Total mesh data size: 0.0 kB |
||||
@ -0,0 +1,2 @@
|
||||
v 1 2 3 |
||||
p 1 |
||||
@ -0,0 +1,12 @@
|
||||
# 1 4--6 |
||||
# |\ \ | |
||||
# | \ \| |
||||
# 2--3 5 |
||||
v -1 1 0 |
||||
v -1 -1 0 |
||||
v 1 -1 0 |
||||
f 1 2 3 |
||||
v -0.9 0.9 0 |
||||
v 0.9 -0.9 0 |
||||
v 1 1 0 |
||||
f 4 5 6 |
||||
@ -0,0 +1,12 @@
|
||||
# 1 4--6 |
||||
# |\ \ | |
||||
# | \ \| |
||||
# 2--3 5 |
||||
v -1 1 0 |
||||
v -1 -1 0 |
||||
v 1 -1 0 |
||||
f 1 2 3 |
||||
v -1 1 0 |
||||
v 1 -1 0 |
||||
v 1 1 0 |
||||
f 4 5 6 |
||||
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue