diff --git a/Navigator/src/Navigator.h b/Navigator/src/Navigator.h deleted file mode 100644 index 37c1151..0000000 --- a/Navigator/src/Navigator.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - Navigator.h - This header file contains all of the essential includes for a project made using the Navigator library. - Should be included into your main project files. - - GWM -- Feb 2022 -*/ -#ifndef NAVIGATOR_H -#define NAVIGATOR_H - - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include "Navigator/Core/Logger.h" -#include "Navigator/Core/Application.h" -#include "Navigator/Physics/PhysicsLayer.h" -#include "Navigator/Physics/AnalysisStage.h" -#include "Navigator/Core/Parameter.h" -#include "Navigator/Core/SpectrumManager.h" -#include "Navigator/Core/Layer.h" -#include "Navigator/Events/Event.h" -#include "Navigator/Utils/TestServerLayer.h" -#include "Navigator/Utils/Instrumentor.h" - -#endif diff --git a/Navigator/src/Navigator/Core/Application.cpp b/Navigator/src/Navigator/Core/Application.cpp deleted file mode 100644 index 7698742..0000000 --- a/Navigator/src/Navigator/Core/Application.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/* - Application.cpp - This is the main application class, master and controller of program flow. Contains a layer stack, where each layer represets an - aspect of the application. Based on the Application class written by @TheCherno during his tutorial series on making a game engine. - Check out his work to learn more! - - Note that Application is a singleton. Should only ever be one application ever created in the project. - - GWM -- Feb 2022 -*/ -#include "Application.h" -#include "Navigator/Renderer/RenderCommand.h" -#include "Navigator/Editor/EditorLayer.h" -#include "Timestep.h" - -namespace Navigator { - - - Application* Application::s_instance = nullptr; - - Application::Application() : - m_runFlag(true) - { - NAV_PROFILE_FUNCTION(); - - s_instance = this; - - m_window = std::unique_ptr(Window::Create()); - m_window->SetEventCallback(BIND_EVENT_FUNCTION(Application::OnEvent)); //Allow window to pass events back - - m_physicsLayer = new PhysicsLayer(); - PushLayer(m_physicsLayer); - EditorLayer* editor = new EditorLayer(); //memory handled by layer stack - editor->SetEventCallbackFunc(BIND_EVENT_FUNCTION(Application::OnEvent)); //Allow editor to pass events back - PushLayer(editor); - m_imgui_layer = new ImGuiLayer(); - PushOverlay(m_imgui_layer); - } - - Application::~Application() - { - } - - void Application::OnEvent(Event& event) - { - NAV_PROFILE_FUNCTION(); - EventDispatcher dispatch(event); - dispatch.Dispatch(BIND_EVENT_FUNCTION(Application::OnWindowCloseEvent)); - for(auto iter = m_stack.end(); iter != m_stack.begin(); ) - { - (*(--iter))->OnEvent(event); - if(event.handledFlag) - break; - } - } - - bool Application::OnWindowCloseEvent(WindowCloseEvent& event) - { - m_runFlag = false; - NAV_WARN("Closing the window!"); - return true; - } - - void Application::PushLayer(Layer* layer) - { - NAV_PROFILE_FUNCTION(); - m_stack.PushLayer(layer); - layer->OnAttach(); - } - - void Application::PushOverlay(Layer* layer) - { - NAV_PROFILE_FUNCTION(); - m_stack.PushOverlay(layer); - layer->OnAttach(); - } - - void Application::Run() - { - NAV_PROFILE_FUNCTION(); - - float lastFrameTime = 0; - float time; - Timestep step; - - while(m_runFlag) - { - RenderCommand::SetClearColor(m_bckgnd_color); - RenderCommand::Clear(); - - time = RenderCommand::GetFrameTime(); - step.SetTime(time - lastFrameTime); - lastFrameTime = time; - - for(auto layer : m_stack) - layer->OnUpdate(step); - - m_imgui_layer->Begin(); - for(auto layer : m_stack) - layer->OnImGuiRender(); - m_imgui_layer->End(); - m_window->OnUpdate(); - } - } -} diff --git a/Navigator/src/Navigator/Core/Application.h b/Navigator/src/Navigator/Core/Application.h deleted file mode 100644 index 9b64f9b..0000000 --- a/Navigator/src/Navigator/Core/Application.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - Application.h - This is the main application class, master and controller of program flow. Contains a layer stack, where each layer represets an - aspect of the application. Based on the Application class written by @TheCherno during his tutorial series on making a game engine. - Check out his work to learn more! - - Note that Application is a singleton. Should only ever be one application ever created in the project. - - GWM -- Feb 2022 -*/ -#ifndef APPLICATION_H -#define APPLICATION_H - -#include "Navigator/Core/NavCore.h" -#include "Navigator/Events/Event.h" -#include "Navigator/Events/AppEvent.h" -#include "Navigator/Events/PhysicsEvent.h" -#include "Navigator/Core/LayerStack.h" -#include "Navigator/Core/Layer.h" -#include "Navigator/Core/Window.h" -#include "Navigator/ImGui/ImGuiLayer.h" -#include "Navigator/Physics/PhysicsLayer.h" -#include "glm/vec4.hpp" - -namespace Navigator { - - class NAV_API Application - { - public: - Application(); - virtual ~Application(); - - void Run(); - inline void Close() { m_runFlag = false; } - - void OnEvent(Event& event); - void PushLayer(Layer* layer); - inline void PushAnalysisStage(AnalysisStage* stage) { m_physicsLayer->PushStage(stage); } - void PushOverlay(Layer* layer); - - inline static Application& Get() { return *s_instance; } - - inline Window& GetWindow() { return *m_window; } - - private: - bool OnWindowCloseEvent(WindowCloseEvent& event); - - LayerStack m_stack; - std::unique_ptr m_window; - ImGuiLayer* m_imgui_layer; - PhysicsLayer* m_physicsLayer; - bool m_runFlag; - - //Dark grey background - glm::vec4 m_bckgnd_color = {0.1f, 0.1f, 0.1f, 1.0f}; - - static Application* s_instance; - }; - - - /* - This function is left to be defined by the user. In principle we don't need to do this, as the Navigator library doesn't handle creation of the application, - but I like it and might be useful for changing to a system with a pre-defined entry point. - */ - Application* CreateApplication(); -} - -#endif \ No newline at end of file diff --git a/Navigator/src/Navigator/Core/Cut.cpp b/Navigator/src/Navigator/Core/Cut.cpp deleted file mode 100644 index b37fa0e..0000000 --- a/Navigator/src/Navigator/Core/Cut.cpp +++ /dev/null @@ -1,133 +0,0 @@ -/* - Cut.cpp - Cut related classes. A cut here is defined as a filter upon a histogram based on some range for a parameter or set of parameters. - - CutArgs is the underlying data that defines a cut (excluding the actual points). - - Cut is the base class for all cut objects. Should not be used in practice. All cut objects have functions which can query what kind of cut it is. If one has the cut object, - Is1D() or Is2D() can be called. If one has the CutArgs, a 1D cut will have y_par set to "None" while a 2D cut will have a valid parameter name. - - Cut1D is a one-dimensional (single parameter cut) while Cut2D is a two-dimensional (two parameter cut). There are a few differences between 1D and 2D cuts. - A Cut1D only contains two values, a min and a max. The parameter is checked that it falls within these bounds. - A Cut2D contains a set of (x,y) points that form a closed polygon. The polygon may be convex. The parameter is checked that it falls within the polygon using similar methods - to flood-fill algorithms. - - GWM -- Feb 2022 -*/ -#include "Cut.h" -#include "implot.h" - -namespace Navigator { - - std::string ConvertCutTypeToString(CutType type) - { - NAV_PROFILE_FUNCTION(); - switch(type) - { - case CutType::Cut1D: return "Cut1D"; - case CutType::Cut2D: return "Cut2D"; - case CutType::CutSummaryAll: return "CutSummaryAll"; - case CutType::CutSummaryAny: return "CutSummaryAny"; - case CutType::None: return "None"; - } - return "None"; - } - - /*1D Cuts -- Can be made on and applied to either 1D or 2D histograms*/ - Cut1D::Cut1D(const CutArgs& params, double min, double max) : - Cut(params), m_minVal(min), m_maxVal(max) - { - m_params.type = CutType::Cut1D; - } - - Cut1D::~Cut1D() {} - - void Cut1D::IsInside(double x, double y) - { - NAV_PROFILE_FUNCTION(); - m_isValid = x >= m_minVal && x <= m_maxVal; - } - - //Only within an ImPlot/ImGui context!!! - void Cut1D::Draw() const - { - NAV_PROFILE_FUNCTION(); - double points[2] = { m_minVal, m_maxVal }; - ImPlot::PlotVLines(m_params.name.c_str(), points, 2); - } - - /*2D Cuts -- Can only be made on 2D histogram, but applied to either 1D or 2D histograms*/ - Cut2D::Cut2D(const CutArgs& params, const std::vector& xpoints, const std::vector& ypoints) : - Cut(params), m_xpoints(xpoints), m_ypoints(ypoints) - { - m_params.type = CutType::Cut2D; - } - - Cut2D::~Cut2D() {} - - /* - Even-odd point in polygon algorithm (see Wikipedia) - Walk around the sides of the polygon and check intersection with each of the sides. - Cast a ray from the point to infinity in any direction and check the number of intersections. - If odd number of intersections, point is inside. Even, point is outside. - Edge cases of point is a vertex or on a side considered. - */ - void Cut2D::IsInside(double x, double y) - { - NAV_PROFILE_FUNCTION(); - m_isValid = false; - double slope; - for(size_t i=0; i<(m_xpoints.size()-1); i++) - { - if (x == m_xpoints[i + 1] && y == m_ypoints[i + 1]) - { - m_isValid = true; - return; - } - else if((m_ypoints[i+1] > y) != (m_ypoints[i] > y)) - { - slope = (x - m_xpoints[i+1])*(m_ypoints[i] - m_ypoints[i+1]) - (m_xpoints[i] - m_xpoints[i+1])*(y - m_ypoints[i+1]); - if (slope == 0.0) - { - m_isValid = true; - return; - } - else if ((slope < 0.0) != (m_ypoints[i] < m_ypoints[i + 1])) - { - m_isValid = !m_isValid; - } - } - } - } - - //Only in ImPlot/ImGui context!!!! - void Cut2D::Draw() const - { - NAV_PROFILE_FUNCTION(); - ImPlot::PlotLine(m_params.name.c_str(), m_xpoints.data(), m_ypoints.data(), (int)m_xpoints.size()); - } - - /*CutSummaryAll -- Can only be made on a HistogramSummary but can be applied to any*/ - CutSummary::CutSummary(const CutArgs& params, const std::vector& subhistos, double min, double max) : - Cut(params), m_subhistos(subhistos), m_minVal(min), m_maxVal(max) - { - } - - CutSummary::~CutSummary() - { - } - - void CutSummary::IsInside(double x, double y) - { - NAV_PROFILE_FUNCTION(); - m_isValid = x >= m_minVal && x <= m_maxVal; - } - - //Only within an ImPlot/ImGui context!!! - void CutSummary::Draw() const - { - NAV_PROFILE_FUNCTION(); - double points[2] = { m_minVal, m_maxVal }; - ImPlot::PlotVLines(m_params.name.c_str(), points, 2); - } -} diff --git a/Navigator/src/Navigator/Core/Cut.h b/Navigator/src/Navigator/Core/Cut.h deleted file mode 100644 index 72aa3c1..0000000 --- a/Navigator/src/Navigator/Core/Cut.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - Cut.h - Cut related classes. A cut here is defined as a filter upon a histogram based on some range for a parameter or set of parameters. - - CutArgs is the underlying data that defines a cut (excluding the actual points). - - Cut is the base class for all cut objects. Should not be used in practice. All cut objects have functions which can query what kind of cut it is. If one has the cut object, - Is1D() or Is2D() can be called. If one has the CutArgs, a 1D cut will have y_par set to "None" while a 2D cut will have a valid parameter name. - - Cut1D is a one-dimensional (single parameter cut) while Cut2D is a two-dimensional (two parameter cut). There are a few differences between 1D and 2D cuts. - A Cut1D only contains two values, a min and a max. The parameter is checked that it falls within these bounds. - A Cut2D contains a set of (x,y) points that form a closed polygon. The polygon may be convex. The parameter is checked that it falls within the polygon using similar methods - to flood-fill algorithms. - - GWM -- Feb 2022 -*/ -#ifndef CUT_H -#define CUT_H - -#include "NavCore.h" -#include "imgui.h" - -namespace Navigator { - - enum class CutType - { - Cut1D, - Cut2D, - CutSummaryAny, - CutSummaryAll, - None - }; - - std::string ConvertCutTypeToString(CutType type); - - struct NAV_API CutArgs - { - CutArgs() {} - CutArgs(const std::string& n, const std::string& x, const std::string& y = "None") : - name(n), x_par(x), y_par(y) - { - } - - CutType type = CutType::None; - std::string name = "None"; - std::string x_par = "None"; - std::string y_par = "None"; - }; - - class NAV_API Cut - { - public: - - Cut(const CutArgs& params) : - m_params(params), m_isValid(false) - { - } - - virtual ~Cut() {} - - virtual void IsInside(double x, double y=0.0) = 0; - virtual void Draw() const = 0; - virtual std::vector GetXValues() const = 0; - virtual std::vector GetYValues() const = 0; - - inline const bool IsValid() const { return m_isValid; } - inline void ResetValidity() { m_isValid = false; } - inline CutType GetType() const { return m_params.type; } - inline const std::string& GetName() const { return m_params.name; } - inline const std::string& GetXParameter() const { return m_params.x_par; } - inline const std::string& GetYParameter() const { return m_params.y_par; } - inline const CutArgs& GetCutArgs() const { return m_params; } - protected: - CutArgs m_params; - bool m_isValid; - }; - - class NAV_API Cut1D : public Cut - { - public: - Cut1D(const CutArgs& params, double min, double max); - virtual ~Cut1D(); - virtual void IsInside(double x, double y=0.0) override; - virtual void Draw() const override; - virtual std::vector GetXValues() const override { return std::vector({ m_minVal, m_maxVal }); } - virtual std::vector GetYValues() const override { return std::vector(); } - - private: - double m_minVal, m_maxVal; - }; - - class NAV_API Cut2D : public Cut - { - public: - Cut2D(const CutArgs& params, const std::vector& xpoints, const std::vector& ypoints); - virtual ~Cut2D(); - virtual void IsInside(double x, double y) override; - virtual void Draw() const override; - virtual std::vector GetXValues() const override { return m_xpoints; } - virtual std::vector GetYValues() const override { return m_ypoints; } - - private: - std::vector m_xpoints; - std::vector m_ypoints; - }; - - class NAV_API CutSummary : public Cut - { - public: - CutSummary(const CutArgs& params, const std::vector& subhistos, double min, double max); - virtual ~CutSummary(); - virtual void IsInside(double x, double y) override; - virtual void Draw() const override; - virtual std::vector GetXValues() const override { return std::vector({ m_minVal, m_maxVal }); } - virtual std::vector GetYValues() const override { return std::vector(); } - - inline const std::vector& GetSubHistograms() const { return m_subhistos; } - - private: - double m_minVal, m_maxVal; - std::vector m_subhistos; - }; - -} - -#endif diff --git a/Navigator/src/Navigator/Core/Graph.cpp b/Navigator/src/Navigator/Core/Graph.cpp deleted file mode 100644 index c185e49..0000000 --- a/Navigator/src/Navigator/Core/Graph.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include "Graph.h" -#include "implot.h" - -namespace Navigator { - - ScalerGraph::ScalerGraph(const GraphArgs& args) : - m_args(args), m_lastScalerVal(0) - { - m_xPoints.reserve(m_args.maxPoints); - m_xPoints.reserve(m_args.maxPoints); - } - - ScalerGraph::~ScalerGraph() {} - - void ScalerGraph::UpdatePoints(double timeStep, uint64_t scalerVal) - { - double rate = (scalerVal - m_lastScalerVal) / timeStep; - if (m_xPoints.size() < m_args.maxPoints) - { - m_xPoints.push_back(timeStep); - m_yPoints.push_back(rate); - } - else - { - for (size_t i = 0; i < (m_args.maxPoints - 1); i++) - { - m_xPoints[i] = m_xPoints[i + 1]; - m_yPoints[i] = m_yPoints[i + 1]; - } - m_xPoints[m_args.maxPoints - 1] = timeStep; - m_yPoints[m_args.maxPoints - 1] = rate; - } - - m_lastScalerVal = scalerVal; - } - - void ScalerGraph::Draw() - { - ImPlot::SetupAxes("time (s)", "rate (Hz)"); - ImPlot::PlotLine(m_args.name.c_str(), m_xPoints.data(), m_yPoints.data(), m_xPoints.size()); - } -} \ No newline at end of file diff --git a/Navigator/src/Navigator/Core/Graph.h b/Navigator/src/Navigator/Core/Graph.h deleted file mode 100644 index 1247c89..0000000 --- a/Navigator/src/Navigator/Core/Graph.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef GRAPH_H -#define GRAPH_H - -#include - -namespace Navigator { - - struct GraphArgs - { - std::string name; - std::string scalerName; - size_t maxPoints; - }; - - class ScalerGraph - { - public: - ScalerGraph(const GraphArgs& args); - ~ScalerGraph(); - - void UpdatePoints(double timeStep, uint64_t scalerVal); - void Draw(); - inline void Clear() { m_xPoints.clear(); m_yPoints.clear(); } - - inline const std::string& GetName() const { return m_args.name; } - inline const std::string& GetScaler() const { return m_args.scalerName; } - inline const GraphArgs& GetArgs() const { return m_args; } - - private: - - GraphArgs m_args; - - uint64_t m_lastScalerVal; - - std::vector m_yPoints; - std::vector m_xPoints; - }; - -} - -#endif \ No newline at end of file diff --git a/Navigator/src/Navigator/Core/Histogram.cpp b/Navigator/src/Navigator/Core/Histogram.cpp deleted file mode 100644 index e90b7b0..0000000 --- a/Navigator/src/Navigator/Core/Histogram.cpp +++ /dev/null @@ -1,421 +0,0 @@ -/* - Histogram.cpp - Histogram related classes. We use a custom histogram class here because the ImPlot histograms are not a data structure, but rather just a function. This means that at every draw call for an ImPlot - histogram the entire data set will need to be properly binned and memory will need to be allocated to make histogram arrays. For our use case this is obviously bad. For one thing, data runs can have - thousands to millions of events. In the ImPlot paradigm we would need to loop over all of this data and bin it, not to mention explicitly store all of this data in memory for every histogram. I point this - out not to say that ImPlot histograms are bad intrinsically, because they definitely have a use for smaller data sets, but rather to explain why for this program I have re-invented the wheel somewhat. - - HistogramArgs are the underlying data which define a histogram. This is grouped in a struct to easily pass these around for use in contexts like the Editor. - Every histogram has a set of histogram parameters. - - Histogram is the base class of all histograms. Should not be used in practice. Every histogram contains functions to query what type of underlying histogram it is. If one has - the Histogram object, Is1D() or Is2D() can be called. If one only has the HistogramArgs, the values of x_par and y_par can be inspected. In particular, a 1D histogram will have - y_par set to "None", while a 2D histogram should have a valid parameter name for y_par. - - Histogram1D is a one dimensional (single parameter) histogram. Histogram2D is a two dimensional (two parameter) histogram. The only real difference between these in practice, other than - the obvious two vs. one parameter thing, is that a Histogram2D contains methods to set the z-axis range (color scale) which ImPlot does not provide intrinsic access to from the plot itself. - When the range is set to (0,0), the color scale is set to the default (0, maxValue). Otherwise the color is scaled as appropriate. If you query a Histogram1D for its color scale you will recieve - a nullptr. - - StatResults is a struct containing statistical information about a region of a histogram. - - GWM -- Feb 2022 -*/ -#include "Histogram.h" -#include "implot.h" - -/* - For Navigator histograms, binnning is done over ranges as - [min, max), so that each bin is exclusive. -*/ - -namespace Navigator { - - std::string ConvertSpectrumTypeToString(SpectrumType type) - { - NAV_PROFILE_FUNCTION(); - switch (type) - { - case SpectrumType::Histo1D: return "Histogram1D"; - case SpectrumType::Histo2D: return "Histogram2D"; - case SpectrumType::Summary: return "Summary"; - case SpectrumType::None: return "None"; - } - return "None"; - } - - /* - 1D Histogram class - */ - Histogram1D::Histogram1D(const HistogramArgs& params) : - Histogram(params) - { - InitBins(); - } - - Histogram1D::~Histogram1D() {} - - void Histogram1D::InitBins() - { - NAV_PROFILE_FUNCTION(); - m_params.type = SpectrumType::Histo1D; - if(m_params.nbins_x == 0 || (m_params.min_x >= m_params.max_x)) - { - NAV_WARN("Attempting to create an illegal Histogram1D {0} with {1} bins and a range from {2} to {3}. Historgram not initialized.", m_params.name, m_params.nbins_x, m_params.min_x, m_params.max_x); - m_initFlag = false; - return; - } - - m_binWidth = (m_params.max_x - m_params.min_x)/m_params.nbins_x; - - m_binCenters.resize(m_params.nbins_x); - m_binCounts.resize(m_params.nbins_x); - - for(int i=0; i= m_params.max_x) - return; - int bin = int((x - m_params.min_x)/(m_binWidth)); - m_binCounts[bin] += 1.0; - } - - //Can only be used within an ImGui / ImPlot context!! - void Histogram1D::Draw() - { - NAV_PROFILE_FUNCTION(); - ImPlot::SetupAxes(m_params.x_par.c_str(), "Counts",0, ImPlotAxisFlags_LockMin | ImPlotAxisFlags_AutoFit); - ImPlot::PlotBars(m_params.name.c_str(), &m_binCenters.data()[0], &m_binCounts.data()[0], m_params.nbins_x, m_binWidth); - } - - void Histogram1D::ClearData() - { - for(int i=0; i= m_params.max_x) - bin_max = m_params.nbins_x - 1; - else - bin_max = int((x_max - m_params.min_x) / (m_binWidth)); - - for (int i = bin_min; i <= bin_max; i++) - { - results.integral += m_binCounts[i]; - results.cent_x += m_binCounts[i] * (m_params.min_x + m_binWidth * i); - } - if (results.integral == 0) - return results; - - results.cent_x /= results.integral; - for (int i = bin_min; i <= bin_max; i++) - results.sigma_x += m_binCounts[i] * ((m_params.min_x + m_binWidth * i) - results.cent_x) * ((m_params.min_x + m_binWidth * i) - results.cent_x); - results.sigma_x = std::sqrt(results.sigma_x / (results.integral - 1)); - return results; - } - - /* - 2D Histogram class - Note for 2D: Rendering is done from top left to bottom right. So ybins run from top to bottom (ymin is last row, ymax is first row) - */ - Histogram2D::Histogram2D(const HistogramArgs& params) : - Histogram(params) - { - m_colorScaleRange[0] = 0.0f; - m_colorScaleRange[1] = 0.0f; - InitBins(); - } - - Histogram2D::~Histogram2D() {} - - void Histogram2D::InitBins() - { - NAV_PROFILE_FUNCTION(); - m_params.type = SpectrumType::Histo2D; - if(m_params.nbins_x <= 0 || m_params.nbins_y <= 0 || m_params.min_x >= m_params.max_x || m_params.min_y >= m_params.max_y) - { - NAV_WARN("Attempting to create illegal Histogram2D {0} with {1} x bins, {2} y bins, an x range of {3} to {4}, and a y range of {5} to {6}. Not initialized.", m_params.name, m_params.nbins_x, m_params.nbins_y, - m_params.min_x, m_params.max_x, m_params.min_y, m_params.max_y); - m_initFlag = false; - return; - } - - m_binWidthX = (m_params.max_x - m_params.min_x)/m_params.nbins_x; - m_binWidthY = (m_params.max_y - m_params.min_y)/m_params.nbins_y; - - m_nBinsTotal = m_params.nbins_x*m_params.nbins_y; - - m_binCounts.resize(m_nBinsTotal); - for(int i=0; i= m_params.max_x || y <= m_params.min_y || y > m_params.max_y) - return; - int bin_x = int((x - m_params.min_x)/m_binWidthX); - int bin_y = int((m_params.max_y - y)/m_binWidthY); - int bin = bin_y*m_params.nbins_x + bin_x; - - m_binCounts[bin] += 1.0; - - m_maxBinContent = m_binCounts[bin] > m_maxBinContent ? (m_binCounts[bin]) : m_maxBinContent; - } - - //Can only be used within an ImGui / ImPlot context!! - /* - Brief note on colormaps: There are several kinds of colormaps, each with specific use cases. But broadly, the two main categories are discrete and continuous. - Discrete maps are good for categorical data, and we use these as the standard for plots we draw. This is how you make cuts standout from your histograms. - But for the colors of the bins, we want a continuous scale, i.e. smooth variation on a single hue, as the color differences represent the value differences - relative to other bins. Hence the pushing of the Matplotlib virdis colormap. For more on colormaps, I suggest looking at matplotlib documentation. - */ - void Histogram2D::Draw() - { - NAV_PROFILE_FUNCTION(); - ImPlot::SetupAxes(m_params.x_par.c_str(), m_params.y_par.c_str()); - ImPlot::PushColormap(ImPlotColormap_Viridis); - ImPlot::PlotHeatmap(m_params.name.c_str(), &m_binCounts.data()[0], m_params.nbins_y, m_params.nbins_x, m_colorScaleRange[0], m_colorScaleRange[1], NULL, - ImPlotPoint(m_params.min_x, m_params.min_y), ImPlotPoint(m_params.max_x, m_params.max_y)); - ImPlot::PopColormap(); - } - - void Histogram2D::ClearData() - { - for(int i=0; i= m_params.max_x) - xbin_max = m_params.nbins_x - 1; - else - xbin_max = int((x_max - m_params.min_x) / (m_binWidthX)); - - if (y_min <= m_params.min_y) - ybin_max = m_params.nbins_y - 1; - else - ybin_max = int((m_params.max_y - y_min) / m_binWidthY); - - if (y_max >= m_params.max_y) - ybin_min = 0; - else - ybin_min = int((m_params.max_y - y_max) / m_binWidthY); - - for (int y = ybin_min; y <= ybin_max; y++) - { - for (int x = xbin_min; x <= xbin_max; x++) - { - curbin = y * m_params.nbins_x + x; - results.integral += m_binCounts[curbin]; - results.cent_x += m_binCounts[curbin] * (m_params.min_x + m_binWidthX * x); - results.cent_y += m_binCounts[curbin] * (m_params.max_y - m_binWidthY * y); - } - } - - if (results.integral == 0) - return results; - - results.cent_x /= results.integral; - results.cent_y /= results.integral; - for (int y = ybin_min; y <= ybin_max; y++) - { - for (int x = xbin_min; x <= xbin_max; x++) - { - curbin = y * m_params.nbins_x + x; - results.sigma_x += m_binCounts[curbin] * ((m_params.min_x + m_binWidthX * x) - results.cent_x) * ((m_params.min_x + m_binWidthX * x) - results.cent_x); - results.sigma_y += m_binCounts[curbin] * ((m_params.max_y - m_binWidthY * y) - results.cent_y) * ((m_params.max_y - m_binWidthY * y) - results.cent_y); - } - } - - results.sigma_x = std::sqrt(results.sigma_x / (results.integral - 1)); - results.sigma_y = std::sqrt(results.sigma_y / (results.integral - 1)); - - return results; - } - - /* - HistogramSummary class methods - - -- 03/18/22 Adding in the basics, unsure of how to exactly approach design - - -- Fill data to independent histogram? Steal data from other histograms? - - -- Cuts? - - -- Literally everything hahaha - */ - - HistogramSummary::HistogramSummary(const HistogramArgs& params, const std::vector& subhistos) : - Histogram(params), m_subhistos(subhistos), m_labels(nullptr) - { - m_colorScaleRange[0] = 0.0f; - m_colorScaleRange[1] = 0.0f; - InitBins(); - } - - HistogramSummary::~HistogramSummary() - { - if (m_labels) - delete[] m_labels; - } - - void HistogramSummary::InitBins() - { - NAV_PROFILE_FUNCTION(); - m_params.type = SpectrumType::Summary; - if (m_params.nbins_x <= 0 || m_params.min_x >= m_params.max_x) - { - NAV_WARN("Attempting to create illegal HistogramSummary {0} with {1} x bins and an x range of {2} to {3}. Not initialized.", m_params.name, m_params.nbins_x, m_params.min_x, m_params.max_x); - m_initFlag = false; - return; - } - - m_labels = new const char* [m_subhistos.size() + 1]; - for (size_t i = 0; i < m_subhistos.size(); i++) - m_labels[i] = m_subhistos[i].c_str(); - m_labels[m_subhistos.size()] = ""; - m_params.nbins_y = m_subhistos.size(); - m_params.min_y = 0.0; - m_params.max_y = m_subhistos.size(); - m_binWidthX = (m_params.max_x - m_params.min_x) / m_params.nbins_x; - - m_nBinsTotal = m_params.nbins_x * m_params.nbins_y; - - m_binCounts.resize(m_nBinsTotal); - for (int i = 0; i < m_nBinsTotal; i++) - m_binCounts[i] = 0; - - m_initFlag = true; - } - - void HistogramSummary::FillData(double x, double y) - { - NAV_PROFILE_FUNCTION(); - if (x < m_params.min_x || x >= m_params.max_x || y <= m_params.min_y || y > m_params.max_y) - return; - int bin_x = int((x - m_params.min_x) / m_binWidthX); - int bin_y = int((m_params.max_y - y) / m_binWidthY); - int bin = bin_y * m_params.nbins_x + bin_x; - - m_binCounts[bin] += 1.0; - } - - void HistogramSummary::Draw() - { - NAV_PROFILE_FUNCTION(); - ImPlot::SetupAxisTicks(ImAxis_Y1, m_params.min_y, m_params.max_y, m_params.nbins_y, m_labels, false); - ImPlot::PushColormap(ImPlotColormap_Viridis); - ImPlot::PlotHeatmap(m_params.name.c_str(), &m_binCounts.data()[0], m_params.nbins_y, m_params.nbins_x, m_colorScaleRange[0], m_colorScaleRange[1], NULL, - ImPlotPoint(m_params.min_x, m_params.min_y), ImPlotPoint(m_params.max_x, m_params.max_y)); - ImPlot::PopColormap(); - } - - void HistogramSummary::ClearData() - { - for (int i = 0; i < m_nBinsTotal; i++) - m_binCounts[i] = 0; - } - - StatResults HistogramSummary::AnalyzeRegion(double x_min, double x_max, double y_min, double y_max) - { - NAV_PROFILE_FUNCTION(); - int xbin_min, xbin_max, ybin_min, ybin_max; - int curbin; - - StatResults results; - - //We clamp to the boundaries of the histogram - if (x_min <= m_params.min_x) - xbin_min = 0; - else - xbin_min = int((x_min - m_params.min_x) / (m_binWidthX)); - - if (x_max >= m_params.max_x) - xbin_max = m_params.nbins_x - 1; - else - xbin_max = int((x_max - m_params.min_x) / (m_binWidthX)); - - if (y_min <= m_params.min_y) - ybin_max = m_params.nbins_y - 1; - else - ybin_max = int((m_params.max_y - y_min) / m_binWidthY); - - if (y_max >= m_params.max_y) - ybin_min = 0; - else - ybin_min = int((m_params.max_y - y_max) / m_binWidthY); - - for (int y = ybin_min; y <= ybin_max; y++) - { - for (int x = xbin_min; x <= xbin_max; x++) - { - curbin = y * m_params.nbins_x + x; - results.integral += m_binCounts[curbin]; - results.cent_x += m_binCounts[curbin] * (m_params.min_x + m_binWidthX * x); - results.cent_y += m_binCounts[curbin] * (m_params.max_y - m_binWidthY * y); - } - } - - if (results.integral == 0) - return results; - - results.cent_x /= results.integral; - results.cent_y /= results.integral; - for (int y = ybin_min; y <= ybin_max; y++) - { - for (int x = xbin_min; x <= xbin_max; x++) - { - curbin = y * m_params.nbins_x + x; - results.sigma_x += m_binCounts[curbin] * ((m_params.min_x + m_binWidthX * x) - results.cent_x) * ((m_params.min_x + m_binWidthX * x) - results.cent_x); - results.sigma_y += m_binCounts[curbin] * ((m_params.max_y - m_binWidthY * y) - results.cent_y) * ((m_params.max_y - m_binWidthY * y) - results.cent_y); - } - } - - results.sigma_x = std::sqrt(results.sigma_x / (results.integral - 1)); - results.sigma_y = std::sqrt(results.sigma_y / (results.integral - 1)); - - return results; - } -} diff --git a/Navigator/src/Navigator/Core/Histogram.h b/Navigator/src/Navigator/Core/Histogram.h deleted file mode 100644 index 4251675..0000000 --- a/Navigator/src/Navigator/Core/Histogram.h +++ /dev/null @@ -1,184 +0,0 @@ -/* - Histogram.h - Histogram related classes. We use a custom histogram class here because the ImPlot histograms are not a data structure, but rather just a function. This means that at every draw call for an ImPlot - histogram the entire data set will need to be properly binned and memory will need to be allocated to make histogram arrays. For our use case this is obviously bad. For one thing, data runs can have - thousands to millions of events. In the ImPlot paradigm we would need to loop over all of this data and bin it, not to mention explicitly store all of this data in memory for every histogram. I point this - out not to say that ImPlot histograms are bad intrinsically, because they definitely have a use for smaller data sets, but rather to explain why for this program I have re-invented the wheel somewhat. - - HistogramArgs are the underlying data which define a histogram. This is grouped in a struct to easily pass these around for use in contexts like the Editor. - Every histogram has a set of histogram parameters. - - Histogram is the base class of all histograms. Should not be used in practice. Every histogram contains functions to query what type of underlying histogram it is. If one has - the Histogram object, Is1D() or Is2D() can be called. If one only has the HistogramArgs, the values of x_par and y_par can be inspected. In particular, a 1D histogram will have - y_par set to "None", while a 2D histogram should have a valid parameter name for y_par. - - Histogram1D is a one dimensional (single parameter) histogram. Histogram2D is a two dimensional (two parameter) histogram. The only real difference between these in practice, other than - the obvious two vs. one parameter thing, is that a Histogram2D contains methods to set the z-axis range (color scale) which ImPlot does not provide intrinsic access to from the plot itself. - When the range is set to (0,0), the color scale is set to the default (0, maxValue). Otherwise the color is scaled as appropriate. If you query a Histogram1D for its color scale you will recieve - a nullptr. - - StatResults is a struct containing statistical information about a region of a histogram. - - GWM -- Feb 2022 -*/ -#ifndef HISTOGRAM_H -#define HISTOGRAM_H - -#include "NavCore.h" - -namespace Navigator { - - enum class SpectrumType - { - Histo1D, - Histo2D, - Summary, - None - }; - - std::string ConvertSpectrumTypeToString(SpectrumType type); - - - struct NAV_API StatResults - { - double integral = 0.0; - double cent_x = 0.0; - double cent_y = 0.0; - double sigma_x = 0.0; - double sigma_y = 0.0; - }; - - struct NAV_API HistogramArgs - { - HistogramArgs() {} - - HistogramArgs(const std::string& n, const std::string& x, int bins, double min, double max) : - name(n), x_par(x), nbins_x(bins), min_x(min), max_x(max) - { - } - - HistogramArgs(const std::string& n, const std::string& x, const std::string& y, int binsx, double minx, double maxx, int binsy, double miny, double maxy) : - name(n), x_par(x), y_par(y), nbins_x(binsx), min_x(minx), max_x(maxx), nbins_y(binsy), min_y(miny), max_y(maxy) - { - } - - SpectrumType type = SpectrumType::None; - std::string name = "None"; - std::string x_par = "None"; - std::string y_par = "None"; - std::vector cutsDrawnUpon; - std::vector cutsAppliedTo; - int nbins_x = 0; - double min_x = 0; - double max_x = 0; - int nbins_y = 0; - double min_y = 0; - double max_y = 0; - }; - - class NAV_API Histogram - { - public: - Histogram() : - m_initFlag(false) - { - } - Histogram(const HistogramArgs& params) : - m_params(params), m_initFlag(false) - { - } - - virtual ~Histogram() {}; - virtual void FillData(double x, double y=0.0) { NAV_WARN("Trying to fill a default histogram!"); } - virtual void Draw() {} - virtual void ClearData() {} - virtual StatResults AnalyzeRegion(double x_min, double x_max, double y_min = 0.0, double y_max = 0.0) { return StatResults(); } - inline virtual float* GetColorScaleRange() { return nullptr; } - inline virtual std::vector GetBinData() { return std::vector(); } - inline HistogramArgs& GetParameters() { return m_params; } - inline SpectrumType GetType() { return m_params.type; } - inline const std::string& GetXParam() const { return m_params.x_par; }; - inline const std::string& GetYParam() const { return m_params.y_par; }; - inline const std::string& GetName() const { return m_params.name; } - inline void AddCutToBeDrawn(const std::string& name) { m_params.cutsDrawnUpon.push_back(name); } - inline void AddCutToBeApplied(const std::string& name) { m_params.cutsAppliedTo.push_back(name); } - - protected: - HistogramArgs m_params; - bool m_initFlag; - }; - - class NAV_API Histogram1D : public Histogram - { - public: - Histogram1D(const HistogramArgs& params); - virtual ~Histogram1D(); - virtual void FillData(double x, double y=0.0) override; - virtual void Draw() override; - virtual void ClearData() override; - virtual StatResults AnalyzeRegion(double x_min, double x_max, double y_min = 0.0, double y_max = 0.0) override; - inline virtual std::vector GetBinData() override { return m_binCounts; } - - private: - void InitBins(); - - std::vector m_binCenters; - std::vector m_binCounts; - double m_binWidth; - - }; - - class NAV_API Histogram2D : public Histogram - { - public: - Histogram2D(const HistogramArgs& params); - virtual ~Histogram2D(); - virtual void FillData(double x, double y) override; - virtual void Draw() override; - virtual void ClearData() override; - virtual StatResults AnalyzeRegion(double x_min, double x_max, double y_min = 0.0, double y_max = 0.0) override; - inline virtual std::vector GetBinData() override { return m_binCounts; } - - inline virtual float* GetColorScaleRange() override { return m_colorScaleRange; } - - private: - void InitBins(); - - std::vector m_binCounts; - int m_nBinsTotal; - double m_binWidthY; - double m_binWidthX; - double m_maxBinContent; - float m_colorScaleRange[2]; - }; - - class NAV_API HistogramSummary : public Histogram - { - public: - HistogramSummary(const HistogramArgs& params, const std::vector& subhistos); - ~HistogramSummary(); - - inline const std::vector& GetSubHistograms() const { return m_subhistos; } - - virtual void FillData(double x, double y) override; - virtual void ClearData() override; - virtual void Draw() override; - inline virtual float* GetColorScaleRange() override { return m_colorScaleRange; } - virtual StatResults AnalyzeRegion(double x_min, double x_max, double y_min = 0.0, double y_max = 0.0) override; - inline virtual std::vector GetBinData() override { return m_binCounts; } - - private: - void InitBins(); - - std::vector m_subhistos; - const char** m_labels; - std::vector m_binCounts; - int m_nBinsTotal; - double m_binWidthX; - const double m_binWidthY = 1.0; - float m_colorScaleRange[2]; - }; - -} - -#endif diff --git a/Navigator/src/Navigator/Core/Layer.cpp b/Navigator/src/Navigator/Core/Layer.cpp deleted file mode 100644 index bfc5b68..0000000 --- a/Navigator/src/Navigator/Core/Layer.cpp +++ /dev/null @@ -1,17 +0,0 @@ -/* - Layer.cpp - Layer is an abstract class representing an aspect of the application. Based entirely upon @TheCherno's tutorials in his game engine series. - - GWM -- Feb 2022 -*/ -#include "Layer.h" - -namespace Navigator { - - Layer::Layer(const std::string& name) : - m_name(name) - { - } - - Layer::~Layer() {} -} \ No newline at end of file diff --git a/Navigator/src/Navigator/Core/Layer.h b/Navigator/src/Navigator/Core/Layer.h deleted file mode 100644 index 0c6ed74..0000000 --- a/Navigator/src/Navigator/Core/Layer.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - Layer.h - Layer is an abstract class representing an aspect of the application. Based entirely upon @TheCherno's tutorials in his game engine series. - - GWM -- Feb 2022 -*/ -#ifndef LAYER_H -#define LAYER_H - -#include "NavCore.h" -#include "Navigator/Events/Event.h" -#include "Timestep.h" - -namespace Navigator { - - class NAV_API Layer - { - public: - Layer(const std::string& name="Layer"); - virtual ~Layer(); - - virtual void OnAttach() {} - virtual void OnDetach() {} - virtual void OnImGuiRender() {} - virtual void OnUpdate(Timestep& step) {} - virtual void OnEvent(Event& event) {} - - inline const std::string& GetName() { return m_name; } - - private: - std::string m_name; - }; - -} - -#endif \ No newline at end of file diff --git a/Navigator/src/Navigator/Core/LayerStack.cpp b/Navigator/src/Navigator/Core/LayerStack.cpp deleted file mode 100644 index 0c2f225..0000000 --- a/Navigator/src/Navigator/Core/LayerStack.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - LayerStack.cpp - LayerStack is a container for Layers. Should only be owned by the Application. Layers are - managed by the LayerStack (memory-wise). There are two types of layers, overlays and regular layers. - Overlays are processed first in the event stack. This is entirely based upon @TheCherno's work shown in his - game engine tutorial series. - - GWM -- Feb 2022 -*/ -#include "LayerStack.h" - -namespace Navigator { - - LayerStack::LayerStack() {} - - LayerStack::~LayerStack() - { - for(Layer* layer : m_stack) - delete layer; - } - - void LayerStack::PushLayer(Layer* layer) - { - m_stack.emplace(m_stack.begin() + m_insertIndex, layer); - m_insertIndex++; - } - - void LayerStack::PushOverlay(Layer* layer) - { - m_stack.emplace_back(layer); - } - - void LayerStack::PopLayer(Layer* layer) - { - auto iter = std::find(m_stack.begin(), m_stack.end(), layer); - if(iter != m_stack.end()) - { - m_stack.erase(iter); - m_insertIndex--; - } - } - - void LayerStack::PopOverlay(Layer* layer) - { - auto iter = std::find(m_stack.begin(), m_stack.end(), layer); - if(iter != m_stack.end()) - m_stack.erase(iter); - } -} \ No newline at end of file diff --git a/Navigator/src/Navigator/Core/LayerStack.h b/Navigator/src/Navigator/Core/LayerStack.h deleted file mode 100644 index c18e93e..0000000 --- a/Navigator/src/Navigator/Core/LayerStack.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - LayerStack.h - LayerStack is a container for Layers. Should only be owned by the Application. Layers are - managed by the LayerStack (memory-wise). There are two types of layers, overlays and regular layers. - Overlays are processed first in the event stack. This is entirely based upon @TheCherno's work shown in his - game engine tutorial series. - - GWM -- Feb 2022 -*/ -#ifndef LAYER_STACK_H -#define LAYER_STACK_H - -#include "NavCore.h" -#include "Layer.h" - -namespace Navigator { - - class NAV_API LayerStack - { - public: - LayerStack(); - ~LayerStack(); - - void PushLayer(Layer* layer); - void PopLayer(Layer* layer); - void PushOverlay(Layer* layer); - void PopOverlay(Layer* layer); - - //helpers for iterator for loops - std::vector::iterator begin() { return m_stack.begin(); } - std::vector::iterator end() { return m_stack.end(); } - private: - std::vector m_stack; //These layers are owned by the LayerStack! - unsigned int m_insertIndex=0; //used to keep track of where to put layers vs. overlays. - }; - -} - -#endif \ No newline at end of file diff --git a/Navigator/src/Navigator/Core/Logger.cpp b/Navigator/src/Navigator/Core/Logger.cpp deleted file mode 100644 index 02868c0..0000000 --- a/Navigator/src/Navigator/Core/Logger.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/* - Logger.cpp - Logging class which is a thin wrapper on the spdlog library. Must be initialized in the project at start (see NavProject main.cpp for example). - Again, strongly based upon @TheCherno's work, see his Hazel repository for more details. - - Note Logger is a singleton. Should only ever be intialized once. Macros for calling the log provided to make clean looking code at the other side. - Consider making some logging calls only defined on Debug. - - GWM -- Feb 2022 -*/ -#include "Logger.h" -#include "spdlog/sinks/stdout_color_sinks.h" - -namespace Navigator { - - std::shared_ptr Logger::s_logger; - - void Logger::Init() - { - spdlog::set_pattern("%^[%T] %n: %v%$"); - - s_logger = spdlog::stdout_color_mt("NAV"); - s_logger->set_level(spdlog::level::trace); - } - -} \ No newline at end of file diff --git a/Navigator/src/Navigator/Core/Logger.h b/Navigator/src/Navigator/Core/Logger.h deleted file mode 100644 index 4e36c28..0000000 --- a/Navigator/src/Navigator/Core/Logger.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - Logger.h - Logging class which is a thin wrapper on the spdlog library. Must be initialized in the project at start (see NavProject main.cpp for example). - Again, strongly based upon @TheCherno's work, see his Hazel repository for more details. - - Note Logger is a singleton. Should only ever be intialized once. Macros for calling the log provided to make clean looking code at the other side. - Consider making some logging calls only defined on Debug. - - GWM -- Feb 2022 -*/ -#ifndef LOGGER_H -#define LOGGER_H - -#include "NavCore.h" -#include "spdlog/spdlog.h" -#include "spdlog/fmt/ostr.h" - -namespace Navigator { - - class NAV_API Logger - { - - public: - static void Init(); - - inline static std::shared_ptr GetLogger() { return s_logger; } - - private: - static std::shared_ptr s_logger; - - }; - -} - -//Macros for clean code. Different logging levels. -#define NAV_CRITICAL(...) ::Navigator::Logger::GetLogger()->critical(__VA_ARGS__) -#define NAV_WARN(...) ::Navigator::Logger::GetLogger()->warn(__VA_ARGS__) -#define NAV_ERROR(...) ::Navigator::Logger::GetLogger()->error(__VA_ARGS__) -#define NAV_TRACE(...) ::Navigator::Logger::GetLogger()->trace(__VA_ARGS__) -#define NAV_INFO(...) ::Navigator::Logger::GetLogger()->info(__VA_ARGS__) - -#endif \ No newline at end of file diff --git a/Navigator/src/Navigator/Core/NavCore.h b/Navigator/src/Navigator/Core/NavCore.h deleted file mode 100644 index b8d0315..0000000 --- a/Navigator/src/Navigator/Core/NavCore.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef NAVCORE_H -#define NAVCORE_H - -/* - Have to handle Windows dll import/export behavior. Otherwise, NAV_API - is just an empty expression. -*/ -#ifdef NAV_WINDOWS - #define NAV_API - - #ifdef _MSC_VER - #pragma warning (disable: 4127) // condition expression is constant - #pragma warning (disable: 4251) // class 'xxx' needs to have dll-interface to be used by clients of struct 'xxx' // when NAV_API is set to__declspec(dllexport) - #pragma warning (disable: 4091) // '__declspec(dllimport)': ignored on left of class 'xxx' when no variable is declared - #pragma warning (disable: 4996) // 'This function or variable may be unsafe': strcpy, strdup, sprintf, vsnprintf, sscanf, fopen - #if defined(_MSC_VER) && _MSC_VER >= 1922 // MSVC 2019 16.2 or later - #pragma warning (disable: 5054) // operator '|': deprecated between enumerations of different types - #endif - #pragma warning (disable: 26451) // [Static Analyzer] Arithmetic overflow : Using operator 'xxx' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator 'xxx' to avoid overflow(io.2). - #pragma warning (disable: 26495) // [Static Analyzer] Variable 'XXX' is uninitialized. Always initialize a member variable (type.6). - #pragma warning (disable: 26812) // [Static Analyzer] The enum type 'xxx' is unscoped. Prefer 'enum class' over 'enum' (Enum.3). - #endif -#else - #define NAV_API -#endif - - -//Bit field setter -#define BIT(x) (1< decltype(auto) { return this->x(std::forward(args)...); } - -#endif diff --git a/Navigator/src/Navigator/Core/Parameter.cpp b/Navigator/src/Navigator/Core/Parameter.cpp deleted file mode 100644 index 949bbc7..0000000 --- a/Navigator/src/Navigator/Core/Parameter.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/* - Parameter.cpp - Contains two data related structures, ParameterData and Parameter. Parameter here refers to a value which - can be associated with the axis of a histogram. ParameterData is a two component struct which represents the state of a single parameter, which is stored - in the global SpectrumManager (see SpectrumManager documentation). Parameter is an access point class for use within analysis. It provides scoped access to - the managed data. There are several important caveats to using the parameters this way, which is mostly related to synchronization: - - - Parameter contains no guarantee of thread safety. THIS IS BY DESIGN. Parameters should only be created within the context of an AnalysisStage (see AnalysisStage documentation). - As long as this is true, there is no risk of accessing parameter data outside of the physics thread, and that thread explicitly handles calculation of parameters - and updating of histograms. DO NOT make a Parameter outside of the AnalysisStage context. - - Parameters must be bound to the active SpectrumManager. This is done using the BindParameter function of the manager; Parameters are keyed based on their name string. - If two Parameters are made that are both named "x1", they are in fact the same parameter. In this way, values can be passed from one AnalysisStage to another. If you make a stage - called InitialStage with a Parameter named "x1" where x1 is set to 1.0, and then have a later stage called LaterStage with another Parameter named x1, it implicitly has the value 1.0 - due to it being set in the previous stage. - - Each Parameter has a valid flag. This is a boolean which idicates whether or not the parameter is in a valid state (the data event contianed a value for this parameter). Before using a parameter - in a calculation one should check if the parameter is valid using the IsValid() function. When a parameter is set using the SetValue() function, the valid flag is set to true. After the event is completely - processed (all analysis stages have been run and histograms have been updated) the manager should be called to run InvalidateParameters() to set all parameters as invalid (valid flag false). - - Those are the key points I can think of now. As more people use the code, I expect this section to grow and change. - - Credit to nscldaq and in particular NSCLSpecTcl which provided the inspiration for this parameter model. - - GWM -- Feb 2022 -*/ -#include "Parameter.h" - -namespace Navigator { - - Parameter::Parameter() : - m_name(""), m_pdata(nullptr) - { - } - - Parameter::Parameter(const std::string& name) : - m_name(name), m_pdata(nullptr) - { - } - - Parameter::~Parameter() {} - - //So that you can make arrays, std::vectors of Parameters (useful for big detector arrays) - //SpectrumManager::BindParameter() still needs to be used after this! - void Parameter::SetName(const std::string& name) - { - if (m_name != "") - { - NAV_ERROR("Attempting to change the name of an already bound Parameter! Set name: {0} New name: {1}", m_name, name); - return; - } - m_name = name; - } - - Variable::Variable() : - m_name(""), m_pdata(nullptr) - { - } - - Variable::Variable(const std::string& name) : - m_name(name), m_pdata(nullptr) - { - } - - Variable::~Variable() {} - - void Variable::SetName(const std::string& name) - { - if (m_name != "") - { - NAV_ERROR("Attempting to change the name of an already bound Variable! Set name: {0} New name: {1}", m_name, name); - return; - } - m_name = name; - } - - Scaler::Scaler() : - m_pdata(nullptr), m_name("") - { - } - - Scaler::Scaler(const std::string& name) : - m_pdata(nullptr), m_name(name) - { - } - - Scaler::~Scaler() {} - - void Scaler::SetName(const std::string& name) - { - if (m_name != "") - { - NAV_ERROR("Attempting to change the name of an already bound Scaler! Set name: {0} New name: {1}", m_name, name); - return; - } - m_name = name; - } -} diff --git a/Navigator/src/Navigator/Core/Parameter.h b/Navigator/src/Navigator/Core/Parameter.h deleted file mode 100644 index e314232..0000000 --- a/Navigator/src/Navigator/Core/Parameter.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - Parameter.h - Contains two data related structures, ParameterData and Parameter. Parameter here refers to a value which - can be associated with the axis of a histogram. ParameterData is a two component struct which represents the state of a single parameter, which is stored - in the global SpectrumManager (see SpectrumManager documentation). Parameter is an access point class for use within analysis. It provides scoped access to - the managed data. There are several important caveats to using the parameters this way, which is mostly related to synchronization: - - - Parameter contains no guarantee of thread safety. THIS IS BY DESIGN. Parameters should only be created within the context of an AnalysisStage (see AnalysisStage documentation). - As long as this is true, there is no risk of accessing parameter data outside of the physics thread, and that thread explicitly handles calculation of parameters - and updating of histograms. DO NOT make a Parameter outside of the AnalysisStage context. - - Parameters must be bound to the active SpectrumManager. This is done using the BindParameter function of the manager; Parameters are keyed based on their name string. - If two Parameters are made that are both named "x1", they are in fact the same parameter. In this way, values can be passed from one AnalysisStage to another. If you make a stage - called InitialStage with a Parameter named "x1" where x1 is set to 1.0, and then have a later stage called LaterStage with another Parameter named x1, it implicitly has the value 1.0 - due to it being set in the previous stage. - - Each Parameter has a valid flag. This is a boolean which idicates whether or not the parameter is in a valid state (the data event contianed a value for this parameter). Before using a parameter - in a calculation one should check if the parameter is valid using the IsValid() function. When a parameter is set using the SetValue() function, the valid flag is set to true. After the event is completely - processed (all analysis stages have been run and histograms have been updated) the manager should be called to run InvalidateParameters() to set all parameters as invalid (valid flag false). - - Those are the key points I can think of now. As more people use the code, I expect this section to grow and change rapidly. - - Credit to nscldaq and in particular NSCLSpecTcl which provided the inspiration for this parameter model. - - GWM -- Feb 2022 -*/ -#ifndef PARAMETER_H -#define PARAMETER_H - -#include "NavCore.h" - -namespace Navigator { - - //Underlying data - struct NAV_API ParameterData - { - double value=0.0; - bool validFlag=false; - }; - - //Interface to parameter data - class NAV_API Parameter - { - - public: - Parameter(); - Parameter(const std::string& name); - ~Parameter(); - - inline bool IsValid() const { return m_pdata->validFlag; } - inline void Invalidate() { m_pdata->validFlag = false; } - inline void SetValue(double value) { m_pdata->validFlag = true; m_pdata->value = value; } - inline double GetValue() const { return m_pdata->value; } - inline const std::string& GetName() const { return m_name; } - void SetName(const std::string& name); - - friend class SpectrumManager; - private: - std::string m_name; - std::shared_ptr m_pdata; - - }; - - //Similar to parameters, sometimes you want to have a numeric input (in calculation terms, a constant) - //which you can use with your analysis. To be able to expose these numeric values to the UI, we need to implement them - //in the manager. To help with this, Variables are atomics. So unlike Parameters they are implicity thread safe on read and write. - //However, this does not mean they can be modified in the analysis! To the AnalysisStage they should be treated as constant, while the UI - //should view them as modifiable. These are real god damn dangerous, but I think the power they offer outweighs the risk, for now. - class NAV_API Variable - { - public: - Variable(); - Variable(const std::string& name); - ~Variable(); - - inline void SetValue(double value) { *(m_pdata) = value; } - inline double GetValue() { return *(m_pdata); } - inline const std::string& GetName() { return m_name; } - void SetName(const std::string& name); - - friend class SpectrumManager; - private: - std::shared_ptr> m_pdata; - std::string m_name; - }; - - class Scaler - { - public: - Scaler(); - Scaler(const std::string& name); - ~Scaler(); - - inline void Increment() { ++(*m_pdata); } - - inline const std::string& GetName() { return m_name; } - inline uint64_t GetCounts() { return *m_pdata; } - void SetName(const std::string& name); - - friend class SpectrumManager; - private: - std::shared_ptr> m_pdata; - std::string m_name; - }; - -} - -#endif diff --git a/Navigator/src/Navigator/Core/SpectrumManager.cpp b/Navigator/src/Navigator/Core/SpectrumManager.cpp deleted file mode 100644 index 723f2c7..0000000 --- a/Navigator/src/Navigator/Core/SpectrumManager.cpp +++ /dev/null @@ -1,631 +0,0 @@ -/* - SpectrumManager.cpp - SpectrumManager is the global resource management class. Controls everything related to spectra (histograms, cuts, parameters). Since - the manager must traverse threads, explicit synchronoization is handled through a mutex. To this end, excessive calls to the manager should be - avoided if possible, as this will increase the lock deadtime in the application, which is especially bad for online data sources. - - Note that SpectrumManager is a singleton. There should only ever be one SpectrumManager with a given application. - - GWM -- Feb 2022 -*/ -#include "SpectrumManager.h" - -#include "implot.h" - -namespace Navigator { - - SpectrumManager* SpectrumManager::s_instance = new SpectrumManager(); - - SpectrumManager::SpectrumManager() - { - } - - SpectrumManager::~SpectrumManager() - { - } - - /*************Histogram Functions Begin*************/ - - void SpectrumManager::AddHistogram(const HistogramArgs& params) - { - NAV_PROFILE_FUNCTION(); - std::scoped_lock guard(m_managerMutex); - if (params.y_par == "None") //Check dimensionality - m_histoMap[params.name].reset(new Histogram1D(params)); - else - m_histoMap[params.name].reset(new Histogram2D(params)); - } - - void SpectrumManager::AddHistogramSummary(const HistogramArgs& params, const std::vector& subhistos) - { - NAV_PROFILE_FUNCTION(); - std::scoped_lock guard(m_managerMutex); - m_histoMap[params.name].reset(new HistogramSummary(params, subhistos)); - } - - void SpectrumManager::RemoveHistogram(const std::string& name) - { - NAV_PROFILE_FUNCTION(); - std::scoped_lock guard(m_managerMutex); - m_histoMap.erase(name); - } - - void SpectrumManager::AddCutToHistogramDraw(const std::string& cutname, const std::string& histoname) - { - NAV_PROFILE_FUNCTION(); - std::scoped_lock guard(m_managerMutex); - auto iter = m_histoMap.find(histoname); - if (iter != m_histoMap.end()) - iter->second->AddCutToBeDrawn(cutname); - } - - void SpectrumManager::AddCutToHistogramApplied(const std::string& cutname, const std::string& histoname) - { - NAV_PROFILE_FUNCTION(); - std::scoped_lock guard(m_managerMutex); - auto iter = m_histoMap.find(histoname); - if (iter != m_histoMap.end()) - iter->second->AddCutToBeApplied(cutname); - } - - //Use this to fill histograms. Currently can only be filled in bulk; maybe a use case for individual fills? - void SpectrumManager::UpdateHistograms() - { - NAV_PROFILE_FUNCTION(); - std::scoped_lock guard(m_managerMutex); - - //Set state of all cuts for the event - CheckCuts(); - - bool cutFlag; - for (auto& pair : m_histoMap) - { - cutFlag = true; - for (auto& cutname : pair.second->GetParameters().cutsAppliedTo) //check the associated cuts - { - if (!IsCutValid(cutname)) - { - cutFlag = false; - break; - } - } - if (!cutFlag) - continue; - - switch (pair.second->GetType()) - { - case SpectrumType::Histo1D: - { - auto iterX = m_paramMap.find(pair.second->GetXParam()); - if (iterX != m_paramMap.end() && iterX->second->validFlag) - pair.second->FillData(iterX->second->value); - break; - } - case SpectrumType::Histo2D: - { - auto iterX = m_paramMap.find(pair.second->GetXParam()); - auto iterY = m_paramMap.find(pair.second->GetYParam()); - if (iterX != m_paramMap.end() && iterY != m_paramMap.end() && iterX->second->validFlag && iterY->second->validFlag) - pair.second->FillData(iterX->second->value, iterY->second->value); - break; - } - case SpectrumType::Summary: - { - const std::vector& subhistos = std::static_pointer_cast(pair.second)->GetSubHistograms(); - for (size_t i = 0; i < subhistos.size(); i++) - { - auto iterX = m_paramMap.find(subhistos[i]); - if (iterX != m_paramMap.end() && iterX->second->validFlag) - pair.second->FillData(iterX->second->value, i + 0.5); //avoid floating point conversion issues - } - break; - } - case SpectrumType::None: - { - NAV_WARN("Found a spectrum with None type!"); - break; - } - } - } - - //Reset the state of all cuts in preparation for next event - ResetCutValidities(); - } - - void SpectrumManager::ClearHistograms() - { - NAV_PROFILE_FUNCTION(); - std::scoped_lock guard(m_managerMutex); - for (auto& pair : m_histoMap) - pair.second->ClearData(); - } - - void SpectrumManager::ClearHistogram(const std::string& name) - { - NAV_PROFILE_FUNCTION(); - std::scoped_lock guard(m_managerMutex); - auto iter = m_histoMap.find(name); - if (iter != m_histoMap.end()) - iter->second->ClearData(); - } - - void SpectrumManager::DrawHistogram(const std::string& name) - { - NAV_PROFILE_FUNCTION(); - std::scoped_lock guard(m_managerMutex); - auto iter = m_histoMap.find(name); - if (iter != m_histoMap.end()) - { - iter->second->Draw(); - for (auto& cutname : iter->second->GetParameters().cutsDrawnUpon) //Draw all cuts made upon the histogram - DrawCut(cutname); - } - } - - const HistogramArgs& SpectrumManager::GetHistogramParams(const std::string& name) - { - NAV_PROFILE_FUNCTION(); - std::scoped_lock guard(m_managerMutex); - auto iter = m_histoMap.find(name); - if (iter != m_histoMap.end()) - return iter->second->GetParameters(); - else - return m_nullHistoResult; - } - - //For 2D spectra, we want to allow zooming along the z-axis (color) - float* SpectrumManager::GetColorScaleRange(const std::string& name) - { - NAV_PROFILE_FUNCTION(); - std::scoped_lock guard(m_managerMutex); - auto iter = m_histoMap.find(name); - if (iter != m_histoMap.end()) - { - return iter->second->GetColorScaleRange(); - } - - return nullptr; - } - - std::vector SpectrumManager::GetBinData(const std::string& name) - { - std::scoped_lock guard(m_managerMutex); - auto iter = m_histoMap.find(name); - if (iter != m_histoMap.end()) - { - return iter->second->GetBinData(); - } - - return std::vector(); - } - - std::vector SpectrumManager::GetSubHistograms(const std::string& name) - { - NAV_PROFILE_FUNCTION(); - std::scoped_lock guard(m_managerMutex); - auto iter = m_histoMap.find(name); - if (iter != m_histoMap.end() && iter->second->GetType() == SpectrumType::Summary) - { - auto gram = std::static_pointer_cast(iter->second); - return gram->GetSubHistograms(); - } - return std::vector(); - } - - //Pass through for stats - StatResults SpectrumManager::AnalyzeHistogramRegion(const std::string& name, const ImPlotRect& region) - { - std::scoped_lock guard(m_managerMutex); - auto iter = m_histoMap.find(name); - if (iter != m_histoMap.end()) - return iter->second->AnalyzeRegion(region.X.Min, region.X.Max, region.Y.Min, region.Y.Max); - else - return StatResults(); - } - - //This function allows us to obtain the key histogram info in a list, avoiding excessive manager calls and thread-locks - //in something like the Editor. - std::vector SpectrumManager::GetListOfHistograms() - { - std::scoped_lock guard(m_managerMutex); - std::vector list; - list.reserve(m_histoMap.size()); - for (auto& gram : m_histoMap) - { - list.push_back(gram.second->GetParameters()); - } - return list; - } - - /*************Histogram Functions End*************/ - - /*************Graph Functions Begin*************/ - - void SpectrumManager::AddGraph(const GraphArgs& args) - { - std::scoped_lock guard(m_managerMutex); - m_graphMap[args.name].reset(new ScalerGraph(args)); - } - - void SpectrumManager::RemoveGraph(const std::string& name) - { - std::scoped_lock guard(m_managerMutex); - m_graphMap.erase(name); - } - - void SpectrumManager::UpdateGraphs(const Timestep& step) - { - std::scoped_lock guard(m_managerMutex); - uint64_t scalerVal; - for (auto& graph : m_graphMap) - { - auto& scalerIter = m_scalerMap.find(graph.second->GetScaler()); - if (scalerIter != m_scalerMap.end()) - { - scalerVal = *(scalerIter->second); - graph.second->UpdatePoints(step, scalerVal); - } - } - } - - void SpectrumManager::ClearGraphs() - { - std::scoped_lock guard(m_managerMutex); - for (auto& graph : m_graphMap) - graph.second->Clear(); - } - - void SpectrumManager::ClearGraph(const std::string& name) - { - std::scoped_lock guard(m_managerMutex); - auto& iter = m_graphMap.find(name); - if (iter != m_graphMap.end()) - iter->second->Clear(); - } - - void SpectrumManager::DrawGraph(const std::string& name) - { - std::scoped_lock guard(m_managerMutex); - auto& iter = m_graphMap.find(name); - if (iter != m_graphMap.end()) - iter->second->Draw(); - } - - const GraphArgs& SpectrumManager::GetGraphArgs(const std::string& name) - { - std::scoped_lock guard(m_managerMutex); - auto& iter = m_graphMap.find(name); - if (iter != m_graphMap.end()) - return iter->second->GetArgs(); - return m_nullGraphResult; - } - - std::vector SpectrumManager::GetListOfGraphs() - { - std::scoped_lock guard(m_managerMutex); - std::vector list; - list.reserve(m_graphMap.size()); - for (auto& graph : m_graphMap) - list.push_back(graph.second->GetArgs()); - return list; - } - - /*************Graph Functions End*************/ - - /*************Parameter Functions Begin*************/ - - //Bind a Parameter instance to the manager. If the Parameter doesn't exist, make a new one, otherwise attach to extant memory - void SpectrumManager::BindParameter(Parameter& param) - { - NAV_PROFILE_FUNCTION(); - std::scoped_lock guard(m_managerMutex); - auto iter = m_paramMap.find(param.GetName()); - if (iter == m_paramMap.end()) - { - m_paramMap[param.GetName()].reset(new ParameterData()); - } - - param.m_pdata = m_paramMap[param.GetName()]; - } - - //Bind a Parameter instance to the manager. If the Parameter doesn't exist, make a new one, otherwise attach to extant memory - //Additionally, make a default 1D histogram for the parameter (histogram has same name as parameter) - void SpectrumManager::BindParameter(Parameter& param, int nbins, double minVal, double maxVal) - { - NAV_PROFILE_FUNCTION(); - std::scoped_lock guard(m_managerMutex); - auto iter = m_paramMap.find(param.GetName()); - if (iter == m_paramMap.end()) - { - m_paramMap[param.GetName()].reset(new ParameterData()); - } - - param.m_pdata = m_paramMap[param.GetName()]; - - auto histoIter = m_histoMap.find(param.GetName()); - if (histoIter == m_histoMap.end()) - { - HistogramArgs histo(param.GetName(), param.GetName(), nbins, minVal, maxVal); - m_histoMap[param.GetName()].reset(new Histogram1D(histo)); - } - } - - //Once an analysis pass is done and histograms filled, reset all parameters - void SpectrumManager::InvalidateParameters() - { - NAV_PROFILE_FUNCTION(); - std::scoped_lock guard(m_managerMutex); - for (auto& param : m_paramMap) - { - param.second->validFlag = false; - param.second->value = 0.0; - } - } - - //Similar to GetListOfHistograms, see that documentation - std::vector SpectrumManager::GetListOfParameters() - { - std::scoped_lock guard(m_managerMutex); - std::vector list; - list.reserve(m_paramMap.size()); - for (auto iter : m_paramMap) - { - list.push_back(iter.first); - } - - return list; - } - - /*************Parameter Functions End*************/ - - /*************Variable Functions Begin*************/ - - void SpectrumManager::BindVariable(Variable& var) - { - NAV_PROFILE_FUNCTION(); - std::scoped_lock guard(m_managerMutex); - auto iter = m_varMap.find(var.GetName()); - if (iter == m_varMap.end()) - { - m_varMap[var.GetName()].reset(new std::atomic(0.0)); - } - var.m_pdata = m_varMap[var.GetName()]; - } - - std::vector SpectrumManager::GetListOfVariables() - { - std::scoped_lock guard(m_managerMutex); - std::vector list; - list.reserve(m_varMap.size()); - for (auto iter : m_varMap) - list.push_back(iter.first); - return list; - } - - /*************Variable Functions End*************/ - - void SpectrumManager::BindScaler(Scaler& scaler) - { - NAV_PROFILE_FUNCTION(); - std::scoped_lock guard(m_managerMutex); - auto iter = m_scalerMap.find(scaler.GetName()); - if (iter == m_scalerMap.end()) - { - m_scalerMap[scaler.GetName()].reset(new std::atomic(0)); - } - scaler.m_pdata = m_scalerMap[scaler.GetName()]; - } - - void SpectrumManager::ResetScalers() - { - NAV_PROFILE_FUNCTION(); - std::scoped_lock guard(m_managerMutex); - for (auto& scaler : m_scalerMap) - { - *(scaler.second) = 0; - } - } - - std::vector SpectrumManager::GetListOfScalers() - { - std::scoped_lock guard(m_managerMutex); - std::vector list; - list.reserve(m_scalerMap.size()); - for (auto& iter : m_scalerMap) - list.push_back(iter.first); - return list; - } - - /*************Cut Functions Begin*************/ - - void SpectrumManager::AddCut(const CutArgs& params, double min, double max) - { - std::scoped_lock guard(m_managerMutex); - m_cutMap[params.name].reset(new Cut1D(params, min, max)); - } - - void SpectrumManager::AddCut(const CutArgs& params, const std::vector& xpoints, const std::vector& ypoints) - { - std::scoped_lock guard(m_managerMutex); - m_cutMap[params.name].reset(new Cut2D(params, xpoints, ypoints)); - } - - void SpectrumManager::AddCut(const CutArgs& params, const std::vector& subhistos, double min, double max) - { - std::scoped_lock guard(m_managerMutex); - m_cutMap[params.name].reset(new CutSummary(params, subhistos, min, max)); - } - - void SpectrumManager::RemoveCut(const std::string& name) - { - NAV_PROFILE_FUNCTION(); - std::scoped_lock guard(m_managerMutex); - m_cutMap.erase(name); - RemoveCutFromHistograms(name); //Once a cut is gone, remove all references to it. - } - - std::vector SpectrumManager::GetCutXPoints(const std::string& name) - { - std::scoped_lock guard(m_managerMutex); - std::vector null_result; - auto iter = m_cutMap.find(name); - if (iter != m_cutMap.end()) - return iter->second->GetXValues(); - return null_result; - } - - std::vector SpectrumManager::GetCutYPoints(const std::string& name) - { - std::scoped_lock guard(m_managerMutex); - std::vector null_result; - auto iter = m_cutMap.find(name); - if (iter != m_cutMap.end()) - return iter->second->GetYValues(); - return null_result; - } - - std::vector SpectrumManager::GetCutSubHistograms(const std::string& cutname) - { - std::scoped_lock guard(m_managerMutex); - auto iter = m_cutMap.find(cutname); - if (iter != m_cutMap.end() && iter->second->GetType() == CutType::CutSummaryAny || iter->second->GetType() == CutType::CutSummaryAll) - { - auto cut = std::static_pointer_cast(iter->second); - return cut->GetSubHistograms(); - } - return std::vector(); - } - - //Similar to GetListOfHistograms, see that documentation - std::vector SpectrumManager::GetListOfCuts() - { - std::scoped_lock guard(m_managerMutex); - std::vector list; - list.reserve(m_cutMap.size()); - for (auto& entry : m_cutMap) - list.push_back(entry.second->GetCutArgs()); - return list; - } - - /*************Cut Functions End*************/ - - /* - Private Functions - Can only be called from within the SpectrumManager, therefore the lock should already have been aquired by - whatever parent function calls them. No explicit synchronization. - */ - - //Can only be called by RemoveCut currently. May be a use case where this should be promoted to public to on the fly mod a gram. - void SpectrumManager::RemoveCutFromHistograms(const std::string& cutname) - { - NAV_PROFILE_FUNCTION(); - for (auto& gram : m_histoMap) - { - auto& params = gram.second->GetParameters(); - for (size_t i = 0; i < params.cutsDrawnUpon.size(); ++i) - { - if (params.cutsDrawnUpon[i] == cutname) - { - params.cutsDrawnUpon.erase(params.cutsDrawnUpon.begin() + i); - } - } - for (size_t i = 0; i < params.cutsAppliedTo.size(); ++i) - { - if (params.cutsAppliedTo[i] == cutname) - { - params.cutsAppliedTo.erase(params.cutsAppliedTo.begin() + i); - } - } - } - } - - //Obv. only need to draw a cut if its parent histogram is drawn. - void SpectrumManager::DrawCut(const std::string& name) - { - NAV_PROFILE_FUNCTION(); - auto iter = m_cutMap.find(name); - if (iter != m_cutMap.end()) - iter->second->Draw(); - } - - //Set the state of the cuts for the current event. Called by the - void SpectrumManager::CheckCuts() - { - NAV_PROFILE_FUNCTION(); - for (auto& iter : m_cutMap) - { - const std::string& xpar = iter.second->GetXParameter(); - const std::string& ypar = iter.second->GetYParameter(); - switch (iter.second->GetType()) - { - case CutType::Cut1D: - { - auto iterX = m_paramMap.find(xpar); - if (iterX != m_paramMap.end() && iterX->second->validFlag) - iter.second->IsInside(iterX->second->value); - break; - } - case CutType::Cut2D: - { - auto iterX = m_paramMap.find(xpar); - auto iterY = m_paramMap.find(ypar); - if (iterX != m_paramMap.end() && iterX->second->validFlag && iterY != m_paramMap.end() && iterY->second->validFlag) - iter.second->IsInside(iterX->second->value, iterY->second->value); - break; - } - case CutType::CutSummaryAll: - { - std::vector paramlist = std::static_pointer_cast(iter.second)->GetSubHistograms(); - for (auto& param : paramlist) - { - auto iterX = m_paramMap.find(param); - if (iterX != m_paramMap.end() && iterX->second->validFlag) - { - iter.second->IsInside(iterX->second->value); - if (!iter.second->IsValid()) - break; - } - } - break; - } - case CutType::CutSummaryAny: - { - std::vector paramlist = std::static_pointer_cast(iter.second)->GetSubHistograms(); - for (auto& param : paramlist) - { - auto iterX = m_paramMap.find(param); - if (iterX != m_paramMap.end() && iterX->second->validFlag) - { - iter.second->IsInside(iterX->second->value); - if (iter.second->IsValid()) - break; - } - } - break; - } - case CutType::None: - { - NAV_WARN("Found a cut with None type!"); - break; - } - } - } - } - - bool SpectrumManager::IsCutValid(const std::string& name) - { - NAV_PROFILE_FUNCTION(); - auto iter = m_cutMap.find(name); - if (iter != m_cutMap.end()) - return iter->second->IsValid(); - return false; - } - - void SpectrumManager::ResetCutValidities() - { - for (auto& iter : m_cutMap) - { - iter.second->ResetValidity(); - } - } -} diff --git a/Navigator/src/Navigator/Core/SpectrumManager.h b/Navigator/src/Navigator/Core/SpectrumManager.h deleted file mode 100644 index fa2d63d..0000000 --- a/Navigator/src/Navigator/Core/SpectrumManager.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - SpectrumManager.h - SpectrumManager is the global resource management class. Controls everything related to spectra (histograms, cuts, parameters). Since - the manager must traverse threads, explicit synchronoization is handled through a mutex. To this end, excessive calls to the manager should be - avoided if possible, as this will increase the lock deadtime in the application, which is especially bad for online data sources. - - Note that SpectrumManager is a singleton. There should only ever be one SpectrumManager with a given application. - - GWM -- Feb 2022 -*/ -#ifndef SPECTRUM_MANAGER_H -#define SPECTRUM_MANAGER_H - -#include "Histogram.h" -#include "Cut.h" -#include "Parameter.h" -#include "Graph.h" -#include "Timestep.h" - -#include - -struct ImPlotRect; - -namespace Navigator { - - class NAV_API SpectrumManager - { - public: - SpectrumManager(); - ~SpectrumManager(); - - inline static SpectrumManager& GetInstance() { return *s_instance; } - - //To clear all managed spectra. Note that Parameters are left untouched. - inline void RemoveAllSpectra() - { - std::scoped_lock guard(m_managerMutex); - m_histoMap.clear(); - m_cutMap.clear(); - } - - /*Histogram Functions*/ - void AddHistogram(const HistogramArgs& params); - void AddHistogramSummary(const HistogramArgs& params, const std::vector& subhistos); - void RemoveHistogram(const std::string& name); - void AddCutToHistogramDraw(const std::string& cutname, const std::string& histoname); - void AddCutToHistogramApplied(const std::string& cutname, const std::string& histoname); - void UpdateHistograms(); - void ClearHistograms(); - void ClearHistogram(const std::string& name); - void DrawHistogram(const std::string& name); - const HistogramArgs& GetHistogramParams(const std::string& name); - float* GetColorScaleRange(const std::string& name); - std::vector GetBinData(const std::string& name); - std::vector GetSubHistograms(const std::string& name); - StatResults AnalyzeHistogramRegion(const std::string& name, const ImPlotRect& region); - std::vector GetListOfHistograms(); - /********************/ - - /*ScalerGraph Functions*/ - void AddGraph(const GraphArgs& args); - void RemoveGraph(const std::string& name); - void UpdateGraphs(const Timestep& step); - void ClearGraphs(); - void ClearGraph(const std::string& name); - void DrawGraph(const std::string& name); - const GraphArgs& GetGraphArgs(const std::string& name); - std::vector GetListOfGraphs(); - /********************/ - - /*Parameter Functions*/ - void BindParameter(Parameter& param); - void BindParameter(Parameter& param, int nbins, double maxVal, double minVal); - void InvalidateParameters(); - std::vector GetListOfParameters(); - /*********************/ - - /*Variable Functions*/ - void BindVariable(Variable& var); - std::vector GetListOfVariables(); - /********************/ - - /*Scaler Functions*/ - void BindScaler(Scaler& scaler); - void ResetScalers(); - std::vector GetListOfScalers(); - /******************/ - - /*Cut Functions*/ - void AddCut(const CutArgs& params, double min, double max); - void AddCut(const CutArgs& params, const std::vector& xpoints, const std::vector& ypoints); - void AddCut(const CutArgs& params, const std::vector& subhistos, double min, double max); - void RemoveCut(const std::string& name); - std::vector GetCutXPoints(const std::string& name); - std::vector GetCutYPoints(const std::string& name); - std::vector GetCutSubHistograms(const std::string& cutname); - std::vector GetListOfCuts(); - /**************/ - - private: - //Only used from within manager - void RemoveCutFromHistograms(const std::string& cutname); - void DrawCut(const std::string& name); - void CheckCuts(); - bool IsCutValid(const std::string& name); - void ResetCutValidities(); - - static SpectrumManager* s_instance; - - //Actual data - std::unordered_map> m_histoMap; - std::unordered_map> m_cutMap; - std::unordered_map> m_paramMap; - std::unordered_map>> m_varMap; - std::unordered_map>> m_scalerMap; - std::unordered_map> m_graphMap; - - HistogramArgs m_nullHistoResult; //For handling bad query - GraphArgs m_nullGraphResult; //For handling bad query - - std::mutex m_managerMutex; //synchronization - }; - -} - -#endif diff --git a/Navigator/src/Navigator/Core/SpectrumSerializer.cpp b/Navigator/src/Navigator/Core/SpectrumSerializer.cpp deleted file mode 100644 index 3760838..0000000 --- a/Navigator/src/Navigator/Core/SpectrumSerializer.cpp +++ /dev/null @@ -1,455 +0,0 @@ -/* - SpectrumSerializer.h - SpectrumSerializer class providing method to write/read spectra (histograms and cuts) to/from a .nav file. These are formated text files. - Note that by virtue of the way that cuts work, they are written first. - - A couple of notes: - - Writing/reading data is a pretty expensive concept from a thread-locking perspective. Not recommended for use during active analysis. - - Deserializing (reading) by default removes all current histograms and cuts. This avoids any issues with collisions, but may not always be desireable. - - There is no intrinsic checking of whether a parameter for a cut/histogram to be loaded exists within the current project. If you load something and the histograms - don't fill, it is most likely due to the parameter not being defined in the current project. - - GWM -- Feb 2022 -*/ -#include "SpectrumSerializer.h" -#include "SpectrumManager.h" - -#include - -namespace Navigator { - - SpectrumSerializer::SpectrumSerializer(const std::string& filepath) : - m_filename(filepath) - { - } - - SpectrumSerializer::~SpectrumSerializer() {} - - void SpectrumSerializer::SerializeData(const std::vector& histoList, const std::vector& cutList) - { - SpectrumManager& manager = SpectrumManager::GetInstance(); - - std::ofstream output(m_filename); - if (!output.is_open()) - { - NAV_ERROR("Unable to open {0} to write data.", m_filename); - return; - } - - output << "begin_cuts" << std::endl; - for (auto& cut : cutList) - { - if (cut.type == CutType::Cut1D) - { - std::vector xpoints = manager.GetCutXPoints(cut.name); - output << "\tbegin_cut1D" << std::endl; - output << "\t\tname: " << cut.name << std::endl; - output << "\t\txparam: " << cut.x_par << std::endl; - output << "\t\tminValue: " << xpoints[0] << std::endl; - output << "\t\tmaxValue: " << xpoints[1] << std::endl; - output << "\tend_cut1D" << std::endl; - } - else if (cut.type == CutType::Cut2D) - { - std::vector xpoints = manager.GetCutXPoints(cut.name); - std::vector ypoints = manager.GetCutYPoints(cut.name); - output << "\tbegin_cut2D" << std::endl; - output << "\t\tname: " << cut.name << std::endl; - output << "\t\txparam: " << cut.x_par << std::endl; - output << "\t\typaram: " << cut.y_par << std::endl; - output << "\t\tbegin_xvalues" << std::endl; - for (const auto& value : xpoints) - { - output << "\t\t\t" << value << std::endl; - } - output << "\t\tend_xvalues" << std::endl; - output << "\t\tbegin_yvalues" << std::endl; - for (const auto& value : ypoints) - { - output << "\t\t\t" << value << std::endl; - } - output << "\t\tend_yvalues" << std::endl; - output << "\tend_cut2D" << std::endl; - } - else if (cut.type == CutType::CutSummaryAll) - { - std::vector subhistos = manager.GetCutSubHistograms(cut.name); - std::vector xpoints = manager.GetCutXPoints(cut.name); - output << "\tbegin_cutSummaryAll" << std::endl; - output << "\t\tname: " << cut.name << std::endl; - output << "\t\tminValue: " << xpoints[0] << std::endl; - output << "\t\tmaxValue: " << xpoints[1] << std::endl; - output << "\t\tbegin_parameters" << std::endl; - for (auto& par : subhistos) - { - output << "\t\t\t" << par << std::endl; - } - output << "\t\tend_parameters" << std::endl; - output << "\tend_cutSummaryAll" << std::endl; - } - else if (cut.type == CutType::CutSummaryAny) - { - std::vector subhistos = manager.GetCutSubHistograms(cut.name); - std::vector xpoints = manager.GetCutXPoints(cut.name); - output << "\tbegin_cutSummaryAny" << std::endl; - output << "\t\tname: " << cut.name << std::endl; - output << "\t\tminValue: " << xpoints[0] << std::endl; - output << "\t\tmaxValue: " << xpoints[1] << std::endl; - output << "\t\tbegin_parameters" << std::endl; - for (auto& par : subhistos) - { - output << "\t\t\t" << par << std::endl; - } - output << "\t\tend_parameters" << std::endl; - output << "\tend_cutSummaryAny" << std::endl; - } - } - output << "end_cuts" << std::endl; - - output << "begin_histograms" << std::endl; - for (auto& params : histoList) - { - if (params.type == SpectrumType::Histo1D) - { - output << "\tbegin_histogram1D" << std::endl; - output << "\t\tname: " << params.name << std::endl; - output << "\t\txparam: " << params.x_par << std::endl; - output << "\t\tNxbins: " << params.nbins_x << std::endl; - output << "\t\tXMin: " << params.min_x << std::endl; - output << "\t\tXMax: " << params.max_x << std::endl; - output << "\t\tbegin_cutsdrawn" << std::endl; - for (const auto& name : params.cutsDrawnUpon) - { - output << "\t\t\t" << name << std::endl; - } - output << "\t\tend_cutsdrawn" << std::endl; - output << "\t\tbegin_cutsapplied" << std::endl; - for (const auto& name : params.cutsAppliedTo) - { - output << "\t\t\t" << name << std::endl; - } - output << "\t\tend_cutsapplied" << std::endl; - output << "\tend_histogram1D" << std::endl; - } - else if (params.type == SpectrumType::Histo2D) - { - output << "\tbegin_histogram2D" << std::endl; - output << "\t\tname: " << params.name << std::endl; - output << "\t\txparam: " << params.x_par << std::endl; - output << "\t\typaram: " << params.y_par << std::endl; - output << "\t\tNxbins: " << params.nbins_x << std::endl; - output << "\t\tXMin: " << params.min_x << std::endl; - output << "\t\tXMax: " << params.max_x << std::endl; - output << "\t\tNybins: " << params.nbins_y << std::endl; - output << "\t\tYMin: " << params.min_y << std::endl; - output << "\t\tYMax: " << params.max_y << std::endl; - output << "\t\tbegin_cutsdrawn" << std::endl; - for (const auto& name : params.cutsDrawnUpon) - { - output << "\t\t\t" << name << std::endl; - } - output << "\t\tend_cutsdrawn" << std::endl; - output << "\t\tbegin_cutsapplied" << std::endl; - for (const auto& name : params.cutsAppliedTo) - { - output << "\t\t\t" << name << std::endl; - } - output << "\t\tend_cutsapplied" << std::endl; - output << "\tend_histogram2D" << std::endl; - } - else if (params.type == SpectrumType::Summary) - { - output << "\tbegin_histogramSummary" << std::endl; - output << "\t\tname: " << params.name << std::endl; - output << "\t\tNxbins: " << params.nbins_x << std::endl; - output << "\t\tXMin: " << params.min_x << std::endl; - output << "\t\tXMax: " << params.max_x << std::endl; - output << "\t\tbegin_subhistos" << std::endl; - std::vector subhistos = manager.GetSubHistograms(params.name); - for (auto& name : subhistos) - { - output << "\t\t\t" << name << std::endl; - } - output << "\t\tend_subhistos" << std::endl; - output << "\t\tbegin_cutsdrawn" << std::endl; - for (const auto& name : params.cutsDrawnUpon) - { - output << "\t\t\t" << name << std::endl; - } - output << "\t\tend_cutsdrawn" << std::endl; - output << "\t\tbegin_cutsapplied" << std::endl; - for (const auto& name : params.cutsAppliedTo) - { - output << "\t\t\t" << name << std::endl; - } - output << "\t\tend_cutsapplied" << std::endl; - output << "\tend_histogram1D" << std::endl; - } - } - output << "end_histograms" << std::endl; - - NAV_INFO("Successfully saved data to {0}", m_filename); - output.close(); - } - - void SpectrumSerializer::DeserializeData() - { - SpectrumManager& manager = SpectrumManager::GetInstance(); - manager.RemoveAllSpectra(); //When loading in, we remove all extant data, to avoid any potential collisions. - - std::ifstream input(m_filename); - if (!input.is_open()) - { - NAV_ERROR("Unable to open {0} to read data!", m_filename); - return; - } - - std::string check; - double value_doub; - CutArgs cut_data, reset_cut; - std::vector cut_xdata; - std::vector cut_ydata; - std::vector subhistos; - HistogramArgs hist_data, reset_hist; - - while (input >> check) - { - if (check == "begin_cuts") - { - while (input >> check) - { - cut_data = reset_cut; - cut_xdata.clear(); - cut_ydata.clear(); - subhistos.clear(); - if (check == "begin_cut1D") - { - cut_data.type = CutType::Cut1D; - input >> check >> cut_data.name; - input >> check >> cut_data.x_par; - input >> check >> value_doub; - cut_xdata.push_back(value_doub); - input >> check >> value_doub; - cut_xdata.push_back(value_doub); - input >> check; - manager.AddCut(cut_data, cut_xdata[0], cut_xdata[1]); - } - else if (check == "begin_cut2D") - { - cut_data.type = CutType::Cut2D; - input >> check >> cut_data.name; - input >> check >> cut_data.x_par; - input >> check >> cut_data.y_par; - while (input >> check) - { - if (check == "begin_xvalues") - continue; - else if (check == "end_xvalues") - break; - else - cut_xdata.push_back(std::stod(check)); - } - while (input >> check) - { - if (check == "begin_yvalues") - continue; - else if (check == "end_yvalues") - break; - else - cut_ydata.push_back(std::stod(check)); - } - input >> check; - manager.AddCut(cut_data, cut_xdata, cut_ydata); - } - else if (check == "begin_cutSummaryAll") - { - cut_data.type = CutType::CutSummaryAll; - input >> check >> cut_data.name; - input >> check >> value_doub; - cut_xdata.push_back(value_doub); - input >> check >> value_doub; - cut_xdata.push_back(value_doub); - while (input >> check) - { - if (check == "begin_parameters") - continue; - else if (check == "end_parameters") - break; - else - subhistos.push_back(check); - } - input >> check; - manager.AddCut(cut_data, subhistos, cut_xdata[0], cut_xdata[1]); - } - else if (check == "begin_cutSummaryAny") - { - cut_data.type = CutType::CutSummaryAny; - input >> check >> cut_data.name; - input >> check >> value_doub; - cut_xdata.push_back(value_doub); - input >> check >> value_doub; - cut_xdata.push_back(value_doub); - while (input >> check) - { - if (check == "begin_parameters") - continue; - else if (check == "end_parameters") - break; - else - subhistos.push_back(check); - } - input >> check; - manager.AddCut(cut_data, subhistos, cut_xdata[0], cut_xdata[1]); - } - else if (check == "end_cuts") - break; - else - { - NAV_ERROR("Deserialization error; unexpected check condition while parsing cut data! Current value: {0}", check); - input.close(); - return; - } - } - } - else if (check == "begin_histograms") - { - while (input >> check) - { - hist_data = reset_hist; - if (check == "begin_histogram1D") - { - hist_data.type = SpectrumType::Histo1D; - input >> check >> hist_data.name; - input >> check >> hist_data.x_par; - input >> check >> hist_data.nbins_x; - input >> check >> hist_data.min_x; - input >> check >> hist_data.max_x; - while (input >> check) - { - if (check == "begin_cutsdrawn") - continue; - else if (check == "end_cutsdrawn") - break; - else - { - hist_data.cutsDrawnUpon.push_back(check); - } - } - while (input >> check) - { - if (check == "begin_cutsapplied") - continue; - else if (check == "end_cutsapplied") - break; - else - { - hist_data.cutsAppliedTo.push_back(check); - } - } - input >> check; - manager.AddHistogram(hist_data); - } - else if (check == "begin_histogram2D") - { - hist_data.type = SpectrumType::Histo2D; - input >> check >> hist_data.name; - input >> check >> hist_data.x_par; - input >> check >> hist_data.y_par; - input >> check >> hist_data.nbins_x; - input >> check >> hist_data.min_x; - input >> check >> hist_data.max_x; - input >> check >> hist_data.nbins_y; - input >> check >> hist_data.min_y; - input >> check >> hist_data.max_y; - while (input >> check) - { - if (check == "begin_cutsdrawn") - continue; - else if (check == "end_cutsdrawn") - break; - else - { - hist_data.cutsDrawnUpon.push_back(check); - } - } - while (input >> check) - { - if (check == "begin_cutsapplied") - continue; - else if (check == "end_cutsapplied") - break; - else - { - hist_data.cutsAppliedTo.push_back(check); - } - } - input >> check; - manager.AddHistogram(hist_data); - } - else if (check == "begin_histogramSummary") - { - subhistos.clear(); - hist_data.type = SpectrumType::Summary; - input >> check >> hist_data.name; - input >> check >> hist_data.nbins_x; - input >> check >> hist_data.min_x; - input >> check >> hist_data.max_x; - while (input >> check) - { - if (check == "begin_subhistos") - continue; - else if (check == "end_subhistos") - break; - else - { - subhistos.push_back(check); - } - } - while (input >> check) - { - if (check == "begin_cutsdrawn") - continue; - else if (check == "end_cutsdrawn") - break; - else - { - hist_data.cutsDrawnUpon.push_back(check); - } - } - while (input >> check) - { - if (check == "begin_cutsapplied") - continue; - else if (check == "end_cutsapplied") - break; - else - { - hist_data.cutsAppliedTo.push_back(check); - } - } - input >> check; - manager.AddHistogramSummary(hist_data, subhistos); - } - else if (check == "end_histograms") - break; - else - { - NAV_ERROR("Deserialization error; unexpected check condition while parsing histogram data! Current value: {0}", check); - input.close(); - return; - } - } - } - else - { - NAV_ERROR("Deserialization error; unexpected check condition at top level! Current value: {0}", check); - input.close(); - return; - } - } - - NAV_INFO("Successfully loaded data from {0}", m_filename); - input.close(); - } - -} \ No newline at end of file diff --git a/Navigator/src/Navigator/Core/SpectrumSerializer.h b/Navigator/src/Navigator/Core/SpectrumSerializer.h deleted file mode 100644 index 573bc53..0000000 --- a/Navigator/src/Navigator/Core/SpectrumSerializer.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - SpectrumSerializer.h - SpectrumSerializer class providing method to write/read spectra (histograms and cuts) to/from a .nav file. These are formated text files. - Note that by virtue of the way that cuts work, they are written first. - - A couple of notes: - - Writing/reading data is a pretty expensive concept from a thread-locking perspective. Not recommended for use during active analysis. - - Deserializing (reading) by default removes all current histograms and cuts. This avoids any issues with collisions, but may not always be desireable. - - There is no intrinsic checking of whether a parameter for a cut/histogram to be loaded exists within our framework. If you load something and the histograms - don't fill, it is most likely due to the parameter not being defined in the current project. - - GWM -- Feb 2022 -*/ -#ifndef SPECTRUM_SERIALIZER_H -#define SPECTRUM_SERIALIZER_H - -#include "Histogram.h" -#include "Cut.h" - -namespace Navigator { - - class NAV_API SpectrumSerializer - { - public: - SpectrumSerializer(const std::string& filepath); - ~SpectrumSerializer(); - - void SerializeData(const std::vector& histoList, const std::vector& cutList); - void DeserializeData(); - - inline const std::string& GetFilename() { return m_filename; } - - private: - std::string m_filename; - }; - -} - -#endif \ No newline at end of file diff --git a/Navigator/src/Navigator/Core/Timestep.h b/Navigator/src/Navigator/Core/Timestep.h deleted file mode 100644 index 620e3c5..0000000 --- a/Navigator/src/Navigator/Core/Timestep.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef TIMESTEP_H -#define TIMESTEP_H - -namespace Navigator { - - class Timestep - { - public: - Timestep(float time=0.0f) : - m_time(time) - { - } - - void SetTime(float time) { m_time = time; } - - operator float() const { return m_time; } - - float GetElapsedSeconds() const { return m_time; } - float GetElapsedMilliseconds() const { return m_time * 1000.0f; } - private: - float m_time; - }; -} - -#endif \ No newline at end of file diff --git a/Navigator/src/Navigator/Core/Window.h b/Navigator/src/Navigator/Core/Window.h deleted file mode 100644 index 843f3e1..0000000 --- a/Navigator/src/Navigator/Core/Window.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - Window.h - - Abstract class for a window in Navigator. Based entirely upon the work of @TheCherno, see his Hazel repository. This exists primarily to allow for the option - to extend Navigator to other rendering backends, most likely Metal, or potentially DX12. See code in Platform for specific implementations (currently only for OpenGL). - - GWM -- Feb 2022 -*/ -#ifndef WINDOW_H -#define WINDOW_H - -#include "NavCore.h" -#include "Navigator/Events/Event.h" - -namespace Navigator { - - class NAV_API WindowProperties - { - public: - unsigned int width, height; - std::string name; - - WindowProperties(const std::string& title="Navigator", unsigned int w=1280, unsigned int h=720) : - width(w), height(h), name(title) - { - } - - }; - - class NAV_API Window - { - public: - - using EventCallbackFunc = std::function; - - virtual ~Window() {} - - virtual void OnUpdate() = 0; - virtual unsigned int GetWidth() const = 0; - virtual unsigned int GetHeight() const = 0; - virtual std::string GetName() const = 0; - - virtual void SetEventCallback(const EventCallbackFunc& function) = 0; - virtual void SetVSync(bool enabled) = 0; - virtual bool IsVSync() const = 0; - - virtual void* GetNativeWindow() const =0; - - static Window* Create(const WindowProperties& props = WindowProperties()); - }; -} - -#endif \ No newline at end of file diff --git a/Navigator/src/Navigator/Editor/EditorLayer.cpp b/Navigator/src/Navigator/Editor/EditorLayer.cpp deleted file mode 100644 index d4727ab..0000000 --- a/Navigator/src/Navigator/Editor/EditorLayer.cpp +++ /dev/null @@ -1,416 +0,0 @@ -/* - EditorLayer.cpp - Application layer encapsulating the editor for Navigator. Written using the Dear ImGui library. Setup based off of @TheCherno's Hazel game engine. - EditorLayer essentially controls the state for UI related actions. - - GWM -- Feb 2022 -*/ -#include "EditorLayer.h" -#include "imgui.h" -#include "misc/cpp/imgui_stdlib.h" -#include "implot.h" -#include "FileDialog.h" -#include "Navigator/Core/Application.h" -#include "Navigator/Core/SpectrumSerializer.h" -#include "Navigator/Core/SpectrumManager.h" - -#include "IconsFontAwesome5.h" - -namespace Navigator { - - bool SortByString(const std::string& p1, const std::string& p2) - { - return p1 < p2; - } - - EditorLayer::EditorLayer() : - Layer("EditorLayer"), m_removeHistogram(false), m_removeCut(false), m_exportHistogram(false) - { - } - - EditorLayer::~EditorLayer() {} - - void EditorLayer::OnAttach() - { - } - - void EditorLayer::OnDetach() - { - } - - void EditorLayer::OnUpdate(Timestep& step) - { - } - - void EditorLayer::OnEvent(Event& e) - { - } - - //These updates are used whenever a new object is added to the manager. - void EditorLayer::UpdateHistogramList() - { - m_histoList = SpectrumManager::GetInstance().GetListOfHistograms(); - std::sort(m_histoList.begin(), m_histoList.end(), SortByName); - } - - void EditorLayer::UpdateCutList() - { - m_cutList = SpectrumManager::GetInstance().GetListOfCuts(); - std::sort(m_cutList.begin(), m_cutList.end(), SortByName); - } - - void EditorLayer::UpdateParameterList() - { - m_paramList = SpectrumManager::GetInstance().GetListOfParameters(); - std::sort(m_paramList.begin(), m_paramList.end(), SortByString); - } - - //The main function - void EditorLayer::OnImGuiRender() - { - NAV_PROFILE_FUNCTION(); - static bool startFlag = true; //first render retrieve base - if(startFlag) - { - UpdateParameterList(); - UpdateHistogramList(); - UpdateCutList(); - startFlag = false; - } - // We are using the ImGuiWindowFlags_NoDocking flag to make the parent window not dockable into, - // because it would be confusing to have two docking targets within each others. - if (opt_fullscreen) - { - ImGuiViewport* viewport = ImGui::GetMainViewport(); - ImGui::SetNextWindowPos(viewport->Pos); - ImGui::SetNextWindowSize(viewport->Size); - ImGui::SetNextWindowViewport(viewport->ID); - ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f); - ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f); - window_flags |= ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove; - window_flags |= ImGuiWindowFlags_NoBringToFrontOnFocus | ImGuiWindowFlags_NoNavFocus; - } - - // When using ImGuiDockNodeFlags_PassthruCentralNode, DockSpace() will render our background and handle the pass-thru hole, so we ask Begin() to not render a background. - if (dockspace_flags & ImGuiDockNodeFlags_PassthruCentralNode) - window_flags |= ImGuiWindowFlags_NoBackground; - - // Important: note that we proceed even if Begin() returns false (aka window is collapsed). - // This is because we want to keep our DockSpace() active. If a DockSpace() is inactive, - // all active windows docked into it will lose their parent and become undocked. - // We cannot preserve the docking relationship between an active window and an inactive docking, otherwise - // any change of dockspace/settings would lead to windows being stuck in limbo and never being visible. - ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f)); - ImGui::Begin("MyTestSpace", &dockspaceOpen, window_flags); - ImGui::PopStyleVar(); - - if (opt_fullscreen) - ImGui::PopStyleVar(2); - - // DockSpace - ImGuiIO& io = ImGui::GetIO(); - ImGuiStyle& style = ImGui::GetStyle(); - float minWinSizeX = style.WindowMinSize.x; - style.WindowMinSize.x = 370.0f; - if (io.ConfigFlags & ImGuiConfigFlags_DockingEnable) - { - ImGuiID dockspace_id = ImGui::GetID("MyDockSpace"); - ImGui::DockSpace(dockspace_id, ImVec2(0.0f, 0.0f), dockspace_flags); - } - - style.WindowMinSize.x = minWinSizeX; - - if(ImGui::BeginMenuBar()) - { - if(ImGui::BeginMenu("File")) - { - if(ImGui::MenuItem(ICON_FA_FOLDER_OPEN "\tOpen")) - { - m_fileDialog.OpenDialog(FileDialog::Type::OpenFile); - } - if(ImGui::MenuItem(ICON_FA_SAVE "\tSave")) - { - m_fileDialog.OpenDialog(FileDialog::Type::SaveFile); - } - if (ImGui::MenuItem(ICON_FA_TIMES_CIRCLE "\tExit")) - { - Application::Get().Close(); - } - ImGui::EndMenu(); - } - if (ImGui::BeginMenu("Data Source")) - { - if (ImGui::MenuItem(ICON_FA_LINK "\tAttach Source")) - { - m_sourceDialog.OpenSourceDialog(); - } - if (ImGui::MenuItem(ICON_FA_UNLINK "\tDetach Source")) - { - PhysicsStopEvent event; - m_callbackFunc(event); - } - ImGui::EndMenu(); - } - if (ImGui::BeginMenu("Add")) - { - if (ImGui::MenuItem(ICON_FA_CHART_BAR "\tSpectrum")) - { - m_spectrumDialog.SetSpectrumDialog(); - } - ImGui::EndMenu(); - } - if (ImGui::BeginMenu("Remove")) - { - if (ImGui::MenuItem(ICON_FA_CHART_BAR "\tSpectrum")) - { - m_removeHistogram = true; - } - if (ImGui::MenuItem(ICON_FA_CUT "\tCut")) - { - m_removeCut = true; - } - ImGui::EndMenu(); - } - if (ImGui::BeginMenu("Export")) - { - if (ImGui::MenuItem(ICON_FA_SAVE "\tAs .csv")) - { - m_exportHistogram = true; - } - ImGui::EndMenu(); - } - ImGui::EndMenuBar(); - } - - //Render all of our sub-windows, dialogs, panels, etc - auto fd_result = m_fileDialog.RenderFileDialog(".nav"); - if (!fd_result.first.empty()) - { - switch (fd_result.second) - { - case FileDialog::Type::OpenFile: - { - SpectrumSerializer serializer(fd_result.first); - serializer.DeserializeData(); - UpdateHistogramList(); - UpdateCutList(); - break; - } - case FileDialog::Type::SaveFile: - { - NAV_INFO("Found a Save File! {0}", fd_result.first); - SpectrumSerializer serializer(fd_result.first); - serializer.SerializeData(m_histoList, m_cutList); - break; - } - } - } - - - if(m_spectrumDialog.ImGuiRenderSpectrumDialog(m_histoList, m_cutList, m_paramList)) - UpdateHistogramList(); - - m_sourceDialog.ImGuiRenderSourceDialog(); - - RemoveHistogramDialog(); - - RemoveCutDialog(); - - ExportHistogramDialog(); - - if(m_spectrumPanel.OnImGuiRender(m_histoList, m_cutList, m_paramList)) - { - UpdateCutList(); - UpdateHistogramList(); - } - - if (ImGui::Begin(ICON_FA_CHART_BAR " Spectra")) - { - for (auto& params : m_histoList) - { - if (ImGui::TreeNode(params.name.c_str())) - { - ImGui::BulletText("%s", ("X Parameter: "+params.x_par).c_str()); - ImGui::BulletText("X Bins: %d X Min: %f X Max: %f", params.nbins_x, params.min_x, params.max_x); - if (params.y_par != "None") - { - ImGui::BulletText("%s", ("Y Parameter: "+params.y_par).c_str()); - ImGui::BulletText("Y Bins: %d Y Min: %f Y Max: %f", params.nbins_y, params.min_y, params.max_y); - } - if(params.cutsDrawnUpon.size() != 0 && ImGui::TreeNode("Cuts Drawn")) - { - for(auto& cut : params.cutsDrawnUpon) - ImGui::BulletText("%s", cut.c_str()); - ImGui::TreePop(); - } - if(params.cutsAppliedTo.size() != 0 && ImGui::TreeNode("Cuts Applied")) - { - for(auto& cut : params.cutsAppliedTo) - ImGui::BulletText("%s", cut.c_str()); - ImGui::TreePop(); - } - ImGui::TreePop(); - } - } - } - ImGui::End(); - - if(ImGui::Begin(ICON_FA_CUT " Cuts")) - { - for(auto& params : m_cutList) - { - if(ImGui::TreeNode(params.name.c_str())) - { - ImGui::BulletText("%s", ("X Parameter: "+params.x_par).c_str()); - if(params.y_par != "None") - ImGui::BulletText("%s", ("Y Parameter: "+params.y_par).c_str()); - ImGui::TreePop(); - } - } - } - ImGui::End(); - - ImGui::End(); - } - - //Simple dialogs, no need for separate class - - void EditorLayer::RemoveHistogramDialog() - { - NAV_PROFILE_FUNCTION(); - static std::string selectedGram = ""; - if (m_removeHistogram) - { - selectedGram = ""; - m_removeHistogram = false; - ImGui::OpenPopup("Remove Histogram"); - } - if (ImGui::BeginPopupModal("Remove Histogram")) - { - if (ImGui::BeginCombo("Histogram", selectedGram.c_str())) - { - for (auto& gram : m_histoList) - { - if (ImGui::Selectable(gram.name.c_str(), gram.name == selectedGram, ImGuiSelectableFlags_DontClosePopups)) - selectedGram = gram.name; - } - ImGui::EndCombo(); - } - if (ImGui::Button("Ok")) - { - SpectrumManager::GetInstance().RemoveHistogram(selectedGram); - UpdateHistogramList(); - ImGui::CloseCurrentPopup(); - } - ImGui::SameLine(); - if (ImGui::Button("Cancel")) - { - ImGui::CloseCurrentPopup(); - } - ImGui::EndPopup(); - } - } - - void EditorLayer::RemoveCutDialog() - { - NAV_PROFILE_FUNCTION(); - static std::string selectedCut = ""; - if (m_removeCut) - { - selectedCut = ""; - m_removeCut = false; - ImGui::OpenPopup("Remove Cut"); - } - if (ImGui::BeginPopupModal("Remove Cut")) - { - if (ImGui::BeginCombo("Cut", selectedCut.c_str())) - { - for (auto& cut : m_cutList) - { - if (ImGui::Selectable(cut.name.c_str(), cut.name == selectedCut, ImGuiSelectableFlags_DontClosePopups)) - selectedCut = cut.name; - } - ImGui::EndCombo(); - } - if (ImGui::Button("Ok")) - { - SpectrumManager::GetInstance().RemoveCut(selectedCut); - UpdateHistogramList(); - UpdateCutList(); - ImGui::CloseCurrentPopup(); - } - ImGui::SameLine(); - if (ImGui::Button("Cancel")) - { - ImGui::CloseCurrentPopup(); - } - ImGui::EndPopup(); - } - } - - void EditorLayer::ExportHistogramDialog() - { - NAV_PROFILE_FUNCTION(); - static std::string filename = ""; - static HistogramArgs selectedGram = HistogramArgs(); - if(m_exportHistogram) - { - filename = ""; - selectedGram = HistogramArgs(); - m_exportHistogram = false; - ImGui::OpenPopup("Export Histogram"); - } - if(ImGui::BeginPopupModal("Export Histogram")) - { - if(ImGui::BeginCombo("Histogram", selectedGram.name.c_str())) - { - for (auto& gram : m_histoList) - { - if (ImGui::Selectable(gram.name.c_str(), gram.name == selectedGram.name, ImGuiSelectableFlags_DontClosePopups)) - selectedGram = gram; - } - ImGui::EndCombo(); - } - ImGui::InputText("File", &filename); - ImGui::SameLine(); - if(ImGui::Button("Open")) - { - m_fileDialog.OpenDialog(FileDialog::Type::SaveFile); - } - auto result = m_fileDialog.RenderFileDialog(".csv"); - if(!result.first.empty() && result.second == FileDialog::Type::SaveFile) - filename = result.first; - if(ImGui::Button("Ok")) - { - ExportHistogram(selectedGram, filename); - ImGui::CloseCurrentPopup(); - } - ImGui::SameLine(); - if(ImGui::Button("Cancel")) - ImGui::CloseCurrentPopup(); - ImGui::EndPopup(); - } - } - - void EditorLayer::ExportHistogram(HistogramArgs selectedGram, const std::string& filename) - { - std::ofstream output(filename); - if(!output.is_open()) - { - NAV_ERROR("Unable to create export file {0}. Check pathing.", filename); - return; - } - - std::vector data = SpectrumManager::GetInstance().GetBinData(selectedGram.name); - - output<<"Histogram Name,"<; - - EditorLayer(); - ~EditorLayer(); - - void SetEventCallbackFunc(const EventCallbackFunc& f) { m_callbackFunc = f; } - - virtual void OnAttach() override; - virtual void OnDetach() override; - virtual void OnImGuiRender() override; - virtual void OnUpdate(Timestep& step) override; - virtual void OnEvent(Event& event) override; - - - private: - void RemoveCutDialog(); - void RemoveHistogramDialog(); - void ExportHistogramDialog(); - void UpdateHistogramList(); - void UpdateCutList(); - void UpdateParameterList(); //Currently not really used, only once. Params all made at construction time of PhysicsLayer - void ExportHistogram(HistogramArgs selectedGram, const std::string& filename); - - EventCallbackFunc m_callbackFunc; - - SpectrumPanel m_spectrumPanel; - FileDialog m_fileDialog; - SpectrumDialog m_spectrumDialog; - SourceDialog m_sourceDialog; - - - std::vector m_histoList; - std::vector m_cutList; - std::vector m_paramList; - - //ImGui Settings - bool dockspaceOpen = true; - bool opt_fullscreen = true; - bool opt_fullscreen_persistant = true; - ImGuiDockNodeFlags dockspace_flags = ImGuiDockNodeFlags_None; - ImGuiWindowFlags window_flags = ImGuiWindowFlags_MenuBar | ImGuiWindowFlags_NoDocking; - - bool m_removeHistogram; - bool m_removeCut; - bool m_exportHistogram; - }; - - template - bool SortByName(const T& p1, const T& p2) - { - return p1.name < p2.name; - } - -} - -#endif diff --git a/Navigator/src/Navigator/Editor/FileDialog.cpp b/Navigator/src/Navigator/Editor/FileDialog.cpp deleted file mode 100644 index 662cc6c..0000000 --- a/Navigator/src/Navigator/Editor/FileDialog.cpp +++ /dev/null @@ -1,272 +0,0 @@ -/* - FileDialog.cpp - File dialog window in ImGui using std::filesystem. This is slightly complicated, as file dialogs change function - based on the type of action one wants to perform. In our case we have OpenFile, SaveFile, and OpenDirectory. One can also - specify the kind of file (extension). Use FontAwesome icons. - - Use style: - if(ImGui::Button()) - Set...FileDialog(true); - std::string value = ImGuiRender...(extension); - - GWM -- Feb 2022 -*/ -#include "FileDialog.h" -#include "misc/cpp/imgui_stdlib.h" -#include "IconsFontAwesome5.h" - -namespace Navigator { - - //Helper function to handle file size printing - std::string ConvertFileSystemSizeToString(std::uintmax_t value) - { - NAV_PROFILE_FUNCTION(); - int i = 0; - double mantissa = (double)value; - for (; mantissa >= 1024.0; ++i) - mantissa /= 1024.0; - mantissa = std::ceil(mantissa * 10.0) / 10.0; - return std::to_string(int(mantissa)) + "BKMGTPE"[i]; - } - - FileDialog::FileDialog() : - m_currentPath(std::filesystem::current_path()), m_type(Type::None), m_selectedItem(""), m_openDialogFlag(false) - { - table_flags = ImGuiTableFlags_BordersH | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_RowBg; - select_flags = ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_DontClosePopups; - } - - FileDialog::~FileDialog() {} - - //Each type of action has its own render function - - std::pair FileDialog::RenderFileDialog(const std::string& ext) - { - NAV_PROFILE_FUNCTION(); - if (m_openDialogFlag) - { - m_selectedItem = ""; - m_openDialogFlag = false; - m_currentPath = std::filesystem::current_path(); - ImGui::OpenPopup("File Dialog"); - } - - std::string result = ""; - if (ImGui::BeginPopupModal("File Dialog")) - { - switch (m_type) - { - case Type::OpenFile: - { - result = ImGuiRenderOpenFile(ext); - break; - } - case Type::SaveFile: - { - result = ImGuiRenderSaveFile(ext); - break; - } - case Type::OpenDir: - { - result = ImGuiRenderOpenDir(); - break; - } - case Type::None: break; - } - ImGui::EndPopup(); - } - - return std::make_pair(result, m_type); - } - - std::string FileDialog::ImGuiRenderOpenFile(const std::string& ext) - { - NAV_PROFILE_FUNCTION(); - std::string result = ""; - std::string text = ""; - - ImGui::Text("%s", ("Current Directory: " + m_currentPath.lexically_normal().string()).c_str()); - ImGui::SameLine(); - ImGui::Text("%s", ("Extension Filter: "+ext).c_str()); - ImGui::InputText("Selected", &m_selectedItem); - if (ImGui::Button("Ok")) - { - std::filesystem::path filepath = m_currentPath / m_selectedItem; - result = filepath.string(); - ImGui::CloseCurrentPopup(); - } - ImGui::SameLine(); - if (ImGui::Button("Cancel")) - ImGui::CloseCurrentPopup(); - - if (ImGui::BeginTable("File System", 2, table_flags, ImVec2(-1, -1))) - { - ImGui::TableSetupColumn("Name"); - ImGui::TableSetupColumn("Size"); - ImGui::TableHeadersRow(); - ImGui::TableNextRow(); - ImGui::TableNextColumn(); - if (ImGui::Selectable(ICON_FA_FOLDER " ..", false, select_flags)) - { - m_selectedItem.clear(); - m_currentPath.append(".."); - } - ImGui::TableNextColumn(); - ImGui::Text("N/A"); - for (auto& entry : std::filesystem::directory_iterator(m_currentPath)) - { - if (entry.is_directory()) - { - ImGui::TableNextRow(); - text = ICON_FA_FOLDER " " + std::filesystem::relative(entry.path(), m_currentPath).string(); - ImGui::TableNextColumn(); - if (ImGui::Selectable(text.c_str(), false, select_flags)) - { - m_selectedItem.clear(); - m_currentPath /= entry.path(); - } - ImGui::TableNextColumn(); - ImGui::Text("N/A"); - } - else if (entry.path().filename().extension() == ext) - { - ImGui::TableNextRow(); - text = ICON_FA_FILE " " + entry.path().filename().string(); - ImGui::TableNextColumn(); - if (ImGui::Selectable(text.c_str(), false, select_flags)) - m_selectedItem = entry.path().filename().string(); - ImGui::TableNextColumn(); - ImGui::Text("%s", ConvertFileSystemSizeToString(entry.file_size()).c_str()); - } - } - ImGui::EndTable(); - } - return result; - } - - std::string FileDialog::ImGuiRenderSaveFile(const std::string& ext) - { - NAV_PROFILE_FUNCTION(); - std::string result = ""; - std::string text = ""; - - ImGui::Text("%s", ("Current Directory: "+m_currentPath.lexically_normal().string()).c_str()); - ImGui::SameLine(); - ImGui::Text("%s", ("Extension Filter: "+ext).c_str()); - ImGui::InputText("Selected", &m_selectedItem); - if (ImGui::Button("Ok")) - { - std::filesystem::path filepath = m_currentPath / m_selectedItem; - result = filepath.string(); - ImGui::CloseCurrentPopup(); - } - ImGui::SameLine(); - if (ImGui::Button("Cancel")) - ImGui::CloseCurrentPopup(); - - if (ImGui::BeginTable("File System", 2, table_flags, ImVec2(-1, -1))) - { - ImGui::TableSetupColumn("Name"); - ImGui::TableSetupColumn("Size"); - ImGui::TableHeadersRow(); - ImGui::TableNextRow(); - ImGui::TableNextColumn(); - if (ImGui::Selectable(ICON_FA_FOLDER " ..", false, select_flags)) - { - m_selectedItem.clear(); - m_currentPath.append(".."); - } - ImGui::TableNextColumn(); - ImGui::Text("N/A"); - for (auto& entry : std::filesystem::directory_iterator(m_currentPath)) - { - if (entry.is_directory()) - { - ImGui::TableNextRow(); - text = ICON_FA_FOLDER " " + std::filesystem::relative(entry.path(), m_currentPath).string(); - ImGui::TableNextColumn(); - if (ImGui::Selectable(text.c_str(), false, select_flags)) - { - m_selectedItem.clear(); - m_currentPath /= entry.path(); - } - ImGui::TableNextColumn(); - ImGui::Text("N/A"); - } - else if (entry.path().filename().extension() == ext) - { - ImGui::TableNextRow(); - text = ICON_FA_FILE " " + entry.path().filename().string(); - ImGui::TableNextColumn(); - if (ImGui::Selectable(text.c_str(), false, select_flags)) - m_selectedItem = entry.path().filename().string(); - ImGui::TableNextColumn(); - ImGui::Text("%s", ConvertFileSystemSizeToString(entry.file_size()).c_str()); - } - } - ImGui::EndTable(); - } - return result; - } - - std::string FileDialog::ImGuiRenderOpenDir() - { - NAV_PROFILE_FUNCTION(); - std::string result = ""; - std::string text = ""; - - ImGui::Text("%s", ("Current Directory: "+m_currentPath.lexically_normal().string()).c_str()); - ImGui::InputText("Selected", &m_selectedItem); - if (ImGui::Button("Ok")) - { - result = m_selectedItem; - ImGui::CloseCurrentPopup(); - } - ImGui::SameLine(); - if (ImGui::Button("Cancel")) - ImGui::CloseCurrentPopup(); - - if (ImGui::BeginTable("File System", 2, table_flags, ImVec2(-1, -1))) - { - ImGui::TableSetupColumn("Name"); - ImGui::TableSetupColumn("Size"); - ImGui::TableHeadersRow(); - ImGui::TableNextRow(); - ImGui::TableNextColumn(); - if (ImGui::Selectable(ICON_FA_FOLDER " ..", false, select_flags)) - { - m_currentPath.append(".."); - m_selectedItem = m_currentPath.string(); - } - ImGui::TableNextColumn(); - ImGui::Text("N/A"); - for (auto& entry : std::filesystem::directory_iterator(m_currentPath)) - { - ImGui::TableNextRow(); - if (entry.is_directory()) - { - text = ICON_FA_FOLDER " " + std::filesystem::relative(entry.path(), m_currentPath).string(); - ImGui::TableNextColumn(); - if (ImGui::Selectable(text.c_str(), false, select_flags)) - { - m_currentPath /= entry.path(); - m_selectedItem = m_currentPath.string(); - } - ImGui::TableNextColumn(); - ImGui::Text("N/A"); - } - else - { - text = ICON_FA_FILE " " + entry.path().filename().string(); - ImGui::TableNextColumn(); - ImGui::Text("%s", text.c_str()); - ImGui::TableNextColumn(); - ImGui::Text("%s", ConvertFileSystemSizeToString(entry.file_size()).c_str()); - } - } - ImGui::EndTable(); - } - return result; - } - -} diff --git a/Navigator/src/Navigator/Editor/FileDialog.h b/Navigator/src/Navigator/Editor/FileDialog.h deleted file mode 100644 index 3aaa49e..0000000 --- a/Navigator/src/Navigator/Editor/FileDialog.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - FileDialog.h - File dialog window in ImGui using std::filesystem. This is slightly complicated, as file dialogs change function - based on the type of action one wants to perform. In our case we have OpenFile, SaveFile, and OpenDirectory. One can also - specify the kind of file (extension). Use FontAwesome icons. - - Use style: - if(ImGui::Button()) - Set...FileDialog(true); - std::string value = ImGuiRender...(extension); - - GWM -- Feb 2022 -*/ -#ifndef FILE_DIALOG_H -#define FILE_DIALOG_H - -#include -#include "imgui.h" - -namespace Navigator { - - - - class NAV_API FileDialog - { - public: - - enum class Type - { - OpenFile, - SaveFile, - OpenDir, - None - }; - - FileDialog(); - ~FileDialog(); - - inline void OpenDialog(Type type) { m_type = type; m_openDialogFlag = true; } - std::pair RenderFileDialog(const std::string& ext = ""); - - private: - std::string ImGuiRenderOpenFile(const std::string& ext); - std::string ImGuiRenderSaveFile(const std::string& ext); - std::string ImGuiRenderOpenDir(); - - std::filesystem::path m_currentPath; - Type m_type; - - std::string m_selectedItem; - - bool m_openDialogFlag; - - ImGuiTableFlags table_flags; - ImGuiSelectableFlags select_flags; - }; - -} - -#endif diff --git a/Navigator/src/Navigator/Editor/SourceDialog.cpp b/Navigator/src/Navigator/Editor/SourceDialog.cpp deleted file mode 100644 index b29db93..0000000 --- a/Navigator/src/Navigator/Editor/SourceDialog.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/* - SourceDialog.cpp - Handles selection of data source type and location specification. Needs to be updated when new source - types are added to Navigator. - - GWM -- Feb 2022 -*/ -#include "SourceDialog.h" -#include "Navigator/Events/PhysicsEvent.h" -#include "Navigator/Events/Event.h" -#include "Navigator/Core/Application.h" -#include "Navigator/Physics/Caen/CompassHit.h" - -#include "imgui.h" -#include "misc/cpp/imgui_stdlib.h" -#include "IconsFontAwesome5.h" - -namespace Navigator { - - SourceDialog::SourceDialog() : - m_openFlag(false), m_chosenPort("51489"), m_chosenWindow(2000000) - { - } - - SourceDialog::~SourceDialog() - { - } - - void SourceDialog::ImGuiRenderSourceDialog() - { - NAV_PROFILE_FUNCTION(); - static bool onlineFlag = false; - static bool offlineFlag = false; - static std::vector availTypes = { DataSource::SourceType::CompassOnline, DataSource::SourceType::CompassOffline }; - - if (m_openFlag) - { - onlineFlag = false; - offlineFlag = false; - m_openFlag = false; - m_chosenType = DataSource::SourceType::None; - m_chosenLocation = ""; - m_chosenPort = "51489"; - m_chosenWindow = 3000000; - m_bitflags = 0; - m_channels_per_board = 16; - ImGui::OpenPopup(ICON_FA_LINK " Attach Source"); - } - if (ImGui::BeginPopupModal(ICON_FA_LINK " Attach Source")) - { - if (ImGui::BeginCombo("Source Type", ConvertDataSourceTypeToString(m_chosenType).c_str())) - { - for (auto& type : availTypes) - { - if (ImGui::Selectable(ConvertDataSourceTypeToString(type).c_str(), type == m_chosenType, ImGuiSelectableFlags_DontClosePopups)) - { - m_chosenType = type; - } - } - ImGui::EndCombo(); - } - - if (m_chosenType == DataSource::SourceType::CompassOnline) - { - ImGui::InputText("Hostname", &m_chosenLocation); - ImGui::InputText("Port", &m_chosenPort); - if (ImGui::RadioButton("Energy", (m_bitflags & CompassHeaders::Energy) != 0)) - { - m_bitflags = m_bitflags ^ CompassHeaders::Energy; - } - ImGui::SameLine(); - if (ImGui::RadioButton("Energy Short", (m_bitflags & CompassHeaders::EnergyShort) != 0)) - { - m_bitflags = m_bitflags ^ CompassHeaders::EnergyShort; - } - ImGui::SameLine(); - if (ImGui::RadioButton("Energy Calibrated", (m_bitflags & CompassHeaders::EnergyCalibrated) != 0)) - { - m_bitflags = m_bitflags ^ CompassHeaders::EnergyCalibrated; - } - ImGui::InputInt("Channels Per Digitizer Board", &m_channels_per_board); - } - else if (m_chosenType == DataSource::SourceType::CompassOffline) - { - ImGui::InputText("Run Directory", &m_chosenLocation); - if (ImGui::Button("Choose Location")) - { - m_fileDialog.OpenDialog(FileDialog::Type::OpenDir); - } - auto temp = m_fileDialog.RenderFileDialog(); - if (!temp.first.empty() && temp.second == FileDialog::Type::OpenDir) - m_chosenLocation = temp.first; - ImGui::InputInt("Channels Per Digitizer Board", &m_channels_per_board); - } - ImGui::InputInt("Coinc. Window (ps)", &m_chosenWindow); - - - if (ImGui::Button("Ok")) - { - if (m_chosenType == DataSource::SourceType::CompassOffline) - { - PhysicsStartEvent event(m_chosenLocation, m_chosenType, m_chosenWindow, m_chosenPort, false, 0U, m_channels_per_board); - Application::Get().OnEvent(event); - } - else if (m_chosenType == DataSource::SourceType::CompassOnline) - { - PhysicsStartEvent event(m_chosenLocation, m_chosenType, m_chosenWindow, m_chosenPort, true, m_bitflags, m_channels_per_board); - Application::Get().OnEvent(event); - } - ImGui::CloseCurrentPopup(); - } - ImGui::SameLine(); - if (ImGui::Button("Cancel")) - { - ImGui::CloseCurrentPopup(); - } - ImGui::EndPopup(); - } - } - -} diff --git a/Navigator/src/Navigator/Editor/SourceDialog.h b/Navigator/src/Navigator/Editor/SourceDialog.h deleted file mode 100644 index c79e06c..0000000 --- a/Navigator/src/Navigator/Editor/SourceDialog.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - SourceDialog.h - Handles selection of data source type and location specification. Needs to be updated when new source - types are added to Navigator. - - GWM -- Feb 2022 -*/ -#ifndef SOURCE_DIALOG_H -#define SOURCE_DIALOG_H - -#include "FileDialog.h" -#include "Navigator/Physics/DataSource.h" - -namespace Navigator { - - class NAV_API SourceDialog - { - public: - SourceDialog(); - ~SourceDialog(); - - void ImGuiRenderSourceDialog(); - - inline void OpenSourceDialog() { m_openFlag = true; } - private: - bool m_openFlag; - DataSource::SourceType m_chosenType; - std::string m_chosenLocation; - std::string m_chosenPort; - FileDialog m_fileDialog; - uint16_t m_bitflags; - int m_chosenWindow; - int m_channels_per_board; - }; - -} - -#endif \ No newline at end of file diff --git a/Navigator/src/Navigator/Editor/SpectrumDialog.cpp b/Navigator/src/Navigator/Editor/SpectrumDialog.cpp deleted file mode 100644 index 45baf28..0000000 --- a/Navigator/src/Navigator/Editor/SpectrumDialog.cpp +++ /dev/null @@ -1,280 +0,0 @@ -/* - SpectrumDialog.h - Handles creation of new spectra. Pretty much that simple. - - GWM -- Feb 2022 -*/ -#include "SpectrumDialog.h" -#include "Navigator/Core/SpectrumManager.h" - -#include "misc/cpp/imgui_stdlib.h" - -#include "IconsFontAwesome5.h" - -namespace Navigator { - - SpectrumDialog::SpectrumDialog() : - m_openFlag(false), m_openCutFlag(false) - { - selectFlags = ImGuiSelectableFlags_DontClosePopups; - tableFlags = ImGuiTableFlags_BordersH | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_RowBg; - } - - SpectrumDialog::~SpectrumDialog() - { - } - - bool SpectrumDialog::ImGuiRenderSpectrumDialog(const std::vector& histoList, const std::vector& cutList, const std::vector& paramList) - { - NAV_PROFILE_FUNCTION(); - static std::string selectedCut = ""; - bool result = false; - if (m_openFlag) - { - m_openFlag = false; - m_newParams = m_blank; - m_subhistos.clear(); - ImGui::OpenPopup(ICON_FA_CHART_BAR " New Spectrum Dialog"); - } - - if (ImGui::BeginPopupModal(ICON_FA_CHART_BAR " New Spectrum Dialog")) - { - ImGui::InputText("Spectrum Name", &m_newParams.name); - if (ImGui::BeginCombo("Spectrum Type", ConvertSpectrumTypeToString(m_newParams.type).c_str())) - { - if (ImGui::Selectable("Histogram1D", m_newParams.type == SpectrumType::Histo1D, selectFlags)) - m_newParams.type = SpectrumType::Histo1D; - else if (ImGui::Selectable("Histogram2D", m_newParams.type == SpectrumType::Histo2D, selectFlags)) - m_newParams.type = SpectrumType::Histo2D; - else if (ImGui::Selectable("Summary", m_newParams.type == SpectrumType::Summary, selectFlags)) - m_newParams.type = SpectrumType::Summary; - ImGui::EndCombo(); - } - - switch (m_newParams.type) - { - case SpectrumType::Histo1D: RenderDialog1D(paramList); break; - case SpectrumType::Histo2D: RenderDialog2D(paramList); break; - case SpectrumType::Summary: RenderDialogSummary(paramList); break; - case SpectrumType::None: break; - } - - if (ImGui::TreeNode("Applied Cuts")) - { - for (auto& name : m_newParams.cutsAppliedTo) - { - ImGui::BulletText("%s", name.c_str()); - } - ImGui::TreePop(); - } - - if (ImGui::Button("Apply Cuts")) - { - m_openCutFlag = true; - } - RenderCutDialog(cutList); - - if (ImGui::Button("Ok")) - { - switch (m_newParams.type) - { - case SpectrumType::Histo1D: SpectrumManager::GetInstance().AddHistogram(m_newParams); break; - case SpectrumType::Histo2D: SpectrumManager::GetInstance().AddHistogram(m_newParams); break; - case SpectrumType::Summary: SpectrumManager::GetInstance().AddHistogramSummary(m_newParams, m_subhistos); break; - case SpectrumType::None: break; - } - ImGui::CloseCurrentPopup(); - result = true; - } - ImGui::SameLine(); - if (ImGui::Button("Cancel")) - { - ImGui::CloseCurrentPopup(); - result = false; - } - ImGui::EndPopup(); - } - return result; - } - - void SpectrumDialog::RenderDialog1D(const std::vector& paramList) - { - if (ImGui::BeginTable("SpecParamsTable", 4)) - { - ImGui::TableNextRow(); - - ImGui::TableNextColumn(); - if (ImGui::BeginCombo("X Param.", m_newParams.x_par.c_str())) - { - for (auto& params : paramList) - { - if (ImGui::Selectable(params.c_str(), params == m_newParams.x_par, selectFlags)) - m_newParams.x_par = params; - } - ImGui::EndCombo(); - } - ImGui::TableNextColumn(); - ImGui::InputInt("X Bins", &m_newParams.nbins_x); - ImGui::TableNextColumn(); - ImGui::InputDouble("Min X", &m_newParams.min_x); - ImGui::TableNextColumn(); - ImGui::InputDouble("Max X", &m_newParams.max_x); - - ImGui::EndTable(); - } - } - - void SpectrumDialog::RenderDialog2D(const std::vector& paramList) - { - if (ImGui::BeginTable("SpecParamsTable", 4)) - { - ImGui::TableNextRow(); - - ImGui::TableNextColumn(); - if (ImGui::BeginCombo("X Param.", m_newParams.x_par.c_str())) - { - for (auto& params : paramList) - { - if (ImGui::Selectable(params.c_str(), params == m_newParams.x_par, selectFlags)) - m_newParams.x_par = params; - } - ImGui::EndCombo(); - } - ImGui::TableNextColumn(); - ImGui::InputInt("X Bins", &m_newParams.nbins_x); - ImGui::TableNextColumn(); - ImGui::InputDouble("Min X", &m_newParams.min_x); - ImGui::TableNextColumn(); - ImGui::InputDouble("Max X", &m_newParams.max_x); - - ImGui::TableNextRow(); - - ImGui::TableNextColumn(); - if (ImGui::BeginCombo("Y Param.", m_newParams.y_par.c_str())) - { - for (auto& params : paramList) - { - if (ImGui::Selectable(params.c_str(), params == m_newParams.y_par, selectFlags)) - m_newParams.y_par = params; - } - ImGui::EndCombo(); - } - ImGui::TableNextColumn(); - ImGui::InputInt("Y Bins", &m_newParams.nbins_y); - ImGui::TableNextColumn(); - ImGui::InputDouble("Min Y", &m_newParams.min_y); - ImGui::TableNextColumn(); - ImGui::InputDouble("Max Y", &m_newParams.max_y); - - - ImGui::EndTable(); - } - } - - void SpectrumDialog::RenderDialogSummary(const std::vector& paramList) - { - if (ImGui::BeginTable("SpecParamsTable", 3)) - { - ImGui::TableNextRow(); - ImGui::TableNextColumn(); - ImGui::InputInt("X Bins", &m_newParams.nbins_x); - ImGui::TableNextColumn(); - ImGui::InputDouble("Min X", &m_newParams.min_x); - ImGui::TableNextColumn(); - ImGui::InputDouble("Max X", &m_newParams.max_x); - ImGui::EndTable(); - } - if (ImGui::TreeNode("Selected Parameters")) - { - for (auto& name : m_subhistos) - { - ImGui::BulletText("%s", name.c_str()); - } - ImGui::TreePop(); - } - if (ImGui::Button("Add Parameter")) - { - m_subhistos.clear(); - ImGui::OpenPopup("Param List"); - } - if (ImGui::BeginPopupModal("Param List")) - { - if (ImGui::Button("Ok")) - { - ImGui::CloseCurrentPopup(); - } - ImGui::SameLine(); - if (ImGui::Button("Cancel")) - { - m_subhistos.clear(); - ImGui::CloseCurrentPopup(); - } - - auto check_func = [this](const std::string& name) - { - for (auto& par : m_subhistos) - { - if (name == par) - return true; - } - return false; - }; - - if (ImGui::BeginTable("Parameters", 1, tableFlags, ImVec2(-1, -1))) - { - for (auto& param : paramList) - { - ImGui::TableNextRow(); - ImGui::TableNextColumn(); - if (ImGui::Selectable(param.c_str(), check_func(param), selectFlags)) - { - if (!check_func(param)) - { - m_subhistos.push_back(param); - } - else - { - auto iter = std::remove(m_subhistos.begin(), m_subhistos.end(), param); - m_subhistos.erase(iter, m_subhistos.end()); - } - } - } - - ImGui::EndTable(); - } - - ImGui::EndPopup(); - } - } - - void SpectrumDialog::RenderCutDialog(const std::vector& cutList) - { - static std::string selectedCut = ""; - if (m_openCutFlag) - { - selectedCut = ""; - m_openCutFlag = false; - ImGui::OpenPopup("Cut List"); - } - if (ImGui::BeginPopup("Cut List")) - { - for (auto& cut : cutList) - { - if (ImGui::Selectable(cut.name.c_str(), cut.name == selectedCut, selectFlags)) - selectedCut = cut.name; - } - ImGui::InputText("Selected Cut", &selectedCut); - if (ImGui::Button("Ok")) - { - m_newParams.cutsAppliedTo.push_back(selectedCut); - ImGui::CloseCurrentPopup(); - } - ImGui::SameLine(); - if (ImGui::Button("Cancel")) - { - ImGui::CloseCurrentPopup(); - } - ImGui::EndPopup(); - } - } -} \ No newline at end of file diff --git a/Navigator/src/Navigator/Editor/SpectrumDialog.h b/Navigator/src/Navigator/Editor/SpectrumDialog.h deleted file mode 100644 index e135c74..0000000 --- a/Navigator/src/Navigator/Editor/SpectrumDialog.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - SpectrumDialog.h - Handles creation of new spectra. Pretty much that simple. - - GWM -- Feb 2022 -*/ -#ifndef SPECTRUM_DIALOG_H -#define SPECTRUM_DIALOG_H - -#include "Navigator/Core/Histogram.h" -#include "Navigator/Core/Cut.h" - -#include "imgui.h" - - -namespace Navigator { - - class NAV_API SpectrumDialog - { - public: - SpectrumDialog(); - ~SpectrumDialog(); - - bool ImGuiRenderSpectrumDialog(const std::vector& histoList, const std::vector& cutList, const std::vector& paramList); - - inline void SetSpectrumDialog() { m_openFlag = true; } - private: - void RenderDialog1D(const std::vector& paramList); - void RenderDialog2D(const std::vector& paramList); - void RenderDialogSummary(const std::vector& paramList); - void RenderCutDialog(const std::vector& cutList); - - bool m_openFlag; - bool m_openCutFlag; - HistogramArgs m_newParams; - HistogramArgs m_blank; - std::vector m_subhistos; - - ImGuiSelectableFlags selectFlags; - ImGuiTableFlags tableFlags; - }; - -} - -#endif \ No newline at end of file diff --git a/Navigator/src/Navigator/Editor/SpectrumPanel.cpp b/Navigator/src/Navigator/Editor/SpectrumPanel.cpp deleted file mode 100644 index d782297..0000000 --- a/Navigator/src/Navigator/Editor/SpectrumPanel.cpp +++ /dev/null @@ -1,393 +0,0 @@ -/* - SpectrumPanel.cpp - This is the big boi. Renders a panel holding all of the drawn plots. Good news is that in general only a few things really require - any modification if new types of plots are to be rendered, basically just the zoomed in spectrum rendering. - - GWM -- Feb 2022 -*/ -#include "SpectrumPanel.h" -#include "Navigator/Core/SpectrumManager.h" -#include "misc/cpp/imgui_stdlib.h" -#include "IconsFontAwesome5.h" - -namespace Navigator { - - //Convert a StatResults struct from analysis to a std::string helper function - std::string GenerateStatString(const std::string& name, const StatResults& results, bool is2D = true) - { - NAV_PROFILE_FUNCTION(); - std::stringstream stream; - stream << "Region: " << name << "\n" << "Integral: " << results.integral << "\n"; - if (results.integral == 0.0) - return stream.str(); - stream << "Centroid X: " << results.cent_x << "\nStd. Dev. X: " << results.sigma_x << "\nFWHM X: " << 2.355 * results.sigma_x << "\n"; - if(is2D) - stream << "Centroid Y: " << results.cent_y << "\nStd. Dev. Y: " << results.sigma_y << "\nFWHM Y: " << 2.355 * results.sigma_y << "\n"; - return stream.str(); - } - - SpectrumPanel::SpectrumPanel() : - m_zoomedFlag(false), m_cutModeFlag(false), m_acceptCutFlag(false), m_zoomedGram(), m_totalSlots(1), m_nRegions(0) - { - m_tableSizes[0] = 1; m_tableSizes[1] = 1; - } - - SpectrumPanel::~SpectrumPanel() {} - - //Main render function. Handles generating subplot regions as well as the zoomed in region - bool SpectrumPanel::OnImGuiRender(const std::vector& histoList, const std::vector& cutList, const std::vector& paramList) - { - NAV_PROFILE_FUNCTION(); - static bool acceptCutFlag = false; - m_result = false; - if (ImGui::Begin("Active View")) - { - if (histoList.size() > 0) - { - if (m_zoomedFlag && m_zoomedGram.type != SpectrumType::None) - { - RenderCutButton(); - ImGui::SameLine(); - if(ImGui::Button("Clear")) - { - SpectrumManager::GetInstance().ClearHistogram(m_zoomedGram.name); - } - ImGui::SameLine(); - RenderRemoveRegionButton(); - if (m_zoomedGram.type == SpectrumType::Histo2D || m_zoomedGram.type == SpectrumType::Summary) - { - float* scale = SpectrumManager::GetInstance().GetColorScaleRange(m_zoomedGram.name); - ImGui::DragFloatRange2("Min / Max", &(scale[0]), &(scale[1]), 0.01f); - ImPlot::ColormapScale("##HistogramScale", scale[0], scale[1], ImVec2(0, -1), ImPlotColormap_Viridis); - ImGui::SameLine(); - } - if (ImPlot::BeginPlot(m_zoomedGram.name.c_str(), ImVec2(-1, -1))) - { - SpectrumManager::GetInstance().DrawHistogram(m_zoomedGram.name); - if (!m_cutModeFlag && ImPlot::IsPlotHovered() && ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left)) - { - m_zoomedFlag = false; - m_zoomedGram = HistogramArgs(); - } - else if (m_cutModeFlag) - { - HandleCutMode(); - } - - if (ImPlot::IsPlotSelected()) { - auto select = ImPlot::GetPlotSelection(); - if (ImGui::IsMouseClicked(ImPlot::GetInputMap().SelectCancel)) { - ImPlot::CancelPlotSelection(); - m_integralRegions.emplace_back(select, "integralRegion_"+std::to_string(m_nRegions), m_zoomedGram.name); - m_nRegions++; - } - } - for (size_t i = 0; i < m_integralRegions.size(); i++) - { - auto& region = m_integralRegions[i]; - if (m_zoomedGram.name == region.histogram_name) - { - ImPlot::DragRect(int(i), ®ion.region.X.Min, ®ion.region.Y.Min, ®ion.region.X.Max, ®ion.region.Y.Max, ImVec4(1, 0, 1, 1), ImPlotDragToolFlags_NoFit); - StatResults results = SpectrumManager::GetInstance().AnalyzeHistogramRegion(m_zoomedGram.name, region.region); - ImPlot::PlotText(GenerateStatString(region.name, results, m_zoomedGram.y_par != "None").c_str(), (region.region.X.Max + region.region.X.Min) * 0.5, - (region.region.Y.Min + region.region.Y.Max) * 0.5); - } - } - ImPlot::EndPlot(); - } - RenderAcceptCutDialog(); - } - else - { - ImGui::SliderInt2("Rows, Columns", m_tableSizes, 1, 3); - ImGui::SameLine(); - if (ImGui::Button("Clear All")) - { - SpectrumManager::GetInstance().ClearHistograms(); - } - m_totalSlots = m_tableSizes[0] * m_tableSizes[1]; - m_selectedGrams.resize(m_totalSlots); - if (ImGui::BeginTable("Select Histograms", m_tableSizes[1])) - { - std::string label; - int this_gram; - for (int i = 0; i < m_tableSizes[0]; i++) - { - ImGui::TableNextRow(); - for (int j = 0; j < m_tableSizes[1]; j++) - { - ImGui::TableNextColumn(); - this_gram = i * m_tableSizes[1] + j; - label = "Histogram" + std::to_string(this_gram); - if (ImGui::BeginCombo(label.c_str(), m_selectedGrams[this_gram].name.c_str())) - { - for (auto& params : histoList) - { - if (ImGui::Selectable(params.name.c_str(), params.name == m_selectedGrams[this_gram].name)) - m_selectedGrams[this_gram] = params; - } - ImGui::EndCombo(); - } - } - } - ImGui::EndTable(); - } - - if (ImPlot::BeginSubplots("Histograms", m_tableSizes[0], m_tableSizes[1], ImVec2(-1, -1))) - { - int i = 0; - for (auto& spec : m_selectedGrams) - { - if (ImPlot::BeginPlot(spec.name.c_str())) - { - SpectrumManager::GetInstance().DrawHistogram(spec.name); - if (ImPlot::IsPlotHovered() && ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left)) - { - m_zoomedFlag = true; - m_zoomedGram = spec; - } - - for (size_t i = 0; i < m_integralRegions.size(); i++) - { - auto& region = m_integralRegions[i]; - if (spec.name == region.histogram_name) - { - ImPlot::DragRect(int(i), ®ion.region.X.Min, ®ion.region.Y.Min, ®ion.region.X.Max, ®ion.region.Y.Max, ImVec4(1, 0, 1, 1)); - } - } - ImPlot::EndPlot(); - } - i++; - } - ImPlot::EndSubplots(); - } - } - } - } - ImGui::End(); - return m_result; - } - - void SpectrumPanel::HandleCutMode() - { - switch (m_zoomedGram.type) - { - case SpectrumType::Histo1D: - { - if (m_newCutX.size() == 2) - { - m_acceptCutFlag = true; - } - else if (ImPlot::IsPlotHovered() && ImGui::IsMouseClicked(ImGuiMouseButton_Left)) - { - m_newCutX.push_back(ImPlot::GetPlotMousePos().x); - } - ImPlot::PlotVLines(m_newCutArgs.name.c_str(), m_newCutX.data(), int(m_newCutX.size())); - break; - } - case SpectrumType::Histo2D: - { - if (m_newCutX.size() >= 2 && ImPlot::IsPlotHovered() && ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left)) - { - m_acceptCutFlag = true; - m_newCutX.push_back(m_newCutX[0]); - m_newCutY.push_back(m_newCutY[0]); - } - else if (ImPlot::IsPlotHovered() && ImGui::IsMouseClicked(ImGuiMouseButton_Left)) - { - auto point = ImPlot::GetPlotMousePos(); - m_newCutX.push_back(point.x); - m_newCutY.push_back(point.y); - } - ImPlot::PlotLine(m_newCutArgs.name.c_str(), m_newCutX.data(), m_newCutY.data(), int(m_newCutX.size())); - break; - } - case SpectrumType::Summary: - { - if (m_newCutX.size() == 2) - { - m_acceptCutFlag = true; - } - else if (ImPlot::IsPlotHovered() && ImGui::IsMouseClicked(ImGuiMouseButton_Left)) - { - m_newCutX.push_back(ImPlot::GetPlotMousePos().x); - } - ImPlot::PlotVLines(m_newCutArgs.name.c_str(), m_newCutX.data(), int(m_newCutX.size())); - break; - } - case SpectrumType::None: - { - m_cutModeFlag = false; - break; - } - } - } - - void SpectrumPanel::RenderAcceptCutDialog() - { - if (m_acceptCutFlag) - { - m_acceptCutFlag = false; - m_cutModeFlag = false; - ImGui::OpenPopup("Accept Cut"); - } - if (ImGui::BeginPopupModal("Accept Cut")) - { - ImGui::Text("Save this Cut?"); - if (ImGui::Button("Yes")) - { - SpectrumManager& manager = SpectrumManager::GetInstance(); - switch (m_newCutArgs.type) - { - case CutType::Cut1D: - { - std::sort(m_newCutX.begin(), m_newCutX.end()); - manager.AddCut(m_newCutArgs, m_newCutX[0], m_newCutX[1]); - manager.AddCutToHistogramDraw(m_newCutArgs.name, m_zoomedGram.name); - break; - } - case CutType::Cut2D: - { - manager.AddCut(m_newCutArgs, m_newCutX, m_newCutY); - manager.AddCutToHistogramDraw(m_newCutArgs.name, m_zoomedGram.name); - break; - } - case CutType::CutSummaryAny: - { - std::sort(m_newCutX.begin(), m_newCutX.end()); - std::vector subhistos = manager.GetSubHistograms(m_zoomedGram.name); - manager.AddCut(m_newCutArgs, subhistos, m_newCutX[0], m_newCutX[1]); - manager.AddCutToHistogramDraw(m_newCutArgs.name, m_zoomedGram.name); - break; - } - case CutType::CutSummaryAll: - { - std::sort(m_newCutX.begin(), m_newCutX.end()); - std::vector subhistos = manager.GetSubHistograms(m_zoomedGram.name); - manager.AddCut(m_newCutArgs, subhistos, m_newCutX[0], m_newCutX[1]); - manager.AddCutToHistogramDraw(m_newCutArgs.name, m_zoomedGram.name); - break; - } - case CutType::None: - { - NAV_ERROR("Trying to add None type cut to manager at SpectrumPanel::RenderAcceptCutDialog!"); - break; - } - } - ImGui::CloseCurrentPopup(); - m_result = true; - } - ImGui::SameLine(); - if (ImGui::Button("No")) - { - ImGui::CloseCurrentPopup(); - m_result = false; - } - ImGui::EndPopup(); - } - } - - //Renders Cut button as well as dialog for creating cuts. - void SpectrumPanel::RenderCutButton() - { - if (ImGui::Button(ICON_FA_CUT " Draw Cut")) - { - m_newCutArgs = CutArgs(); - m_newCutX.resize(0); - m_newCutY.resize(0); - ImGui::OpenPopup(ICON_FA_CUT " New Cut Dialog"); - } - if (ImGui::BeginPopupModal(ICON_FA_CUT " New Cut Dialog")) - { - m_newCutArgs.x_par = m_zoomedGram.x_par; - m_newCutArgs.y_par = m_zoomedGram.y_par; - switch (m_zoomedGram.type) - { - case SpectrumType::Histo1D: - { - m_newCutArgs.type = CutType::Cut1D; - ImGui::BulletText("%s", ("X Parameter: " + m_newCutArgs.x_par).c_str()); - break; - } - case SpectrumType::Histo2D: - { - m_newCutArgs.type = CutType::Cut2D; - ImGui::BulletText("%s", ("X Parameter: " + m_newCutArgs.x_par).c_str()); - ImGui::BulletText("%s", ("Y Parameter: " + m_newCutArgs.y_par).c_str()); - break; - } - case SpectrumType::Summary: - { - if (ImGui::RadioButton("CutSummaryAny", m_newCutArgs.type == CutType::CutSummaryAny)) - m_newCutArgs.type = CutType::CutSummaryAny; - ImGui::SameLine(); - if (ImGui::RadioButton("CutSummaryAll", m_newCutArgs.type == CutType::CutSummaryAll)) - m_newCutArgs.type = CutType::CutSummaryAll; - break; - } - case SpectrumType::None: m_newCutArgs.type = CutType::None; break; - } - ImGui::InputText("Cut Name", &m_newCutArgs.name); - if (ImGui::Button("Accept & Draw")) - { - m_cutModeFlag = true; - ImGui::CloseCurrentPopup(); - } - ImGui::SameLine(); - if (ImGui::Button("Cancel")) - { - ImGui::CloseCurrentPopup(); - } - ImGui::EndPopup(); - } - } - - //Simple button/dialog for removing integration regions - void SpectrumPanel::RenderRemoveRegionButton() - { - static std::string selectedRegion = ""; - if (ImGui::Button("Delete Region")) - { - selectedRegion = ""; - ImGui::OpenPopup("Remove Integral Region"); - } - if (ImGui::BeginPopupModal("Remove Integral Region")) - { - if (ImGui::BeginCombo("Region", selectedRegion.c_str())) - { - for (auto& region : m_integralRegions) - { - if (region.histogram_name == m_zoomedGram.name) - { - if (ImGui::Selectable(region.name.c_str(), region.name == selectedRegion, ImGuiSelectableFlags_DontClosePopups)) - selectedRegion = region.name; - } - } - ImGui::EndCombo(); - } - if (ImGui::Button("Ok")) - { - RemoveSelectedRegion(selectedRegion); - ImGui::CloseCurrentPopup(); - } - ImGui::SameLine(); - if (ImGui::Button("Cancel")) - { - ImGui::CloseCurrentPopup(); - } - ImGui::EndPopup(); - } - } - - void SpectrumPanel::RemoveSelectedRegion(const std::string& region) - { - for (size_t i=0; i& histoList, const std::vector& cutList, const std::vector& paramList); - inline const std::string& GetZoomedOnHistogram() { return m_zoomedGram.name; } - inline const bool IsZoomed() { return m_zoomedFlag; } - - private: - void HandleCutMode(); - void RenderAcceptCutDialog(); - void RenderCutButton(); - void RenderRemoveRegionButton(); - void RemoveSelectedRegion(const std::string& region); - std::vector m_selectedGrams; - std::vector m_integralRegions; - bool m_zoomedFlag; - bool m_cutModeFlag; - bool m_acceptCutFlag; - bool m_result; - HistogramArgs m_zoomedGram; - int m_tableSizes[2]; - int m_totalSlots; - int m_nRegions; - CutArgs m_newCutArgs; - std::vector m_newCutX; - std::vector m_newCutY; - }; - -} - -#endif diff --git a/Navigator/src/Navigator/Events/AppEvent.h b/Navigator/src/Navigator/Events/AppEvent.h deleted file mode 100644 index 0b1eda4..0000000 --- a/Navigator/src/Navigator/Events/AppEvent.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - AppEvent.h - Events related to the main application (window events mostly). Again, based on @TheCherno's work. - - GWM -- Feb 2022 -*/ -#ifndef APP_EVENT_H -#define APP_EVENT_H - -#include "Event.h" - -namespace Navigator { - - // Window closing is pure event (no data) - class NAV_API WindowCloseEvent : public Event - { - public: - WindowCloseEvent() {}; - - EVENT_CATEGORY_SETUP(EventCategoryApp) - EVENT_TYPE_SETUP(WindowClose) - }; - - class NAV_API WindowResizeEvent : public Event - { - public: - WindowResizeEvent(int x, int y) : - m_xSize(x), m_ySize(y) - { - } - - inline int GetXSize() { return m_xSize; } - inline int GetYSize() { return m_ySize; } - std::string ToString() const override - { - std::stringstream ss; - ss << GetName() << " to size: (" << m_xSize << ", " << m_ySize << ")"; - return ss.str(); - } - - EVENT_CATEGORY_SETUP(EventCategoryApp) - EVENT_TYPE_SETUP(WindowResize) - - private: - int m_xSize, m_ySize; - }; - - class NAV_API AppUpdateEvent : public Event - { - public: - AppUpdateEvent() = default; - - EVENT_CATEGORY_SETUP(EventCategoryApp) - EVENT_TYPE_SETUP(AppUpdate) - }; - -} - -#endif \ No newline at end of file diff --git a/Navigator/src/Navigator/Events/Event.h b/Navigator/src/Navigator/Events/Event.h deleted file mode 100644 index 9a55a69..0000000 --- a/Navigator/src/Navigator/Events/Event.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - Event.h - Event system for Navigator. Based entirely upon the work of @TheCherno in his game engine series, with additons specific to - Navigator. Abstract Event class and an EventDispatcher. EventDispatcher links a function to the event for handling. See Application::OnEvent for - an example of use. - - GWM -- Feb 2022 -*/ -#ifndef EVENT_H -#define EVENT_H - -#include "Navigator/Core/NavCore.h" - -namespace Navigator { - - enum class NAV_API EventType - { - None=0, - WindowClose, WindowResize, WindowFocus, WindowLostFocus, WindowMoved, - KeyPressed, KeyReleased, KeyTyped, - MouseButtonPressed, MouseButtonReleased, MouseScrolled, MouseMoved, - AppUpdate, - PhysicsStart, PhysicsStop, PhysicsParam - }; - - enum NAV_API EventCategory - { - EventCategoryNone=0, - EventCategoryApp=BIT(0), - EventCategoryInput=BIT(1), - EventCategoryKey=BIT(2), - EventCategoryMouse=BIT(3), - EventCategoryWindow=BIT(4), - EventCategoryPhysics=BIT(5), - }; - - //Some function generation automation to reduce code written for all events - #define EVENT_CATEGORY_SETUP(cat) virtual int GetCategoryFlags() const override { return cat; } - - #define EVENT_TYPE_SETUP(type) static EventType GetStaticType() { return EventType::type; } \ - virtual EventType GetEventType() const override { return GetStaticType(); } \ - virtual const char* GetName() const override { return #type; } - - class NAV_API Event - { - friend class EventDispatcher; - public: - virtual EventType GetEventType() const = 0; - virtual const char* GetName() const = 0; - virtual int GetCategoryFlags() const = 0; - virtual std::string ToString() const { return GetName(); } - inline bool IsCategory(EventCategory cat) const { return GetCategoryFlags() & cat; } - bool handledFlag = false; - }; - - class NAV_API EventDispatcher - { - public: - EventDispatcher(Event& e) : - m_event(e) - { - } - - template - bool Dispatch(const F& function) - { - if(m_event.GetEventType() == T::GetStaticType()) - { - m_event.handledFlag = function(static_cast(m_event)); - return true; - } - else - { - return false; - } - } - - private: - Event& m_event; - }; - - //For easy printing - NAV_API inline std::ostream& operator<<(std::ostream& os, const Event& e) - { - return os << e.ToString(); - } -} - -#endif \ No newline at end of file diff --git a/Navigator/src/Navigator/Events/KeyEvent.h b/Navigator/src/Navigator/Events/KeyEvent.h deleted file mode 100644 index 3cc037e..0000000 --- a/Navigator/src/Navigator/Events/KeyEvent.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - KeyEvent.h - Events related to key presses. Again, based on @TheCherno's work. - - GWM -- Feb 2022 -*/ -#ifndef KEY_EVENT_H -#define KEY_EVENT_H - -#include "Event.h" - -namespace Navigator { - - //Since so many key related events, have a base - class NAV_API KeyEvent : public Event - { - public: - inline int GetKeycode() const { return m_keycode; } - EVENT_CATEGORY_SETUP(EventCategoryKey | EventCategoryInput) - protected: - KeyEvent(int code) : - m_keycode(code) - { - } - - int m_keycode; - - }; - - class NAV_API KeyPressedEvent : public KeyEvent - { - public: - KeyPressedEvent(int code, int count) : - KeyEvent(code), m_repeatCount(count) - { - } - - EVENT_TYPE_SETUP(KeyPressed) - - inline int GetRepeatCount() const { return m_repeatCount; } - - std::string ToString() const override - { - std::stringstream stream; - stream << GetName() << " with code "< -#include -#include "IconsFontAwesome5.h" - -namespace Navigator { - - ImGuiLayer::ImGuiLayer() : - Layer("ImGuiLayer") - { - } - - ImGuiLayer::~ImGuiLayer() - { - } - - void ImGuiLayer::OnAttach() - { - NAV_PROFILE_FUNCTION(); - IMGUI_CHECKVERSION(); - - NAV_INFO("Creating ImGui Context..."); - - ImGui::CreateContext(); - ImPlot::CreateContext(); - - ImGuiIO& io = ImGui::GetIO(); - io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; - io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; - //Viewports are real wonky on Linux and sometimes on MacOS - //Can currently cause assertion failure on checking number of monitors in ImGui sanity checks. - io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; - - ImGui::StyleColorsDark(); //Hacker mode - ImPlot::StyleColorsDark(); - - ImGuiStyle& style = ImGui::GetStyle(); - - if(io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) - { - style.WindowRounding = 0.0f; - style.Colors[ImGuiCol_WindowBg].w = 1.0f; - } - - //Setup our fonts. We have Roboto for text and FontAwesome for our icons. - //Note the .ttf files are found in NavProject, or in the bin dir. This is because - //the actual program (NavProject) is launched from either the bin/ ... /NaProject or the NavProject directory - //io.Fonts->AddFontDefault(); - ImFontConfig latin_config; - latin_config.RasterizerMultiply = 1.3f; - ImFontConfig config; - config.MergeMode = true; - //config.GlyphMinAdvanceX = 13.0f; // Use if you want to make the icon monospaced - config.PixelSnapH = true; - static const ImWchar icon_ranges[] = { ICON_MIN_FA, ICON_MAX_FA, 0 }; - io.Fonts->AddFontFromFileTTF("Assets/fonts/Roboto-Regular.ttf", 16.0f, &latin_config, io.Fonts->GetGlyphRangesDefault()); - io.Fonts->AddFontFromFileTTF("Assets/fonts/fa-solid-900.ttf", 16.0f, &config, icon_ranges); - - //ImPlot styling - ImPlot::GetStyle().FillAlpha = 0.75; - - Application& app = Application::Get(); - GLFWwindow* window = static_cast(app.GetWindow().GetNativeWindow()); - - ImGui_ImplGlfw_InitForOpenGL(window, true); - ImGui_ImplOpenGL3_Init("#version 410"); //GLSL version - - NAV_INFO("ImGui Finished initializing."); - } - - void ImGuiLayer::OnDetach() - { - NAV_PROFILE_FUNCTION(); - ImGui_ImplOpenGL3_Shutdown(); - ImGui_ImplGlfw_Shutdown(); - ImPlot::DestroyContext(); - ImGui::DestroyContext(); - } - - void ImGuiLayer::Begin() - { - NAV_PROFILE_FUNCTION(); - ImGui_ImplOpenGL3_NewFrame(); - ImGui_ImplGlfw_NewFrame(); - - ImGui::NewFrame(); - } - - void ImGuiLayer::End() - { - NAV_PROFILE_FUNCTION(); - Application& app = Application::Get(); - ImGuiIO& io = ImGui::GetIO(); - - io.DisplaySize = ImVec2((float)app.GetWindow().GetWidth(), (float)app.GetWindow().GetHeight()); - - - ImGui::Render(); - ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData()); - - if(io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) - { - GLFWwindow* backup_current_context = glfwGetCurrentContext(); - ImGui::UpdatePlatformWindows(); - ImGui::RenderPlatformWindowsDefault(); - glfwMakeContextCurrent(backup_current_context); - } - } - - void ImGuiLayer::OnImGuiRender() - { - //Demo's used to figure out how to do things. - //Should not be on for actual NavProject for - //real use - //static bool show = true; - //ImGui::ShowDemoWindow(&show); - //ImPlot::ShowDemoWindow(); - } -} diff --git a/Navigator/src/Navigator/ImGui/ImGuiLayer.h b/Navigator/src/Navigator/ImGui/ImGuiLayer.h deleted file mode 100644 index 54d28dc..0000000 --- a/Navigator/src/Navigator/ImGui/ImGuiLayer.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - ImGuiLayer.h - The layer containing all of the ImGui related setup and calls. Based on the work by @TheCherno in his game engine series. - Should always exist as an overlay in the Application LayerStack. Note that it currently is OpenGL specific based on - ImGui implementation/backends. - - GWM -- Feb 2022 -*/ -#ifndef IMGUI_LAYER_H -#define IMGUI_LAYER_H - -#include "Navigator/Core/NavCore.h" -#include "Navigator/Core/Layer.h" - -namespace Navigator { - - class NAV_API ImGuiLayer : public Layer - { - public: - ImGuiLayer(); - ~ImGuiLayer(); - - virtual void OnAttach() override; - virtual void OnDetach() override; - virtual void OnImGuiRender() override; - - void Begin(); - void End(); - - private: - float m_time; - }; - -} - -#endif \ No newline at end of file diff --git a/Navigator/src/Navigator/Physics/AnalysisStack.cpp b/Navigator/src/Navigator/Physics/AnalysisStack.cpp deleted file mode 100644 index a9bfaa7..0000000 --- a/Navigator/src/Navigator/Physics/AnalysisStack.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - AnalysisStack.cpp - Container for the analyses in the PhysicsLayer. Really just a specialized wrapper around std::vector. - - GWM -- Feb 2022 -*/ -#include "AnalysisStack.h" - -namespace Navigator { - - AnalysisStack::AnalysisStack() {} - - AnalysisStack::~AnalysisStack() - { - for(AnalysisStage* stage : m_stack) - delete stage; - } - - void AnalysisStack::PushStage(AnalysisStage* stage) - { - m_stack.emplace(m_stack.begin()+m_insertIndex, stage); - m_insertIndex++; - } - - void AnalysisStack::PopStage(AnalysisStage* stage) - { - auto iter = std::find(m_stack.begin(), m_stack.end(), stage); - if(iter != m_stack.end()) - { - m_stack.erase(iter); - m_insertIndex--; - } - } - -} diff --git a/Navigator/src/Navigator/Physics/AnalysisStack.h b/Navigator/src/Navigator/Physics/AnalysisStack.h deleted file mode 100644 index 1a0f842..0000000 --- a/Navigator/src/Navigator/Physics/AnalysisStack.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - AnalysisStack.h - Container for the analyses in the PhysicsLayer. Really just a specialized wrapper around std::vector. - - GWM -- Feb 2022 -*/ - -#ifndef ANALYSIS_STACK_H -#define ANALYSIS_STACK_H - -#include "AnalysisStage.h" -#include "Navigator/Core/NavCore.h" - -namespace Navigator { - - class NAV_API AnalysisStack - { - public: - AnalysisStack(); - ~AnalysisStack(); - - void PushStage(AnalysisStage* stage); - void PopStage(AnalysisStage* stage); - - std::vector::iterator begin() { return m_stack.begin(); } - std::vector::iterator end() { return m_stack.end(); } - private: - std::vector m_stack; //The analysis stack owns the analysis stages - unsigned int m_insertIndex=0; - }; - -} - - -#endif \ No newline at end of file diff --git a/Navigator/src/Navigator/Physics/AnalysisStage.cpp b/Navigator/src/Navigator/Physics/AnalysisStage.cpp deleted file mode 100644 index f6669f6..0000000 --- a/Navigator/src/Navigator/Physics/AnalysisStage.cpp +++ /dev/null @@ -1,19 +0,0 @@ -/* - AnalysisStage.h - Represents a step in a chain of analyses that are run on a NavEvent. These stages are where NavParameters are set and validated. Users should use this base class - to create their own analyses and inject them into their project. See template NavProject for an example of use. - - GWM -- Feb 2022 -*/ -#include "AnalysisStage.h" - -namespace Navigator { - - AnalysisStage::AnalysisStage(const std::string& name) : - m_name(name) - { - } - - AnalysisStage::~AnalysisStage() {} - -} \ No newline at end of file diff --git a/Navigator/src/Navigator/Physics/AnalysisStage.h b/Navigator/src/Navigator/Physics/AnalysisStage.h deleted file mode 100644 index 2aab375..0000000 --- a/Navigator/src/Navigator/Physics/AnalysisStage.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - AnalysisStage.h - Represents a step in a chain of analyses that are run on a NavEvent. These stages are where Parameters are set and validated. Users should use this base class - to create their own analyses and inject them into their project. See template NavProject for an example of use. - - GWM -- Feb 2022 -*/ -#ifndef ANALYSIS_STAGE_H -#define ANALYSIS_STAGE_H - -#include "Navigator/Core/NavCore.h" -#include "Navigator/Core/Parameter.h" -#include "NavData.h" - -namespace Navigator { - - class NAV_API AnalysisStage - { - public: - AnalysisStage(const std::string& name="AnalysisStage"); - virtual ~AnalysisStage(); - - virtual void AnalyzePhysicsEvent(const NavEvent& event) {}; - - inline std::string GetName() { return m_name; } - private: - std::string m_name; - }; - -} - -#endif \ No newline at end of file diff --git a/Navigator/src/Navigator/Physics/Caen/CompassFile.cpp b/Navigator/src/Navigator/Physics/Caen/CompassFile.cpp deleted file mode 100644 index 78cf7e6..0000000 --- a/Navigator/src/Navigator/Physics/Caen/CompassFile.cpp +++ /dev/null @@ -1,210 +0,0 @@ -/* - CompassFile.cpp - Wrapper class around a shared pointer to an ifstream. Here the shared pointer is used - to overcome limitations of the ifstream class, namely that it is written such that ifstream - cannot be modified by move semantics. Contains all information needed to parse a single binary - CompassFile. Currently has a class wide defined buffer size; may want to make this user input - in the future. - - Written by G.W. McCann Oct. 2020 - - Modified for Navigator; not really any significant changes. Just some simple changes, removal of unused data. - - GWM -- Feb 2022 - - Update to reflect new CAEN binary data format with headers to indicate data contents. - - GWM -- May 2022 -*/ -#include "CompassFile.h" - -namespace Navigator { - - CompassFile::CompassFile() : - m_filename(""), m_bufferIter(nullptr), m_bufferEnd(nullptr), m_smap(nullptr), m_hitUsedFlag(true), m_file(std::make_shared()), m_eofFlag(false) - { - } - - CompassFile::CompassFile(const std::string& filename) : - m_filename(""), m_bufferIter(nullptr), m_bufferEnd(nullptr), m_smap(nullptr), m_hitUsedFlag(true), m_file(std::make_shared()), m_eofFlag(false) - { - Open(filename); - } - - CompassFile::CompassFile(const std::string& filename, int bsize) : - m_filename(""), m_bufferIter(nullptr), m_bufferEnd(nullptr), m_smap(nullptr), m_hitUsedFlag(true), - m_bufsize(bsize), m_file(std::make_shared()), m_eofFlag(false) - { - Open(filename); - } - - CompassFile::~CompassFile() - { - Close(); - } - - void CompassFile::Open(const std::string& filename) - { - NAV_PROFILE_FUNCTION(); - m_eofFlag = false; - m_hitUsedFlag = true; - m_filename = filename; - m_file->open(m_filename, std::ios::binary | std::ios::in); - - m_file->seekg(0, std::ios_base::end); - m_size = (unsigned int)m_file->tellg(); - if(m_size == 0) - { - m_eofFlag = true; - } - else - { - m_file->seekg(0, std::ios_base::beg); - ReadHeader(); - m_nHits = m_size / m_hitsize; - m_buffersize = m_hitsize * m_bufsize; - m_hitBuffer.resize(m_buffersize); - } - } - - void CompassFile::Close() - { - if(IsOpen()) - m_file->close(); - } - - void CompassFile::ReadHeader() - { - if(!IsOpen()) - { - NAV_WARN("Unable to get hit size from file {0}, sending invalid value.", m_filename); - return; - } - - char* header = new char[2]; - m_file->read(header, 2); - m_header = *((uint16_t*)header); - m_hitsize = 16; //default hitsize 16 bytes - if (Compass_IsEnergy(m_header)) - m_hitsize += 2; - if (Compass_IsEnergyShort(m_header)) - m_hitsize += 2; - if (Compass_IsEnergyCalibrated(m_header)) - m_hitsize += 8; - if (Compass_IsWaves(m_header)) - { - m_hitsize += 5; - char* firstHit = new char[m_hitsize]; //Read chunk of first hit - m_file->read(firstHit, m_hitsize); - firstHit += m_hitsize - 4; //Move to the Nsamples value - uint32_t nsamples = *((uint32_t*)firstHit); - m_hitsize += nsamples * 2; //Each sample is two bytes - m_file->seekg(0, std::ios_base::beg); - m_file->read(header, 2); - - delete[] firstHit; - } - - delete[] header; - } - - /* - GetNextHit() is the function which... gets the next hit - Has to check if the buffer needs refilled/filled for the first time - Upon pulling a hit, sets the UsedFlag to false, letting the next level know - that the hit should be free game. - - If the file cannot be opened, signals as though file is EOF - */ - bool CompassFile::GetNextHit() - { - NAV_PROFILE_FUNCTION(); - if(!IsOpen()) return true; - - if((m_bufferIter == nullptr || m_bufferIter == m_bufferEnd) && !IsEOF()) - { - GetNextBuffer(); - } - - if(!IsEOF()) - { - ParseNextHit(); - m_hitUsedFlag = false; - } - - return m_eofFlag; - } - - /* - GetNextBuffer() ... self-explanatory name - Note tht this is where the EOF flag is set. The EOF is only singaled - after the LAST buffer is completely read (i.e literally no more data). ifstream sets its eof - bit upon pulling the last buffer, but this class waits until that entire - last buffer is read to singal EOF (the true end of file). - */ - void CompassFile::GetNextBuffer() - { - NAV_PROFILE_FUNCTION(); - if(m_file->eof()) - { - m_eofFlag = true; - return; - } - - m_file->read(m_hitBuffer.data(), m_hitBuffer.size()); - - m_bufferIter = m_hitBuffer.data(); - m_bufferEnd = m_bufferIter + m_file->gcount(); //one past the last datum - - } - - void CompassFile::ParseNextHit() - { - NAV_PROFILE_FUNCTION(); - m_currentHit.board = *((uint16_t*)m_bufferIter); - m_bufferIter += 2; - m_currentHit.channel = *((uint16_t*)m_bufferIter); - m_bufferIter += 2; - m_currentHit.timestamp = *((uint64_t*)m_bufferIter); - m_bufferIter += 8; - if (Compass_IsEnergy(m_header)) - { - m_currentHit.energy = *((uint16_t*)m_bufferIter); - m_bufferIter += 2; - } - if (Compass_IsEnergyCalibrated(m_header)) - { - m_currentHit.energyCalibrated = *((uint64_t*)m_bufferIter); - m_bufferIter += 8; - } - if (Compass_IsEnergyShort(m_header)) - { - m_currentHit.energyShort = *((uint16_t*)m_bufferIter); - m_bufferIter += 2; - } - m_currentHit.flags = *((uint32_t*)m_bufferIter); - m_bufferIter += 4; - if (Compass_IsWaves(m_header)) - { - m_currentHit.waveCode = *((uint8_t*)m_bufferIter); - m_bufferIter += 1; - m_currentHit.Ns = *((uint32_t*)m_bufferIter); - m_bufferIter += 4; - if (m_currentHit.samples.size() != m_currentHit.Ns) - m_currentHit.samples.resize(m_currentHit.Ns); - for (size_t i = 0; i < m_currentHit.samples.size(); i++) - { - m_currentHit.samples[i] = *((uint16_t*)m_bufferIter); - m_bufferIter += 2; - } - } - - if(m_smap != nullptr) - { //memory safety - int gchan = m_currentHit.channel + m_currentHit.board*16; - m_currentHit.timestamp += m_smap->GetShift(gchan); - } - - } - -} \ No newline at end of file diff --git a/Navigator/src/Navigator/Physics/Caen/CompassFile.h b/Navigator/src/Navigator/Physics/Caen/CompassFile.h deleted file mode 100644 index fbd6878..0000000 --- a/Navigator/src/Navigator/Physics/Caen/CompassFile.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - CompassFile.h - Wrapper class around a shared pointer to an ifstream. Here the shared pointer is used - to overcome limitations of the ifstream class, namely that it is written such that ifstream - cannot be modified by move semantics. Contains all information needed to parse a single binary - CompassFile. Currently has a class wide defined buffer size; may want to make this user input - in the future. - - Written by G.W. McCann Oct. 2020 - - Modified for Navigator; not really any significant changes. Just some simple changes, removal of unused data. - - GWM -- Feb 2022 - - Update to reflect new CAEN binary data format with headers to indicate data contents. - - GWM -- May 2022 -*/ -#ifndef COMPASSFILE_H -#define COMPASSFILE_H - -#include "Navigator/Core/NavCore.h" -#include "CompassHit.h" -#include "Navigator/Physics/ShiftMap.h" - -namespace Navigator { - - class NAV_API CompassFile - { - - public: - CompassFile(); - CompassFile(const std::string& filename); - CompassFile(const std::string& filename, int bsize); - ~CompassFile(); - void Open(const std::string& filename); - void Close(); - bool GetNextHit(); - - inline bool IsOpen() const { return m_file->is_open(); }; - inline CompassHit GetCurrentHit() const { return m_currentHit; } - inline std::string GetName() const { return m_filename; } - inline bool CheckHitHasBeenUsed() const { return m_hitUsedFlag; } //query to find out if we've used the current hit - inline void SetHitHasBeenUsed() { m_hitUsedFlag = true; } //flip the flag to indicate the current hit has been used - inline bool IsEOF() const { return m_eofFlag; } //see if we've read all available data - inline bool* GetUsedFlagPtr() { return &m_hitUsedFlag; } - inline void AttachShiftMap(ShiftMap* map) { m_smap = map; } - inline unsigned int GetSize() const { return m_size; } - inline unsigned int GetNumberOfHits() const { return m_nHits; } - - - private: - void ReadHeader(); - void ParseNextHit(); - void GetNextBuffer(); - - using Buffer = std::vector; - - using FilePointer = std::shared_ptr; //to make this class copy/movable - - std::string m_filename; - Buffer m_hitBuffer; - char* m_bufferIter; - char* m_bufferEnd; - ShiftMap* m_smap; //NOT owned by CompassFile. DO NOT delete - - bool m_hitUsedFlag; - int m_bufsize = 200000; //size of the buffer in hits - int m_hitsize; //size of a CompassHit in bytes (without alignment padding) - uint16_t m_header; - int m_buffersize; - - CompassHit m_currentHit; - FilePointer m_file; - bool m_eofFlag; - unsigned int m_size; //size of the file in bytes - unsigned int m_nHits; //number of hits in the file (m_size/m_hitsize) - - }; - -} - -#endif diff --git a/Navigator/src/Navigator/Physics/Caen/CompassHit.cpp b/Navigator/src/Navigator/Physics/Caen/CompassHit.cpp deleted file mode 100644 index e8e7ccf..0000000 --- a/Navigator/src/Navigator/Physics/Caen/CompassHit.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include "CompassHit.h" - -namespace Navigator { - - bool Compass_IsEnergy(uint16_t header) - { - return (header & CompassHeaders::Energy) != 0; - } - - bool Compass_IsEnergyShort(uint16_t header) - { - return (header & CompassHeaders::EnergyShort) != 0; - } - - bool Compass_IsEnergyCalibrated(uint16_t header) - { - return (header & CompassHeaders::EnergyCalibrated) != 0; - } - - bool Compass_IsWaves(uint16_t header) - { - return (header & CompassHeaders::EnergyCalibrated) != 0; - } -} \ No newline at end of file diff --git a/Navigator/src/Navigator/Physics/Caen/CompassHit.h b/Navigator/src/Navigator/Physics/Caen/CompassHit.h deleted file mode 100644 index 7213e96..0000000 --- a/Navigator/src/Navigator/Physics/Caen/CompassHit.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - CompassHit.h - Simple struct representing data from the CAEN CoMPASS DAQ. Note here I do not have any of the non-standard data available (calibrated energy, waveform data, etc.) - - GWM -- Feb 2022 - - Update to reflect new CAEN binary data format with headers to indicate data contents. - - GWM -- May 2022 -*/ -#ifndef COMPASS_HIT_H -#define COMPASS_HIT_H - -#include "Navigator/Core/NavCore.h" - -namespace Navigator { - - struct NAV_API CompassHit - { - uint16_t board = 0; - uint16_t channel = 0; - uint64_t timestamp = 0; - uint16_t energy = 0; - uint16_t energyShort = 0; - uint64_t energyCalibrated = 0; - uint32_t flags = 0; - uint8_t waveCode = 0; - uint32_t Ns = 0; - std::vector samples; - }; - - //New to CoMPASS Data Format: Headers indicating what data is present. - enum CompassHeaders - { - Energy = 0x0001, - EnergyShort = 0x0002, - EnergyCalibrated = 0x0004, - Waves = 0x0008 - }; - - bool Compass_IsEnergy(uint16_t header); - bool Compass_IsEnergyShort(uint16_t header); - bool Compass_IsEnergyCalibrated(uint16_t header); - bool Compass_IsWaves(uint16_t header); -} - -#endif \ No newline at end of file diff --git a/Navigator/src/Navigator/Physics/Caen/CompassOnlineSource.cpp b/Navigator/src/Navigator/Physics/Caen/CompassOnlineSource.cpp deleted file mode 100644 index 89167fb..0000000 --- a/Navigator/src/Navigator/Physics/Caen/CompassOnlineSource.cpp +++ /dev/null @@ -1,149 +0,0 @@ -/* - CompassOnlineSource.cpp - A data source for online CAEN CoMPASS Data. Uses TCPClient to connect to the CoMPASS server. Data is then converted - from the CAEN CoMPASS format to the native NavData format. Note that here we use syncrhonous since we - need to know if the buffer is/was filled, however we use non-blocking since we don't want the entire process to hang on attempting a connection or waiting - for data to come over the pipe. We handle the case of an un-filled buffer internally. - - IMPORTANT - Navigator wants a unqiue ID on each hit. To do this we use the idiom: - id = board_number * nchannels_per_board + channel_number - This requires two things: that the class variable m_nchannels_per_board be set to match your physical digitizers, and that ALL of your - digitizers have the SAME number of channels. By default CompassRun assumes 16 channels per board, as this is what is used with the SE-SPS setup at FoxLab. - If you use a different set of boards, CHANGE THIS VALUE! If you use mixed boards, you will need to invent a new id scheme altogether. - - ADDITIONALLY - CoMPASS servers provide no stream side information on the state of a transfer (verified via communication w/ CAEN). That is: there are no headers or enders on the data transfers. - This forces us to use the size of a single CoMPASS datum (CompassHit) to determine the state of a transfer. If the read buffer size is not a whole multiple of CompassHits, the data - was determined to be fragmented. This has a huge drawback: in general there is no guarantee that the first byte of the transferred data is the first byte of a CompassHit. This means that - Navigator MUST be connected to the CoMPASS server BEFORE starting the aquisition. Otherwise the program could endup in a state of scrambled unpacking (also verified w/ CAEN). - Maybe we can get them to change this? Headers reeaaally should exist for transfers like this. - - GWM -- April 2022 -*/ -#include "CompassOnlineSource.h" - -namespace Navigator { - - CompassOnlineSource::CompassOnlineSource(const std::string& hostname, const std::string& port, uint16_t header, int channels_per_board) : - DataSource(), m_bufferIter(nullptr), m_bufferEnd(nullptr), m_header(header), m_nchannels_per_board(channels_per_board) - { - InitConnection(hostname, port); - } - - CompassOnlineSource::~CompassOnlineSource() {} - - void CompassOnlineSource::InitConnection(const std::string& hostname, const std::string& port) - { - NAV_PROFILE_FUNCTION(); - - m_datasize = 16; //base size of CoMPASS data - if (Compass_IsEnergy(m_header)) - m_datasize += 2; - if (Compass_IsEnergyShort(m_header)) - m_datasize += 2; - if (Compass_IsEnergyCalibrated(m_header)) - m_datasize += 8; - if (Compass_IsWaves(m_header)) - NAV_ERROR("Navigator does not support reading CoMPASS wave data for an online source!"); - - m_validFlag = false; - m_connection.Connect(hostname, port); - if (m_connection.IsOpen()) - { - m_validFlag = true; - } - } - - const NavData& CompassOnlineSource::GetData() - { - NAV_PROFILE_FUNCTION(); - size_t range = m_bufferEnd - m_bufferIter; //how much buffer we have left - if (!IsValid()) - { - NAV_ERROR("Attempting to access invalid source at CompassOnlineSource!"); - m_datum = NavData(); - return m_datum; - } - else if (m_bufferIter == nullptr || range < m_datasize || m_bufferIter == m_bufferEnd) //If no buffer/buffer completely used/buffer fragmented fill - { - FillBuffer(); - } - - if (m_bufferIter != m_bufferEnd && range >= m_datasize)//If buffer and enough data for a hit, get it - GetHit(); - else - { - m_datum = NavData(); - return m_datum; - } - - m_datum.longEnergy = m_currentHit.energy; - m_datum.shortEnergy = m_currentHit.energyShort; - m_datum.calEnergy = m_currentHit.energyCalibrated; - m_datum.timestamp = m_currentHit.timestamp; - m_datum.id = m_currentHit.board * m_nchannels_per_board + m_currentHit.channel; - - return m_datum; - } - - void CompassOnlineSource::FillBuffer() - { - NAV_PROFILE_FUNCTION(); - if (!m_connection.IsOpen()) //Make sure connection is still cool - { - m_validFlag = false; - return; - } - - std::vector recieved = m_connection.Read(); - //If we didn't finish the last buffer toss all of the stuff we used and then append the recieved data - //Otherwise, copy over the recieved buffer. Note lack of vector::resize, vector::reserve. Intentional for performance. - //The amount of copying/resizing is best handled by the std (according to multiple references) - if (m_bufferIter != m_bufferEnd) - { - size_t pos = m_bufferEnd - m_bufferIter; - m_currentBuffer.erase(m_currentBuffer.begin(), m_currentBuffer.begin() + (m_currentBuffer.size() - pos)); //remove used bytes - m_currentBuffer.insert(m_currentBuffer.end(), recieved.begin(), recieved.end()); - } - else - m_currentBuffer = recieved; - - m_bufferIter = m_currentBuffer.data(); - m_bufferEnd = m_currentBuffer.data() + m_currentBuffer.size(); - } - - void CompassOnlineSource::ReadHeader() - { - - } - - void CompassOnlineSource::GetHit() - { - NAV_PROFILE_FUNCTION(); - m_currentHit.board = *((uint16_t*)m_bufferIter); - m_bufferIter += 2; - m_currentHit.channel = *((uint16_t*)m_bufferIter); - m_bufferIter += 2; - m_currentHit.timestamp = *((uint64_t*)m_bufferIter); - m_bufferIter += 8; - if (Compass_IsEnergy(m_header)) - { - m_currentHit.energy = *((uint16_t*)m_bufferIter); - m_bufferIter += 2; - } - if (Compass_IsEnergyCalibrated(m_header)) - { - m_currentHit.energyCalibrated = *((uint16_t*)m_bufferIter); - m_bufferIter += 8; - } - if (Compass_IsEnergyShort(m_header)) - { - m_currentHit.energyShort = *((uint16_t*)m_bufferIter); - m_bufferIter += 2; - } - m_currentHit.flags = *((uint32_t*)m_bufferIter); - m_bufferIter += 4; - } - -} \ No newline at end of file diff --git a/Navigator/src/Navigator/Physics/Caen/CompassOnlineSource.h b/Navigator/src/Navigator/Physics/Caen/CompassOnlineSource.h deleted file mode 100644 index a549f44..0000000 --- a/Navigator/src/Navigator/Physics/Caen/CompassOnlineSource.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - CompassOnlineSource.h - A data source for online CAEN CoMPASS Data. Uses TCPClient to connect to the CoMPASS server. Data is then converted - from the CAEN CoMPASS format to the native NavData format. Note that here we use syncrhonous since we - need to know if the buffer is/was filled, however we use non-blocking since we don't want the entire process to hang on attempting a connection or waiting - for data to come over the pipe. We handle the case of an un-filled buffer internally. - - IMPORTANT - Navigator wants a unqiue ID on each hit. To do this we use the idiom: - id = board_number * nchannels_per_board + channel_number - This requires two things: that the class variable m_nchannels_per_board be set to match your physical digitizers, and that ALL of your - digitizers have the SAME number of channels. By default CompassRun assumes 16 channels per board, as this is what is used with the SE-SPS setup at FoxLab. - If you use a different set of boards, CHANGE THIS VALUE! If you use mixed boards, you will need to invent a new id scheme altogether. - - ADDITIONALLY - CoMPASS servers provide no stream side information on the state of a transfer (verified via communication w/ CAEN). That is: there are no headers or enders on the data transfers. - This forces us to use the size of a single CoMPASS datum (CompassHit) to determine the state of a transfer. If the read buffer size is not a whole multiple of CompassHits, the data - was determined to be fragmented. This has a huge drawback: in general there is no guarantee that the first byte of the transferred data is the first byte of a CompassHit. This means that - Navigator MUST be connected to the CoMPASS server BEFORE starting the aquisition. Otherwise the program could endup in a state of scrambled unpacking (also verified w/ CAEN). - Maybe we can get them to change this? Headers reeaaally should exist for transfers like this. - - GWM -- April 2022 - - Update to reflect new CAEN binary data format with headers to indicate data contents. Note that as prev. mentioned, no headers, so cannot rely on data stream to indicate state. State must be selected - by user at UI when creating source. Cannot support waves atm. No way to predict size of first event to calibrate the number of samples for the stream (or guarantee that they will be constant for duration - of Navigator's runtime). Best to use the CoMPASSPlot for waves. - - GWM -- May 2022 -*/ -#ifndef COMPASS_ONLINE_SOURCE_H -#define COMPASS_ONLINE_SOURCE_H - -#include "Navigator/Physics/DataSource.h" -#include "Navigator/Utils/TCPClient.h" -#include "CompassHit.h" - -namespace Navigator { - - class CompassOnlineSource : public DataSource - { - public: - CompassOnlineSource(const std::string& hostname, const std::string& port, uint16_t header, int channels_per_board=16); - virtual ~CompassOnlineSource() override; - - virtual const NavData& GetData() override; - - private: - void InitConnection(const std::string& hostname, const std::string& port); - void FillBuffer(); - void GetHit(); - void ReadHeader(); - - std::vector m_currentBuffer; - uint16_t m_header; - int m_datasize; //size of CoMPASS hit in bytes, set by header arg - const int m_nchannels_per_board = 16; //IMPORTANT: Used for ID'ing channels uniquely. If you use boards with 32 or 8 or 64 channels you must change this! If you mix boards with - //different numbers of channels, you will have to find a different id solution. - char* m_bufferIter; - char* m_bufferEnd; - CompassHit m_currentHit; - - TCPClient m_connection; - - }; - -} - -#endif diff --git a/Navigator/src/Navigator/Physics/Caen/CompassRun.cpp b/Navigator/src/Navigator/Physics/Caen/CompassRun.cpp deleted file mode 100644 index 67659ec..0000000 --- a/Navigator/src/Navigator/Physics/Caen/CompassRun.cpp +++ /dev/null @@ -1,156 +0,0 @@ -/* - CompassRun.cpp - Class designed as abstraction of a collection of binary files that represent the total data in a single - Compass data run. It handles the user input (shift maps, file collection etc.) and creates a list of - CompassFiles from which to draw data. It then draws data from these files, organizes them in time, - and writes to a ROOT file for further processing. - - Written by G.W. McCann Oct. 2020 - - Updated to also handle scaler data. -- GWM Oct. 2020 - - Modifed and updated for use in Navigator. Obviously stripped out any ROOT code. Also, now uses the very nice std::filesystem - library to handle filepathing. Also, removed scalers (for now). - - GWM -- Feb 2022 - - Update to reflect new CAEN binary data format with headers to indicate data contents. - - GWM -- May 2022 -*/ -#include "CompassRun.h" - -namespace Navigator { - - CompassRun::CompassRun() : - DataSource(), m_directory(""), m_startIndex(0), m_nchannels_per_board(16) - { - } - - CompassRun::CompassRun(const std::string& dir, int channels_per_board) : - DataSource(), m_directory(dir), m_startIndex(0), m_nchannels_per_board(channels_per_board) - { - CollectFiles(); - } - - CompassRun::~CompassRun() {} - - void CompassRun::CollectFiles() - { - NAV_PROFILE_FUNCTION(); - int nfiles=0; - for(auto& item : std::filesystem::directory_iterator(m_directory)) - { - if(item.path().extension() == m_extension) - nfiles++; - } - - m_datafiles.clear(); - m_datafiles.reserve(nfiles); - for(auto& item : std::filesystem::directory_iterator(m_directory)) - { - if(item.path().extension() == m_extension) - { - m_datafiles.emplace_back(item.path().string()); - } - } - - long total_hits=0; - for(auto& file : m_datafiles) - { - - if(!file.IsOpen()) - { - NAV_ERROR("Unable to open file with name {0}", file.GetName()); - m_validFlag = false; - return; - } - - if(m_smap.IsValid()) - file.AttachShiftMap(&m_smap); - - total_hits += file.GetNumberOfHits(); - } - - if(m_datafiles.size() == 0) - { - NAV_WARN("Unable to find any files with extension {0} in directory {1}. CompassRun killed.", m_extension, m_directory); - m_validFlag = false; - } - else - { - NAV_INFO("Succesfully opened {0} files with {1} total hits", nfiles, total_hits); - m_validFlag = true; - } - } - - /* - GetHitsFromFiles() is the function which actually retrieves and sorts the data from the individual - files. There are several tricks which allow this to happen. First is that, after sorting, it is impossible - to determine which file the data originally came from (short of parsing the name of the file against board/channel). - However, we need to let the file know that we want it to pull the next hit. To do this, a pointer to the UsedFlag of the file - is retrieved along with the data. This flag is flipped so that on the next hit cycle a new hit is pulled. Second is the use - of a rolling start index. Once a file has gone EOF, we no longer need it. If this is the first file in the list, we can just skip - that index all together. In this way, the loop can go from N times to N-1 times. - */ - bool CompassRun::GetHitsFromFiles() - { - NAV_PROFILE_FUNCTION(); - std::pair earliestHit = std::make_pair(CompassHit(), nullptr); - for(unsigned int i=m_startIndex; i - -namespace Navigator { - - class NAV_API CompassRun : public DataSource - { - - public: - CompassRun(); - CompassRun(const std::string& dir, int channels_per_board=16); - virtual ~CompassRun(); - virtual const NavData& GetData() override; - inline void SetDirectory(const std::string& dir) { m_directory = dir; CollectFiles(); } - inline void SetShiftMap(const std::string& filename) { m_smap.SetFile(filename); } - - - private: - void CollectFiles(); - bool GetHitsFromFiles(); - - std::filesystem::path m_directory; - const std::string m_extension = ".bin"; - - std::vector m_datafiles; - unsigned int m_startIndex; //this is the file we start looking at; increases as we finish files. - int m_nchannels_per_board; //IMPORTANT: Used for ID'ing channels uniquely. If you use boards with 32 or 8 or 64 channels you must change this! If you mix boards with - //different numbers of channels, you will have to find a different id solution. - ShiftMap m_smap; - - CompassHit m_hit; - - unsigned int m_totalHits; - }; - -} - -#endif diff --git a/Navigator/src/Navigator/Physics/DataSource.cpp b/Navigator/src/Navigator/Physics/DataSource.cpp deleted file mode 100644 index 3e205f1..0000000 --- a/Navigator/src/Navigator/Physics/DataSource.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - DataSource.cpp - Abstract data source class. In Navigator a DataSource can be either an online (live) source or an offline (file) source. By default, - Navigator has classes to handle CAEN CoMPASS data sources (files and online); other sources may be implemented as more use cases for Navigator become - apparent. - - GWM -- Feb 2022 -*/ -#include "DataSource.h" -#include "Caen/CompassRun.h" -#include "Caen/CompassOnlineSource.h" - -namespace Navigator { - - //loc=either an ip address or a file location, port=address port, or unused in case of file - DataSource* CreateDataSource(const std::string& location, const std::string& port, uint16_t header, int channels_per_board, DataSource::SourceType type) - { - switch(type) - { - case DataSource::SourceType::CompassOffline : return new CompassRun(location, channels_per_board); - case DataSource::SourceType::CompassOnline : return new CompassOnlineSource(location, port, header, channels_per_board); - case DataSource::SourceType::None : return nullptr; - } - NAV_WARN("Invalid DataSourceType at CreateDataSource!"); - return nullptr; - } - - std::string ConvertDataSourceTypeToString(DataSource::SourceType type) - { - switch(type) - { - case DataSource::SourceType::None: return "None"; - case DataSource::SourceType::CompassOnline : return "CompassOnline"; - case DataSource::SourceType::CompassOffline : return "CompassOffline"; - } - - return "None"; - } -} diff --git a/Navigator/src/Navigator/Physics/DataSource.h b/Navigator/src/Navigator/Physics/DataSource.h deleted file mode 100644 index 3016c10..0000000 --- a/Navigator/src/Navigator/Physics/DataSource.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - DataSource.h - Abstract data source class. In Navigator a DataSource can be either an online (live) source or an offline (file) source. By default, - Navigator has classes to handle CAEN CoMPASS data sources (files and online); other sources may be implemented as more use cases for Navigator become - apparent. - - GWM -- Feb 2022 -*/ -#ifndef DATA_SOURCE_H -#define DATA_SOURCE_H - -#include "Navigator/Core/NavCore.h" -#include "NavData.h" - -namespace Navigator { - - class NAV_API DataSource - { - public: - enum class SourceType //Need to know what kind of sources are available. - { - None, - CompassOnline, - CompassOffline - }; - - DataSource() : - m_validFlag(false) - { - } - - virtual ~DataSource() {}; - virtual const NavData& GetData() = 0; - inline bool IsValid() { return m_validFlag; } - - protected: - bool m_validFlag; - NavData m_datum; - }; - - NAV_API DataSource* CreateDataSource(const std::string& location, const std::string& port, uint16_t bitflags, int channels_per_board, DataSource::SourceType type); - - NAV_API std::string ConvertDataSourceTypeToString(DataSource::SourceType type); -} - -#endif diff --git a/Navigator/src/Navigator/Physics/NavData.h b/Navigator/src/Navigator/Physics/NavData.h deleted file mode 100644 index 861d713..0000000 --- a/Navigator/src/Navigator/Physics/NavData.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - NavData.h - Simple data structures for the event building process in Navigator. Way to create uniform data from different sources. Note that the current paradigm - is very heavily tied to digital data aquisition systems. Any attempt to use Navigator for analog systems would require a deep overhaul of the event processing. - Most likely link to something like nscldaq. - - GWM -- Feb 2022 - - Update to reflect new CAEN binary data format with headers to indicate data contents. - - GWM -- May 2022 -*/ -#ifndef NAVDATA_H -#define NAVDATA_H - -namespace Navigator { - - struct NavData - { - uint32_t longEnergy; - uint32_t shortEnergy; - uint64_t calEnergy; - uint64_t timestamp; - uint32_t id; - }; - - using NavEvent = std::vector; - -} - -#endif \ No newline at end of file diff --git a/Navigator/src/Navigator/Physics/PhysicsEventBuilder.cpp b/Navigator/src/Navigator/Physics/PhysicsEventBuilder.cpp deleted file mode 100644 index 23442b8..0000000 --- a/Navigator/src/Navigator/Physics/PhysicsEventBuilder.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - PhysicsEventBuilder.h - Class for taking in raw NavData and converting into a NavEvent. NavEvent is just a std::vector of NavData, where - the held NavData all falls within a time window called the coincidence window. As soon as a NavData is given that falls outside - of this window, the current event is shifted to the ready event and the AddDatumToEvent function returns true. The ready event can - then be retrieved. The hit that triggered the end of event then is used to start the new event. The current pattern is strongly associated - with digital electronics concepts for nuclear data aquisition systems. - - GWM -- Feb 2022 -*/ -#include "PhysicsEventBuilder.h" - -namespace Navigator { - - PhysicsEventBuilder::PhysicsEventBuilder(uint64_t windowSize) : - m_sortFlag(false), m_coincWindow(windowSize), m_bufferIndex(0) - { - } - - PhysicsEventBuilder::~PhysicsEventBuilder() - { - } - - bool PhysicsEventBuilder::AddDatum(const NavData& datum) - { - NAV_PROFILE_FUNCTION(); - if (datum.timestamp == 0) //Ignore empty data (need a valid timestamp) - return false; - - m_dataBuffer[m_bufferIndex] = datum; - m_bufferIndex++; - if (m_bufferIndex < s_maxDataBuffer) //If we haven't filled the buffer keep going - return false; - else if (m_sortFlag) - std::sort(m_dataBuffer.begin(), m_dataBuffer.end(), [](NavData& i, NavData& j) { return i.timestamp < j.timestamp; }); - - //Generate our ready events - m_readyEvents.clear(); - uint64_t eventStartTime = m_dataBuffer[0].timestamp; - NavEvent event; - event.push_back(m_dataBuffer[0]); - for (auto& data : m_dataBuffer) - { - if (data.timestamp - eventStartTime < m_coincWindow) //are we within active window - { - event.push_back(data); - } - else // found one that falls outside - { - m_readyEvents.push_back(event); - event.clear(); - eventStartTime = data.timestamp; - event.push_back(data); - } - } - m_bufferIndex = 0; - return true; - } - - const std::vector& PhysicsEventBuilder::GetReadyEvents() const - { - return m_readyEvents; - } - -} \ No newline at end of file diff --git a/Navigator/src/Navigator/Physics/PhysicsEventBuilder.h b/Navigator/src/Navigator/Physics/PhysicsEventBuilder.h deleted file mode 100644 index 35fd27f..0000000 --- a/Navigator/src/Navigator/Physics/PhysicsEventBuilder.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - PhysicsEventBuilder.h - Class for taking in raw NavData and converting into a NavEvent. NavEvent is just a std::vector of NavData, where - the held NavData all falls within a time window called the coincidence window. As soon as a NavData is given that falls outside - of this window, the current event is shifted to the ready event and the AddDatumToEvent function returns true. The ready event can - then be retrieved. The hit that triggered the end of event then is used to start the new event. The current pattern is strongly associated - with digital electronics concepts for nuclear data aquisition systems. - - GWM -- Feb 2022 -*/ -#ifndef PHYSICS_EVENT_BUILDER_H -#define PHYSICS_EVENT_BUILDER_H - -#include "NavData.h" - -namespace Navigator { - - class NAV_API PhysicsEventBuilder - { - public: - PhysicsEventBuilder(uint64_t windowSize); - ~PhysicsEventBuilder(); - inline void SetCoincidenceWindow(uint64_t windowSize) { m_coincWindow = windowSize; } - inline void SetSortFlag(bool flag) { m_sortFlag = flag; } - inline void ClearAll() // reset all internal structures - { - m_bufferIndex = 0; - m_readyEvents.clear(); - } - bool AddDatum(const NavData& datum); - const std::vector& GetReadyEvents() const; - - private: - bool m_sortFlag; - static constexpr int s_maxDataBuffer = 1000; - std::array m_dataBuffer; - int m_bufferIndex; - std::vector m_readyEvents; - uint64_t m_coincWindow; - - }; - -} - -#endif \ No newline at end of file diff --git a/Navigator/src/Navigator/Physics/PhysicsLayer.cpp b/Navigator/src/Navigator/Physics/PhysicsLayer.cpp deleted file mode 100644 index 1a41b42..0000000 --- a/Navigator/src/Navigator/Physics/PhysicsLayer.cpp +++ /dev/null @@ -1,188 +0,0 @@ -/* - PhysicsLayer.cpp - The layer of the application representing all physics. This includes the data source and the thread upon which data is piped, event built, and analyzed. - PhysicsLayer receives a PhysicsStartEvent or PhysicsStopEvent to handle changes to the state of the secondary thread. As it handles the thread, it must have synchronization. - This is handled on two levels. The first is a mutex that synchronizes access to the DataSource. The second is an atomic boolean flag which is used to control the state of the physics thread. - PhysicsLayer also owns the AnalysisStack for the application. - - GWM -- Feb 2022 -*/ -#include "PhysicsLayer.h" -#include "Navigator/Core/SpectrumManager.h" -#include "NavData.h" - -namespace Navigator { - - PhysicsLayer::PhysicsLayer() : - m_activeFlag(false), m_source(nullptr), m_eventBuilder(0), m_physThread(nullptr) - { - } - - PhysicsLayer::~PhysicsLayer() - { - NAV_PROFILE_FUNCTION(); - if (m_activeFlag) - { - DetachDataSource(); - DestroyPhysThread(); - } - } - - void PhysicsLayer::OnAttach() - { - /* For debugging - NavParameter par("joseph"); - par.SetValue(8); - NAV_INFO("Does the par exist? {0}", ParameterMap::GetInstance().IsParameterValid("joseph")); - NAV_INFO("What is its value? {0}", ParameterMap::GetInstance().GetParameterValue("joseph")); - */ - } - - void PhysicsLayer::OnDetach() - { - } - - void PhysicsLayer::OnEvent(Event& event) - { - NAV_PROFILE_FUNCTION(); - EventDispatcher dispatch(event); - dispatch.Dispatch(BIND_EVENT_FUNCTION(PhysicsLayer::OnPhysicsStartEvent)); - dispatch.Dispatch(BIND_EVENT_FUNCTION(PhysicsLayer::OnPhysicsStopEvent)); - } - - bool PhysicsLayer::OnPhysicsStartEvent(PhysicsStartEvent& event) - { - NAV_PROFILE_FUNCTION(); - //If the Physics thread is active, kill it - if(m_activeFlag) - { - DetachDataSource(); - DestroyPhysThread(); - } - - AttachDataSource(event); - - //If we succesfully attached, fire up a new phys thread - if(m_activeFlag) - { - NAV_INFO("Starting new analysis thread..."); - m_physThread = new std::thread(&PhysicsLayer::RunSource, std::ref(*this)); - } - return true; - } - - bool PhysicsLayer::OnPhysicsStopEvent(PhysicsStopEvent& event) - { - NAV_PROFILE_FUNCTION(); - if (m_activeFlag) - { - DetachDataSource(); - DestroyPhysThread(); - } - return true; - } - - void PhysicsLayer::PushStage(AnalysisStage* stage) - { - m_physStack.PushStage(stage); - } - - void PhysicsLayer::OnUpdate(Timestep& step) {} - - /*Threaded functions*/ - - void PhysicsLayer::DestroyPhysThread() - { - NAV_PROFILE_FUNCTION(); - NAV_INFO("Destroying the analysis thread..."); - //Join the thread back to the parent (finish up the thread) - if(m_physThread != nullptr && m_physThread->joinable()) - { - m_physThread->join(); - } - - //Free the thread memory - if(m_physThread != nullptr) - { - delete m_physThread; - m_physThread = nullptr; - } - NAV_INFO("Thread destroyed."); - } - - void PhysicsLayer::AttachDataSource(PhysicsStartEvent& event) - { - NAV_PROFILE_FUNCTION(); - std::scoped_lock guard(m_sourceMutex); //Shouldn't matter for this, but safety first - m_source.reset(CreateDataSource(event.GetSourceLocation(), event.GetSourcePort(), event.GetBitFlags(), event.GetChannelsPerBoard(), event.GetSourceType())); - m_eventBuilder.SetCoincidenceWindow(event.GetCoincidenceWindow()); - m_eventBuilder.SetSortFlag(event.GetSortFlag()); - m_eventBuilder.ClearAll(); //Protect against stopping mid-event - if (m_source->IsValid()) - { - NAV_INFO("Attach successful. Enabling data pull..."); - m_activeFlag = true; - } - else - { - NAV_ERROR("DataSource attach failed... check for error conditions."); - m_source.reset(nullptr); - } - } - - void PhysicsLayer::DetachDataSource() - { - NAV_PROFILE_FUNCTION(); - std::scoped_lock guard(m_sourceMutex); - NAV_INFO("Detaching physics data source..."); - m_activeFlag = false; - m_source.reset(nullptr); - NAV_INFO("Detach succesful."); - } - - void PhysicsLayer::RunSource() - { - NAV_PROFILE_FUNCTION(); - SpectrumManager& manager = SpectrumManager::GetInstance(); - - std::vector events; - NavData datum; - while(m_activeFlag) - { - //Scope to encapsulate access to the data source - { - std::scoped_lock guard(m_sourceMutex); - if (m_source == nullptr || !m_source->IsValid()) - { - return; - } - /* - Looks funny, but two conditions lead to !IsValid(). Either source prev. shutdown, - OR we reached end of source, indicated after prev. data grab - */ - datum = m_source->GetData(); - if(!m_source->IsValid()) - { - NAV_INFO("End of data source."); - return; - } - } - - //Pass data from source to event builder. True from AddDatum indicates events are ready - if (m_eventBuilder.AddDatum(datum)) - { - events = m_eventBuilder.GetReadyEvents(); - for (auto& event : events) - { - for (auto& stage : m_physStack) - stage->AnalyzePhysicsEvent(event); - - //Now that the analysis stack has filled all our NavParameters with data, update the histogram counts - manager.UpdateHistograms(); - //Invalidate all parameters to get ready for next event - manager.InvalidateParameters(); - } - } - } - } -} diff --git a/Navigator/src/Navigator/Physics/PhysicsLayer.h b/Navigator/src/Navigator/Physics/PhysicsLayer.h deleted file mode 100644 index 6408409..0000000 --- a/Navigator/src/Navigator/Physics/PhysicsLayer.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - PhysicsLayer.h - The layer of the application representing all physics. This includes the data source and the thread upon which data is piped, event built, and analyzed. - PhysicsLayer receives a PhysicsStartEvent or PhysicsStopEvent to handle changes to the state of the secondary thread. As it handles the thread, it must have synchronization. - This is handled on two levels. The first is a mutex that synchronizes access to the DataSource. The second is an atomic boolean flag which is used to control the state of the physics thread. - PhysicsLayer also owns the AnalysisStack for the application. - - GWM -- Feb 2022 -*/ -#ifndef PHYSICS_LAYER_H -#define PHYSICS_LAYER_H - -#include "Navigator/Core/NavCore.h" -#include "Navigator/Core/Layer.h" -#include "Navigator/Events/PhysicsEvent.h" -#include "AnalysisStack.h" -#include "AnalysisStage.h" -#include "DataSource.h" -#include "PhysicsEventBuilder.h" - -#include -#include -#include - -namespace Navigator { - - class NAV_API PhysicsLayer : public Layer - { - public: - PhysicsLayer(); - virtual ~PhysicsLayer(); - - virtual void OnAttach() override; - virtual void OnUpdate(Timestep& step) override; - virtual void OnDetach() override; - virtual void OnImGuiRender() override {}; - virtual void OnEvent(Event& event) override; - - bool OnPhysicsStartEvent(PhysicsStartEvent& event); - bool OnPhysicsStopEvent(PhysicsStopEvent& event); - - void PushStage(AnalysisStage* stage); - - private: - void DestroyPhysThread(); - void AttachDataSource(PhysicsStartEvent& event); - void DetachDataSource(); - void RunSource(); - - AnalysisStack m_physStack; - std::atomic m_activeFlag; //safe read/write across thread, but more expensive - - std::mutex m_sourceMutex; - - std::unique_ptr m_source; - PhysicsEventBuilder m_eventBuilder; - - std::thread* m_physThread; - - }; - -} - -#endif diff --git a/Navigator/src/Navigator/Physics/ShiftMap.cpp b/Navigator/src/Navigator/Physics/ShiftMap.cpp deleted file mode 100644 index 69bfc7b..0000000 --- a/Navigator/src/Navigator/Physics/ShiftMap.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - ShiftMap.h - New class to act a go-between for timestamp shifts to channels. Takes in a - formated file containing data for shifts and then stores them in an unordered_map. - Key is a global compass channel (board#*16 + channel). Shifts in ps. - - Written by G.W. McCann Oct. 2020 - - Not currently implemented for Navigator though it could still be useful. Leave this here as a maybe upgrade path. - - GWM -- Feb 2022 -*/ -#include "ShiftMap.h" - -namespace Navigator { - - ShiftMap::ShiftMap() : - m_filename(""), m_validFlag(false) - { - } - - ShiftMap::ShiftMap(const std::string& filename) : - m_filename(filename), m_validFlag(false) - { - ParseFile(); - } - - ShiftMap::~ShiftMap() {} - - void ShiftMap::SetFile(const std::string& filename) - { - m_filename = filename; - ParseFile(); - } - - uint64_t ShiftMap::GetShift(int gchan) - { - if(!m_validFlag) - return 0; - - auto iter = m_map.find(gchan); - if(iter == m_map.end()) - return 0; - else - return iter->second; - } - - void ShiftMap::ParseFile() - { - m_validFlag = false; - std::ifstream input(m_filename); - if(!input.is_open()) - return; - - int board, channel, gchan; - uint64_t shift; - std::string junk, temp; - - std::getline(input, junk); - std::getline(input, junk); - - while(input>>board) - { - input>>temp; - input>>shift; - if(temp == "all") //keyword to set all channels in this board to same shift - { - for(int i=0; i<16; i++) - { - gchan = board*16 + i; - m_map[gchan] = shift; - } - } - else - { - channel = stoi(temp); - gchan = channel + board*16; - m_map[gchan] = shift; - } - } - - m_validFlag = true; - } - -} \ No newline at end of file diff --git a/Navigator/src/Navigator/Physics/ShiftMap.h b/Navigator/src/Navigator/Physics/ShiftMap.h deleted file mode 100644 index 869f8d9..0000000 --- a/Navigator/src/Navigator/Physics/ShiftMap.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - ShiftMap.h - New class to act a go-between for timestamp shifts to channels. Takes in a - formated file containing data for shifts and then stores them in an unordered_map. - Key is a global compass channel (board#*16 + channel). Shifts in ps. - - Written by G.W. McCann Oct. 2020 - - Not currently implemented for Navigator though it could still be useful. Leave this here as a maybe upgrade path. - - GWM -- Feb 2022 -*/ -#ifndef SHIFTMAP_H -#define SHIFTMAP_H - -#include "Navigator/Core/NavCore.h" - -namespace Navigator { - - class NAV_API ShiftMap - { - public: - ShiftMap(); - ShiftMap(const std::string& filename); - ~ShiftMap(); - void SetFile(const std::string& filename); - inline bool IsValid() { return m_validFlag; } - inline std::string GetFilename() { return m_filename; } - uint64_t GetShift(int gchan); - - private: - void ParseFile(); - - std::string m_filename; - bool m_validFlag; - - std::unordered_map m_map; - - }; - -} - -#endif diff --git a/Navigator/src/Navigator/Renderer/GraphicsContext.h b/Navigator/src/Navigator/Renderer/GraphicsContext.h deleted file mode 100644 index 3d4ca31..0000000 --- a/Navigator/src/Navigator/Renderer/GraphicsContext.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - GraphicsContext.h - Abstraction of graphical rendering context. Exists to allow Navigator the felxibility to be backend api agnostic, though currently - only OpenGL is implemented. Entirely based upon the work done by @TheCherno in his game engine series. See his content for more details. - - GWM -- Feb 2022 -*/ -#ifndef GRAPHICS_CONTEXT_H -#define GRAPHICS_CONTEXT_H - -namespace Navigator { - - class NAV_API GraphicsContext - { - public: - virtual void Init() = 0; - virtual void SwapBuffers() = 0; - }; - -} - -#endif \ No newline at end of file diff --git a/Navigator/src/Navigator/Renderer/RenderCommand.cpp b/Navigator/src/Navigator/Renderer/RenderCommand.cpp deleted file mode 100644 index ef45990..0000000 --- a/Navigator/src/Navigator/Renderer/RenderCommand.cpp +++ /dev/null @@ -1,13 +0,0 @@ -/* - RenderCommand.cpp - Render call abstraction. Exists to allow Navigator the felxibility to be backend api agnostic, though currently - only OpenGL is implemented. Entirely based upon the work done by @TheCherno in his game engine series. See his content for more details. - - GWM -- Feb 2022 -*/ -#include "RenderCommand.h" -#include "Platform/OpenGL/OpenGLRendererAPI.h" - -namespace Navigator { - RendererAPI* RenderCommand::s_api = new OpenGLRendererAPI(); -} \ No newline at end of file diff --git a/Navigator/src/Navigator/Renderer/RenderCommand.h b/Navigator/src/Navigator/Renderer/RenderCommand.h deleted file mode 100644 index 28b0162..0000000 --- a/Navigator/src/Navigator/Renderer/RenderCommand.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - RenderCommand.h - Render call abstraction. Exists to allow Navigator the felxibility to be backend api agnostic, though currently - only OpenGL is implemented. Entirely based upon the work done by @TheCherno in his game engine series. See his content for more details. - - GWM -- Feb 2022 -*/ -#ifndef RENDER_COMMAND_H -#define RENDER_COMMAND_H - -#include "Navigator/Core/NavCore.h" -#include "RendererAPI.h" - -namespace Navigator { - - class NAV_API RenderCommand - { - public: - inline static void SetClearColor(const glm::vec4& color_array) { s_api->SetClearColor(color_array); } - inline static void Clear() { s_api->Clear(); } - inline static float GetFrameTime() { return s_api->GetFrameTime(); } - - private: - static RendererAPI* s_api; - }; - -} - -#endif \ No newline at end of file diff --git a/Navigator/src/Navigator/Renderer/RendererAPI.cpp b/Navigator/src/Navigator/Renderer/RendererAPI.cpp deleted file mode 100644 index 421750f..0000000 --- a/Navigator/src/Navigator/Renderer/RendererAPI.cpp +++ /dev/null @@ -1,12 +0,0 @@ -/* - RenderAPI.h - Render API abstraction. Exists to allow Navigator the felxibility to be backend api agnostic, though currently - only OpenGL is implemented. Entirely based upon the work done by @TheCherno in his game engine series. See his content for more details. - - GWM -- Feb 2022 -*/ -#include "RendererAPI.h" - -namespace Navigator { - RendererAPI::API RendererAPI::s_api = RendererAPI::API::OpenGL; -} \ No newline at end of file diff --git a/Navigator/src/Navigator/Renderer/RendererAPI.h b/Navigator/src/Navigator/Renderer/RendererAPI.h deleted file mode 100644 index a8de3e4..0000000 --- a/Navigator/src/Navigator/Renderer/RendererAPI.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - RenderAPI.h - Render API abstraction. Exists to allow Navigator the felxibility to be backend api agnostic, though currently - only OpenGL is implemented. Entirely based upon the work done by @TheCherno in his game engine series. See his content for more details. - - GWM -- Feb 2022 -*/ -#ifndef RENDERER_API_H -#define RENDERER_API_H - -#include "Navigator/Core/NavCore.h" -#include "glm/vec4.hpp" - -namespace Navigator { - - class NAV_API RendererAPI - { - public: - enum class API - { - None = 0, - OpenGL = 1 //Currently only have OpenGL - }; - - virtual void Clear() = 0; - virtual void SetClearColor(const glm::vec4& color) = 0; - virtual float GetFrameTime() = 0; - - inline static API GetAPI() { return s_api; } - - private: - static API s_api; - }; - -} - -#endif \ No newline at end of file diff --git a/Navigator/src/Navigator/Utils/Instrumentor.h b/Navigator/src/Navigator/Utils/Instrumentor.h deleted file mode 100644 index a075f19..0000000 --- a/Navigator/src/Navigator/Utils/Instrumentor.h +++ /dev/null @@ -1,260 +0,0 @@ -/* - Instrumentor.h - Instrumentation classes for generating JSON trace files for use in Google Chrome's tracer. Based entirely upon the work done by @TheCherno in his game engine series. See his Hazel - repository for more details. - - To activate the profiling, switch the NAV_PROFILE macro to a value greater than 0. By default the instrumentaion is disabled (duh). Should only be used for development cases. - - GWM -- May 2022 -*/ -#ifndef INSTRUMENTOR_H -#define INSTRUMENTOR_H - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "Navigator/Core/Logger.h" -#include "Timer.h" - -namespace Navigator { - - using FloatingPointMicroseconds = std::chrono::duration; - - struct ProfileResult - { - std::string name; - FloatingPointMicroseconds start; - std::chrono::microseconds elapsedTime; - std::thread::id threadID; - }; - - struct InstrumentationSession - { - std::string name; - }; - - class Instrumentor - { - public: - Instrumentor(const Instrumentor&) = delete; - Instrumentor(Instrumentor&&) = delete; - - void BeginSession(const std::string& name, const std::string filename="inst_results.json") - { - std::scoped_lock guard(m_instMutex); - - if (m_session) - { - /* - * Can only ever have one session rolling. If for whatever reason attempt to open second, handle gracefully - */ - if (Logger::GetLogger()) //Ensure logger exists - { - NAV_ERROR("Attempting to create new instr. session ({0}) while session ({1}) is running! Setting to session {0}", name, m_session->name); - } - - InternalEndSession(); - } - - m_outputFile.open(filename); - if (m_outputFile.is_open()) - { - m_session = new InstrumentationSession({ name }); - WriteHeader(); - } - else if(Logger::GetLogger()) - { - NAV_ERROR("Unable to open instr. output file named {0}!", filename); - } - } - - void EndSession() - { - std::scoped_lock guard(m_instMutex); - InternalEndSession(); - } - - void WriteProfile(const ProfileResult& result) - { - std::scoped_lock guard(m_instMutex); - std::stringstream json_string; - json_string << std::setprecision(3) << std::fixed; - json_string << ",{"; - json_string << "\"cat\":\"function\","; - json_string << "\"dur\":" << (result.elapsedTime.count()) << ','; - json_string << "\"name\":\"" << result.name << "\","; - json_string << "\"ph\":\"X\","; - json_string << "\"pid\":0,"; - json_string << "\"tid\":" << result.threadID << ","; - json_string << "\"ts\":" << result.start.count(); - json_string << "}"; - - if (m_session) - { - m_outputFile << json_string.str(); - m_outputFile.flush(); - } - } - - static Instrumentor& Get() - { - static Instrumentor s_instance; - return s_instance; - } - - private: - Instrumentor() : - m_session(nullptr) - { - - } - - ~Instrumentor() - { - EndSession(); - } - - void InternalEndSession() - { - if (m_session) - { - WriteFooter(); - m_outputFile.close(); - delete m_session; - m_session = nullptr; - } - } - - void WriteHeader() - { - m_outputFile << "{\"otherData\": {},\"traceEvents\":[{}"; - m_outputFile.flush(); - } - - void WriteFooter() - { - m_outputFile << "]}"; - m_outputFile.flush(); - } - - std::mutex m_instMutex; - InstrumentationSession* m_session; - std::ofstream m_outputFile; - }; - - class InstrumentationTimer - { - public: - InstrumentationTimer(const char* name) : - m_name(name), m_stopped(false) - { - m_startTime = Clock::now(); - } - - ~InstrumentationTimer() - { - if (!m_stopped) - Stop(); - } - - - void Stop() - { - auto stopTime = Clock::now(); - FloatingPointMicroseconds start = FloatingPointMicroseconds((m_startTime).time_since_epoch()); - auto elapsedTime = std::chrono::time_point_cast(stopTime).time_since_epoch() - std::chrono::time_point_cast(m_startTime).time_since_epoch(); - m_stopped = true; - - Instrumentor::Get().WriteProfile({ m_name, start, elapsedTime, std::this_thread::get_id() }); - } - - private: - using Time = std::chrono::steady_clock::time_point; - using Clock = std::chrono::steady_clock; - - const char* m_name; - Time m_startTime; - bool m_stopped; - }; - - namespace InstrumentorUtils { - - template - struct ChangeResult - { - char data[N]; - }; - - template - constexpr auto CleanupOutputString(const char(&expr)[N], const char(&remove)[M]) - { - ChangeResult result = {}; - - size_t srcIndex = 0; - size_t destIndex = 0; - while (srcIndex < N) - { - size_t matchIndex = 0; - while (matchIndex < M - 1 && srcIndex + matchIndex < N - 1 && expr[srcIndex + matchIndex] == remove[matchIndex]) - matchIndex++; - if (matchIndex == M - 1) - srcIndex += matchIndex; - result.data[destIndex++] = expr[srcIndex] == '"' ? '\'' : expr[srcIndex]; - srcIndex++; - } - return result; - } - - } -} - -//Macros for ease of use - -#define NAV_PROFILE 0 -#if NAV_PROFILE - -//Attempt to resolve function signature with precompiler -#if defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600)) || defined(__ghs__) -#define NAV_FUNC_SIG __PRETTY_FUNCTION__ -#elif defined(__DMC__) && (__DMC__ >= 0x810) -#define NAV_FUNC_SIG __PRETTY_FUNCTION__ -#elif (defined(__FUNCSIG__) || (_MSC_VER)) -#define NAV_FUNC_SIG __FUNCSIG__ -#elif (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 600)) || (defined(__IBMCPP__) && (__IBMCPP__ >= 500)) -#define NAV_FUNC_SIG __FUNCTION__ -#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550) -#define NAV_FUNC_SIG __FUNC__ -#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) -#define NAV_FUNC_SIG __func__ -#elif defined(__cplusplus) && (__cplusplus >= 201103) -#define NAV_FUNC_SIG __func__ -#else -#define NAV_FUNC_SIG "NAV_FUNC_SIG unknown!" -#endif - -#define NAV_PROFILE_BEGIN_SESSION(name, filename) ::Navigator::Instrumentor::Get().BeginSession(name, filename); -#define NAV_PROFILE_END_SESSION() ::Navigator::Instrumentor::Get().EndSession(); -#define NAV_PROFILE_SCOPE_LINE2(name, line) constexpr auto fixedName##line = ::Navigator::InstrumentorUtils::CleanupOutputString(name, "__cdecl ");\ - ::Navigator::InstrumentationTimer timer##line(fixedName##line.data) -#define NAV_PROFILE_SCOPE_LINE(name, line) NAV_PROFILE_SCOPE_LINE2(name, line) -#define NAV_PROFILE_SCOPE(name) NAV_PROFILE_SCOPE_LINE(name, __LINE__) -#define NAV_PROFILE_FUNCTION() NAV_PROFILE_SCOPE(NAV_FUNC_SIG) - -#else - -#define NAV_PROFILE_BEGIN_SESSION(name, filename) -#define NAV_PROFILE_END_SESSION() -#define NAV_PROFILE_SCOPE_LINE2(name, line) -#define NAV_PROFILE_SCOPE_LINE(name, line) -#define NAV_PROFILE_SCOPE(name) -#define NAV_PROFILE_FUNCTION() - -#endif - -#endif diff --git a/Navigator/src/Navigator/Utils/TCPClient.cpp b/Navigator/src/Navigator/Utils/TCPClient.cpp deleted file mode 100644 index c002f63..0000000 --- a/Navigator/src/Navigator/Utils/TCPClient.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - TCPClient.h - Navigator's TCP client rep using asio. Contains very basic ability to read and write from a tcp socket in a non-blocking, synchronous method. - See asio docs for more details and examples on how to use. - - GWM -- April 2022 - - Note: the write functionality has not been verified. Should be fine, but test before using. -*/ -#include "TCPClient.h" - -namespace Navigator { - - TCPClient::TCPClient() : - m_socket(m_context) - { - m_readBuffer.resize(s_readBufferSize); - } - - TCPClient::TCPClient(const std::string& host, const std::string& port) : - m_socket(m_context) - { - m_readBuffer.resize(s_readBufferSize); - Connect(host, port); - } - - TCPClient::~TCPClient() - { - Close(); - } - - void TCPClient::Connect(const std::string& host, const std::string& port) - { - try - { - asio::ip::tcp::resolver resolver(m_context); - auto end_points = resolver.resolve(host, port); - asio::connect(m_socket, end_points); - m_socket.non_blocking(true); //Set the connection as non-blocking - } - catch (asio::system_error& e) - { - NAV_ERROR("Unable to connect to remote port for TCPClient! Error Code: {0}", e.what()); - } - } - - std::vector TCPClient::Read() - { - asio::error_code code; - size_t length = m_socket.read_some(asio::buffer(m_readBuffer, m_readBuffer.size()), code); - if (code == asio::error::eof) - { - NAV_WARN("Server has closed connection. Closing the TCPClient"); - Close(); - } - else if (code && code != asio::error::would_block) - { - NAV_ERROR("TCPClient::Read recieved unexpected error from host. Error message: {0}", code.message()); - NAV_WARN("Closing the socket."); - Close(); - } - return std::vector(m_readBuffer.begin(), m_readBuffer.begin()+length); - } - - //untested, not currently used. - size_t TCPClient::Write(const std::vector& data) - { - asio::error_code code; - m_writeBuffer = data; - size_t length = m_socket.write_some(asio::buffer(m_writeBuffer, m_writeBuffer.size()), code); - if (code == asio::error::eof) - { - NAV_WARN("Server has closed connection. Closing the TCPClient."); - Close(); - } - else if(code && code != asio::error::would_block) - { - NAV_ERROR("TCPClient::Write recieved unexpected error from host. Error message: {0}", code.message()); - NAV_WARN("Closing the socket"); - Close(); - } - - return length; - } -} \ No newline at end of file diff --git a/Navigator/src/Navigator/Utils/TCPClient.h b/Navigator/src/Navigator/Utils/TCPClient.h deleted file mode 100644 index d5fbdc7..0000000 --- a/Navigator/src/Navigator/Utils/TCPClient.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - TCPClient.h - Navigator's TCP client rep using asio. Contains very basic ability to read and write from a tcp socket in a non-blocking, synchronous method. - See asio docs for more details and examples on how to use. - - GWM -- April 2022 - - Note: the write functionality has not been verified. Should be fine, but test before using. -*/ -#ifndef TCPCLIENT_H -#define TCPCLIENT_H - -#include - -namespace Navigator { - - class TCPClient - { - public: - TCPClient(); - TCPClient(const std::string& host, const std::string& port); - ~TCPClient(); - - void Connect(const std::string& host, const std::string& port); - std::vector Read(); - size_t Write(const std::vector& data); - inline void Close() { if(IsOpen()) m_socket.close(); } - inline bool IsOpen() { return m_socket.is_open(); } - - private: - - std::vector m_readBuffer; - std::vector m_writeBuffer; - - static constexpr size_t s_readBufferSize = 24000; // reserve some space for the read buffer - asio::io_context m_context; - asio::ip::tcp::socket m_socket; - }; -} - -#endif \ No newline at end of file diff --git a/Navigator/src/Navigator/Utils/TestServerLayer.cpp b/Navigator/src/Navigator/Utils/TestServerLayer.cpp deleted file mode 100644 index 2770c8c..0000000 --- a/Navigator/src/Navigator/Utils/TestServerLayer.cpp +++ /dev/null @@ -1,323 +0,0 @@ -/* - TestServerLayer.h - This set of classes represents a test layer containing a TCP server and client connection class. This is only to be used as a way to debug - online data sources. You can have this server post data to a port on a localhost and then have the analysis thread connect to that port and analyze the - imitated data. Default setup is for an OnlineCompassSource, but of course this could be easily modified for your test of choice. For more details, - see the asio Tutorials, specifically the asynchronous daytime server. - - Here we use async methods, as we do not want the whole project to be hanging on creating a succesfull client/server connection. (Also cause it was fun - to learn) - - GWM -- April 2022 - - NOTE: There are NO security features on this server/connection. Please use with care on a protected network/firewalled machine. -*/ -#include "TestServerLayer.h" - -namespace Navigator { - - /* TCPConnection */ - - TCPConnection::TCPConnection(asio::io_context& context) : - m_socket(context), m_buffer(36) - { - } - - //This function is kinda misnamed in our scheme. Should be Write to make more clear. - void TCPConnection::Start() - { - CreateBinaryBuffer(); //Generate Buffer - //CreateBinaryBufferFragmented(); //Generate fragmented buffer - //Actually write the buffer to the socket. Use std::bind to set a callback function for error handling or any other server side actions - asio::async_write(m_socket, asio::buffer(m_buffer, m_buffer.size()), - std::bind(&TCPConnection::HandleWrite, this, std::placeholders::_1, std::placeholders::_2)); - } - - //Server-side connection actions upon attempting write, only on for debugging - void TCPConnection::HandleWrite(const asio::error_code& ec, size_t bytes) - { - /* - static int i = 0; - if(!ec) - NAV_INFO("Number written: {0}", ++i); - */ - //NAV_INFO("Writer result: Asio Error -- {0} Amount transferred={1}", ec.message(), bytes); - } - - /* - Create C-style binary buffer from the data struct. This is to mimic the raw data source, - which will have no padding, or any other normal struct related features (and note that the intrisic - ordering from compass ensures that padding would be placed) - */ - void TCPConnection::CreateBinaryBuffer() - { - m_hit.board = 8; - m_hit.channel = 1; - m_hit.timestamp = m_hit.timestamp + s_timestep; - m_hit.energy = 512; - m_hit.energyShort = 0; - m_hit.flags = 0; - m_hit.Ns = 0; - - - char* data_pointer; - int buffer_position = 0; - data_pointer = (char*)&m_hit.board; - for (int i = 0; i < 2; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - data_pointer = (char*)&m_hit.channel; - for (int i = 0; i < 2; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - data_pointer = (char*)&m_hit.timestamp; - for (int i = 0; i < 8; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - data_pointer = (char*)&m_hit.energy; - for (int i = 0; i < 2; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - data_pointer = (char*)&m_hit.energyShort; - for (int i = 0; i < 2; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - data_pointer = (char*)&m_hit.flags; - for (int i = 0; i < 4; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - data_pointer = (char*)&m_hit.Ns; - for (int i = 0; i < 4; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - } - - /* - Create C-style binary buffer from the data struct. This is to mimic the raw data source, - which will have no padding, or any other normal struct related features (and note that the intrisic - ordering from compass ensures that padding would be placed). Here we also fragment a hit (split over 2 buffers) - to test ability to handle real life conditions - - Note -- as implemented highlights one issue with CAEN CoMPASS sources. No headers are left in the stream, - so one must be CERTAIN to attach Navigator to the socket before running, otherwise fragments could lead to - scrambled unpacking order. (i.e. sometimes this will work for the test and sometimes it won't) - */ - void TCPConnection::CreateBinaryBufferFragmented() - { - static std::atomic even = true; - m_hit.board = 8; - m_hit.channel = 1; - m_hit.timestamp = m_hit.timestamp + s_timestep; - m_hit.energy = 512; - m_hit.energyShort = 0; - m_hit.flags = 0; - m_hit.Ns = 0; - - - char* data_pointer; - int buffer_position = 0; - if (even) - { - data_pointer = (char*)&m_hit.board; - for (int i = 0; i < 2; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - data_pointer = (char*)&m_hit.channel; - for (int i = 0; i < 2; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - data_pointer = (char*)&m_hit.timestamp; - for (int i = 0; i < 8; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - data_pointer = (char*)&m_hit.energy; - for (int i = 0; i < 2; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - data_pointer = (char*)&m_hit.energyShort; - for (int i = 0; i < 2; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - data_pointer = (char*)&m_hit.flags; - for (int i = 0; i < 4; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - data_pointer = (char*)&m_hit.board; - for (int i = 0; i < 2; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - data_pointer = (char*)&m_hit.channel; - for (int i = 0; i < 2; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - m_hit.timestamp += s_timestep; - data_pointer = (char*)&m_hit.timestamp; - for (int i = 0; i < 8; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - even = false; - } - else - { - data_pointer = (char*)&m_hit.energy; - for (int i = 0; i < 2; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - data_pointer = (char*)&m_hit.energyShort; - for (int i = 0; i < 2; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - data_pointer = (char*)&m_hit.flags; - for (int i = 0; i < 4; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - data_pointer = (char*)&m_hit.board; - for (int i = 0; i < 2; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - data_pointer = (char*)&m_hit.channel; - for (int i = 0; i < 2; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - data_pointer = (char*)&m_hit.timestamp; - for (int i = 0; i < 8; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - data_pointer = (char*)&m_hit.energy; - for (int i = 0; i < 2; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - data_pointer = (char*)&m_hit.energyShort; - for (int i = 0; i < 2; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - data_pointer = (char*)&m_hit.flags; - for (int i = 0; i < 4; i++) - { - m_buffer[buffer_position] = *(data_pointer + i); - buffer_position++; - } - } - } - - /* TCPServer */ - - TCPServer::TCPServer(asio::io_context& context) : - m_contextRef(context), m_acceptor(context, asio::ip::tcp::endpoint(asio::ip::tcp::v4(), 51489)), m_isAccepted(false) - { - } - - //Attempt to create a connection - std::shared_ptr TCPServer::StartAccept() - { - std::shared_ptr new_connection = TCPConnection::CreateConnection(m_contextRef); - - m_acceptor.async_accept(new_connection->Socket(), std::bind(&TCPServer::HandleAccept, this, new_connection, std::placeholders::_1)); - - return new_connection; - } - - //If connection successful, attempt to write as a test. - void TCPServer::HandleAccept(std::shared_ptr connection, const asio::error_code& ec) - { - if (!ec) - { - m_isAccepted = true; - connection->Start(); - } - else - { - m_isAccepted = false; - NAV_INFO("TCPServer HandleAccept found Error: {0}", ec.message()); - } - StartAccept(); - } - - /* TestServerLayer */ - - TestServerLayer::TestServerLayer() : - Layer("TestServer"), m_server(nullptr), m_connection(nullptr) - { - } - - TestServerLayer::~TestServerLayer() - { - if (m_server) - delete m_server; - } - - //Create a server, get the connection, poll actions - void TestServerLayer::OnAttach() - { - try - { - m_server = new TCPServer(m_context); - m_connection = m_server->StartAccept(); - m_context.poll(); - } - catch (std::exception& e) - { - NAV_INFO("ServerLayer Error: {0}", e.what()); - } - } - - void TestServerLayer::OnDetach() - { - } - - //Tell to write, then poll actions - void TestServerLayer::OnUpdate(Timestep& step) - { - m_connection->Start(); - m_context.poll(); - } - -} \ No newline at end of file diff --git a/Navigator/src/Navigator/Utils/TestServerLayer.h b/Navigator/src/Navigator/Utils/TestServerLayer.h deleted file mode 100644 index d54ec55..0000000 --- a/Navigator/src/Navigator/Utils/TestServerLayer.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - TestServerLayer.h - This set of classes represents a test layer containing a TCP server and client connection class. This is only to be used as a way to debug - online data sources. You can have this server post data to a port on a localhost and then have the analysis thread connect to that port and analyze the - imitated data. Default setup is for an OnlineCompassSource, but of course this could be easily modified for your test of choice. For more details, - see the asio Tutorials, specifically the asynchronous daytime server. - - Here we use async methods, as we do not want the whole project to be hanging on creating a succesfull client/server connection. (Also cause it was fun - to learn) - - GWM -- April 2022 - - NOTE: There are NO security features on this server/connection. Please use with care on a protected network/firewalled machine. -*/ -#ifndef TEST_SERVER_LAYER_H -#define TEST_SERVER_LAYER_H - -#include "Navigator/Core/Layer.h" -#include "Navigator/Physics/Caen/CompassHit.h" -#include "asio.hpp" - -namespace Navigator { - - /*Server-side TCP Connection to the open port*/ - class TCPConnection - { - public: - TCPConnection(asio::io_context& context); - inline static std::shared_ptr CreateConnection(asio::io_context& context) { return std::make_shared(context); } - inline asio::ip::tcp::socket& Socket() { return m_socket; } - - void Start(); - - private: - void HandleWrite(const asio::error_code& ec, size_t bytes); - void CreateBinaryBuffer(); - void CreateBinaryBufferFragmented(); - - asio::ip::tcp::socket m_socket; - std::vector m_buffer; - CompassHit m_hit; - static constexpr uint64_t s_timestep = 2000000; - }; - - /*Server itself*/ - class TCPServer - { - public: - TCPServer(asio::io_context& context); - inline bool IsAccepted() { return m_isAccepted; } - std::shared_ptr StartAccept(); - - private: - void HandleAccept(std::shared_ptr connection, const asio::error_code& error); - - asio::io_context& m_contextRef; - asio::ip::tcp::acceptor m_acceptor; - bool m_isAccepted; - }; - - class TestServerLayer : public Layer - { - public: - TestServerLayer(); - virtual ~TestServerLayer(); - - virtual void OnAttach() override; - virtual void OnDetach() override; - virtual void OnUpdate(Timestep& step) override; - - private: - asio::io_context m_context; - TCPServer* m_server; - std::shared_ptr m_connection; - }; -} - -#endif diff --git a/Navigator/src/Navigator/Utils/Timer.h b/Navigator/src/Navigator/Utils/Timer.h deleted file mode 100644 index 2b08bbf..0000000 --- a/Navigator/src/Navigator/Utils/Timer.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef TIMER_H -#define TIMER_H - -#include - -namespace Navigator { - - class Timer - { - public: - Timer(const char* name) : - m_name(name), m_stopped(false) - { - m_startTime = Clock::now(); - } - - ~Timer() - { - if (!m_stopped) - Stop(); - } - - - void Stop() - { - auto stopTime = Clock::now(); - int64_t start = std::chrono::time_point_cast(m_startTime).time_since_epoch().count(); - int64_t stop = std::chrono::time_point_cast(stopTime).time_since_epoch().count(); - float duration = (stop - start)*0.001f; - m_stopped = true; - - NAV_INFO("{1} -- Duration: {0} ms", m_name, duration); - } - - private: - using Time = std::chrono::steady_clock::time_point; - using Clock = std::chrono::steady_clock; - - const char* m_name; - Time m_startTime; - bool m_stopped; - }; - -} - -#endif \ No newline at end of file diff --git a/Navigator/src/Platform/OpenGL/OpenGLContext.cpp b/Navigator/src/Platform/OpenGL/OpenGLContext.cpp deleted file mode 100644 index 2fa7451..0000000 --- a/Navigator/src/Platform/OpenGL/OpenGLContext.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/* - OpenGLContext.h - Implementation of OpenGL rendering context. Entirely based upon the work done by @TheCherno in his game engine series. See his content for more details. - - GWM -- Feb 2022 -*/ -#include "OpenGLContext.h" - -#include "GLFW/glfw3.h" -#include "glad/glad.h" - -namespace Navigator { - - OpenGLContext::OpenGLContext(GLFWwindow* window) : - m_windowHandle(window) - { - } - - OpenGLContext::~OpenGLContext() {} - - void OpenGLContext::Init() - { - NAV_PROFILE_FUNCTION(); - glfwMakeContextCurrent(m_windowHandle); - - int status = gladLoadGLLoader((GLADloadproc)glfwGetProcAddress); - - //Report graphics status - NAV_TRACE("Loaded OpenGL with glad Init status {0}", status); - - NAV_INFO("Loaded OpenGL renderer"); - NAV_INFO("Vendor: {0}", glGetString(GL_VENDOR)); - NAV_INFO("Renderer: {0}", glGetString(GL_RENDERER)); - NAV_INFO("Version: {0}", glGetString(GL_VERSION)); - } - - void OpenGLContext::SwapBuffers() - { - glfwSwapBuffers(m_windowHandle); - } -} \ No newline at end of file diff --git a/Navigator/src/Platform/OpenGL/OpenGLContext.h b/Navigator/src/Platform/OpenGL/OpenGLContext.h deleted file mode 100644 index 1b91cf5..0000000 --- a/Navigator/src/Platform/OpenGL/OpenGLContext.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - OpenGLContext.h - Implementation of OpenGL rendering context. Entirely based upon the work done by @TheCherno in his game engine series. See his content for more details. - - GWM -- Feb 2022 -*/ -#ifndef OPEGL_CONTEXT_H -#define OPEGL_CONTEXT_H - -#include "Navigator/Core/NavCore.h" -#include "Navigator/Renderer/GraphicsContext.h" - -struct GLFWwindow; - -namespace Navigator { - - class NAV_API OpenGLContext : public GraphicsContext - { - public: - OpenGLContext(GLFWwindow* window); - ~OpenGLContext(); - - virtual void Init() override; - virtual void SwapBuffers() override; - private: - GLFWwindow* m_windowHandle; - }; - -} - -#endif \ No newline at end of file diff --git a/Navigator/src/Platform/OpenGL/OpenGLRendererAPI.cpp b/Navigator/src/Platform/OpenGL/OpenGLRendererAPI.cpp deleted file mode 100644 index 9418d2e..0000000 --- a/Navigator/src/Platform/OpenGL/OpenGLRendererAPI.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - OpenGLRendererAPI.h - Implementation of OpenGL API in Navigator context. Note here only a few things exist. We don't need to implement much ourselves, - ImGui handles a lot of the heavy lifting for us. Based entirely upon @TheCherno's work in his game engine series. - - GWM -- Feb 2022 -*/ -#include "OpenGLRendererAPI.h" - -#include "glad/glad.h" -#include "GLFW/glfw3.h" - -namespace Navigator { - - void OpenGLRendererAPI::Clear() - { - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - } - - void OpenGLRendererAPI::SetClearColor(const glm::vec4& color_array) - { - glClearColor(color_array[0], color_array[1], color_array[2], color_array[3]); - } - - float OpenGLRendererAPI::GetFrameTime() - { - return (float)glfwGetTime(); - } -} \ No newline at end of file diff --git a/Navigator/src/Platform/OpenGL/OpenGLRendererAPI.h b/Navigator/src/Platform/OpenGL/OpenGLRendererAPI.h deleted file mode 100644 index cb4f193..0000000 --- a/Navigator/src/Platform/OpenGL/OpenGLRendererAPI.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - OpenGLRendererAPI.h - Implementation of OpenGL API in Navigator context. Note here only a few things exist. We don't need to implement much ourselves, - ImGui handles a lot of the heavy lifting for us. Based entirely upon @TheCherno's work in his game engine series. - - GWM -- Feb 2022 -*/ -#ifndef OPENGL_RENDERER_API_H -#define OPENGL_RENDERER_API_H - -#include "Navigator/Core/NavCore.h" -#include "Navigator/Renderer/RendererAPI.h" - -namespace Navigator { - - class NAV_API OpenGLRendererAPI : public RendererAPI - { - public: - virtual void Clear() override; - virtual void SetClearColor(const glm::vec4& color_array) override; - virtual float GetFrameTime() override; - }; - -} - -#endif \ No newline at end of file diff --git a/Navigator/src/Platform/OpenGL/OpenGLWindow.cpp b/Navigator/src/Platform/OpenGL/OpenGLWindow.cpp deleted file mode 100644 index fa06fc9..0000000 --- a/Navigator/src/Platform/OpenGL/OpenGLWindow.cpp +++ /dev/null @@ -1,180 +0,0 @@ -/* - OpenGLWindow.h - Implementation of a window with OpenGL context. Not really OpenGL specific, other than in creation of GraphicsContext. - Bulk of creation can be used in any api/context (glfw compatible with Cocoa, X11, or Windows). Based entirely upon the - work of @TheCherno in his game engine series. - - GWM -- Feb 2022 -*/ -#include "OpenGLWindow.h" -#include "OpenGLContext.h" -#include "Navigator/Core/NavCore.h" -#include "Navigator/Events/AppEvent.h" -#include "Navigator/Events/KeyEvent.h" -#include "Navigator/Events/MouseEvent.h" - -namespace Navigator { - - static bool s_glfwInitialized = false; - static void GLFWErrorCallback(int error, const char* description) - { - NAV_ERROR("GLFW Error Code {0}: {1}", error, description); - } - - Window* Window::Create(const WindowProperties& props) { return new OpenGLWindow(props); } - - OpenGLWindow::OpenGLWindow(const WindowProperties& props) - { - Init(props); - } - - OpenGLWindow::~OpenGLWindow() - { - Shutdown(); - } - - void OpenGLWindow::Init(const WindowProperties& props) - { - NAV_PROFILE_FUNCTION(); - m_data.width = props.width; - m_data.height = props.height; - m_data.name = props.name; - - NAV_INFO("Creating OpenGLWindow with height {0} width {1} and name {2}", m_data.height, m_data.width, m_data.name); - - if(!s_glfwInitialized) - { - int passed = glfwInit(); - NAV_INFO("Initializing GLFW ... Returned value {0}", passed); - glfwSetErrorCallback(GLFWErrorCallback); - } - - //Apple specific. OpenGL is technically deprecated, so a little extra work to force the correct version -#ifdef __APPLE__ - glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); - glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2); - glfwWindowHint(GLFW_OPENGL_PROFILE,GLFW_OPENGL_CORE_PROFILE); - glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT,true); -#endif - - m_window = glfwCreateWindow((int)m_data.width, (int)m_data.height, m_data.name.c_str(), nullptr, nullptr); - - m_context = new OpenGLContext(m_window); //This is the only seriously OpenGL specific code - m_context->Init(); - - glfwSetWindowUserPointer(m_window, &m_data); - SetVSync(true); - - //Set all of the callback functions for the window. - glfwSetWindowSizeCallback(m_window, [](GLFWwindow* window, int width, int height) - { - Data& data = *(Data*) glfwGetWindowUserPointer(window); - data.width = width; - data.height = height; - WindowResizeEvent event(width, height); - data.event_callback_func(event); - }); - - glfwSetWindowCloseCallback(m_window, [](GLFWwindow* window) - { - Data& data = *(Data*) glfwGetWindowUserPointer(window); - WindowCloseEvent event; - data.event_callback_func(event); - }); - - glfwSetKeyCallback(m_window, [](GLFWwindow* window, int key, int scancode, int action, int mods) - { - Data& data = *(Data*) glfwGetWindowUserPointer(window); - switch(action) - { - case GLFW_PRESS: - { - KeyPressedEvent event(key, 0); - data.event_callback_func(event); - break; - } - case GLFW_RELEASE: - { - KeyReleasedEvent event(key); - data.event_callback_func(event); - break; - } - case GLFW_REPEAT: - { - //GLFW doesnt have a hold count, so here we just pass 1 to indicate a hold is happening. - KeyPressedEvent event(key, 1); - data.event_callback_func(event); - break; - } - } - }); - - glfwSetCharCallback(m_window, [](GLFWwindow* window, unsigned int character) - { - Data& data = *(Data*) glfwGetWindowUserPointer(window); - KeyTypedEvent event(character); - data.event_callback_func(event); - }); - - glfwSetMouseButtonCallback(m_window, [](GLFWwindow* window, int button, int action, int mods) - { - Data& data = *(Data*) glfwGetWindowUserPointer(window); - switch(action) - { - case GLFW_PRESS: - { - MouseButtonPressedEvent event(button); - data.event_callback_func(event); - } - case GLFW_RELEASE: - { - MouseButtonReleasedEvent event(button); - data.event_callback_func(event); - } - } - }); - - glfwSetScrollCallback(m_window, [](GLFWwindow* window, double xoffset, double yoffset) - { - Data& data = *(Data*) glfwGetWindowUserPointer(window); - MouseScrolledEvent event((float)xoffset, (float)yoffset); - data.event_callback_func(event); - }); - - glfwSetCursorPosCallback(m_window, [](GLFWwindow* window, double xpos, double ypos) - { - Data& data = *(Data*) glfwGetWindowUserPointer(window); - MouseMovedEvent event((float)xpos, (float)ypos); - data.event_callback_func(event); - }); - } - - void OpenGLWindow::Shutdown() - { - glfwDestroyWindow(m_window); - } - - void OpenGLWindow::OnUpdate() - { - glfwPollEvents(); - m_context->SwapBuffers(); - } - - void OpenGLWindow::SetVSync(bool enabled) - { - if(enabled) - { - glfwSwapInterval(1); - } - else - { - glfwSwapInterval(0); - } - m_data.vsyncFlag = enabled; - } - - bool OpenGLWindow::IsVSync() const - { - return m_data.vsyncFlag; - } -} diff --git a/Navigator/src/Platform/OpenGL/OpenGLWindow.h b/Navigator/src/Platform/OpenGL/OpenGLWindow.h deleted file mode 100644 index e4f769f..0000000 --- a/Navigator/src/Platform/OpenGL/OpenGLWindow.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - OpenGLWindow.h - Implementation of a window with OpenGL context. Not really OpenGL specific, other than in creation of GraphicsContext. - Bulk of creation can be used in any api/context (glfw compatible with Cocoa, X11, or Windows). Based entirely upon the - work of @TheCherno in his game engine series. - - GWM -- Feb 2022 -*/ -#ifndef OPENGL_WINDOW_H -#define OPENGL_WINDOW_H - -#include "Navigator/Core/NavCore.h" -#include "Navigator/Core/Window.h" -#include "Navigator/Renderer/GraphicsContext.h" -#include "GLFW/glfw3.h" - -namespace Navigator { - - class NAV_API OpenGLWindow : public Window - { - - public: - OpenGLWindow(const WindowProperties& props); - virtual ~OpenGLWindow(); - - void OnUpdate() override; - - inline void SetEventCallback(const EventCallbackFunc& function) override { m_data.event_callback_func = function; } - inline unsigned int GetWidth() const override { return m_data.width; } - inline unsigned int GetHeight() const override { return m_data.height; } - inline std::string GetName() const override { return m_data.name; } - void SetVSync(bool enabled) override; - bool IsVSync() const override; - - inline virtual void* GetNativeWindow() const override { return m_window; } - private: - virtual void Init(const WindowProperties& props); - virtual void Shutdown(); - - GraphicsContext* m_context; - - GLFWwindow* m_window; - - struct Data - { - int height, width; - std::string name; - bool vsyncFlag; - EventCallbackFunc event_callback_func; - }; - - Data m_data; - }; -} - -#endif \ No newline at end of file diff --git a/Navigator/src/navpch.cpp b/Navigator/src/navpch.cpp deleted file mode 100644 index 75e0870..0000000 --- a/Navigator/src/navpch.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "navpch.h" \ No newline at end of file diff --git a/Navigator/src/navpch.h b/Navigator/src/navpch.h deleted file mode 100644 index b4f95d6..0000000 --- a/Navigator/src/navpch.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef NAVPCH_H -#define NAVPCH_H - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include "Navigator/Core/Logger.h" -#include "Navigator/Utils/Instrumentor.h" - -#endif \ No newline at end of file diff --git a/Navigator/vendor/IconFontCppHeaders b/Navigator/vendor/IconFontCppHeaders deleted file mode 160000 index 7d6ff1f..0000000 --- a/Navigator/vendor/IconFontCppHeaders +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7d6ff1f4ba51e7a2b142be39457768abece1549c diff --git a/Navigator/vendor/asio b/Navigator/vendor/asio deleted file mode 160000 index f0a1e1c..0000000 --- a/Navigator/vendor/asio +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f0a1e1c7c0387ad16358c81eb52528f190df625c diff --git a/Navigator/vendor/glad/include/KHR/khrplatform.h b/Navigator/vendor/glad/include/KHR/khrplatform.h deleted file mode 100644 index 0164644..0000000 --- a/Navigator/vendor/glad/include/KHR/khrplatform.h +++ /dev/null @@ -1,311 +0,0 @@ -#ifndef __khrplatform_h_ -#define __khrplatform_h_ - -/* -** Copyright (c) 2008-2018 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are 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 Materials. -** -** THE MATERIALS ARE 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 -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ - -/* Khronos platform-specific types and definitions. - * - * The master copy of khrplatform.h is maintained in the Khronos EGL - * Registry repository at https://github.com/KhronosGroup/EGL-Registry - * The last semantic modification to khrplatform.h was at commit ID: - * 67a3e0864c2d75ea5287b9f3d2eb74a745936692 - * - * Adopters may modify this file to suit their platform. Adopters are - * encouraged to submit platform specific modifications to the Khronos - * group so that they can be included in future versions of this file. - * Please submit changes by filing pull requests or issues on - * the EGL Registry repository linked above. - * - * - * See the Implementer's Guidelines for information about where this file - * should be located on your system and for more details of its use: - * http://www.khronos.org/registry/implementers_guide.pdf - * - * This file should be included as - * #include - * by Khronos client API header files that use its types and defines. - * - * The types in khrplatform.h should only be used to define API-specific types. - * - * Types defined in khrplatform.h: - * khronos_int8_t signed 8 bit - * khronos_uint8_t unsigned 8 bit - * khronos_int16_t signed 16 bit - * khronos_uint16_t unsigned 16 bit - * khronos_int32_t signed 32 bit - * khronos_uint32_t unsigned 32 bit - * khronos_int64_t signed 64 bit - * khronos_uint64_t unsigned 64 bit - * khronos_intptr_t signed same number of bits as a pointer - * khronos_uintptr_t unsigned same number of bits as a pointer - * khronos_ssize_t signed size - * khronos_usize_t unsigned size - * khronos_float_t signed 32 bit floating point - * khronos_time_ns_t unsigned 64 bit time in nanoseconds - * khronos_utime_nanoseconds_t unsigned time interval or absolute time in - * nanoseconds - * khronos_stime_nanoseconds_t signed time interval in nanoseconds - * khronos_boolean_enum_t enumerated boolean type. This should - * only be used as a base type when a client API's boolean type is - * an enum. Client APIs which use an integer or other type for - * booleans cannot use this as the base type for their boolean. - * - * Tokens defined in khrplatform.h: - * - * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. - * - * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. - * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. - * - * Calling convention macros defined in this file: - * KHRONOS_APICALL - * KHRONOS_APIENTRY - * KHRONOS_APIATTRIBUTES - * - * These may be used in function prototypes as: - * - * KHRONOS_APICALL void KHRONOS_APIENTRY funcname( - * int arg1, - * int arg2) KHRONOS_APIATTRIBUTES; - */ - -#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC) -# define KHRONOS_STATIC 1 -#endif - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APICALL - *------------------------------------------------------------------------- - * This precedes the return type of the function in the function prototype. - */ -#if defined(KHRONOS_STATIC) - /* If the preprocessor constant KHRONOS_STATIC is defined, make the - * header compatible with static linking. */ -# define KHRONOS_APICALL -#elif defined(_WIN32) -# define KHRONOS_APICALL __declspec(dllimport) -#elif defined (__SYMBIAN32__) -# define KHRONOS_APICALL IMPORT_C -#elif defined(__ANDROID__) -# define KHRONOS_APICALL __attribute__((visibility("default"))) -#else -# define KHRONOS_APICALL -#endif - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APIENTRY - *------------------------------------------------------------------------- - * This follows the return type of the function and precedes the function - * name in the function prototype. - */ -#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) - /* Win32 but not WinCE */ -# define KHRONOS_APIENTRY __stdcall -#else -# define KHRONOS_APIENTRY -#endif - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APIATTRIBUTES - *------------------------------------------------------------------------- - * This follows the closing parenthesis of the function prototype arguments. - */ -#if defined (__ARMCC_2__) -#define KHRONOS_APIATTRIBUTES __softfp -#else -#define KHRONOS_APIATTRIBUTES -#endif - -/*------------------------------------------------------------------------- - * basic type definitions - *-----------------------------------------------------------------------*/ -#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__) - - -/* - * Using - */ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 -/* - * To support platform where unsigned long cannot be used interchangeably with - * inptr_t (e.g. CHERI-extended ISAs), we can use the stdint.h intptr_t. - * Ideally, we could just use (u)intptr_t everywhere, but this could result in - * ABI breakage if khronos_uintptr_t is changed from unsigned long to - * unsigned long long or similar (this results in different C++ name mangling). - * To avoid changes for existing platforms, we restrict usage of intptr_t to - * platforms where the size of a pointer is larger than the size of long. - */ -#if defined(__SIZEOF_LONG__) && defined(__SIZEOF_POINTER__) -#if __SIZEOF_POINTER__ > __SIZEOF_LONG__ -#define KHRONOS_USE_INTPTR_T -#endif -#endif - -#elif defined(__VMS ) || defined(__sgi) - -/* - * Using - */ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(_WIN32) && !defined(__SCITECH_SNAP__) - -/* - * Win32 - */ -typedef __int32 khronos_int32_t; -typedef unsigned __int32 khronos_uint32_t; -typedef __int64 khronos_int64_t; -typedef unsigned __int64 khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(__sun__) || defined(__digital__) - -/* - * Sun or Digital - */ -typedef int khronos_int32_t; -typedef unsigned int khronos_uint32_t; -#if defined(__arch64__) || defined(_LP64) -typedef long int khronos_int64_t; -typedef unsigned long int khronos_uint64_t; -#else -typedef long long int khronos_int64_t; -typedef unsigned long long int khronos_uint64_t; -#endif /* __arch64__ */ -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif 0 - -/* - * Hypothetical platform with no float or int64 support - */ -typedef int khronos_int32_t; -typedef unsigned int khronos_uint32_t; -#define KHRONOS_SUPPORT_INT64 0 -#define KHRONOS_SUPPORT_FLOAT 0 - -#else - -/* - * Generic fallback - */ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#endif - - -/* - * Types that are (so far) the same on all platforms - */ -typedef signed char khronos_int8_t; -typedef unsigned char khronos_uint8_t; -typedef signed short int khronos_int16_t; -typedef unsigned short int khronos_uint16_t; - -/* - * Types that differ between LLP64 and LP64 architectures - in LLP64, - * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears - * to be the only LLP64 architecture in current use. - */ -#ifdef KHRONOS_USE_INTPTR_T -typedef intptr_t khronos_intptr_t; -typedef uintptr_t khronos_uintptr_t; -#elif defined(_WIN64) -typedef signed long long int khronos_intptr_t; -typedef unsigned long long int khronos_uintptr_t; -#else -typedef signed long int khronos_intptr_t; -typedef unsigned long int khronos_uintptr_t; -#endif - -#if defined(_WIN64) -typedef signed long long int khronos_ssize_t; -typedef unsigned long long int khronos_usize_t; -#else -typedef signed long int khronos_ssize_t; -typedef unsigned long int khronos_usize_t; -#endif - -#if KHRONOS_SUPPORT_FLOAT -/* - * Float type - */ -typedef float khronos_float_t; -#endif - -#if KHRONOS_SUPPORT_INT64 -/* Time types - * - * These types can be used to represent a time interval in nanoseconds or - * an absolute Unadjusted System Time. Unadjusted System Time is the number - * of nanoseconds since some arbitrary system event (e.g. since the last - * time the system booted). The Unadjusted System Time is an unsigned - * 64 bit value that wraps back to 0 every 584 years. Time intervals - * may be either signed or unsigned. - */ -typedef khronos_uint64_t khronos_utime_nanoseconds_t; -typedef khronos_int64_t khronos_stime_nanoseconds_t; -#endif - -/* - * Dummy value used to pad enum types to 32 bits. - */ -#ifndef KHRONOS_MAX_ENUM -#define KHRONOS_MAX_ENUM 0x7FFFFFFF -#endif - -/* - * Enumerated boolean type - * - * Values other than zero should be considered to be true. Therefore - * comparisons should not be made against KHRONOS_TRUE. - */ -typedef enum { - KHRONOS_FALSE = 0, - KHRONOS_TRUE = 1, - KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM -} khronos_boolean_enum_t; - -#endif /* __khrplatform_h_ */ diff --git a/Navigator/vendor/glad/include/glad/glad.h b/Navigator/vendor/glad/include/glad/glad.h deleted file mode 100644 index 240ccb5..0000000 --- a/Navigator/vendor/glad/include/glad/glad.h +++ /dev/null @@ -1,3694 +0,0 @@ -/* - - OpenGL loader generated by glad 0.1.34 on Sun Dec 19 21:33:48 2021. - - Language/Generator: C/C++ - Specification: gl - APIs: gl=4.6 - Profile: core - Extensions: - - Loader: True - Local files: False - Omit khrplatform: False - Reproducible: False - - Commandline: - --profile="core" --api="gl=4.6" --generator="c" --spec="gl" --extensions="" - Online: - https://glad.dav1d.de/#profile=core&language=c&specification=gl&loader=on&api=gl%3D4.6 -*/ - - -#ifndef __glad_h_ -#define __glad_h_ - -#ifdef __gl_h_ -#error OpenGL header already included, remove this include, glad already provides it -#endif -#define __gl_h_ - -#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) -#define APIENTRY __stdcall -#endif - -#ifndef APIENTRY -#define APIENTRY -#endif -#ifndef APIENTRYP -#define APIENTRYP APIENTRY * -#endif - -#ifndef GLAPIENTRY -#define GLAPIENTRY APIENTRY -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -struct gladGLversionStruct { - int major; - int minor; -}; - -typedef void* (* GLADloadproc)(const char *name); - -#ifndef GLAPI -# if defined(GLAD_GLAPI_EXPORT) -# if defined(_WIN32) || defined(__CYGWIN__) -# if defined(GLAD_GLAPI_EXPORT_BUILD) -# if defined(__GNUC__) -# define GLAPI __attribute__ ((dllexport)) extern -# else -# define GLAPI __declspec(dllexport) extern -# endif -# else -# if defined(__GNUC__) -# define GLAPI __attribute__ ((dllimport)) extern -# else -# define GLAPI __declspec(dllimport) extern -# endif -# endif -# elif defined(__GNUC__) && defined(GLAD_GLAPI_EXPORT_BUILD) -# define GLAPI __attribute__ ((visibility ("default"))) extern -# else -# define GLAPI extern -# endif -# else -# define GLAPI extern -# endif -#endif - -GLAPI struct gladGLversionStruct GLVersion; - -GLAPI int gladLoadGL(void); - -GLAPI int gladLoadGLLoader(GLADloadproc); - -#include -typedef unsigned int GLenum; -typedef unsigned char GLboolean; -typedef unsigned int GLbitfield; -typedef void GLvoid; -typedef khronos_int8_t GLbyte; -typedef khronos_uint8_t GLubyte; -typedef khronos_int16_t GLshort; -typedef khronos_uint16_t GLushort; -typedef int GLint; -typedef unsigned int GLuint; -typedef khronos_int32_t GLclampx; -typedef int GLsizei; -typedef khronos_float_t GLfloat; -typedef khronos_float_t GLclampf; -typedef double GLdouble; -typedef double GLclampd; -typedef void *GLeglClientBufferEXT; -typedef void *GLeglImageOES; -typedef char GLchar; -typedef char GLcharARB; -#ifdef __APPLE__ -typedef void *GLhandleARB; -#else -typedef unsigned int GLhandleARB; -#endif -typedef khronos_uint16_t GLhalf; -typedef khronos_uint16_t GLhalfARB; -typedef khronos_int32_t GLfixed; -typedef khronos_intptr_t GLintptr; -typedef khronos_intptr_t GLintptrARB; -typedef khronos_ssize_t GLsizeiptr; -typedef khronos_ssize_t GLsizeiptrARB; -typedef khronos_int64_t GLint64; -typedef khronos_int64_t GLint64EXT; -typedef khronos_uint64_t GLuint64; -typedef khronos_uint64_t GLuint64EXT; -typedef struct __GLsync *GLsync; -struct _cl_context; -struct _cl_event; -typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); -typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); -typedef void (APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); -typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam); -typedef unsigned short GLhalfNV; -typedef GLintptr GLvdpauSurfaceNV; -typedef void (APIENTRY *GLVULKANPROCNV)(void); -#define GL_DEPTH_BUFFER_BIT 0x00000100 -#define GL_STENCIL_BUFFER_BIT 0x00000400 -#define GL_COLOR_BUFFER_BIT 0x00004000 -#define GL_FALSE 0 -#define GL_TRUE 1 -#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_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_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_NONE 0 -#define GL_FRONT_LEFT 0x0400 -#define GL_FRONT_RIGHT 0x0401 -#define GL_BACK_LEFT 0x0402 -#define GL_BACK_RIGHT 0x0403 -#define GL_FRONT 0x0404 -#define GL_BACK 0x0405 -#define GL_LEFT 0x0406 -#define GL_RIGHT 0x0407 -#define GL_FRONT_AND_BACK 0x0408 -#define GL_NO_ERROR 0 -#define GL_INVALID_ENUM 0x0500 -#define GL_INVALID_VALUE 0x0501 -#define GL_INVALID_OPERATION 0x0502 -#define GL_OUT_OF_MEMORY 0x0505 -#define GL_CW 0x0900 -#define GL_CCW 0x0901 -#define GL_POINT_SIZE 0x0B11 -#define GL_POINT_SIZE_RANGE 0x0B12 -#define GL_POINT_SIZE_GRANULARITY 0x0B13 -#define GL_LINE_SMOOTH 0x0B20 -#define GL_LINE_WIDTH 0x0B21 -#define GL_LINE_WIDTH_RANGE 0x0B22 -#define GL_LINE_WIDTH_GRANULARITY 0x0B23 -#define GL_POLYGON_MODE 0x0B40 -#define GL_POLYGON_SMOOTH 0x0B41 -#define GL_CULL_FACE 0x0B44 -#define GL_CULL_FACE_MODE 0x0B45 -#define GL_FRONT_FACE 0x0B46 -#define GL_DEPTH_RANGE 0x0B70 -#define GL_DEPTH_TEST 0x0B71 -#define GL_DEPTH_WRITEMASK 0x0B72 -#define GL_DEPTH_CLEAR_VALUE 0x0B73 -#define GL_DEPTH_FUNC 0x0B74 -#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_VIEWPORT 0x0BA2 -#define GL_DITHER 0x0BD0 -#define GL_BLEND_DST 0x0BE0 -#define GL_BLEND_SRC 0x0BE1 -#define GL_BLEND 0x0BE2 -#define GL_LOGIC_OP_MODE 0x0BF0 -#define GL_DRAW_BUFFER 0x0C01 -#define GL_READ_BUFFER 0x0C02 -#define GL_SCISSOR_BOX 0x0C10 -#define GL_SCISSOR_TEST 0x0C11 -#define GL_COLOR_CLEAR_VALUE 0x0C22 -#define GL_COLOR_WRITEMASK 0x0C23 -#define GL_DOUBLEBUFFER 0x0C32 -#define GL_STEREO 0x0C33 -#define GL_LINE_SMOOTH_HINT 0x0C52 -#define GL_POLYGON_SMOOTH_HINT 0x0C53 -#define GL_UNPACK_SWAP_BYTES 0x0CF0 -#define GL_UNPACK_LSB_FIRST 0x0CF1 -#define GL_UNPACK_ROW_LENGTH 0x0CF2 -#define GL_UNPACK_SKIP_ROWS 0x0CF3 -#define GL_UNPACK_SKIP_PIXELS 0x0CF4 -#define GL_UNPACK_ALIGNMENT 0x0CF5 -#define GL_PACK_SWAP_BYTES 0x0D00 -#define GL_PACK_LSB_FIRST 0x0D01 -#define GL_PACK_ROW_LENGTH 0x0D02 -#define GL_PACK_SKIP_ROWS 0x0D03 -#define GL_PACK_SKIP_PIXELS 0x0D04 -#define GL_PACK_ALIGNMENT 0x0D05 -#define GL_MAX_TEXTURE_SIZE 0x0D33 -#define GL_MAX_VIEWPORT_DIMS 0x0D3A -#define GL_SUBPIXEL_BITS 0x0D50 -#define GL_TEXTURE_1D 0x0DE0 -#define GL_TEXTURE_2D 0x0DE1 -#define GL_TEXTURE_WIDTH 0x1000 -#define GL_TEXTURE_HEIGHT 0x1001 -#define GL_TEXTURE_BORDER_COLOR 0x1004 -#define GL_DONT_CARE 0x1100 -#define GL_FASTEST 0x1101 -#define GL_NICEST 0x1102 -#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_CLEAR 0x1500 -#define GL_AND 0x1501 -#define GL_AND_REVERSE 0x1502 -#define GL_COPY 0x1503 -#define GL_AND_INVERTED 0x1504 -#define GL_NOOP 0x1505 -#define GL_XOR 0x1506 -#define GL_OR 0x1507 -#define GL_NOR 0x1508 -#define GL_EQUIV 0x1509 -#define GL_INVERT 0x150A -#define GL_OR_REVERSE 0x150B -#define GL_COPY_INVERTED 0x150C -#define GL_OR_INVERTED 0x150D -#define GL_NAND 0x150E -#define GL_SET 0x150F -#define GL_TEXTURE 0x1702 -#define GL_COLOR 0x1800 -#define GL_DEPTH 0x1801 -#define GL_STENCIL 0x1802 -#define GL_STENCIL_INDEX 0x1901 -#define GL_DEPTH_COMPONENT 0x1902 -#define GL_RED 0x1903 -#define GL_GREEN 0x1904 -#define GL_BLUE 0x1905 -#define GL_ALPHA 0x1906 -#define GL_RGB 0x1907 -#define GL_RGBA 0x1908 -#define GL_POINT 0x1B00 -#define GL_LINE 0x1B01 -#define GL_FILL 0x1B02 -#define GL_KEEP 0x1E00 -#define GL_REPLACE 0x1E01 -#define GL_INCR 0x1E02 -#define GL_DECR 0x1E03 -#define GL_VENDOR 0x1F00 -#define GL_RENDERER 0x1F01 -#define GL_VERSION 0x1F02 -#define GL_EXTENSIONS 0x1F03 -#define GL_NEAREST 0x2600 -#define GL_LINEAR 0x2601 -#define GL_NEAREST_MIPMAP_NEAREST 0x2700 -#define GL_LINEAR_MIPMAP_NEAREST 0x2701 -#define GL_NEAREST_MIPMAP_LINEAR 0x2702 -#define GL_LINEAR_MIPMAP_LINEAR 0x2703 -#define GL_TEXTURE_MAG_FILTER 0x2800 -#define GL_TEXTURE_MIN_FILTER 0x2801 -#define GL_TEXTURE_WRAP_S 0x2802 -#define GL_TEXTURE_WRAP_T 0x2803 -#define GL_REPEAT 0x2901 -#define GL_COLOR_LOGIC_OP 0x0BF2 -#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_POLYGON_OFFSET_FACTOR 0x8038 -#define GL_TEXTURE_BINDING_1D 0x8068 -#define GL_TEXTURE_BINDING_2D 0x8069 -#define GL_TEXTURE_INTERNAL_FORMAT 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_DOUBLE 0x140A -#define GL_PROXY_TEXTURE_1D 0x8063 -#define GL_PROXY_TEXTURE_2D 0x8064 -#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_UNSIGNED_BYTE_3_3_2 0x8032 -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_INT_8_8_8_8 0x8035 -#define GL_UNSIGNED_INT_10_10_10_2 0x8036 -#define GL_TEXTURE_BINDING_3D 0x806A -#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_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_REV 0x8365 -#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 -#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 -#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 -#define GL_BGR 0x80E0 -#define GL_BGRA 0x80E1 -#define GL_MAX_ELEMENTS_VERTICES 0x80E8 -#define GL_MAX_ELEMENTS_INDICES 0x80E9 -#define GL_CLAMP_TO_EDGE 0x812F -#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_LINE_WIDTH_RANGE 0x846E -#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_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_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_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_CLAMP_TO_BORDER 0x812D -#define GL_BLEND_DST_RGB 0x80C8 -#define GL_BLEND_SRC_RGB 0x80C9 -#define GL_BLEND_DST_ALPHA 0x80CA -#define GL_BLEND_SRC_ALPHA 0x80CB -#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 -#define GL_DEPTH_COMPONENT16 0x81A5 -#define GL_DEPTH_COMPONENT24 0x81A6 -#define GL_DEPTH_COMPONENT32 0x81A7 -#define GL_MIRRORED_REPEAT 0x8370 -#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD -#define GL_TEXTURE_LOD_BIAS 0x8501 -#define GL_INCR_WRAP 0x8507 -#define GL_DECR_WRAP 0x8508 -#define GL_TEXTURE_DEPTH_SIZE 0x884A -#define GL_TEXTURE_COMPARE_MODE 0x884C -#define GL_TEXTURE_COMPARE_FUNC 0x884D -#define GL_BLEND_COLOR 0x8005 -#define GL_BLEND_EQUATION 0x8009 -#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_FUNC_ADD 0x8006 -#define GL_FUNC_REVERSE_SUBTRACT 0x800B -#define GL_FUNC_SUBTRACT 0x800A -#define GL_MIN 0x8007 -#define GL_MAX 0x8008 -#define GL_BUFFER_SIZE 0x8764 -#define GL_BUFFER_USAGE 0x8765 -#define GL_QUERY_COUNTER_BITS 0x8864 -#define GL_CURRENT_QUERY 0x8865 -#define GL_QUERY_RESULT 0x8866 -#define GL_QUERY_RESULT_AVAILABLE 0x8867 -#define GL_ARRAY_BUFFER 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER 0x8893 -#define GL_ARRAY_BUFFER_BINDING 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F -#define GL_READ_ONLY 0x88B8 -#define GL_WRITE_ONLY 0x88B9 -#define GL_READ_WRITE 0x88BA -#define GL_BUFFER_ACCESS 0x88BB -#define GL_BUFFER_MAPPED 0x88BC -#define GL_BUFFER_MAP_POINTER 0x88BD -#define GL_STREAM_DRAW 0x88E0 -#define GL_STREAM_READ 0x88E1 -#define GL_STREAM_COPY 0x88E2 -#define GL_STATIC_DRAW 0x88E4 -#define GL_STATIC_READ 0x88E5 -#define GL_STATIC_COPY 0x88E6 -#define GL_DYNAMIC_DRAW 0x88E8 -#define GL_DYNAMIC_READ 0x88E9 -#define GL_DYNAMIC_COPY 0x88EA -#define GL_SAMPLES_PASSED 0x8914 -#define GL_SRC1_ALPHA 0x8589 -#define GL_BLEND_EQUATION_RGB 0x8009 -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 -#define GL_CURRENT_VERTEX_ATTRIB 0x8626 -#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 -#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 -#define GL_STENCIL_BACK_FUNC 0x8800 -#define GL_STENCIL_BACK_FAIL 0x8801 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 -#define GL_MAX_DRAW_BUFFERS 0x8824 -#define GL_DRAW_BUFFER0 0x8825 -#define GL_DRAW_BUFFER1 0x8826 -#define GL_DRAW_BUFFER2 0x8827 -#define GL_DRAW_BUFFER3 0x8828 -#define GL_DRAW_BUFFER4 0x8829 -#define GL_DRAW_BUFFER5 0x882A -#define GL_DRAW_BUFFER6 0x882B -#define GL_DRAW_BUFFER7 0x882C -#define GL_DRAW_BUFFER8 0x882D -#define GL_DRAW_BUFFER9 0x882E -#define GL_DRAW_BUFFER10 0x882F -#define GL_DRAW_BUFFER11 0x8830 -#define GL_DRAW_BUFFER12 0x8831 -#define GL_DRAW_BUFFER13 0x8832 -#define GL_DRAW_BUFFER14 0x8833 -#define GL_DRAW_BUFFER15 0x8834 -#define GL_BLEND_EQUATION_ALPHA 0x883D -#define GL_MAX_VERTEX_ATTRIBS 0x8869 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A -#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 -#define GL_FRAGMENT_SHADER 0x8B30 -#define GL_VERTEX_SHADER 0x8B31 -#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 -#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A -#define GL_MAX_VARYING_FLOATS 0x8B4B -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D -#define GL_SHADER_TYPE 0x8B4F -#define GL_FLOAT_VEC2 0x8B50 -#define GL_FLOAT_VEC3 0x8B51 -#define GL_FLOAT_VEC4 0x8B52 -#define GL_INT_VEC2 0x8B53 -#define GL_INT_VEC3 0x8B54 -#define GL_INT_VEC4 0x8B55 -#define GL_BOOL 0x8B56 -#define GL_BOOL_VEC2 0x8B57 -#define GL_BOOL_VEC3 0x8B58 -#define GL_BOOL_VEC4 0x8B59 -#define GL_FLOAT_MAT2 0x8B5A -#define GL_FLOAT_MAT3 0x8B5B -#define GL_FLOAT_MAT4 0x8B5C -#define GL_SAMPLER_1D 0x8B5D -#define GL_SAMPLER_2D 0x8B5E -#define GL_SAMPLER_3D 0x8B5F -#define GL_SAMPLER_CUBE 0x8B60 -#define GL_SAMPLER_1D_SHADOW 0x8B61 -#define GL_SAMPLER_2D_SHADOW 0x8B62 -#define GL_DELETE_STATUS 0x8B80 -#define GL_COMPILE_STATUS 0x8B81 -#define GL_LINK_STATUS 0x8B82 -#define GL_VALIDATE_STATUS 0x8B83 -#define GL_INFO_LOG_LENGTH 0x8B84 -#define GL_ATTACHED_SHADERS 0x8B85 -#define GL_ACTIVE_UNIFORMS 0x8B86 -#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 -#define GL_SHADER_SOURCE_LENGTH 0x8B88 -#define GL_ACTIVE_ATTRIBUTES 0x8B89 -#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B -#define GL_SHADING_LANGUAGE_VERSION 0x8B8C -#define GL_CURRENT_PROGRAM 0x8B8D -#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 -#define GL_LOWER_LEFT 0x8CA1 -#define GL_UPPER_LEFT 0x8CA2 -#define GL_STENCIL_BACK_REF 0x8CA3 -#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 -#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 -#define GL_PIXEL_PACK_BUFFER 0x88EB -#define GL_PIXEL_UNPACK_BUFFER 0x88EC -#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED -#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF -#define GL_FLOAT_MAT2x3 0x8B65 -#define GL_FLOAT_MAT2x4 0x8B66 -#define GL_FLOAT_MAT3x2 0x8B67 -#define GL_FLOAT_MAT3x4 0x8B68 -#define GL_FLOAT_MAT4x2 0x8B69 -#define GL_FLOAT_MAT4x3 0x8B6A -#define GL_SRGB 0x8C40 -#define GL_SRGB8 0x8C41 -#define GL_SRGB_ALPHA 0x8C42 -#define GL_SRGB8_ALPHA8 0x8C43 -#define GL_COMPRESSED_SRGB 0x8C48 -#define GL_COMPRESSED_SRGB_ALPHA 0x8C49 -#define GL_COMPARE_REF_TO_TEXTURE 0x884E -#define GL_CLIP_DISTANCE0 0x3000 -#define GL_CLIP_DISTANCE1 0x3001 -#define GL_CLIP_DISTANCE2 0x3002 -#define GL_CLIP_DISTANCE3 0x3003 -#define GL_CLIP_DISTANCE4 0x3004 -#define GL_CLIP_DISTANCE5 0x3005 -#define GL_CLIP_DISTANCE6 0x3006 -#define GL_CLIP_DISTANCE7 0x3007 -#define GL_MAX_CLIP_DISTANCES 0x0D32 -#define GL_MAJOR_VERSION 0x821B -#define GL_MINOR_VERSION 0x821C -#define GL_NUM_EXTENSIONS 0x821D -#define GL_CONTEXT_FLAGS 0x821E -#define GL_COMPRESSED_RED 0x8225 -#define GL_COMPRESSED_RG 0x8226 -#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001 -#define GL_RGBA32F 0x8814 -#define GL_RGB32F 0x8815 -#define GL_RGBA16F 0x881A -#define GL_RGB16F 0x881B -#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD -#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF -#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 -#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 -#define GL_CLAMP_READ_COLOR 0x891C -#define GL_FIXED_ONLY 0x891D -#define GL_MAX_VARYING_COMPONENTS 0x8B4B -#define GL_TEXTURE_1D_ARRAY 0x8C18 -#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19 -#define GL_TEXTURE_2D_ARRAY 0x8C1A -#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B -#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C -#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D -#define GL_R11F_G11F_B10F 0x8C3A -#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B -#define GL_RGB9_E5 0x8C3D -#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E -#define GL_TEXTURE_SHARED_SIZE 0x8C3F -#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 -#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 -#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 -#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 -#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 -#define GL_PRIMITIVES_GENERATED 0x8C87 -#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 -#define GL_RASTERIZER_DISCARD 0x8C89 -#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B -#define GL_INTERLEAVED_ATTRIBS 0x8C8C -#define GL_SEPARATE_ATTRIBS 0x8C8D -#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E -#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F -#define GL_RGBA32UI 0x8D70 -#define GL_RGB32UI 0x8D71 -#define GL_RGBA16UI 0x8D76 -#define GL_RGB16UI 0x8D77 -#define GL_RGBA8UI 0x8D7C -#define GL_RGB8UI 0x8D7D -#define GL_RGBA32I 0x8D82 -#define GL_RGB32I 0x8D83 -#define GL_RGBA16I 0x8D88 -#define GL_RGB16I 0x8D89 -#define GL_RGBA8I 0x8D8E -#define GL_RGB8I 0x8D8F -#define GL_RED_INTEGER 0x8D94 -#define GL_GREEN_INTEGER 0x8D95 -#define GL_BLUE_INTEGER 0x8D96 -#define GL_RGB_INTEGER 0x8D98 -#define GL_RGBA_INTEGER 0x8D99 -#define GL_BGR_INTEGER 0x8D9A -#define GL_BGRA_INTEGER 0x8D9B -#define GL_SAMPLER_1D_ARRAY 0x8DC0 -#define GL_SAMPLER_2D_ARRAY 0x8DC1 -#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3 -#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 -#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 -#define GL_UNSIGNED_INT_VEC2 0x8DC6 -#define GL_UNSIGNED_INT_VEC3 0x8DC7 -#define GL_UNSIGNED_INT_VEC4 0x8DC8 -#define GL_INT_SAMPLER_1D 0x8DC9 -#define GL_INT_SAMPLER_2D 0x8DCA -#define GL_INT_SAMPLER_3D 0x8DCB -#define GL_INT_SAMPLER_CUBE 0x8DCC -#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE -#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF -#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1 -#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 -#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 -#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 -#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6 -#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 -#define GL_QUERY_WAIT 0x8E13 -#define GL_QUERY_NO_WAIT 0x8E14 -#define GL_QUERY_BY_REGION_WAIT 0x8E15 -#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16 -#define GL_BUFFER_ACCESS_FLAGS 0x911F -#define GL_BUFFER_MAP_LENGTH 0x9120 -#define GL_BUFFER_MAP_OFFSET 0x9121 -#define GL_DEPTH_COMPONENT32F 0x8CAC -#define GL_DEPTH32F_STENCIL8 0x8CAD -#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD -#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 -#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 -#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 -#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 -#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 -#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 -#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 -#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 -#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 -#define GL_FRAMEBUFFER_DEFAULT 0x8218 -#define GL_FRAMEBUFFER_UNDEFINED 0x8219 -#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A -#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 -#define GL_DEPTH_STENCIL 0x84F9 -#define GL_UNSIGNED_INT_24_8 0x84FA -#define GL_DEPTH24_STENCIL8 0x88F0 -#define GL_TEXTURE_STENCIL_SIZE 0x88F1 -#define GL_TEXTURE_RED_TYPE 0x8C10 -#define GL_TEXTURE_GREEN_TYPE 0x8C11 -#define GL_TEXTURE_BLUE_TYPE 0x8C12 -#define GL_TEXTURE_ALPHA_TYPE 0x8C13 -#define GL_TEXTURE_DEPTH_TYPE 0x8C16 -#define GL_UNSIGNED_NORMALIZED 0x8C17 -#define GL_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_RENDERBUFFER_BINDING 0x8CA7 -#define GL_READ_FRAMEBUFFER 0x8CA8 -#define GL_DRAW_FRAMEBUFFER 0x8CA9 -#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA -#define GL_RENDERBUFFER_SAMPLES 0x8CAB -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 -#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB -#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC -#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD -#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF -#define GL_COLOR_ATTACHMENT0 0x8CE0 -#define GL_COLOR_ATTACHMENT1 0x8CE1 -#define GL_COLOR_ATTACHMENT2 0x8CE2 -#define GL_COLOR_ATTACHMENT3 0x8CE3 -#define GL_COLOR_ATTACHMENT4 0x8CE4 -#define GL_COLOR_ATTACHMENT5 0x8CE5 -#define GL_COLOR_ATTACHMENT6 0x8CE6 -#define GL_COLOR_ATTACHMENT7 0x8CE7 -#define GL_COLOR_ATTACHMENT8 0x8CE8 -#define GL_COLOR_ATTACHMENT9 0x8CE9 -#define GL_COLOR_ATTACHMENT10 0x8CEA -#define GL_COLOR_ATTACHMENT11 0x8CEB -#define GL_COLOR_ATTACHMENT12 0x8CEC -#define GL_COLOR_ATTACHMENT13 0x8CED -#define GL_COLOR_ATTACHMENT14 0x8CEE -#define GL_COLOR_ATTACHMENT15 0x8CEF -#define GL_COLOR_ATTACHMENT16 0x8CF0 -#define GL_COLOR_ATTACHMENT17 0x8CF1 -#define GL_COLOR_ATTACHMENT18 0x8CF2 -#define GL_COLOR_ATTACHMENT19 0x8CF3 -#define GL_COLOR_ATTACHMENT20 0x8CF4 -#define GL_COLOR_ATTACHMENT21 0x8CF5 -#define GL_COLOR_ATTACHMENT22 0x8CF6 -#define GL_COLOR_ATTACHMENT23 0x8CF7 -#define GL_COLOR_ATTACHMENT24 0x8CF8 -#define GL_COLOR_ATTACHMENT25 0x8CF9 -#define GL_COLOR_ATTACHMENT26 0x8CFA -#define GL_COLOR_ATTACHMENT27 0x8CFB -#define GL_COLOR_ATTACHMENT28 0x8CFC -#define GL_COLOR_ATTACHMENT29 0x8CFD -#define GL_COLOR_ATTACHMENT30 0x8CFE -#define GL_COLOR_ATTACHMENT31 0x8CFF -#define GL_DEPTH_ATTACHMENT 0x8D00 -#define GL_STENCIL_ATTACHMENT 0x8D20 -#define GL_FRAMEBUFFER 0x8D40 -#define GL_RENDERBUFFER 0x8D41 -#define GL_RENDERBUFFER_WIDTH 0x8D42 -#define GL_RENDERBUFFER_HEIGHT 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 -#define GL_STENCIL_INDEX1 0x8D46 -#define GL_STENCIL_INDEX4 0x8D47 -#define GL_STENCIL_INDEX8 0x8D48 -#define GL_STENCIL_INDEX16 0x8D49 -#define GL_RENDERBUFFER_RED_SIZE 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 -#define GL_MAX_SAMPLES 0x8D57 -#define GL_FRAMEBUFFER_SRGB 0x8DB9 -#define GL_HALF_FLOAT 0x140B -#define GL_MAP_READ_BIT 0x0001 -#define GL_MAP_WRITE_BIT 0x0002 -#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 -#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 -#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 -#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 -#define GL_COMPRESSED_RED_RGTC1 0x8DBB -#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC -#define GL_COMPRESSED_RG_RGTC2 0x8DBD -#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE -#define GL_RG 0x8227 -#define GL_RG_INTEGER 0x8228 -#define GL_R8 0x8229 -#define GL_R16 0x822A -#define GL_RG8 0x822B -#define GL_RG16 0x822C -#define GL_R16F 0x822D -#define GL_R32F 0x822E -#define GL_RG16F 0x822F -#define GL_RG32F 0x8230 -#define GL_R8I 0x8231 -#define GL_R8UI 0x8232 -#define GL_R16I 0x8233 -#define GL_R16UI 0x8234 -#define GL_R32I 0x8235 -#define GL_R32UI 0x8236 -#define GL_RG8I 0x8237 -#define GL_RG8UI 0x8238 -#define GL_RG16I 0x8239 -#define GL_RG16UI 0x823A -#define GL_RG32I 0x823B -#define GL_RG32UI 0x823C -#define GL_VERTEX_ARRAY_BINDING 0x85B5 -#define GL_SAMPLER_2D_RECT 0x8B63 -#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64 -#define GL_SAMPLER_BUFFER 0x8DC2 -#define GL_INT_SAMPLER_2D_RECT 0x8DCD -#define GL_INT_SAMPLER_BUFFER 0x8DD0 -#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5 -#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 -#define GL_TEXTURE_BUFFER 0x8C2A -#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B -#define GL_TEXTURE_BINDING_BUFFER 0x8C2C -#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D -#define GL_TEXTURE_RECTANGLE 0x84F5 -#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 -#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 -#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 -#define GL_R8_SNORM 0x8F94 -#define GL_RG8_SNORM 0x8F95 -#define GL_RGB8_SNORM 0x8F96 -#define GL_RGBA8_SNORM 0x8F97 -#define GL_R16_SNORM 0x8F98 -#define GL_RG16_SNORM 0x8F99 -#define GL_RGB16_SNORM 0x8F9A -#define GL_RGBA16_SNORM 0x8F9B -#define GL_SIGNED_NORMALIZED 0x8F9C -#define GL_PRIMITIVE_RESTART 0x8F9D -#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E -#define GL_COPY_READ_BUFFER 0x8F36 -#define GL_COPY_WRITE_BUFFER 0x8F37 -#define GL_UNIFORM_BUFFER 0x8A11 -#define GL_UNIFORM_BUFFER_BINDING 0x8A28 -#define GL_UNIFORM_BUFFER_START 0x8A29 -#define GL_UNIFORM_BUFFER_SIZE 0x8A2A -#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B -#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C -#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D -#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E -#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F -#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 -#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 -#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32 -#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 -#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 -#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 -#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 -#define GL_UNIFORM_TYPE 0x8A37 -#define GL_UNIFORM_SIZE 0x8A38 -#define GL_UNIFORM_NAME_LENGTH 0x8A39 -#define GL_UNIFORM_BLOCK_INDEX 0x8A3A -#define GL_UNIFORM_OFFSET 0x8A3B -#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C -#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D -#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E -#define GL_UNIFORM_BLOCK_BINDING 0x8A3F -#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 -#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 -#define GL_INVALID_INDEX 0xFFFFFFFF -#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 -#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 -#define GL_LINES_ADJACENCY 0x000A -#define GL_LINE_STRIP_ADJACENCY 0x000B -#define GL_TRIANGLES_ADJACENCY 0x000C -#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D -#define GL_PROGRAM_POINT_SIZE 0x8642 -#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29 -#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8 -#define GL_GEOMETRY_SHADER 0x8DD9 -#define GL_GEOMETRY_VERTICES_OUT 0x8916 -#define GL_GEOMETRY_INPUT_TYPE 0x8917 -#define GL_GEOMETRY_OUTPUT_TYPE 0x8918 -#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0 -#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1 -#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 -#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123 -#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 -#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 -#define GL_CONTEXT_PROFILE_MASK 0x9126 -#define GL_DEPTH_CLAMP 0x864F -#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C -#define GL_FIRST_VERTEX_CONVENTION 0x8E4D -#define GL_LAST_VERTEX_CONVENTION 0x8E4E -#define GL_PROVOKING_VERTEX 0x8E4F -#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F -#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 -#define GL_OBJECT_TYPE 0x9112 -#define GL_SYNC_CONDITION 0x9113 -#define GL_SYNC_STATUS 0x9114 -#define GL_SYNC_FLAGS 0x9115 -#define GL_SYNC_FENCE 0x9116 -#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 -#define GL_UNSIGNALED 0x9118 -#define GL_SIGNALED 0x9119 -#define GL_ALREADY_SIGNALED 0x911A -#define GL_TIMEOUT_EXPIRED 0x911B -#define GL_CONDITION_SATISFIED 0x911C -#define GL_WAIT_FAILED 0x911D -#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFF -#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 -#define GL_SAMPLE_POSITION 0x8E50 -#define GL_SAMPLE_MASK 0x8E51 -#define GL_SAMPLE_MASK_VALUE 0x8E52 -#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 -#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 -#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101 -#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 -#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103 -#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 -#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105 -#define GL_TEXTURE_SAMPLES 0x9106 -#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 -#define GL_SAMPLER_2D_MULTISAMPLE 0x9108 -#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 -#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A -#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B -#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C -#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D -#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E -#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F -#define GL_MAX_INTEGER_SAMPLES 0x9110 -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE -#define GL_SRC1_COLOR 0x88F9 -#define GL_ONE_MINUS_SRC1_COLOR 0x88FA -#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB -#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC -#define GL_ANY_SAMPLES_PASSED 0x8C2F -#define GL_SAMPLER_BINDING 0x8919 -#define GL_RGB10_A2UI 0x906F -#define GL_TEXTURE_SWIZZLE_R 0x8E42 -#define GL_TEXTURE_SWIZZLE_G 0x8E43 -#define GL_TEXTURE_SWIZZLE_B 0x8E44 -#define GL_TEXTURE_SWIZZLE_A 0x8E45 -#define GL_TEXTURE_SWIZZLE_RGBA 0x8E46 -#define GL_TIME_ELAPSED 0x88BF -#define GL_TIMESTAMP 0x8E28 -#define GL_INT_2_10_10_10_REV 0x8D9F -#define GL_SAMPLE_SHADING 0x8C36 -#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 -#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E -#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F -#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A -#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B -#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C -#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D -#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E -#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F -#define GL_DRAW_INDIRECT_BUFFER 0x8F3F -#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 -#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F -#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A -#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B -#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C -#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D -#define GL_MAX_VERTEX_STREAMS 0x8E71 -#define GL_DOUBLE_VEC2 0x8FFC -#define GL_DOUBLE_VEC3 0x8FFD -#define GL_DOUBLE_VEC4 0x8FFE -#define GL_DOUBLE_MAT2 0x8F46 -#define GL_DOUBLE_MAT3 0x8F47 -#define GL_DOUBLE_MAT4 0x8F48 -#define GL_DOUBLE_MAT2x3 0x8F49 -#define GL_DOUBLE_MAT2x4 0x8F4A -#define GL_DOUBLE_MAT3x2 0x8F4B -#define GL_DOUBLE_MAT3x4 0x8F4C -#define GL_DOUBLE_MAT4x2 0x8F4D -#define GL_DOUBLE_MAT4x3 0x8F4E -#define GL_ACTIVE_SUBROUTINES 0x8DE5 -#define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6 -#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47 -#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48 -#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49 -#define GL_MAX_SUBROUTINES 0x8DE7 -#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8 -#define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A -#define GL_COMPATIBLE_SUBROUTINES 0x8E4B -#define GL_PATCHES 0x000E -#define GL_PATCH_VERTICES 0x8E72 -#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73 -#define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74 -#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75 -#define GL_TESS_GEN_MODE 0x8E76 -#define GL_TESS_GEN_SPACING 0x8E77 -#define GL_TESS_GEN_VERTEX_ORDER 0x8E78 -#define GL_TESS_GEN_POINT_MODE 0x8E79 -#define GL_ISOLINES 0x8E7A -#define GL_QUADS 0x0007 -#define GL_FRACTIONAL_ODD 0x8E7B -#define GL_FRACTIONAL_EVEN 0x8E7C -#define GL_MAX_PATCH_VERTICES 0x8E7D -#define GL_MAX_TESS_GEN_LEVEL 0x8E7E -#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F -#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80 -#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81 -#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82 -#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83 -#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84 -#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85 -#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86 -#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89 -#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A -#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C -#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D -#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E -#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F -#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1 -#define GL_TESS_EVALUATION_SHADER 0x8E87 -#define GL_TESS_CONTROL_SHADER 0x8E88 -#define GL_TRANSFORM_FEEDBACK 0x8E22 -#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23 -#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24 -#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 -#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70 -#define GL_FIXED 0x140C -#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B -#define GL_LOW_FLOAT 0x8DF0 -#define GL_MEDIUM_FLOAT 0x8DF1 -#define GL_HIGH_FLOAT 0x8DF2 -#define GL_LOW_INT 0x8DF3 -#define GL_MEDIUM_INT 0x8DF4 -#define GL_HIGH_INT 0x8DF5 -#define GL_SHADER_COMPILER 0x8DFA -#define GL_SHADER_BINARY_FORMATS 0x8DF8 -#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 -#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB -#define GL_MAX_VARYING_VECTORS 0x8DFC -#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD -#define GL_RGB565 0x8D62 -#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 -#define GL_PROGRAM_BINARY_LENGTH 0x8741 -#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE -#define GL_PROGRAM_BINARY_FORMATS 0x87FF -#define GL_VERTEX_SHADER_BIT 0x00000001 -#define GL_FRAGMENT_SHADER_BIT 0x00000002 -#define GL_GEOMETRY_SHADER_BIT 0x00000004 -#define GL_TESS_CONTROL_SHADER_BIT 0x00000008 -#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010 -#define GL_ALL_SHADER_BITS 0xFFFFFFFF -#define GL_PROGRAM_SEPARABLE 0x8258 -#define GL_ACTIVE_PROGRAM 0x8259 -#define GL_PROGRAM_PIPELINE_BINDING 0x825A -#define GL_MAX_VIEWPORTS 0x825B -#define GL_VIEWPORT_SUBPIXEL_BITS 0x825C -#define GL_VIEWPORT_BOUNDS_RANGE 0x825D -#define GL_LAYER_PROVOKING_VERTEX 0x825E -#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F -#define GL_UNDEFINED_VERTEX 0x8260 -#define GL_COPY_READ_BUFFER_BINDING 0x8F36 -#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 -#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 -#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 -#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127 -#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128 -#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129 -#define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A -#define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B -#define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C -#define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D -#define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E -#define GL_NUM_SAMPLE_COUNTS 0x9380 -#define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC -#define GL_ATOMIC_COUNTER_BUFFER 0x92C0 -#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 -#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 -#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3 -#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4 -#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5 -#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB -#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC -#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD -#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE -#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF -#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0 -#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1 -#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2 -#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3 -#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4 -#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5 -#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6 -#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7 -#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8 -#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC -#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 -#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA -#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB -#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 -#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 -#define GL_UNIFORM_BARRIER_BIT 0x00000004 -#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008 -#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020 -#define GL_COMMAND_BARRIER_BIT 0x00000040 -#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080 -#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100 -#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200 -#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400 -#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800 -#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000 -#define GL_ALL_BARRIER_BITS 0xFFFFFFFF -#define GL_MAX_IMAGE_UNITS 0x8F38 -#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39 -#define GL_IMAGE_BINDING_NAME 0x8F3A -#define GL_IMAGE_BINDING_LEVEL 0x8F3B -#define GL_IMAGE_BINDING_LAYERED 0x8F3C -#define GL_IMAGE_BINDING_LAYER 0x8F3D -#define GL_IMAGE_BINDING_ACCESS 0x8F3E -#define GL_IMAGE_1D 0x904C -#define GL_IMAGE_2D 0x904D -#define GL_IMAGE_3D 0x904E -#define GL_IMAGE_2D_RECT 0x904F -#define GL_IMAGE_CUBE 0x9050 -#define GL_IMAGE_BUFFER 0x9051 -#define GL_IMAGE_1D_ARRAY 0x9052 -#define GL_IMAGE_2D_ARRAY 0x9053 -#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054 -#define GL_IMAGE_2D_MULTISAMPLE 0x9055 -#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056 -#define GL_INT_IMAGE_1D 0x9057 -#define GL_INT_IMAGE_2D 0x9058 -#define GL_INT_IMAGE_3D 0x9059 -#define GL_INT_IMAGE_2D_RECT 0x905A -#define GL_INT_IMAGE_CUBE 0x905B -#define GL_INT_IMAGE_BUFFER 0x905C -#define GL_INT_IMAGE_1D_ARRAY 0x905D -#define GL_INT_IMAGE_2D_ARRAY 0x905E -#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F -#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060 -#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061 -#define GL_UNSIGNED_INT_IMAGE_1D 0x9062 -#define GL_UNSIGNED_INT_IMAGE_2D 0x9063 -#define GL_UNSIGNED_INT_IMAGE_3D 0x9064 -#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065 -#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 -#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067 -#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068 -#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 -#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C -#define GL_MAX_IMAGE_SAMPLES 0x906D -#define GL_IMAGE_BINDING_FORMAT 0x906E -#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7 -#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8 -#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9 -#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA -#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB -#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC -#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD -#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE -#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF -#define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C -#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D -#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E -#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F -#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F -#define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9 -#define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E -#define GL_COMPRESSED_RGB8_ETC2 0x9274 -#define GL_COMPRESSED_SRGB8_ETC2 0x9275 -#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 -#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 -#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 -#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 -#define GL_COMPRESSED_R11_EAC 0x9270 -#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 -#define GL_COMPRESSED_RG11_EAC 0x9272 -#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 -#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 -#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A -#define GL_MAX_ELEMENT_INDEX 0x8D6B -#define GL_COMPUTE_SHADER 0x91B9 -#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB -#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC -#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD -#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262 -#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263 -#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264 -#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265 -#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266 -#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB -#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE -#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF -#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED -#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE -#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF -#define GL_COMPUTE_SHADER_BIT 0x00000020 -#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 -#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 -#define GL_DEBUG_CALLBACK_FUNCTION 0x8244 -#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245 -#define GL_DEBUG_SOURCE_API 0x8246 -#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247 -#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248 -#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249 -#define GL_DEBUG_SOURCE_APPLICATION 0x824A -#define GL_DEBUG_SOURCE_OTHER 0x824B -#define GL_DEBUG_TYPE_ERROR 0x824C -#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D -#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E -#define GL_DEBUG_TYPE_PORTABILITY 0x824F -#define GL_DEBUG_TYPE_PERFORMANCE 0x8250 -#define GL_DEBUG_TYPE_OTHER 0x8251 -#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143 -#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144 -#define GL_DEBUG_LOGGED_MESSAGES 0x9145 -#define GL_DEBUG_SEVERITY_HIGH 0x9146 -#define GL_DEBUG_SEVERITY_MEDIUM 0x9147 -#define GL_DEBUG_SEVERITY_LOW 0x9148 -#define GL_DEBUG_TYPE_MARKER 0x8268 -#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269 -#define GL_DEBUG_TYPE_POP_GROUP 0x826A -#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B -#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C -#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D -#define GL_BUFFER 0x82E0 -#define GL_SHADER 0x82E1 -#define GL_PROGRAM 0x82E2 -#define GL_VERTEX_ARRAY 0x8074 -#define GL_QUERY 0x82E3 -#define GL_PROGRAM_PIPELINE 0x82E4 -#define GL_SAMPLER 0x82E6 -#define GL_MAX_LABEL_LENGTH 0x82E8 -#define GL_DEBUG_OUTPUT 0x92E0 -#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 -#define GL_MAX_UNIFORM_LOCATIONS 0x826E -#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310 -#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311 -#define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312 -#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313 -#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314 -#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315 -#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316 -#define GL_MAX_FRAMEBUFFER_LAYERS 0x9317 -#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318 -#define GL_INTERNALFORMAT_SUPPORTED 0x826F -#define GL_INTERNALFORMAT_PREFERRED 0x8270 -#define GL_INTERNALFORMAT_RED_SIZE 0x8271 -#define GL_INTERNALFORMAT_GREEN_SIZE 0x8272 -#define GL_INTERNALFORMAT_BLUE_SIZE 0x8273 -#define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274 -#define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275 -#define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276 -#define GL_INTERNALFORMAT_SHARED_SIZE 0x8277 -#define GL_INTERNALFORMAT_RED_TYPE 0x8278 -#define GL_INTERNALFORMAT_GREEN_TYPE 0x8279 -#define GL_INTERNALFORMAT_BLUE_TYPE 0x827A -#define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B -#define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C -#define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D -#define GL_MAX_WIDTH 0x827E -#define GL_MAX_HEIGHT 0x827F -#define GL_MAX_DEPTH 0x8280 -#define GL_MAX_LAYERS 0x8281 -#define GL_MAX_COMBINED_DIMENSIONS 0x8282 -#define GL_COLOR_COMPONENTS 0x8283 -#define GL_DEPTH_COMPONENTS 0x8284 -#define GL_STENCIL_COMPONENTS 0x8285 -#define GL_COLOR_RENDERABLE 0x8286 -#define GL_DEPTH_RENDERABLE 0x8287 -#define GL_STENCIL_RENDERABLE 0x8288 -#define GL_FRAMEBUFFER_RENDERABLE 0x8289 -#define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A -#define GL_FRAMEBUFFER_BLEND 0x828B -#define GL_READ_PIXELS 0x828C -#define GL_READ_PIXELS_FORMAT 0x828D -#define GL_READ_PIXELS_TYPE 0x828E -#define GL_TEXTURE_IMAGE_FORMAT 0x828F -#define GL_TEXTURE_IMAGE_TYPE 0x8290 -#define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291 -#define GL_GET_TEXTURE_IMAGE_TYPE 0x8292 -#define GL_MIPMAP 0x8293 -#define GL_MANUAL_GENERATE_MIPMAP 0x8294 -#define GL_AUTO_GENERATE_MIPMAP 0x8295 -#define GL_COLOR_ENCODING 0x8296 -#define GL_SRGB_READ 0x8297 -#define GL_SRGB_WRITE 0x8298 -#define GL_FILTER 0x829A -#define GL_VERTEX_TEXTURE 0x829B -#define GL_TESS_CONTROL_TEXTURE 0x829C -#define GL_TESS_EVALUATION_TEXTURE 0x829D -#define GL_GEOMETRY_TEXTURE 0x829E -#define GL_FRAGMENT_TEXTURE 0x829F -#define GL_COMPUTE_TEXTURE 0x82A0 -#define GL_TEXTURE_SHADOW 0x82A1 -#define GL_TEXTURE_GATHER 0x82A2 -#define GL_TEXTURE_GATHER_SHADOW 0x82A3 -#define GL_SHADER_IMAGE_LOAD 0x82A4 -#define GL_SHADER_IMAGE_STORE 0x82A5 -#define GL_SHADER_IMAGE_ATOMIC 0x82A6 -#define GL_IMAGE_TEXEL_SIZE 0x82A7 -#define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8 -#define GL_IMAGE_PIXEL_FORMAT 0x82A9 -#define GL_IMAGE_PIXEL_TYPE 0x82AA -#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC -#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD -#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE -#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF -#define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1 -#define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2 -#define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3 -#define GL_CLEAR_BUFFER 0x82B4 -#define GL_TEXTURE_VIEW 0x82B5 -#define GL_VIEW_COMPATIBILITY_CLASS 0x82B6 -#define GL_FULL_SUPPORT 0x82B7 -#define GL_CAVEAT_SUPPORT 0x82B8 -#define GL_IMAGE_CLASS_4_X_32 0x82B9 -#define GL_IMAGE_CLASS_2_X_32 0x82BA -#define GL_IMAGE_CLASS_1_X_32 0x82BB -#define GL_IMAGE_CLASS_4_X_16 0x82BC -#define GL_IMAGE_CLASS_2_X_16 0x82BD -#define GL_IMAGE_CLASS_1_X_16 0x82BE -#define GL_IMAGE_CLASS_4_X_8 0x82BF -#define GL_IMAGE_CLASS_2_X_8 0x82C0 -#define GL_IMAGE_CLASS_1_X_8 0x82C1 -#define GL_IMAGE_CLASS_11_11_10 0x82C2 -#define GL_IMAGE_CLASS_10_10_10_2 0x82C3 -#define GL_VIEW_CLASS_128_BITS 0x82C4 -#define GL_VIEW_CLASS_96_BITS 0x82C5 -#define GL_VIEW_CLASS_64_BITS 0x82C6 -#define GL_VIEW_CLASS_48_BITS 0x82C7 -#define GL_VIEW_CLASS_32_BITS 0x82C8 -#define GL_VIEW_CLASS_24_BITS 0x82C9 -#define GL_VIEW_CLASS_16_BITS 0x82CA -#define GL_VIEW_CLASS_8_BITS 0x82CB -#define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC -#define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD -#define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE -#define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF -#define GL_VIEW_CLASS_RGTC1_RED 0x82D0 -#define GL_VIEW_CLASS_RGTC2_RG 0x82D1 -#define GL_VIEW_CLASS_BPTC_UNORM 0x82D2 -#define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3 -#define GL_UNIFORM 0x92E1 -#define GL_UNIFORM_BLOCK 0x92E2 -#define GL_PROGRAM_INPUT 0x92E3 -#define GL_PROGRAM_OUTPUT 0x92E4 -#define GL_BUFFER_VARIABLE 0x92E5 -#define GL_SHADER_STORAGE_BLOCK 0x92E6 -#define GL_VERTEX_SUBROUTINE 0x92E8 -#define GL_TESS_CONTROL_SUBROUTINE 0x92E9 -#define GL_TESS_EVALUATION_SUBROUTINE 0x92EA -#define GL_GEOMETRY_SUBROUTINE 0x92EB -#define GL_FRAGMENT_SUBROUTINE 0x92EC -#define GL_COMPUTE_SUBROUTINE 0x92ED -#define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE -#define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF -#define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0 -#define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1 -#define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2 -#define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3 -#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4 -#define GL_ACTIVE_RESOURCES 0x92F5 -#define GL_MAX_NAME_LENGTH 0x92F6 -#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7 -#define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8 -#define GL_NAME_LENGTH 0x92F9 -#define GL_TYPE 0x92FA -#define GL_ARRAY_SIZE 0x92FB -#define GL_OFFSET 0x92FC -#define GL_BLOCK_INDEX 0x92FD -#define GL_ARRAY_STRIDE 0x92FE -#define GL_MATRIX_STRIDE 0x92FF -#define GL_IS_ROW_MAJOR 0x9300 -#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301 -#define GL_BUFFER_BINDING 0x9302 -#define GL_BUFFER_DATA_SIZE 0x9303 -#define GL_NUM_ACTIVE_VARIABLES 0x9304 -#define GL_ACTIVE_VARIABLES 0x9305 -#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306 -#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307 -#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308 -#define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309 -#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A -#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B -#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C -#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D -#define GL_LOCATION 0x930E -#define GL_LOCATION_INDEX 0x930F -#define GL_IS_PER_PATCH 0x92E7 -#define GL_SHADER_STORAGE_BUFFER 0x90D2 -#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3 -#define GL_SHADER_STORAGE_BUFFER_START 0x90D4 -#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5 -#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6 -#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7 -#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8 -#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9 -#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA -#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB -#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC -#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD -#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE -#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF -#define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000 -#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39 -#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA -#define GL_TEXTURE_BUFFER_OFFSET 0x919D -#define GL_TEXTURE_BUFFER_SIZE 0x919E -#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F -#define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB -#define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC -#define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD -#define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE -#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF -#define GL_VERTEX_ATTRIB_BINDING 0x82D4 -#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5 -#define GL_VERTEX_BINDING_DIVISOR 0x82D6 -#define GL_VERTEX_BINDING_OFFSET 0x82D7 -#define GL_VERTEX_BINDING_STRIDE 0x82D8 -#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 -#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA -#define GL_VERTEX_BINDING_BUFFER 0x8F4F -#define GL_DISPLAY_LIST 0x82E7 -#define GL_STACK_UNDERFLOW 0x0504 -#define GL_STACK_OVERFLOW 0x0503 -#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5 -#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221 -#define GL_TEXTURE_BUFFER_BINDING 0x8C2A -#define GL_MAP_PERSISTENT_BIT 0x0040 -#define GL_MAP_COHERENT_BIT 0x0080 -#define GL_DYNAMIC_STORAGE_BIT 0x0100 -#define GL_CLIENT_STORAGE_BIT 0x0200 -#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000 -#define GL_BUFFER_IMMUTABLE_STORAGE 0x821F -#define GL_BUFFER_STORAGE_FLAGS 0x8220 -#define GL_CLEAR_TEXTURE 0x9365 -#define GL_LOCATION_COMPONENT 0x934A -#define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B -#define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C -#define GL_QUERY_BUFFER 0x9192 -#define GL_QUERY_BUFFER_BARRIER_BIT 0x00008000 -#define GL_QUERY_BUFFER_BINDING 0x9193 -#define GL_QUERY_RESULT_NO_WAIT 0x9194 -#define GL_MIRROR_CLAMP_TO_EDGE 0x8743 -#define GL_CONTEXT_LOST 0x0507 -#define GL_NEGATIVE_ONE_TO_ONE 0x935E -#define GL_ZERO_TO_ONE 0x935F -#define GL_CLIP_ORIGIN 0x935C -#define GL_CLIP_DEPTH_MODE 0x935D -#define GL_QUERY_WAIT_INVERTED 0x8E17 -#define GL_QUERY_NO_WAIT_INVERTED 0x8E18 -#define GL_QUERY_BY_REGION_WAIT_INVERTED 0x8E19 -#define GL_QUERY_BY_REGION_NO_WAIT_INVERTED 0x8E1A -#define GL_MAX_CULL_DISTANCES 0x82F9 -#define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES 0x82FA -#define GL_TEXTURE_TARGET 0x1006 -#define GL_QUERY_TARGET 0x82EA -#define GL_GUILTY_CONTEXT_RESET 0x8253 -#define GL_INNOCENT_CONTEXT_RESET 0x8254 -#define GL_UNKNOWN_CONTEXT_RESET 0x8255 -#define GL_RESET_NOTIFICATION_STRATEGY 0x8256 -#define GL_LOSE_CONTEXT_ON_RESET 0x8252 -#define GL_NO_RESET_NOTIFICATION 0x8261 -#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004 -#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_CONVOLUTION_1D 0x8010 -#define GL_CONVOLUTION_2D 0x8011 -#define GL_SEPARABLE_2D 0x8012 -#define GL_HISTOGRAM 0x8024 -#define GL_PROXY_HISTOGRAM 0x8025 -#define GL_MINMAX 0x802E -#define GL_CONTEXT_RELEASE_BEHAVIOR 0x82FB -#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC -#define GL_SHADER_BINARY_FORMAT_SPIR_V 0x9551 -#define GL_SPIR_V_BINARY 0x9552 -#define GL_PARAMETER_BUFFER 0x80EE -#define GL_PARAMETER_BUFFER_BINDING 0x80EF -#define GL_CONTEXT_FLAG_NO_ERROR_BIT 0x00000008 -#define GL_VERTICES_SUBMITTED 0x82EE -#define GL_PRIMITIVES_SUBMITTED 0x82EF -#define GL_VERTEX_SHADER_INVOCATIONS 0x82F0 -#define GL_TESS_CONTROL_SHADER_PATCHES 0x82F1 -#define GL_TESS_EVALUATION_SHADER_INVOCATIONS 0x82F2 -#define GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED 0x82F3 -#define GL_FRAGMENT_SHADER_INVOCATIONS 0x82F4 -#define GL_COMPUTE_SHADER_INVOCATIONS 0x82F5 -#define GL_CLIPPING_INPUT_PRIMITIVES 0x82F6 -#define GL_CLIPPING_OUTPUT_PRIMITIVES 0x82F7 -#define GL_POLYGON_OFFSET_CLAMP 0x8E1B -#define GL_SPIR_V_EXTENSIONS 0x9553 -#define GL_NUM_SPIR_V_EXTENSIONS 0x9554 -#define GL_TEXTURE_MAX_ANISOTROPY 0x84FE -#define GL_MAX_TEXTURE_MAX_ANISOTROPY 0x84FF -#define GL_TRANSFORM_FEEDBACK_OVERFLOW 0x82EC -#define GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW 0x82ED -#ifndef GL_VERSION_1_0 -#define GL_VERSION_1_0 1 -GLAPI int GLAD_GL_VERSION_1_0; -typedef void (APIENTRYP PFNGLCULLFACEPROC)(GLenum mode); -GLAPI PFNGLCULLFACEPROC glad_glCullFace; -#define glCullFace glad_glCullFace -typedef void (APIENTRYP PFNGLFRONTFACEPROC)(GLenum mode); -GLAPI PFNGLFRONTFACEPROC glad_glFrontFace; -#define glFrontFace glad_glFrontFace -typedef void (APIENTRYP PFNGLHINTPROC)(GLenum target, GLenum mode); -GLAPI PFNGLHINTPROC glad_glHint; -#define glHint glad_glHint -typedef void (APIENTRYP PFNGLLINEWIDTHPROC)(GLfloat width); -GLAPI PFNGLLINEWIDTHPROC glad_glLineWidth; -#define glLineWidth glad_glLineWidth -typedef void (APIENTRYP PFNGLPOINTSIZEPROC)(GLfloat size); -GLAPI PFNGLPOINTSIZEPROC glad_glPointSize; -#define glPointSize glad_glPointSize -typedef void (APIENTRYP PFNGLPOLYGONMODEPROC)(GLenum face, GLenum mode); -GLAPI PFNGLPOLYGONMODEPROC glad_glPolygonMode; -#define glPolygonMode glad_glPolygonMode -typedef void (APIENTRYP PFNGLSCISSORPROC)(GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI PFNGLSCISSORPROC glad_glScissor; -#define glScissor glad_glScissor -typedef void (APIENTRYP PFNGLTEXPARAMETERFPROC)(GLenum target, GLenum pname, GLfloat param); -GLAPI PFNGLTEXPARAMETERFPROC glad_glTexParameterf; -#define glTexParameterf glad_glTexParameterf -typedef void (APIENTRYP PFNGLTEXPARAMETERFVPROC)(GLenum target, GLenum pname, const GLfloat *params); -GLAPI PFNGLTEXPARAMETERFVPROC glad_glTexParameterfv; -#define glTexParameterfv glad_glTexParameterfv -typedef void (APIENTRYP PFNGLTEXPARAMETERIPROC)(GLenum target, GLenum pname, GLint param); -GLAPI PFNGLTEXPARAMETERIPROC glad_glTexParameteri; -#define glTexParameteri glad_glTexParameteri -typedef void (APIENTRYP PFNGLTEXPARAMETERIVPROC)(GLenum target, GLenum pname, const GLint *params); -GLAPI PFNGLTEXPARAMETERIVPROC glad_glTexParameteriv; -#define glTexParameteriv glad_glTexParameteriv -typedef void (APIENTRYP PFNGLTEXIMAGE1DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); -GLAPI PFNGLTEXIMAGE1DPROC glad_glTexImage1D; -#define glTexImage1D glad_glTexImage1D -typedef void (APIENTRYP PFNGLTEXIMAGE2DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -GLAPI PFNGLTEXIMAGE2DPROC glad_glTexImage2D; -#define glTexImage2D glad_glTexImage2D -typedef void (APIENTRYP PFNGLDRAWBUFFERPROC)(GLenum buf); -GLAPI PFNGLDRAWBUFFERPROC glad_glDrawBuffer; -#define glDrawBuffer glad_glDrawBuffer -typedef void (APIENTRYP PFNGLCLEARPROC)(GLbitfield mask); -GLAPI PFNGLCLEARPROC glad_glClear; -#define glClear glad_glClear -typedef void (APIENTRYP PFNGLCLEARCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GLAPI PFNGLCLEARCOLORPROC glad_glClearColor; -#define glClearColor glad_glClearColor -typedef void (APIENTRYP PFNGLCLEARSTENCILPROC)(GLint s); -GLAPI PFNGLCLEARSTENCILPROC glad_glClearStencil; -#define glClearStencil glad_glClearStencil -typedef void (APIENTRYP PFNGLCLEARDEPTHPROC)(GLdouble depth); -GLAPI PFNGLCLEARDEPTHPROC glad_glClearDepth; -#define glClearDepth glad_glClearDepth -typedef void (APIENTRYP PFNGLSTENCILMASKPROC)(GLuint mask); -GLAPI PFNGLSTENCILMASKPROC glad_glStencilMask; -#define glStencilMask glad_glStencilMask -typedef void (APIENTRYP PFNGLCOLORMASKPROC)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -GLAPI PFNGLCOLORMASKPROC glad_glColorMask; -#define glColorMask glad_glColorMask -typedef void (APIENTRYP PFNGLDEPTHMASKPROC)(GLboolean flag); -GLAPI PFNGLDEPTHMASKPROC glad_glDepthMask; -#define glDepthMask glad_glDepthMask -typedef void (APIENTRYP PFNGLDISABLEPROC)(GLenum cap); -GLAPI PFNGLDISABLEPROC glad_glDisable; -#define glDisable glad_glDisable -typedef void (APIENTRYP PFNGLENABLEPROC)(GLenum cap); -GLAPI PFNGLENABLEPROC glad_glEnable; -#define glEnable glad_glEnable -typedef void (APIENTRYP PFNGLFINISHPROC)(void); -GLAPI PFNGLFINISHPROC glad_glFinish; -#define glFinish glad_glFinish -typedef void (APIENTRYP PFNGLFLUSHPROC)(void); -GLAPI PFNGLFLUSHPROC glad_glFlush; -#define glFlush glad_glFlush -typedef void (APIENTRYP PFNGLBLENDFUNCPROC)(GLenum sfactor, GLenum dfactor); -GLAPI PFNGLBLENDFUNCPROC glad_glBlendFunc; -#define glBlendFunc glad_glBlendFunc -typedef void (APIENTRYP PFNGLLOGICOPPROC)(GLenum opcode); -GLAPI PFNGLLOGICOPPROC glad_glLogicOp; -#define glLogicOp glad_glLogicOp -typedef void (APIENTRYP PFNGLSTENCILFUNCPROC)(GLenum func, GLint ref, GLuint mask); -GLAPI PFNGLSTENCILFUNCPROC glad_glStencilFunc; -#define glStencilFunc glad_glStencilFunc -typedef void (APIENTRYP PFNGLSTENCILOPPROC)(GLenum fail, GLenum zfail, GLenum zpass); -GLAPI PFNGLSTENCILOPPROC glad_glStencilOp; -#define glStencilOp glad_glStencilOp -typedef void (APIENTRYP PFNGLDEPTHFUNCPROC)(GLenum func); -GLAPI PFNGLDEPTHFUNCPROC glad_glDepthFunc; -#define glDepthFunc glad_glDepthFunc -typedef void (APIENTRYP PFNGLPIXELSTOREFPROC)(GLenum pname, GLfloat param); -GLAPI PFNGLPIXELSTOREFPROC glad_glPixelStoref; -#define glPixelStoref glad_glPixelStoref -typedef void (APIENTRYP PFNGLPIXELSTOREIPROC)(GLenum pname, GLint param); -GLAPI PFNGLPIXELSTOREIPROC glad_glPixelStorei; -#define glPixelStorei glad_glPixelStorei -typedef void (APIENTRYP PFNGLREADBUFFERPROC)(GLenum src); -GLAPI PFNGLREADBUFFERPROC glad_glReadBuffer; -#define glReadBuffer glad_glReadBuffer -typedef void (APIENTRYP PFNGLREADPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); -GLAPI PFNGLREADPIXELSPROC glad_glReadPixels; -#define glReadPixels glad_glReadPixels -typedef void (APIENTRYP PFNGLGETBOOLEANVPROC)(GLenum pname, GLboolean *data); -GLAPI PFNGLGETBOOLEANVPROC glad_glGetBooleanv; -#define glGetBooleanv glad_glGetBooleanv -typedef void (APIENTRYP PFNGLGETDOUBLEVPROC)(GLenum pname, GLdouble *data); -GLAPI PFNGLGETDOUBLEVPROC glad_glGetDoublev; -#define glGetDoublev glad_glGetDoublev -typedef GLenum (APIENTRYP PFNGLGETERRORPROC)(void); -GLAPI PFNGLGETERRORPROC glad_glGetError; -#define glGetError glad_glGetError -typedef void (APIENTRYP PFNGLGETFLOATVPROC)(GLenum pname, GLfloat *data); -GLAPI PFNGLGETFLOATVPROC glad_glGetFloatv; -#define glGetFloatv glad_glGetFloatv -typedef void (APIENTRYP PFNGLGETINTEGERVPROC)(GLenum pname, GLint *data); -GLAPI PFNGLGETINTEGERVPROC glad_glGetIntegerv; -#define glGetIntegerv glad_glGetIntegerv -typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGPROC)(GLenum name); -GLAPI PFNGLGETSTRINGPROC glad_glGetString; -#define glGetString glad_glGetString -typedef void (APIENTRYP PFNGLGETTEXIMAGEPROC)(GLenum target, GLint level, GLenum format, GLenum type, void *pixels); -GLAPI PFNGLGETTEXIMAGEPROC glad_glGetTexImage; -#define glGetTexImage glad_glGetTexImage -typedef void (APIENTRYP PFNGLGETTEXPARAMETERFVPROC)(GLenum target, GLenum pname, GLfloat *params); -GLAPI PFNGLGETTEXPARAMETERFVPROC glad_glGetTexParameterfv; -#define glGetTexParameterfv glad_glGetTexParameterfv -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIVPROC)(GLenum target, GLenum pname, GLint *params); -GLAPI PFNGLGETTEXPARAMETERIVPROC glad_glGetTexParameteriv; -#define glGetTexParameteriv glad_glGetTexParameteriv -typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERFVPROC)(GLenum target, GLint level, GLenum pname, GLfloat *params); -GLAPI PFNGLGETTEXLEVELPARAMETERFVPROC glad_glGetTexLevelParameterfv; -#define glGetTexLevelParameterfv glad_glGetTexLevelParameterfv -typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERIVPROC)(GLenum target, GLint level, GLenum pname, GLint *params); -GLAPI PFNGLGETTEXLEVELPARAMETERIVPROC glad_glGetTexLevelParameteriv; -#define glGetTexLevelParameteriv glad_glGetTexLevelParameteriv -typedef GLboolean (APIENTRYP PFNGLISENABLEDPROC)(GLenum cap); -GLAPI PFNGLISENABLEDPROC glad_glIsEnabled; -#define glIsEnabled glad_glIsEnabled -typedef void (APIENTRYP PFNGLDEPTHRANGEPROC)(GLdouble n, GLdouble f); -GLAPI PFNGLDEPTHRANGEPROC glad_glDepthRange; -#define glDepthRange glad_glDepthRange -typedef void (APIENTRYP PFNGLVIEWPORTPROC)(GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI PFNGLVIEWPORTPROC glad_glViewport; -#define glViewport glad_glViewport -#endif -#ifndef GL_VERSION_1_1 -#define GL_VERSION_1_1 1 -GLAPI int GLAD_GL_VERSION_1_1; -typedef void (APIENTRYP PFNGLDRAWARRAYSPROC)(GLenum mode, GLint first, GLsizei count); -GLAPI PFNGLDRAWARRAYSPROC glad_glDrawArrays; -#define glDrawArrays glad_glDrawArrays -typedef void (APIENTRYP PFNGLDRAWELEMENTSPROC)(GLenum mode, GLsizei count, GLenum type, const void *indices); -GLAPI PFNGLDRAWELEMENTSPROC glad_glDrawElements; -#define glDrawElements glad_glDrawElements -typedef void (APIENTRYP PFNGLPOLYGONOFFSETPROC)(GLfloat factor, GLfloat units); -GLAPI PFNGLPOLYGONOFFSETPROC glad_glPolygonOffset; -#define glPolygonOffset glad_glPolygonOffset -typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DPROC)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -GLAPI PFNGLCOPYTEXIMAGE1DPROC glad_glCopyTexImage1D; -#define glCopyTexImage1D glad_glCopyTexImage1D -typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DPROC)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GLAPI PFNGLCOPYTEXIMAGE2DPROC glad_glCopyTexImage2D; -#define glCopyTexImage2D glad_glCopyTexImage2D -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -GLAPI PFNGLCOPYTEXSUBIMAGE1DPROC glad_glCopyTexSubImage1D; -#define glCopyTexSubImage1D glad_glCopyTexSubImage1D -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI PFNGLCOPYTEXSUBIMAGE2DPROC glad_glCopyTexSubImage2D; -#define glCopyTexSubImage2D glad_glCopyTexSubImage2D -typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); -GLAPI PFNGLTEXSUBIMAGE1DPROC glad_glTexSubImage1D; -#define glTexSubImage1D glad_glTexSubImage1D -typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -GLAPI PFNGLTEXSUBIMAGE2DPROC glad_glTexSubImage2D; -#define glTexSubImage2D glad_glTexSubImage2D -typedef void (APIENTRYP PFNGLBINDTEXTUREPROC)(GLenum target, GLuint texture); -GLAPI PFNGLBINDTEXTUREPROC glad_glBindTexture; -#define glBindTexture glad_glBindTexture -typedef void (APIENTRYP PFNGLDELETETEXTURESPROC)(GLsizei n, const GLuint *textures); -GLAPI PFNGLDELETETEXTURESPROC glad_glDeleteTextures; -#define glDeleteTextures glad_glDeleteTextures -typedef void (APIENTRYP PFNGLGENTEXTURESPROC)(GLsizei n, GLuint *textures); -GLAPI PFNGLGENTEXTURESPROC glad_glGenTextures; -#define glGenTextures glad_glGenTextures -typedef GLboolean (APIENTRYP PFNGLISTEXTUREPROC)(GLuint texture); -GLAPI PFNGLISTEXTUREPROC glad_glIsTexture; -#define glIsTexture glad_glIsTexture -#endif -#ifndef GL_VERSION_1_2 -#define GL_VERSION_1_2 1 -GLAPI int GLAD_GL_VERSION_1_2; -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); -GLAPI PFNGLDRAWRANGEELEMENTSPROC glad_glDrawRangeElements; -#define glDrawRangeElements glad_glDrawRangeElements -typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -GLAPI PFNGLTEXIMAGE3DPROC glad_glTexImage3D; -#define glTexImage3D glad_glTexImage3D -typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -GLAPI PFNGLTEXSUBIMAGE3DPROC glad_glTexSubImage3D; -#define glTexSubImage3D glad_glTexSubImage3D -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI PFNGLCOPYTEXSUBIMAGE3DPROC glad_glCopyTexSubImage3D; -#define glCopyTexSubImage3D glad_glCopyTexSubImage3D -#endif -#ifndef GL_VERSION_1_3 -#define GL_VERSION_1_3 1 -GLAPI int GLAD_GL_VERSION_1_3; -typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC)(GLenum texture); -GLAPI PFNGLACTIVETEXTUREPROC glad_glActiveTexture; -#define glActiveTexture glad_glActiveTexture -typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC)(GLfloat value, GLboolean invert); -GLAPI PFNGLSAMPLECOVERAGEPROC glad_glSampleCoverage; -#define glSampleCoverage glad_glSampleCoverage -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); -GLAPI PFNGLCOMPRESSEDTEXIMAGE3DPROC glad_glCompressedTexImage3D; -#define glCompressedTexImage3D glad_glCompressedTexImage3D -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); -GLAPI PFNGLCOMPRESSEDTEXIMAGE2DPROC glad_glCompressedTexImage2D; -#define glCompressedTexImage2D glad_glCompressedTexImage2D -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data); -GLAPI PFNGLCOMPRESSEDTEXIMAGE1DPROC glad_glCompressedTexImage1D; -#define glCompressedTexImage1D glad_glCompressedTexImage1D -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -GLAPI PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glad_glCompressedTexSubImage3D; -#define glCompressedTexSubImage3D glad_glCompressedTexSubImage3D -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); -GLAPI PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glad_glCompressedTexSubImage2D; -#define glCompressedTexSubImage2D glad_glCompressedTexSubImage2D -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); -GLAPI PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glad_glCompressedTexSubImage1D; -#define glCompressedTexSubImage1D glad_glCompressedTexSubImage1D -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC)(GLenum target, GLint level, void *img); -GLAPI PFNGLGETCOMPRESSEDTEXIMAGEPROC glad_glGetCompressedTexImage; -#define glGetCompressedTexImage glad_glGetCompressedTexImage -#endif -#ifndef GL_VERSION_1_4 -#define GL_VERSION_1_4 1 -GLAPI int GLAD_GL_VERSION_1_4; -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -GLAPI PFNGLBLENDFUNCSEPARATEPROC glad_glBlendFuncSeparate; -#define glBlendFuncSeparate glad_glBlendFuncSeparate -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC)(GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount); -GLAPI PFNGLMULTIDRAWARRAYSPROC glad_glMultiDrawArrays; -#define glMultiDrawArrays glad_glMultiDrawArrays -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC)(GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount); -GLAPI PFNGLMULTIDRAWELEMENTSPROC glad_glMultiDrawElements; -#define glMultiDrawElements glad_glMultiDrawElements -typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC)(GLenum pname, GLfloat param); -GLAPI PFNGLPOINTPARAMETERFPROC glad_glPointParameterf; -#define glPointParameterf glad_glPointParameterf -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC)(GLenum pname, const GLfloat *params); -GLAPI PFNGLPOINTPARAMETERFVPROC glad_glPointParameterfv; -#define glPointParameterfv glad_glPointParameterfv -typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC)(GLenum pname, GLint param); -GLAPI PFNGLPOINTPARAMETERIPROC glad_glPointParameteri; -#define glPointParameteri glad_glPointParameteri -typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC)(GLenum pname, const GLint *params); -GLAPI PFNGLPOINTPARAMETERIVPROC glad_glPointParameteriv; -#define glPointParameteriv glad_glPointParameteriv -typedef void (APIENTRYP PFNGLBLENDCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GLAPI PFNGLBLENDCOLORPROC glad_glBlendColor; -#define glBlendColor glad_glBlendColor -typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC)(GLenum mode); -GLAPI PFNGLBLENDEQUATIONPROC glad_glBlendEquation; -#define glBlendEquation glad_glBlendEquation -#endif -#ifndef GL_VERSION_1_5 -#define GL_VERSION_1_5 1 -GLAPI int GLAD_GL_VERSION_1_5; -typedef void (APIENTRYP PFNGLGENQUERIESPROC)(GLsizei n, GLuint *ids); -GLAPI PFNGLGENQUERIESPROC glad_glGenQueries; -#define glGenQueries glad_glGenQueries -typedef void (APIENTRYP PFNGLDELETEQUERIESPROC)(GLsizei n, const GLuint *ids); -GLAPI PFNGLDELETEQUERIESPROC glad_glDeleteQueries; -#define glDeleteQueries glad_glDeleteQueries -typedef GLboolean (APIENTRYP PFNGLISQUERYPROC)(GLuint id); -GLAPI PFNGLISQUERYPROC glad_glIsQuery; -#define glIsQuery glad_glIsQuery -typedef void (APIENTRYP PFNGLBEGINQUERYPROC)(GLenum target, GLuint id); -GLAPI PFNGLBEGINQUERYPROC glad_glBeginQuery; -#define glBeginQuery glad_glBeginQuery -typedef void (APIENTRYP PFNGLENDQUERYPROC)(GLenum target); -GLAPI PFNGLENDQUERYPROC glad_glEndQuery; -#define glEndQuery glad_glEndQuery -typedef void (APIENTRYP PFNGLGETQUERYIVPROC)(GLenum target, GLenum pname, GLint *params); -GLAPI PFNGLGETQUERYIVPROC glad_glGetQueryiv; -#define glGetQueryiv glad_glGetQueryiv -typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC)(GLuint id, GLenum pname, GLint *params); -GLAPI PFNGLGETQUERYOBJECTIVPROC glad_glGetQueryObjectiv; -#define glGetQueryObjectiv glad_glGetQueryObjectiv -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC)(GLuint id, GLenum pname, GLuint *params); -GLAPI PFNGLGETQUERYOBJECTUIVPROC glad_glGetQueryObjectuiv; -#define glGetQueryObjectuiv glad_glGetQueryObjectuiv -typedef void (APIENTRYP PFNGLBINDBUFFERPROC)(GLenum target, GLuint buffer); -GLAPI PFNGLBINDBUFFERPROC glad_glBindBuffer; -#define glBindBuffer glad_glBindBuffer -typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC)(GLsizei n, const GLuint *buffers); -GLAPI PFNGLDELETEBUFFERSPROC glad_glDeleteBuffers; -#define glDeleteBuffers glad_glDeleteBuffers -typedef void (APIENTRYP PFNGLGENBUFFERSPROC)(GLsizei n, GLuint *buffers); -GLAPI PFNGLGENBUFFERSPROC glad_glGenBuffers; -#define glGenBuffers glad_glGenBuffers -typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC)(GLuint buffer); -GLAPI PFNGLISBUFFERPROC glad_glIsBuffer; -#define glIsBuffer glad_glIsBuffer -typedef void (APIENTRYP PFNGLBUFFERDATAPROC)(GLenum target, GLsizeiptr size, const void *data, GLenum usage); -GLAPI PFNGLBUFFERDATAPROC glad_glBufferData; -#define glBufferData glad_glBufferData -typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, GLsizeiptr size, const void *data); -GLAPI PFNGLBUFFERSUBDATAPROC glad_glBufferSubData; -#define glBufferSubData glad_glBufferSubData -typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, GLsizeiptr size, void *data); -GLAPI PFNGLGETBUFFERSUBDATAPROC glad_glGetBufferSubData; -#define glGetBufferSubData glad_glGetBufferSubData -typedef void * (APIENTRYP PFNGLMAPBUFFERPROC)(GLenum target, GLenum access); -GLAPI PFNGLMAPBUFFERPROC glad_glMapBuffer; -#define glMapBuffer glad_glMapBuffer -typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC)(GLenum target); -GLAPI PFNGLUNMAPBUFFERPROC glad_glUnmapBuffer; -#define glUnmapBuffer glad_glUnmapBuffer -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint *params); -GLAPI PFNGLGETBUFFERPARAMETERIVPROC glad_glGetBufferParameteriv; -#define glGetBufferParameteriv glad_glGetBufferParameteriv -typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC)(GLenum target, GLenum pname, void **params); -GLAPI PFNGLGETBUFFERPOINTERVPROC glad_glGetBufferPointerv; -#define glGetBufferPointerv glad_glGetBufferPointerv -#endif -#ifndef GL_VERSION_2_0 -#define GL_VERSION_2_0 1 -GLAPI int GLAD_GL_VERSION_2_0; -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC)(GLenum modeRGB, GLenum modeAlpha); -GLAPI PFNGLBLENDEQUATIONSEPARATEPROC glad_glBlendEquationSeparate; -#define glBlendEquationSeparate glad_glBlendEquationSeparate -typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC)(GLsizei n, const GLenum *bufs); -GLAPI PFNGLDRAWBUFFERSPROC glad_glDrawBuffers; -#define glDrawBuffers glad_glDrawBuffers -typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC)(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -GLAPI PFNGLSTENCILOPSEPARATEPROC glad_glStencilOpSeparate; -#define glStencilOpSeparate glad_glStencilOpSeparate -typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC)(GLenum face, GLenum func, GLint ref, GLuint mask); -GLAPI PFNGLSTENCILFUNCSEPARATEPROC glad_glStencilFuncSeparate; -#define glStencilFuncSeparate glad_glStencilFuncSeparate -typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC)(GLenum face, GLuint mask); -GLAPI PFNGLSTENCILMASKSEPARATEPROC glad_glStencilMaskSeparate; -#define glStencilMaskSeparate glad_glStencilMaskSeparate -typedef void (APIENTRYP PFNGLATTACHSHADERPROC)(GLuint program, GLuint shader); -GLAPI PFNGLATTACHSHADERPROC glad_glAttachShader; -#define glAttachShader glad_glAttachShader -typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC)(GLuint program, GLuint index, const GLchar *name); -GLAPI PFNGLBINDATTRIBLOCATIONPROC glad_glBindAttribLocation; -#define glBindAttribLocation glad_glBindAttribLocation -typedef void (APIENTRYP PFNGLCOMPILESHADERPROC)(GLuint shader); -GLAPI PFNGLCOMPILESHADERPROC glad_glCompileShader; -#define glCompileShader glad_glCompileShader -typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC)(void); -GLAPI PFNGLCREATEPROGRAMPROC glad_glCreateProgram; -#define glCreateProgram glad_glCreateProgram -typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC)(GLenum type); -GLAPI PFNGLCREATESHADERPROC glad_glCreateShader; -#define glCreateShader glad_glCreateShader -typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC)(GLuint program); -GLAPI PFNGLDELETEPROGRAMPROC glad_glDeleteProgram; -#define glDeleteProgram glad_glDeleteProgram -typedef void (APIENTRYP PFNGLDELETESHADERPROC)(GLuint shader); -GLAPI PFNGLDELETESHADERPROC glad_glDeleteShader; -#define glDeleteShader glad_glDeleteShader -typedef void (APIENTRYP PFNGLDETACHSHADERPROC)(GLuint program, GLuint shader); -GLAPI PFNGLDETACHSHADERPROC glad_glDetachShader; -#define glDetachShader glad_glDetachShader -typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC)(GLuint index); -GLAPI PFNGLDISABLEVERTEXATTRIBARRAYPROC glad_glDisableVertexAttribArray; -#define glDisableVertexAttribArray glad_glDisableVertexAttribArray -typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC)(GLuint index); -GLAPI PFNGLENABLEVERTEXATTRIBARRAYPROC glad_glEnableVertexAttribArray; -#define glEnableVertexAttribArray glad_glEnableVertexAttribArray -typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GLAPI PFNGLGETACTIVEATTRIBPROC glad_glGetActiveAttrib; -#define glGetActiveAttrib glad_glGetActiveAttrib -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GLAPI PFNGLGETACTIVEUNIFORMPROC glad_glGetActiveUniform; -#define glGetActiveUniform glad_glGetActiveUniform -typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC)(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); -GLAPI PFNGLGETATTACHEDSHADERSPROC glad_glGetAttachedShaders; -#define glGetAttachedShaders glad_glGetAttachedShaders -typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC)(GLuint program, const GLchar *name); -GLAPI PFNGLGETATTRIBLOCATIONPROC glad_glGetAttribLocation; -#define glGetAttribLocation glad_glGetAttribLocation -typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC)(GLuint program, GLenum pname, GLint *params); -GLAPI PFNGLGETPROGRAMIVPROC glad_glGetProgramiv; -#define glGetProgramiv glad_glGetProgramiv -typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC)(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GLAPI PFNGLGETPROGRAMINFOLOGPROC glad_glGetProgramInfoLog; -#define glGetProgramInfoLog glad_glGetProgramInfoLog -typedef void (APIENTRYP PFNGLGETSHADERIVPROC)(GLuint shader, GLenum pname, GLint *params); -GLAPI PFNGLGETSHADERIVPROC glad_glGetShaderiv; -#define glGetShaderiv glad_glGetShaderiv -typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GLAPI PFNGLGETSHADERINFOLOGPROC glad_glGetShaderInfoLog; -#define glGetShaderInfoLog glad_glGetShaderInfoLog -typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); -GLAPI PFNGLGETSHADERSOURCEPROC glad_glGetShaderSource; -#define glGetShaderSource glad_glGetShaderSource -typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC)(GLuint program, const GLchar *name); -GLAPI PFNGLGETUNIFORMLOCATIONPROC glad_glGetUniformLocation; -#define glGetUniformLocation glad_glGetUniformLocation -typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC)(GLuint program, GLint location, GLfloat *params); -GLAPI PFNGLGETUNIFORMFVPROC glad_glGetUniformfv; -#define glGetUniformfv glad_glGetUniformfv -typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC)(GLuint program, GLint location, GLint *params); -GLAPI PFNGLGETUNIFORMIVPROC glad_glGetUniformiv; -#define glGetUniformiv glad_glGetUniformiv -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC)(GLuint index, GLenum pname, GLdouble *params); -GLAPI PFNGLGETVERTEXATTRIBDVPROC glad_glGetVertexAttribdv; -#define glGetVertexAttribdv glad_glGetVertexAttribdv -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC)(GLuint index, GLenum pname, GLfloat *params); -GLAPI PFNGLGETVERTEXATTRIBFVPROC glad_glGetVertexAttribfv; -#define glGetVertexAttribfv glad_glGetVertexAttribfv -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC)(GLuint index, GLenum pname, GLint *params); -GLAPI PFNGLGETVERTEXATTRIBIVPROC glad_glGetVertexAttribiv; -#define glGetVertexAttribiv glad_glGetVertexAttribiv -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC)(GLuint index, GLenum pname, void **pointer); -GLAPI PFNGLGETVERTEXATTRIBPOINTERVPROC glad_glGetVertexAttribPointerv; -#define glGetVertexAttribPointerv glad_glGetVertexAttribPointerv -typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC)(GLuint program); -GLAPI PFNGLISPROGRAMPROC glad_glIsProgram; -#define glIsProgram glad_glIsProgram -typedef GLboolean (APIENTRYP PFNGLISSHADERPROC)(GLuint shader); -GLAPI PFNGLISSHADERPROC glad_glIsShader; -#define glIsShader glad_glIsShader -typedef void (APIENTRYP PFNGLLINKPROGRAMPROC)(GLuint program); -GLAPI PFNGLLINKPROGRAMPROC glad_glLinkProgram; -#define glLinkProgram glad_glLinkProgram -typedef void (APIENTRYP PFNGLSHADERSOURCEPROC)(GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); -GLAPI PFNGLSHADERSOURCEPROC glad_glShaderSource; -#define glShaderSource glad_glShaderSource -typedef void (APIENTRYP PFNGLUSEPROGRAMPROC)(GLuint program); -GLAPI PFNGLUSEPROGRAMPROC glad_glUseProgram; -#define glUseProgram glad_glUseProgram -typedef void (APIENTRYP PFNGLUNIFORM1FPROC)(GLint location, GLfloat v0); -GLAPI PFNGLUNIFORM1FPROC glad_glUniform1f; -#define glUniform1f glad_glUniform1f -typedef void (APIENTRYP PFNGLUNIFORM2FPROC)(GLint location, GLfloat v0, GLfloat v1); -GLAPI PFNGLUNIFORM2FPROC glad_glUniform2f; -#define glUniform2f glad_glUniform2f -typedef void (APIENTRYP PFNGLUNIFORM3FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI PFNGLUNIFORM3FPROC glad_glUniform3f; -#define glUniform3f glad_glUniform3f -typedef void (APIENTRYP PFNGLUNIFORM4FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI PFNGLUNIFORM4FPROC glad_glUniform4f; -#define glUniform4f glad_glUniform4f -typedef void (APIENTRYP PFNGLUNIFORM1IPROC)(GLint location, GLint v0); -GLAPI PFNGLUNIFORM1IPROC glad_glUniform1i; -#define glUniform1i glad_glUniform1i -typedef void (APIENTRYP PFNGLUNIFORM2IPROC)(GLint location, GLint v0, GLint v1); -GLAPI PFNGLUNIFORM2IPROC glad_glUniform2i; -#define glUniform2i glad_glUniform2i -typedef void (APIENTRYP PFNGLUNIFORM3IPROC)(GLint location, GLint v0, GLint v1, GLint v2); -GLAPI PFNGLUNIFORM3IPROC glad_glUniform3i; -#define glUniform3i glad_glUniform3i -typedef void (APIENTRYP PFNGLUNIFORM4IPROC)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI PFNGLUNIFORM4IPROC glad_glUniform4i; -#define glUniform4i glad_glUniform4i -typedef void (APIENTRYP PFNGLUNIFORM1FVPROC)(GLint location, GLsizei count, const GLfloat *value); -GLAPI PFNGLUNIFORM1FVPROC glad_glUniform1fv; -#define glUniform1fv glad_glUniform1fv -typedef void (APIENTRYP PFNGLUNIFORM2FVPROC)(GLint location, GLsizei count, const GLfloat *value); -GLAPI PFNGLUNIFORM2FVPROC glad_glUniform2fv; -#define glUniform2fv glad_glUniform2fv -typedef void (APIENTRYP PFNGLUNIFORM3FVPROC)(GLint location, GLsizei count, const GLfloat *value); -GLAPI PFNGLUNIFORM3FVPROC glad_glUniform3fv; -#define glUniform3fv glad_glUniform3fv -typedef void (APIENTRYP PFNGLUNIFORM4FVPROC)(GLint location, GLsizei count, const GLfloat *value); -GLAPI PFNGLUNIFORM4FVPROC glad_glUniform4fv; -#define glUniform4fv glad_glUniform4fv -typedef void (APIENTRYP PFNGLUNIFORM1IVPROC)(GLint location, GLsizei count, const GLint *value); -GLAPI PFNGLUNIFORM1IVPROC glad_glUniform1iv; -#define glUniform1iv glad_glUniform1iv -typedef void (APIENTRYP PFNGLUNIFORM2IVPROC)(GLint location, GLsizei count, const GLint *value); -GLAPI PFNGLUNIFORM2IVPROC glad_glUniform2iv; -#define glUniform2iv glad_glUniform2iv -typedef void (APIENTRYP PFNGLUNIFORM3IVPROC)(GLint location, GLsizei count, const GLint *value); -GLAPI PFNGLUNIFORM3IVPROC glad_glUniform3iv; -#define glUniform3iv glad_glUniform3iv -typedef void (APIENTRYP PFNGLUNIFORM4IVPROC)(GLint location, GLsizei count, const GLint *value); -GLAPI PFNGLUNIFORM4IVPROC glad_glUniform4iv; -#define glUniform4iv glad_glUniform4iv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLUNIFORMMATRIX2FVPROC glad_glUniformMatrix2fv; -#define glUniformMatrix2fv glad_glUniformMatrix2fv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLUNIFORMMATRIX3FVPROC glad_glUniformMatrix3fv; -#define glUniformMatrix3fv glad_glUniformMatrix3fv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLUNIFORMMATRIX4FVPROC glad_glUniformMatrix4fv; -#define glUniformMatrix4fv glad_glUniformMatrix4fv -typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC)(GLuint program); -GLAPI PFNGLVALIDATEPROGRAMPROC glad_glValidateProgram; -#define glValidateProgram glad_glValidateProgram -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC)(GLuint index, GLdouble x); -GLAPI PFNGLVERTEXATTRIB1DPROC glad_glVertexAttrib1d; -#define glVertexAttrib1d glad_glVertexAttrib1d -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC)(GLuint index, const GLdouble *v); -GLAPI PFNGLVERTEXATTRIB1DVPROC glad_glVertexAttrib1dv; -#define glVertexAttrib1dv glad_glVertexAttrib1dv -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC)(GLuint index, GLfloat x); -GLAPI PFNGLVERTEXATTRIB1FPROC glad_glVertexAttrib1f; -#define glVertexAttrib1f glad_glVertexAttrib1f -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC)(GLuint index, const GLfloat *v); -GLAPI PFNGLVERTEXATTRIB1FVPROC glad_glVertexAttrib1fv; -#define glVertexAttrib1fv glad_glVertexAttrib1fv -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC)(GLuint index, GLshort x); -GLAPI PFNGLVERTEXATTRIB1SPROC glad_glVertexAttrib1s; -#define glVertexAttrib1s glad_glVertexAttrib1s -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC)(GLuint index, const GLshort *v); -GLAPI PFNGLVERTEXATTRIB1SVPROC glad_glVertexAttrib1sv; -#define glVertexAttrib1sv glad_glVertexAttrib1sv -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC)(GLuint index, GLdouble x, GLdouble y); -GLAPI PFNGLVERTEXATTRIB2DPROC glad_glVertexAttrib2d; -#define glVertexAttrib2d glad_glVertexAttrib2d -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC)(GLuint index, const GLdouble *v); -GLAPI PFNGLVERTEXATTRIB2DVPROC glad_glVertexAttrib2dv; -#define glVertexAttrib2dv glad_glVertexAttrib2dv -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC)(GLuint index, GLfloat x, GLfloat y); -GLAPI PFNGLVERTEXATTRIB2FPROC glad_glVertexAttrib2f; -#define glVertexAttrib2f glad_glVertexAttrib2f -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC)(GLuint index, const GLfloat *v); -GLAPI PFNGLVERTEXATTRIB2FVPROC glad_glVertexAttrib2fv; -#define glVertexAttrib2fv glad_glVertexAttrib2fv -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC)(GLuint index, GLshort x, GLshort y); -GLAPI PFNGLVERTEXATTRIB2SPROC glad_glVertexAttrib2s; -#define glVertexAttrib2s glad_glVertexAttrib2s -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC)(GLuint index, const GLshort *v); -GLAPI PFNGLVERTEXATTRIB2SVPROC glad_glVertexAttrib2sv; -#define glVertexAttrib2sv glad_glVertexAttrib2sv -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI PFNGLVERTEXATTRIB3DPROC glad_glVertexAttrib3d; -#define glVertexAttrib3d glad_glVertexAttrib3d -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC)(GLuint index, const GLdouble *v); -GLAPI PFNGLVERTEXATTRIB3DVPROC glad_glVertexAttrib3dv; -#define glVertexAttrib3dv glad_glVertexAttrib3dv -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z); -GLAPI PFNGLVERTEXATTRIB3FPROC glad_glVertexAttrib3f; -#define glVertexAttrib3f glad_glVertexAttrib3f -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC)(GLuint index, const GLfloat *v); -GLAPI PFNGLVERTEXATTRIB3FVPROC glad_glVertexAttrib3fv; -#define glVertexAttrib3fv glad_glVertexAttrib3fv -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC)(GLuint index, GLshort x, GLshort y, GLshort z); -GLAPI PFNGLVERTEXATTRIB3SPROC glad_glVertexAttrib3s; -#define glVertexAttrib3s glad_glVertexAttrib3s -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC)(GLuint index, const GLshort *v); -GLAPI PFNGLVERTEXATTRIB3SVPROC glad_glVertexAttrib3sv; -#define glVertexAttrib3sv glad_glVertexAttrib3sv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC)(GLuint index, const GLbyte *v); -GLAPI PFNGLVERTEXATTRIB4NBVPROC glad_glVertexAttrib4Nbv; -#define glVertexAttrib4Nbv glad_glVertexAttrib4Nbv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC)(GLuint index, const GLint *v); -GLAPI PFNGLVERTEXATTRIB4NIVPROC glad_glVertexAttrib4Niv; -#define glVertexAttrib4Niv glad_glVertexAttrib4Niv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC)(GLuint index, const GLshort *v); -GLAPI PFNGLVERTEXATTRIB4NSVPROC glad_glVertexAttrib4Nsv; -#define glVertexAttrib4Nsv glad_glVertexAttrib4Nsv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -GLAPI PFNGLVERTEXATTRIB4NUBPROC glad_glVertexAttrib4Nub; -#define glVertexAttrib4Nub glad_glVertexAttrib4Nub -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC)(GLuint index, const GLubyte *v); -GLAPI PFNGLVERTEXATTRIB4NUBVPROC glad_glVertexAttrib4Nubv; -#define glVertexAttrib4Nubv glad_glVertexAttrib4Nubv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC)(GLuint index, const GLuint *v); -GLAPI PFNGLVERTEXATTRIB4NUIVPROC glad_glVertexAttrib4Nuiv; -#define glVertexAttrib4Nuiv glad_glVertexAttrib4Nuiv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC)(GLuint index, const GLushort *v); -GLAPI PFNGLVERTEXATTRIB4NUSVPROC glad_glVertexAttrib4Nusv; -#define glVertexAttrib4Nusv glad_glVertexAttrib4Nusv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC)(GLuint index, const GLbyte *v); -GLAPI PFNGLVERTEXATTRIB4BVPROC glad_glVertexAttrib4bv; -#define glVertexAttrib4bv glad_glVertexAttrib4bv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI PFNGLVERTEXATTRIB4DPROC glad_glVertexAttrib4d; -#define glVertexAttrib4d glad_glVertexAttrib4d -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC)(GLuint index, const GLdouble *v); -GLAPI PFNGLVERTEXATTRIB4DVPROC glad_glVertexAttrib4dv; -#define glVertexAttrib4dv glad_glVertexAttrib4dv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI PFNGLVERTEXATTRIB4FPROC glad_glVertexAttrib4f; -#define glVertexAttrib4f glad_glVertexAttrib4f -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC)(GLuint index, const GLfloat *v); -GLAPI PFNGLVERTEXATTRIB4FVPROC glad_glVertexAttrib4fv; -#define glVertexAttrib4fv glad_glVertexAttrib4fv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC)(GLuint index, const GLint *v); -GLAPI PFNGLVERTEXATTRIB4IVPROC glad_glVertexAttrib4iv; -#define glVertexAttrib4iv glad_glVertexAttrib4iv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI PFNGLVERTEXATTRIB4SPROC glad_glVertexAttrib4s; -#define glVertexAttrib4s glad_glVertexAttrib4s -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC)(GLuint index, const GLshort *v); -GLAPI PFNGLVERTEXATTRIB4SVPROC glad_glVertexAttrib4sv; -#define glVertexAttrib4sv glad_glVertexAttrib4sv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC)(GLuint index, const GLubyte *v); -GLAPI PFNGLVERTEXATTRIB4UBVPROC glad_glVertexAttrib4ubv; -#define glVertexAttrib4ubv glad_glVertexAttrib4ubv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC)(GLuint index, const GLuint *v); -GLAPI PFNGLVERTEXATTRIB4UIVPROC glad_glVertexAttrib4uiv; -#define glVertexAttrib4uiv glad_glVertexAttrib4uiv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC)(GLuint index, const GLushort *v); -GLAPI PFNGLVERTEXATTRIB4USVPROC glad_glVertexAttrib4usv; -#define glVertexAttrib4usv glad_glVertexAttrib4usv -typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); -GLAPI PFNGLVERTEXATTRIBPOINTERPROC glad_glVertexAttribPointer; -#define glVertexAttribPointer glad_glVertexAttribPointer -#endif -#ifndef GL_VERSION_2_1 -#define GL_VERSION_2_1 1 -GLAPI int GLAD_GL_VERSION_2_1; -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLUNIFORMMATRIX2X3FVPROC glad_glUniformMatrix2x3fv; -#define glUniformMatrix2x3fv glad_glUniformMatrix2x3fv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLUNIFORMMATRIX3X2FVPROC glad_glUniformMatrix3x2fv; -#define glUniformMatrix3x2fv glad_glUniformMatrix3x2fv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLUNIFORMMATRIX2X4FVPROC glad_glUniformMatrix2x4fv; -#define glUniformMatrix2x4fv glad_glUniformMatrix2x4fv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLUNIFORMMATRIX4X2FVPROC glad_glUniformMatrix4x2fv; -#define glUniformMatrix4x2fv glad_glUniformMatrix4x2fv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLUNIFORMMATRIX3X4FVPROC glad_glUniformMatrix3x4fv; -#define glUniformMatrix3x4fv glad_glUniformMatrix3x4fv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLUNIFORMMATRIX4X3FVPROC glad_glUniformMatrix4x3fv; -#define glUniformMatrix4x3fv glad_glUniformMatrix4x3fv -#endif -#ifndef GL_VERSION_3_0 -#define GL_VERSION_3_0 1 -GLAPI int GLAD_GL_VERSION_3_0; -typedef void (APIENTRYP PFNGLCOLORMASKIPROC)(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -GLAPI PFNGLCOLORMASKIPROC glad_glColorMaski; -#define glColorMaski glad_glColorMaski -typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC)(GLenum target, GLuint index, GLboolean *data); -GLAPI PFNGLGETBOOLEANI_VPROC glad_glGetBooleani_v; -#define glGetBooleani_v glad_glGetBooleani_v -typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC)(GLenum target, GLuint index, GLint *data); -GLAPI PFNGLGETINTEGERI_VPROC glad_glGetIntegeri_v; -#define glGetIntegeri_v glad_glGetIntegeri_v -typedef void (APIENTRYP PFNGLENABLEIPROC)(GLenum target, GLuint index); -GLAPI PFNGLENABLEIPROC glad_glEnablei; -#define glEnablei glad_glEnablei -typedef void (APIENTRYP PFNGLDISABLEIPROC)(GLenum target, GLuint index); -GLAPI PFNGLDISABLEIPROC glad_glDisablei; -#define glDisablei glad_glDisablei -typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC)(GLenum target, GLuint index); -GLAPI PFNGLISENABLEDIPROC glad_glIsEnabledi; -#define glIsEnabledi glad_glIsEnabledi -typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC)(GLenum primitiveMode); -GLAPI PFNGLBEGINTRANSFORMFEEDBACKPROC glad_glBeginTransformFeedback; -#define glBeginTransformFeedback glad_glBeginTransformFeedback -typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC)(void); -GLAPI PFNGLENDTRANSFORMFEEDBACKPROC glad_glEndTransformFeedback; -#define glEndTransformFeedback glad_glEndTransformFeedback -typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI PFNGLBINDBUFFERRANGEPROC glad_glBindBufferRange; -#define glBindBufferRange glad_glBindBufferRange -typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC)(GLenum target, GLuint index, GLuint buffer); -GLAPI PFNGLBINDBUFFERBASEPROC glad_glBindBufferBase; -#define glBindBufferBase glad_glBindBufferBase -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC)(GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); -GLAPI PFNGLTRANSFORMFEEDBACKVARYINGSPROC glad_glTransformFeedbackVaryings; -#define glTransformFeedbackVaryings glad_glTransformFeedbackVaryings -typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -GLAPI PFNGLGETTRANSFORMFEEDBACKVARYINGPROC glad_glGetTransformFeedbackVarying; -#define glGetTransformFeedbackVarying glad_glGetTransformFeedbackVarying -typedef void (APIENTRYP PFNGLCLAMPCOLORPROC)(GLenum target, GLenum clamp); -GLAPI PFNGLCLAMPCOLORPROC glad_glClampColor; -#define glClampColor glad_glClampColor -typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC)(GLuint id, GLenum mode); -GLAPI PFNGLBEGINCONDITIONALRENDERPROC glad_glBeginConditionalRender; -#define glBeginConditionalRender glad_glBeginConditionalRender -typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC)(void); -GLAPI PFNGLENDCONDITIONALRENDERPROC glad_glEndConditionalRender; -#define glEndConditionalRender glad_glEndConditionalRender -typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC)(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); -GLAPI PFNGLVERTEXATTRIBIPOINTERPROC glad_glVertexAttribIPointer; -#define glVertexAttribIPointer glad_glVertexAttribIPointer -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC)(GLuint index, GLenum pname, GLint *params); -GLAPI PFNGLGETVERTEXATTRIBIIVPROC glad_glGetVertexAttribIiv; -#define glGetVertexAttribIiv glad_glGetVertexAttribIiv -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC)(GLuint index, GLenum pname, GLuint *params); -GLAPI PFNGLGETVERTEXATTRIBIUIVPROC glad_glGetVertexAttribIuiv; -#define glGetVertexAttribIuiv glad_glGetVertexAttribIuiv -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC)(GLuint index, GLint x); -GLAPI PFNGLVERTEXATTRIBI1IPROC glad_glVertexAttribI1i; -#define glVertexAttribI1i glad_glVertexAttribI1i -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC)(GLuint index, GLint x, GLint y); -GLAPI PFNGLVERTEXATTRIBI2IPROC glad_glVertexAttribI2i; -#define glVertexAttribI2i glad_glVertexAttribI2i -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC)(GLuint index, GLint x, GLint y, GLint z); -GLAPI PFNGLVERTEXATTRIBI3IPROC glad_glVertexAttribI3i; -#define glVertexAttribI3i glad_glVertexAttribI3i -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC)(GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI PFNGLVERTEXATTRIBI4IPROC glad_glVertexAttribI4i; -#define glVertexAttribI4i glad_glVertexAttribI4i -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC)(GLuint index, GLuint x); -GLAPI PFNGLVERTEXATTRIBI1UIPROC glad_glVertexAttribI1ui; -#define glVertexAttribI1ui glad_glVertexAttribI1ui -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC)(GLuint index, GLuint x, GLuint y); -GLAPI PFNGLVERTEXATTRIBI2UIPROC glad_glVertexAttribI2ui; -#define glVertexAttribI2ui glad_glVertexAttribI2ui -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC)(GLuint index, GLuint x, GLuint y, GLuint z); -GLAPI PFNGLVERTEXATTRIBI3UIPROC glad_glVertexAttribI3ui; -#define glVertexAttribI3ui glad_glVertexAttribI3ui -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI PFNGLVERTEXATTRIBI4UIPROC glad_glVertexAttribI4ui; -#define glVertexAttribI4ui glad_glVertexAttribI4ui -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC)(GLuint index, const GLint *v); -GLAPI PFNGLVERTEXATTRIBI1IVPROC glad_glVertexAttribI1iv; -#define glVertexAttribI1iv glad_glVertexAttribI1iv -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC)(GLuint index, const GLint *v); -GLAPI PFNGLVERTEXATTRIBI2IVPROC glad_glVertexAttribI2iv; -#define glVertexAttribI2iv glad_glVertexAttribI2iv -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC)(GLuint index, const GLint *v); -GLAPI PFNGLVERTEXATTRIBI3IVPROC glad_glVertexAttribI3iv; -#define glVertexAttribI3iv glad_glVertexAttribI3iv -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC)(GLuint index, const GLint *v); -GLAPI PFNGLVERTEXATTRIBI4IVPROC glad_glVertexAttribI4iv; -#define glVertexAttribI4iv glad_glVertexAttribI4iv -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC)(GLuint index, const GLuint *v); -GLAPI PFNGLVERTEXATTRIBI1UIVPROC glad_glVertexAttribI1uiv; -#define glVertexAttribI1uiv glad_glVertexAttribI1uiv -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC)(GLuint index, const GLuint *v); -GLAPI PFNGLVERTEXATTRIBI2UIVPROC glad_glVertexAttribI2uiv; -#define glVertexAttribI2uiv glad_glVertexAttribI2uiv -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC)(GLuint index, const GLuint *v); -GLAPI PFNGLVERTEXATTRIBI3UIVPROC glad_glVertexAttribI3uiv; -#define glVertexAttribI3uiv glad_glVertexAttribI3uiv -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC)(GLuint index, const GLuint *v); -GLAPI PFNGLVERTEXATTRIBI4UIVPROC glad_glVertexAttribI4uiv; -#define glVertexAttribI4uiv glad_glVertexAttribI4uiv -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC)(GLuint index, const GLbyte *v); -GLAPI PFNGLVERTEXATTRIBI4BVPROC glad_glVertexAttribI4bv; -#define glVertexAttribI4bv glad_glVertexAttribI4bv -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC)(GLuint index, const GLshort *v); -GLAPI PFNGLVERTEXATTRIBI4SVPROC glad_glVertexAttribI4sv; -#define glVertexAttribI4sv glad_glVertexAttribI4sv -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC)(GLuint index, const GLubyte *v); -GLAPI PFNGLVERTEXATTRIBI4UBVPROC glad_glVertexAttribI4ubv; -#define glVertexAttribI4ubv glad_glVertexAttribI4ubv -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC)(GLuint index, const GLushort *v); -GLAPI PFNGLVERTEXATTRIBI4USVPROC glad_glVertexAttribI4usv; -#define glVertexAttribI4usv glad_glVertexAttribI4usv -typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC)(GLuint program, GLint location, GLuint *params); -GLAPI PFNGLGETUNIFORMUIVPROC glad_glGetUniformuiv; -#define glGetUniformuiv glad_glGetUniformuiv -typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC)(GLuint program, GLuint color, const GLchar *name); -GLAPI PFNGLBINDFRAGDATALOCATIONPROC glad_glBindFragDataLocation; -#define glBindFragDataLocation glad_glBindFragDataLocation -typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC)(GLuint program, const GLchar *name); -GLAPI PFNGLGETFRAGDATALOCATIONPROC glad_glGetFragDataLocation; -#define glGetFragDataLocation glad_glGetFragDataLocation -typedef void (APIENTRYP PFNGLUNIFORM1UIPROC)(GLint location, GLuint v0); -GLAPI PFNGLUNIFORM1UIPROC glad_glUniform1ui; -#define glUniform1ui glad_glUniform1ui -typedef void (APIENTRYP PFNGLUNIFORM2UIPROC)(GLint location, GLuint v0, GLuint v1); -GLAPI PFNGLUNIFORM2UIPROC glad_glUniform2ui; -#define glUniform2ui glad_glUniform2ui -typedef void (APIENTRYP PFNGLUNIFORM3UIPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2); -GLAPI PFNGLUNIFORM3UIPROC glad_glUniform3ui; -#define glUniform3ui glad_glUniform3ui -typedef void (APIENTRYP PFNGLUNIFORM4UIPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GLAPI PFNGLUNIFORM4UIPROC glad_glUniform4ui; -#define glUniform4ui glad_glUniform4ui -typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC)(GLint location, GLsizei count, const GLuint *value); -GLAPI PFNGLUNIFORM1UIVPROC glad_glUniform1uiv; -#define glUniform1uiv glad_glUniform1uiv -typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC)(GLint location, GLsizei count, const GLuint *value); -GLAPI PFNGLUNIFORM2UIVPROC glad_glUniform2uiv; -#define glUniform2uiv glad_glUniform2uiv -typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC)(GLint location, GLsizei count, const GLuint *value); -GLAPI PFNGLUNIFORM3UIVPROC glad_glUniform3uiv; -#define glUniform3uiv glad_glUniform3uiv -typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC)(GLint location, GLsizei count, const GLuint *value); -GLAPI PFNGLUNIFORM4UIVPROC glad_glUniform4uiv; -#define glUniform4uiv glad_glUniform4uiv -typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC)(GLenum target, GLenum pname, const GLint *params); -GLAPI PFNGLTEXPARAMETERIIVPROC glad_glTexParameterIiv; -#define glTexParameterIiv glad_glTexParameterIiv -typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC)(GLenum target, GLenum pname, const GLuint *params); -GLAPI PFNGLTEXPARAMETERIUIVPROC glad_glTexParameterIuiv; -#define glTexParameterIuiv glad_glTexParameterIuiv -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC)(GLenum target, GLenum pname, GLint *params); -GLAPI PFNGLGETTEXPARAMETERIIVPROC glad_glGetTexParameterIiv; -#define glGetTexParameterIiv glad_glGetTexParameterIiv -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC)(GLenum target, GLenum pname, GLuint *params); -GLAPI PFNGLGETTEXPARAMETERIUIVPROC glad_glGetTexParameterIuiv; -#define glGetTexParameterIuiv glad_glGetTexParameterIuiv -typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC)(GLenum buffer, GLint drawbuffer, const GLint *value); -GLAPI PFNGLCLEARBUFFERIVPROC glad_glClearBufferiv; -#define glClearBufferiv glad_glClearBufferiv -typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC)(GLenum buffer, GLint drawbuffer, const GLuint *value); -GLAPI PFNGLCLEARBUFFERUIVPROC glad_glClearBufferuiv; -#define glClearBufferuiv glad_glClearBufferuiv -typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC)(GLenum buffer, GLint drawbuffer, const GLfloat *value); -GLAPI PFNGLCLEARBUFFERFVPROC glad_glClearBufferfv; -#define glClearBufferfv glad_glClearBufferfv -typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC)(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -GLAPI PFNGLCLEARBUFFERFIPROC glad_glClearBufferfi; -#define glClearBufferfi glad_glClearBufferfi -typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGIPROC)(GLenum name, GLuint index); -GLAPI PFNGLGETSTRINGIPROC glad_glGetStringi; -#define glGetStringi glad_glGetStringi -typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC)(GLuint renderbuffer); -GLAPI PFNGLISRENDERBUFFERPROC glad_glIsRenderbuffer; -#define glIsRenderbuffer glad_glIsRenderbuffer -typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC)(GLenum target, GLuint renderbuffer); -GLAPI PFNGLBINDRENDERBUFFERPROC glad_glBindRenderbuffer; -#define glBindRenderbuffer glad_glBindRenderbuffer -typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC)(GLsizei n, const GLuint *renderbuffers); -GLAPI PFNGLDELETERENDERBUFFERSPROC glad_glDeleteRenderbuffers; -#define glDeleteRenderbuffers glad_glDeleteRenderbuffers -typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC)(GLsizei n, GLuint *renderbuffers); -GLAPI PFNGLGENRENDERBUFFERSPROC glad_glGenRenderbuffers; -#define glGenRenderbuffers glad_glGenRenderbuffers -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI PFNGLRENDERBUFFERSTORAGEPROC glad_glRenderbufferStorage; -#define glRenderbufferStorage glad_glRenderbufferStorage -typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint *params); -GLAPI PFNGLGETRENDERBUFFERPARAMETERIVPROC glad_glGetRenderbufferParameteriv; -#define glGetRenderbufferParameteriv glad_glGetRenderbufferParameteriv -typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC)(GLuint framebuffer); -GLAPI PFNGLISFRAMEBUFFERPROC glad_glIsFramebuffer; -#define glIsFramebuffer glad_glIsFramebuffer -typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC)(GLenum target, GLuint framebuffer); -GLAPI PFNGLBINDFRAMEBUFFERPROC glad_glBindFramebuffer; -#define glBindFramebuffer glad_glBindFramebuffer -typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC)(GLsizei n, const GLuint *framebuffers); -GLAPI PFNGLDELETEFRAMEBUFFERSPROC glad_glDeleteFramebuffers; -#define glDeleteFramebuffers glad_glDeleteFramebuffers -typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC)(GLsizei n, GLuint *framebuffers); -GLAPI PFNGLGENFRAMEBUFFERSPROC glad_glGenFramebuffers; -#define glGenFramebuffers glad_glGenFramebuffers -typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC)(GLenum target); -GLAPI PFNGLCHECKFRAMEBUFFERSTATUSPROC glad_glCheckFramebufferStatus; -#define glCheckFramebufferStatus glad_glCheckFramebufferStatus -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI PFNGLFRAMEBUFFERTEXTURE1DPROC glad_glFramebufferTexture1D; -#define glFramebufferTexture1D glad_glFramebufferTexture1D -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI PFNGLFRAMEBUFFERTEXTURE2DPROC glad_glFramebufferTexture2D; -#define glFramebufferTexture2D glad_glFramebufferTexture2D -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -GLAPI PFNGLFRAMEBUFFERTEXTURE3DPROC glad_glFramebufferTexture3D; -#define glFramebufferTexture3D glad_glFramebufferTexture3D -typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GLAPI PFNGLFRAMEBUFFERRENDERBUFFERPROC glad_glFramebufferRenderbuffer; -#define glFramebufferRenderbuffer glad_glFramebufferRenderbuffer -typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)(GLenum target, GLenum attachment, GLenum pname, GLint *params); -GLAPI PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glad_glGetFramebufferAttachmentParameteriv; -#define glGetFramebufferAttachmentParameteriv glad_glGetFramebufferAttachmentParameteriv -typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC)(GLenum target); -GLAPI PFNGLGENERATEMIPMAPPROC glad_glGenerateMipmap; -#define glGenerateMipmap glad_glGenerateMipmap -typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -GLAPI PFNGLBLITFRAMEBUFFERPROC glad_glBlitFramebuffer; -#define glBlitFramebuffer glad_glBlitFramebuffer -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glad_glRenderbufferStorageMultisample; -#define glRenderbufferStorageMultisample glad_glRenderbufferStorageMultisample -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -GLAPI PFNGLFRAMEBUFFERTEXTURELAYERPROC glad_glFramebufferTextureLayer; -#define glFramebufferTextureLayer glad_glFramebufferTextureLayer -typedef void * (APIENTRYP PFNGLMAPBUFFERRANGEPROC)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -GLAPI PFNGLMAPBUFFERRANGEPROC glad_glMapBufferRange; -#define glMapBufferRange glad_glMapBufferRange -typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC)(GLenum target, GLintptr offset, GLsizeiptr length); -GLAPI PFNGLFLUSHMAPPEDBUFFERRANGEPROC glad_glFlushMappedBufferRange; -#define glFlushMappedBufferRange glad_glFlushMappedBufferRange -typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC)(GLuint array); -GLAPI PFNGLBINDVERTEXARRAYPROC glad_glBindVertexArray; -#define glBindVertexArray glad_glBindVertexArray -typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC)(GLsizei n, const GLuint *arrays); -GLAPI PFNGLDELETEVERTEXARRAYSPROC glad_glDeleteVertexArrays; -#define glDeleteVertexArrays glad_glDeleteVertexArrays -typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC)(GLsizei n, GLuint *arrays); -GLAPI PFNGLGENVERTEXARRAYSPROC glad_glGenVertexArrays; -#define glGenVertexArrays glad_glGenVertexArrays -typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC)(GLuint array); -GLAPI PFNGLISVERTEXARRAYPROC glad_glIsVertexArray; -#define glIsVertexArray glad_glIsVertexArray -#endif -#ifndef GL_VERSION_3_1 -#define GL_VERSION_3_1 1 -GLAPI int GLAD_GL_VERSION_3_1; -typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC)(GLenum mode, GLint first, GLsizei count, GLsizei instancecount); -GLAPI PFNGLDRAWARRAYSINSTANCEDPROC glad_glDrawArraysInstanced; -#define glDrawArraysInstanced glad_glDrawArraysInstanced -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); -GLAPI PFNGLDRAWELEMENTSINSTANCEDPROC glad_glDrawElementsInstanced; -#define glDrawElementsInstanced glad_glDrawElementsInstanced -typedef void (APIENTRYP PFNGLTEXBUFFERPROC)(GLenum target, GLenum internalformat, GLuint buffer); -GLAPI PFNGLTEXBUFFERPROC glad_glTexBuffer; -#define glTexBuffer glad_glTexBuffer -typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC)(GLuint index); -GLAPI PFNGLPRIMITIVERESTARTINDEXPROC glad_glPrimitiveRestartIndex; -#define glPrimitiveRestartIndex glad_glPrimitiveRestartIndex -typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -GLAPI PFNGLCOPYBUFFERSUBDATAPROC glad_glCopyBufferSubData; -#define glCopyBufferSubData glad_glCopyBufferSubData -typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC)(GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); -GLAPI PFNGLGETUNIFORMINDICESPROC glad_glGetUniformIndices; -#define glGetUniformIndices glad_glGetUniformIndices -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC)(GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); -GLAPI PFNGLGETACTIVEUNIFORMSIVPROC glad_glGetActiveUniformsiv; -#define glGetActiveUniformsiv glad_glGetActiveUniformsiv -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC)(GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); -GLAPI PFNGLGETACTIVEUNIFORMNAMEPROC glad_glGetActiveUniformName; -#define glGetActiveUniformName glad_glGetActiveUniformName -typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC)(GLuint program, const GLchar *uniformBlockName); -GLAPI PFNGLGETUNIFORMBLOCKINDEXPROC glad_glGetUniformBlockIndex; -#define glGetUniformBlockIndex glad_glGetUniformBlockIndex -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC)(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); -GLAPI PFNGLGETACTIVEUNIFORMBLOCKIVPROC glad_glGetActiveUniformBlockiv; -#define glGetActiveUniformBlockiv glad_glGetActiveUniformBlockiv -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC)(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); -GLAPI PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glad_glGetActiveUniformBlockName; -#define glGetActiveUniformBlockName glad_glGetActiveUniformBlockName -typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC)(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); -GLAPI PFNGLUNIFORMBLOCKBINDINGPROC glad_glUniformBlockBinding; -#define glUniformBlockBinding glad_glUniformBlockBinding -#endif -#ifndef GL_VERSION_3_2 -#define GL_VERSION_3_2 1 -GLAPI int GLAD_GL_VERSION_3_2; -typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); -GLAPI PFNGLDRAWELEMENTSBASEVERTEXPROC glad_glDrawElementsBaseVertex; -#define glDrawElementsBaseVertex glad_glDrawElementsBaseVertex -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); -GLAPI PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC glad_glDrawRangeElementsBaseVertex; -#define glDrawRangeElementsBaseVertex glad_glDrawRangeElementsBaseVertex -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); -GLAPI PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glad_glDrawElementsInstancedBaseVertex; -#define glDrawElementsInstancedBaseVertex glad_glDrawElementsInstancedBaseVertex -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC)(GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex); -GLAPI PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC glad_glMultiDrawElementsBaseVertex; -#define glMultiDrawElementsBaseVertex glad_glMultiDrawElementsBaseVertex -typedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC)(GLenum mode); -GLAPI PFNGLPROVOKINGVERTEXPROC glad_glProvokingVertex; -#define glProvokingVertex glad_glProvokingVertex -typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC)(GLenum condition, GLbitfield flags); -GLAPI PFNGLFENCESYNCPROC glad_glFenceSync; -#define glFenceSync glad_glFenceSync -typedef GLboolean (APIENTRYP PFNGLISSYNCPROC)(GLsync sync); -GLAPI PFNGLISSYNCPROC glad_glIsSync; -#define glIsSync glad_glIsSync -typedef void (APIENTRYP PFNGLDELETESYNCPROC)(GLsync sync); -GLAPI PFNGLDELETESYNCPROC glad_glDeleteSync; -#define glDeleteSync glad_glDeleteSync -typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC)(GLsync sync, GLbitfield flags, GLuint64 timeout); -GLAPI PFNGLCLIENTWAITSYNCPROC glad_glClientWaitSync; -#define glClientWaitSync glad_glClientWaitSync -typedef void (APIENTRYP PFNGLWAITSYNCPROC)(GLsync sync, GLbitfield flags, GLuint64 timeout); -GLAPI PFNGLWAITSYNCPROC glad_glWaitSync; -#define glWaitSync glad_glWaitSync -typedef void (APIENTRYP PFNGLGETINTEGER64VPROC)(GLenum pname, GLint64 *data); -GLAPI PFNGLGETINTEGER64VPROC glad_glGetInteger64v; -#define glGetInteger64v glad_glGetInteger64v -typedef void (APIENTRYP PFNGLGETSYNCIVPROC)(GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values); -GLAPI PFNGLGETSYNCIVPROC glad_glGetSynciv; -#define glGetSynciv glad_glGetSynciv -typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC)(GLenum target, GLuint index, GLint64 *data); -GLAPI PFNGLGETINTEGER64I_VPROC glad_glGetInteger64i_v; -#define glGetInteger64i_v glad_glGetInteger64i_v -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC)(GLenum target, GLenum pname, GLint64 *params); -GLAPI PFNGLGETBUFFERPARAMETERI64VPROC glad_glGetBufferParameteri64v; -#define glGetBufferParameteri64v glad_glGetBufferParameteri64v -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC)(GLenum target, GLenum attachment, GLuint texture, GLint level); -GLAPI PFNGLFRAMEBUFFERTEXTUREPROC glad_glFramebufferTexture; -#define glFramebufferTexture glad_glFramebufferTexture -typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -GLAPI PFNGLTEXIMAGE2DMULTISAMPLEPROC glad_glTexImage2DMultisample; -#define glTexImage2DMultisample glad_glTexImage2DMultisample -typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -GLAPI PFNGLTEXIMAGE3DMULTISAMPLEPROC glad_glTexImage3DMultisample; -#define glTexImage3DMultisample glad_glTexImage3DMultisample -typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC)(GLenum pname, GLuint index, GLfloat *val); -GLAPI PFNGLGETMULTISAMPLEFVPROC glad_glGetMultisamplefv; -#define glGetMultisamplefv glad_glGetMultisamplefv -typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC)(GLuint maskNumber, GLbitfield mask); -GLAPI PFNGLSAMPLEMASKIPROC glad_glSampleMaski; -#define glSampleMaski glad_glSampleMaski -#endif -#ifndef GL_VERSION_3_3 -#define GL_VERSION_3_3 1 -GLAPI int GLAD_GL_VERSION_3_3; -typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC)(GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); -GLAPI PFNGLBINDFRAGDATALOCATIONINDEXEDPROC glad_glBindFragDataLocationIndexed; -#define glBindFragDataLocationIndexed glad_glBindFragDataLocationIndexed -typedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC)(GLuint program, const GLchar *name); -GLAPI PFNGLGETFRAGDATAINDEXPROC glad_glGetFragDataIndex; -#define glGetFragDataIndex glad_glGetFragDataIndex -typedef void (APIENTRYP PFNGLGENSAMPLERSPROC)(GLsizei count, GLuint *samplers); -GLAPI PFNGLGENSAMPLERSPROC glad_glGenSamplers; -#define glGenSamplers glad_glGenSamplers -typedef void (APIENTRYP PFNGLDELETESAMPLERSPROC)(GLsizei count, const GLuint *samplers); -GLAPI PFNGLDELETESAMPLERSPROC glad_glDeleteSamplers; -#define glDeleteSamplers glad_glDeleteSamplers -typedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC)(GLuint sampler); -GLAPI PFNGLISSAMPLERPROC glad_glIsSampler; -#define glIsSampler glad_glIsSampler -typedef void (APIENTRYP PFNGLBINDSAMPLERPROC)(GLuint unit, GLuint sampler); -GLAPI PFNGLBINDSAMPLERPROC glad_glBindSampler; -#define glBindSampler glad_glBindSampler -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC)(GLuint sampler, GLenum pname, GLint param); -GLAPI PFNGLSAMPLERPARAMETERIPROC glad_glSamplerParameteri; -#define glSamplerParameteri glad_glSamplerParameteri -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC)(GLuint sampler, GLenum pname, const GLint *param); -GLAPI PFNGLSAMPLERPARAMETERIVPROC glad_glSamplerParameteriv; -#define glSamplerParameteriv glad_glSamplerParameteriv -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC)(GLuint sampler, GLenum pname, GLfloat param); -GLAPI PFNGLSAMPLERPARAMETERFPROC glad_glSamplerParameterf; -#define glSamplerParameterf glad_glSamplerParameterf -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC)(GLuint sampler, GLenum pname, const GLfloat *param); -GLAPI PFNGLSAMPLERPARAMETERFVPROC glad_glSamplerParameterfv; -#define glSamplerParameterfv glad_glSamplerParameterfv -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC)(GLuint sampler, GLenum pname, const GLint *param); -GLAPI PFNGLSAMPLERPARAMETERIIVPROC glad_glSamplerParameterIiv; -#define glSamplerParameterIiv glad_glSamplerParameterIiv -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC)(GLuint sampler, GLenum pname, const GLuint *param); -GLAPI PFNGLSAMPLERPARAMETERIUIVPROC glad_glSamplerParameterIuiv; -#define glSamplerParameterIuiv glad_glSamplerParameterIuiv -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC)(GLuint sampler, GLenum pname, GLint *params); -GLAPI PFNGLGETSAMPLERPARAMETERIVPROC glad_glGetSamplerParameteriv; -#define glGetSamplerParameteriv glad_glGetSamplerParameteriv -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC)(GLuint sampler, GLenum pname, GLint *params); -GLAPI PFNGLGETSAMPLERPARAMETERIIVPROC glad_glGetSamplerParameterIiv; -#define glGetSamplerParameterIiv glad_glGetSamplerParameterIiv -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC)(GLuint sampler, GLenum pname, GLfloat *params); -GLAPI PFNGLGETSAMPLERPARAMETERFVPROC glad_glGetSamplerParameterfv; -#define glGetSamplerParameterfv glad_glGetSamplerParameterfv -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC)(GLuint sampler, GLenum pname, GLuint *params); -GLAPI PFNGLGETSAMPLERPARAMETERIUIVPROC glad_glGetSamplerParameterIuiv; -#define glGetSamplerParameterIuiv glad_glGetSamplerParameterIuiv -typedef void (APIENTRYP PFNGLQUERYCOUNTERPROC)(GLuint id, GLenum target); -GLAPI PFNGLQUERYCOUNTERPROC glad_glQueryCounter; -#define glQueryCounter glad_glQueryCounter -typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC)(GLuint id, GLenum pname, GLint64 *params); -GLAPI PFNGLGETQUERYOBJECTI64VPROC glad_glGetQueryObjecti64v; -#define glGetQueryObjecti64v glad_glGetQueryObjecti64v -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC)(GLuint id, GLenum pname, GLuint64 *params); -GLAPI PFNGLGETQUERYOBJECTUI64VPROC glad_glGetQueryObjectui64v; -#define glGetQueryObjectui64v glad_glGetQueryObjectui64v -typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC)(GLuint index, GLuint divisor); -GLAPI PFNGLVERTEXATTRIBDIVISORPROC glad_glVertexAttribDivisor; -#define glVertexAttribDivisor glad_glVertexAttribDivisor -typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC)(GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI PFNGLVERTEXATTRIBP1UIPROC glad_glVertexAttribP1ui; -#define glVertexAttribP1ui glad_glVertexAttribP1ui -typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI PFNGLVERTEXATTRIBP1UIVPROC glad_glVertexAttribP1uiv; -#define glVertexAttribP1uiv glad_glVertexAttribP1uiv -typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC)(GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI PFNGLVERTEXATTRIBP2UIPROC glad_glVertexAttribP2ui; -#define glVertexAttribP2ui glad_glVertexAttribP2ui -typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI PFNGLVERTEXATTRIBP2UIVPROC glad_glVertexAttribP2uiv; -#define glVertexAttribP2uiv glad_glVertexAttribP2uiv -typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC)(GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI PFNGLVERTEXATTRIBP3UIPROC glad_glVertexAttribP3ui; -#define glVertexAttribP3ui glad_glVertexAttribP3ui -typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI PFNGLVERTEXATTRIBP3UIVPROC glad_glVertexAttribP3uiv; -#define glVertexAttribP3uiv glad_glVertexAttribP3uiv -typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC)(GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI PFNGLVERTEXATTRIBP4UIPROC glad_glVertexAttribP4ui; -#define glVertexAttribP4ui glad_glVertexAttribP4ui -typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI PFNGLVERTEXATTRIBP4UIVPROC glad_glVertexAttribP4uiv; -#define glVertexAttribP4uiv glad_glVertexAttribP4uiv -typedef void (APIENTRYP PFNGLVERTEXP2UIPROC)(GLenum type, GLuint value); -GLAPI PFNGLVERTEXP2UIPROC glad_glVertexP2ui; -#define glVertexP2ui glad_glVertexP2ui -typedef void (APIENTRYP PFNGLVERTEXP2UIVPROC)(GLenum type, const GLuint *value); -GLAPI PFNGLVERTEXP2UIVPROC glad_glVertexP2uiv; -#define glVertexP2uiv glad_glVertexP2uiv -typedef void (APIENTRYP PFNGLVERTEXP3UIPROC)(GLenum type, GLuint value); -GLAPI PFNGLVERTEXP3UIPROC glad_glVertexP3ui; -#define glVertexP3ui glad_glVertexP3ui -typedef void (APIENTRYP PFNGLVERTEXP3UIVPROC)(GLenum type, const GLuint *value); -GLAPI PFNGLVERTEXP3UIVPROC glad_glVertexP3uiv; -#define glVertexP3uiv glad_glVertexP3uiv -typedef void (APIENTRYP PFNGLVERTEXP4UIPROC)(GLenum type, GLuint value); -GLAPI PFNGLVERTEXP4UIPROC glad_glVertexP4ui; -#define glVertexP4ui glad_glVertexP4ui -typedef void (APIENTRYP PFNGLVERTEXP4UIVPROC)(GLenum type, const GLuint *value); -GLAPI PFNGLVERTEXP4UIVPROC glad_glVertexP4uiv; -#define glVertexP4uiv glad_glVertexP4uiv -typedef void (APIENTRYP PFNGLTEXCOORDP1UIPROC)(GLenum type, GLuint coords); -GLAPI PFNGLTEXCOORDP1UIPROC glad_glTexCoordP1ui; -#define glTexCoordP1ui glad_glTexCoordP1ui -typedef void (APIENTRYP PFNGLTEXCOORDP1UIVPROC)(GLenum type, const GLuint *coords); -GLAPI PFNGLTEXCOORDP1UIVPROC glad_glTexCoordP1uiv; -#define glTexCoordP1uiv glad_glTexCoordP1uiv -typedef void (APIENTRYP PFNGLTEXCOORDP2UIPROC)(GLenum type, GLuint coords); -GLAPI PFNGLTEXCOORDP2UIPROC glad_glTexCoordP2ui; -#define glTexCoordP2ui glad_glTexCoordP2ui -typedef void (APIENTRYP PFNGLTEXCOORDP2UIVPROC)(GLenum type, const GLuint *coords); -GLAPI PFNGLTEXCOORDP2UIVPROC glad_glTexCoordP2uiv; -#define glTexCoordP2uiv glad_glTexCoordP2uiv -typedef void (APIENTRYP PFNGLTEXCOORDP3UIPROC)(GLenum type, GLuint coords); -GLAPI PFNGLTEXCOORDP3UIPROC glad_glTexCoordP3ui; -#define glTexCoordP3ui glad_glTexCoordP3ui -typedef void (APIENTRYP PFNGLTEXCOORDP3UIVPROC)(GLenum type, const GLuint *coords); -GLAPI PFNGLTEXCOORDP3UIVPROC glad_glTexCoordP3uiv; -#define glTexCoordP3uiv glad_glTexCoordP3uiv -typedef void (APIENTRYP PFNGLTEXCOORDP4UIPROC)(GLenum type, GLuint coords); -GLAPI PFNGLTEXCOORDP4UIPROC glad_glTexCoordP4ui; -#define glTexCoordP4ui glad_glTexCoordP4ui -typedef void (APIENTRYP PFNGLTEXCOORDP4UIVPROC)(GLenum type, const GLuint *coords); -GLAPI PFNGLTEXCOORDP4UIVPROC glad_glTexCoordP4uiv; -#define glTexCoordP4uiv glad_glTexCoordP4uiv -typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIPROC)(GLenum texture, GLenum type, GLuint coords); -GLAPI PFNGLMULTITEXCOORDP1UIPROC glad_glMultiTexCoordP1ui; -#define glMultiTexCoordP1ui glad_glMultiTexCoordP1ui -typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIVPROC)(GLenum texture, GLenum type, const GLuint *coords); -GLAPI PFNGLMULTITEXCOORDP1UIVPROC glad_glMultiTexCoordP1uiv; -#define glMultiTexCoordP1uiv glad_glMultiTexCoordP1uiv -typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIPROC)(GLenum texture, GLenum type, GLuint coords); -GLAPI PFNGLMULTITEXCOORDP2UIPROC glad_glMultiTexCoordP2ui; -#define glMultiTexCoordP2ui glad_glMultiTexCoordP2ui -typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIVPROC)(GLenum texture, GLenum type, const GLuint *coords); -GLAPI PFNGLMULTITEXCOORDP2UIVPROC glad_glMultiTexCoordP2uiv; -#define glMultiTexCoordP2uiv glad_glMultiTexCoordP2uiv -typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIPROC)(GLenum texture, GLenum type, GLuint coords); -GLAPI PFNGLMULTITEXCOORDP3UIPROC glad_glMultiTexCoordP3ui; -#define glMultiTexCoordP3ui glad_glMultiTexCoordP3ui -typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIVPROC)(GLenum texture, GLenum type, const GLuint *coords); -GLAPI PFNGLMULTITEXCOORDP3UIVPROC glad_glMultiTexCoordP3uiv; -#define glMultiTexCoordP3uiv glad_glMultiTexCoordP3uiv -typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIPROC)(GLenum texture, GLenum type, GLuint coords); -GLAPI PFNGLMULTITEXCOORDP4UIPROC glad_glMultiTexCoordP4ui; -#define glMultiTexCoordP4ui glad_glMultiTexCoordP4ui -typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIVPROC)(GLenum texture, GLenum type, const GLuint *coords); -GLAPI PFNGLMULTITEXCOORDP4UIVPROC glad_glMultiTexCoordP4uiv; -#define glMultiTexCoordP4uiv glad_glMultiTexCoordP4uiv -typedef void (APIENTRYP PFNGLNORMALP3UIPROC)(GLenum type, GLuint coords); -GLAPI PFNGLNORMALP3UIPROC glad_glNormalP3ui; -#define glNormalP3ui glad_glNormalP3ui -typedef void (APIENTRYP PFNGLNORMALP3UIVPROC)(GLenum type, const GLuint *coords); -GLAPI PFNGLNORMALP3UIVPROC glad_glNormalP3uiv; -#define glNormalP3uiv glad_glNormalP3uiv -typedef void (APIENTRYP PFNGLCOLORP3UIPROC)(GLenum type, GLuint color); -GLAPI PFNGLCOLORP3UIPROC glad_glColorP3ui; -#define glColorP3ui glad_glColorP3ui -typedef void (APIENTRYP PFNGLCOLORP3UIVPROC)(GLenum type, const GLuint *color); -GLAPI PFNGLCOLORP3UIVPROC glad_glColorP3uiv; -#define glColorP3uiv glad_glColorP3uiv -typedef void (APIENTRYP PFNGLCOLORP4UIPROC)(GLenum type, GLuint color); -GLAPI PFNGLCOLORP4UIPROC glad_glColorP4ui; -#define glColorP4ui glad_glColorP4ui -typedef void (APIENTRYP PFNGLCOLORP4UIVPROC)(GLenum type, const GLuint *color); -GLAPI PFNGLCOLORP4UIVPROC glad_glColorP4uiv; -#define glColorP4uiv glad_glColorP4uiv -typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIPROC)(GLenum type, GLuint color); -GLAPI PFNGLSECONDARYCOLORP3UIPROC glad_glSecondaryColorP3ui; -#define glSecondaryColorP3ui glad_glSecondaryColorP3ui -typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIVPROC)(GLenum type, const GLuint *color); -GLAPI PFNGLSECONDARYCOLORP3UIVPROC glad_glSecondaryColorP3uiv; -#define glSecondaryColorP3uiv glad_glSecondaryColorP3uiv -#endif -#ifndef GL_VERSION_4_0 -#define GL_VERSION_4_0 1 -GLAPI int GLAD_GL_VERSION_4_0; -typedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC)(GLfloat value); -GLAPI PFNGLMINSAMPLESHADINGPROC glad_glMinSampleShading; -#define glMinSampleShading glad_glMinSampleShading -typedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC)(GLuint buf, GLenum mode); -GLAPI PFNGLBLENDEQUATIONIPROC glad_glBlendEquationi; -#define glBlendEquationi glad_glBlendEquationi -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC)(GLuint buf, GLenum modeRGB, GLenum modeAlpha); -GLAPI PFNGLBLENDEQUATIONSEPARATEIPROC glad_glBlendEquationSeparatei; -#define glBlendEquationSeparatei glad_glBlendEquationSeparatei -typedef void (APIENTRYP PFNGLBLENDFUNCIPROC)(GLuint buf, GLenum src, GLenum dst); -GLAPI PFNGLBLENDFUNCIPROC glad_glBlendFunci; -#define glBlendFunci glad_glBlendFunci -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -GLAPI PFNGLBLENDFUNCSEPARATEIPROC glad_glBlendFuncSeparatei; -#define glBlendFuncSeparatei glad_glBlendFuncSeparatei -typedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC)(GLenum mode, const void *indirect); -GLAPI PFNGLDRAWARRAYSINDIRECTPROC glad_glDrawArraysIndirect; -#define glDrawArraysIndirect glad_glDrawArraysIndirect -typedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC)(GLenum mode, GLenum type, const void *indirect); -GLAPI PFNGLDRAWELEMENTSINDIRECTPROC glad_glDrawElementsIndirect; -#define glDrawElementsIndirect glad_glDrawElementsIndirect -typedef void (APIENTRYP PFNGLUNIFORM1DPROC)(GLint location, GLdouble x); -GLAPI PFNGLUNIFORM1DPROC glad_glUniform1d; -#define glUniform1d glad_glUniform1d -typedef void (APIENTRYP PFNGLUNIFORM2DPROC)(GLint location, GLdouble x, GLdouble y); -GLAPI PFNGLUNIFORM2DPROC glad_glUniform2d; -#define glUniform2d glad_glUniform2d -typedef void (APIENTRYP PFNGLUNIFORM3DPROC)(GLint location, GLdouble x, GLdouble y, GLdouble z); -GLAPI PFNGLUNIFORM3DPROC glad_glUniform3d; -#define glUniform3d glad_glUniform3d -typedef void (APIENTRYP PFNGLUNIFORM4DPROC)(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI PFNGLUNIFORM4DPROC glad_glUniform4d; -#define glUniform4d glad_glUniform4d -typedef void (APIENTRYP PFNGLUNIFORM1DVPROC)(GLint location, GLsizei count, const GLdouble *value); -GLAPI PFNGLUNIFORM1DVPROC glad_glUniform1dv; -#define glUniform1dv glad_glUniform1dv -typedef void (APIENTRYP PFNGLUNIFORM2DVPROC)(GLint location, GLsizei count, const GLdouble *value); -GLAPI PFNGLUNIFORM2DVPROC glad_glUniform2dv; -#define glUniform2dv glad_glUniform2dv -typedef void (APIENTRYP PFNGLUNIFORM3DVPROC)(GLint location, GLsizei count, const GLdouble *value); -GLAPI PFNGLUNIFORM3DVPROC glad_glUniform3dv; -#define glUniform3dv glad_glUniform3dv -typedef void (APIENTRYP PFNGLUNIFORM4DVPROC)(GLint location, GLsizei count, const GLdouble *value); -GLAPI PFNGLUNIFORM4DVPROC glad_glUniform4dv; -#define glUniform4dv glad_glUniform4dv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLUNIFORMMATRIX2DVPROC glad_glUniformMatrix2dv; -#define glUniformMatrix2dv glad_glUniformMatrix2dv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLUNIFORMMATRIX3DVPROC glad_glUniformMatrix3dv; -#define glUniformMatrix3dv glad_glUniformMatrix3dv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLUNIFORMMATRIX4DVPROC glad_glUniformMatrix4dv; -#define glUniformMatrix4dv glad_glUniformMatrix4dv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLUNIFORMMATRIX2X3DVPROC glad_glUniformMatrix2x3dv; -#define glUniformMatrix2x3dv glad_glUniformMatrix2x3dv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLUNIFORMMATRIX2X4DVPROC glad_glUniformMatrix2x4dv; -#define glUniformMatrix2x4dv glad_glUniformMatrix2x4dv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLUNIFORMMATRIX3X2DVPROC glad_glUniformMatrix3x2dv; -#define glUniformMatrix3x2dv glad_glUniformMatrix3x2dv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLUNIFORMMATRIX3X4DVPROC glad_glUniformMatrix3x4dv; -#define glUniformMatrix3x4dv glad_glUniformMatrix3x4dv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLUNIFORMMATRIX4X2DVPROC glad_glUniformMatrix4x2dv; -#define glUniformMatrix4x2dv glad_glUniformMatrix4x2dv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLUNIFORMMATRIX4X3DVPROC glad_glUniformMatrix4x3dv; -#define glUniformMatrix4x3dv glad_glUniformMatrix4x3dv -typedef void (APIENTRYP PFNGLGETUNIFORMDVPROC)(GLuint program, GLint location, GLdouble *params); -GLAPI PFNGLGETUNIFORMDVPROC glad_glGetUniformdv; -#define glGetUniformdv glad_glGetUniformdv -typedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC)(GLuint program, GLenum shadertype, const GLchar *name); -GLAPI PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC glad_glGetSubroutineUniformLocation; -#define glGetSubroutineUniformLocation glad_glGetSubroutineUniformLocation -typedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC)(GLuint program, GLenum shadertype, const GLchar *name); -GLAPI PFNGLGETSUBROUTINEINDEXPROC glad_glGetSubroutineIndex; -#define glGetSubroutineIndex glad_glGetSubroutineIndex -typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC)(GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); -GLAPI PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC glad_glGetActiveSubroutineUniformiv; -#define glGetActiveSubroutineUniformiv glad_glGetActiveSubroutineUniformiv -typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC)(GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); -GLAPI PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC glad_glGetActiveSubroutineUniformName; -#define glGetActiveSubroutineUniformName glad_glGetActiveSubroutineUniformName -typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC)(GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); -GLAPI PFNGLGETACTIVESUBROUTINENAMEPROC glad_glGetActiveSubroutineName; -#define glGetActiveSubroutineName glad_glGetActiveSubroutineName -typedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC)(GLenum shadertype, GLsizei count, const GLuint *indices); -GLAPI PFNGLUNIFORMSUBROUTINESUIVPROC glad_glUniformSubroutinesuiv; -#define glUniformSubroutinesuiv glad_glUniformSubroutinesuiv -typedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC)(GLenum shadertype, GLint location, GLuint *params); -GLAPI PFNGLGETUNIFORMSUBROUTINEUIVPROC glad_glGetUniformSubroutineuiv; -#define glGetUniformSubroutineuiv glad_glGetUniformSubroutineuiv -typedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC)(GLuint program, GLenum shadertype, GLenum pname, GLint *values); -GLAPI PFNGLGETPROGRAMSTAGEIVPROC glad_glGetProgramStageiv; -#define glGetProgramStageiv glad_glGetProgramStageiv -typedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC)(GLenum pname, GLint value); -GLAPI PFNGLPATCHPARAMETERIPROC glad_glPatchParameteri; -#define glPatchParameteri glad_glPatchParameteri -typedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC)(GLenum pname, const GLfloat *values); -GLAPI PFNGLPATCHPARAMETERFVPROC glad_glPatchParameterfv; -#define glPatchParameterfv glad_glPatchParameterfv -typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC)(GLenum target, GLuint id); -GLAPI PFNGLBINDTRANSFORMFEEDBACKPROC glad_glBindTransformFeedback; -#define glBindTransformFeedback glad_glBindTransformFeedback -typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC)(GLsizei n, const GLuint *ids); -GLAPI PFNGLDELETETRANSFORMFEEDBACKSPROC glad_glDeleteTransformFeedbacks; -#define glDeleteTransformFeedbacks glad_glDeleteTransformFeedbacks -typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC)(GLsizei n, GLuint *ids); -GLAPI PFNGLGENTRANSFORMFEEDBACKSPROC glad_glGenTransformFeedbacks; -#define glGenTransformFeedbacks glad_glGenTransformFeedbacks -typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC)(GLuint id); -GLAPI PFNGLISTRANSFORMFEEDBACKPROC glad_glIsTransformFeedback; -#define glIsTransformFeedback glad_glIsTransformFeedback -typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC)(void); -GLAPI PFNGLPAUSETRANSFORMFEEDBACKPROC glad_glPauseTransformFeedback; -#define glPauseTransformFeedback glad_glPauseTransformFeedback -typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC)(void); -GLAPI PFNGLRESUMETRANSFORMFEEDBACKPROC glad_glResumeTransformFeedback; -#define glResumeTransformFeedback glad_glResumeTransformFeedback -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC)(GLenum mode, GLuint id); -GLAPI PFNGLDRAWTRANSFORMFEEDBACKPROC glad_glDrawTransformFeedback; -#define glDrawTransformFeedback glad_glDrawTransformFeedback -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC)(GLenum mode, GLuint id, GLuint stream); -GLAPI PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC glad_glDrawTransformFeedbackStream; -#define glDrawTransformFeedbackStream glad_glDrawTransformFeedbackStream -typedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC)(GLenum target, GLuint index, GLuint id); -GLAPI PFNGLBEGINQUERYINDEXEDPROC glad_glBeginQueryIndexed; -#define glBeginQueryIndexed glad_glBeginQueryIndexed -typedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC)(GLenum target, GLuint index); -GLAPI PFNGLENDQUERYINDEXEDPROC glad_glEndQueryIndexed; -#define glEndQueryIndexed glad_glEndQueryIndexed -typedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC)(GLenum target, GLuint index, GLenum pname, GLint *params); -GLAPI PFNGLGETQUERYINDEXEDIVPROC glad_glGetQueryIndexediv; -#define glGetQueryIndexediv glad_glGetQueryIndexediv -#endif -#ifndef GL_VERSION_4_1 -#define GL_VERSION_4_1 1 -GLAPI int GLAD_GL_VERSION_4_1; -typedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC)(void); -GLAPI PFNGLRELEASESHADERCOMPILERPROC glad_glReleaseShaderCompiler; -#define glReleaseShaderCompiler glad_glReleaseShaderCompiler -typedef void (APIENTRYP PFNGLSHADERBINARYPROC)(GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length); -GLAPI PFNGLSHADERBINARYPROC glad_glShaderBinary; -#define glShaderBinary glad_glShaderBinary -typedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC)(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); -GLAPI PFNGLGETSHADERPRECISIONFORMATPROC glad_glGetShaderPrecisionFormat; -#define glGetShaderPrecisionFormat glad_glGetShaderPrecisionFormat -typedef void (APIENTRYP PFNGLDEPTHRANGEFPROC)(GLfloat n, GLfloat f); -GLAPI PFNGLDEPTHRANGEFPROC glad_glDepthRangef; -#define glDepthRangef glad_glDepthRangef -typedef void (APIENTRYP PFNGLCLEARDEPTHFPROC)(GLfloat d); -GLAPI PFNGLCLEARDEPTHFPROC glad_glClearDepthf; -#define glClearDepthf glad_glClearDepthf -typedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC)(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); -GLAPI PFNGLGETPROGRAMBINARYPROC glad_glGetProgramBinary; -#define glGetProgramBinary glad_glGetProgramBinary -typedef void (APIENTRYP PFNGLPROGRAMBINARYPROC)(GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); -GLAPI PFNGLPROGRAMBINARYPROC glad_glProgramBinary; -#define glProgramBinary glad_glProgramBinary -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC)(GLuint program, GLenum pname, GLint value); -GLAPI PFNGLPROGRAMPARAMETERIPROC glad_glProgramParameteri; -#define glProgramParameteri glad_glProgramParameteri -typedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC)(GLuint pipeline, GLbitfield stages, GLuint program); -GLAPI PFNGLUSEPROGRAMSTAGESPROC glad_glUseProgramStages; -#define glUseProgramStages glad_glUseProgramStages -typedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC)(GLuint pipeline, GLuint program); -GLAPI PFNGLACTIVESHADERPROGRAMPROC glad_glActiveShaderProgram; -#define glActiveShaderProgram glad_glActiveShaderProgram -typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC)(GLenum type, GLsizei count, const GLchar *const*strings); -GLAPI PFNGLCREATESHADERPROGRAMVPROC glad_glCreateShaderProgramv; -#define glCreateShaderProgramv glad_glCreateShaderProgramv -typedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC)(GLuint pipeline); -GLAPI PFNGLBINDPROGRAMPIPELINEPROC glad_glBindProgramPipeline; -#define glBindProgramPipeline glad_glBindProgramPipeline -typedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC)(GLsizei n, const GLuint *pipelines); -GLAPI PFNGLDELETEPROGRAMPIPELINESPROC glad_glDeleteProgramPipelines; -#define glDeleteProgramPipelines glad_glDeleteProgramPipelines -typedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC)(GLsizei n, GLuint *pipelines); -GLAPI PFNGLGENPROGRAMPIPELINESPROC glad_glGenProgramPipelines; -#define glGenProgramPipelines glad_glGenProgramPipelines -typedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC)(GLuint pipeline); -GLAPI PFNGLISPROGRAMPIPELINEPROC glad_glIsProgramPipeline; -#define glIsProgramPipeline glad_glIsProgramPipeline -typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC)(GLuint pipeline, GLenum pname, GLint *params); -GLAPI PFNGLGETPROGRAMPIPELINEIVPROC glad_glGetProgramPipelineiv; -#define glGetProgramPipelineiv glad_glGetProgramPipelineiv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC)(GLuint program, GLint location, GLint v0); -GLAPI PFNGLPROGRAMUNIFORM1IPROC glad_glProgramUniform1i; -#define glProgramUniform1i glad_glProgramUniform1i -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC)(GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI PFNGLPROGRAMUNIFORM1IVPROC glad_glProgramUniform1iv; -#define glProgramUniform1iv glad_glProgramUniform1iv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC)(GLuint program, GLint location, GLfloat v0); -GLAPI PFNGLPROGRAMUNIFORM1FPROC glad_glProgramUniform1f; -#define glProgramUniform1f glad_glProgramUniform1f -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC)(GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORM1FVPROC glad_glProgramUniform1fv; -#define glProgramUniform1fv glad_glProgramUniform1fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC)(GLuint program, GLint location, GLdouble v0); -GLAPI PFNGLPROGRAMUNIFORM1DPROC glad_glProgramUniform1d; -#define glProgramUniform1d glad_glProgramUniform1d -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC)(GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORM1DVPROC glad_glProgramUniform1dv; -#define glProgramUniform1dv glad_glProgramUniform1dv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC)(GLuint program, GLint location, GLuint v0); -GLAPI PFNGLPROGRAMUNIFORM1UIPROC glad_glProgramUniform1ui; -#define glProgramUniform1ui glad_glProgramUniform1ui -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC)(GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI PFNGLPROGRAMUNIFORM1UIVPROC glad_glProgramUniform1uiv; -#define glProgramUniform1uiv glad_glProgramUniform1uiv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC)(GLuint program, GLint location, GLint v0, GLint v1); -GLAPI PFNGLPROGRAMUNIFORM2IPROC glad_glProgramUniform2i; -#define glProgramUniform2i glad_glProgramUniform2i -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC)(GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI PFNGLPROGRAMUNIFORM2IVPROC glad_glProgramUniform2iv; -#define glProgramUniform2iv glad_glProgramUniform2iv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC)(GLuint program, GLint location, GLfloat v0, GLfloat v1); -GLAPI PFNGLPROGRAMUNIFORM2FPROC glad_glProgramUniform2f; -#define glProgramUniform2f glad_glProgramUniform2f -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC)(GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORM2FVPROC glad_glProgramUniform2fv; -#define glProgramUniform2fv glad_glProgramUniform2fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC)(GLuint program, GLint location, GLdouble v0, GLdouble v1); -GLAPI PFNGLPROGRAMUNIFORM2DPROC glad_glProgramUniform2d; -#define glProgramUniform2d glad_glProgramUniform2d -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC)(GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORM2DVPROC glad_glProgramUniform2dv; -#define glProgramUniform2dv glad_glProgramUniform2dv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC)(GLuint program, GLint location, GLuint v0, GLuint v1); -GLAPI PFNGLPROGRAMUNIFORM2UIPROC glad_glProgramUniform2ui; -#define glProgramUniform2ui glad_glProgramUniform2ui -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC)(GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI PFNGLPROGRAMUNIFORM2UIVPROC glad_glProgramUniform2uiv; -#define glProgramUniform2uiv glad_glProgramUniform2uiv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -GLAPI PFNGLPROGRAMUNIFORM3IPROC glad_glProgramUniform3i; -#define glProgramUniform3i glad_glProgramUniform3i -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC)(GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI PFNGLPROGRAMUNIFORM3IVPROC glad_glProgramUniform3iv; -#define glProgramUniform3iv glad_glProgramUniform3iv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI PFNGLPROGRAMUNIFORM3FPROC glad_glProgramUniform3f; -#define glProgramUniform3f glad_glProgramUniform3f -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC)(GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORM3FVPROC glad_glProgramUniform3fv; -#define glProgramUniform3fv glad_glProgramUniform3fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC)(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); -GLAPI PFNGLPROGRAMUNIFORM3DPROC glad_glProgramUniform3d; -#define glProgramUniform3d glad_glProgramUniform3d -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC)(GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORM3DVPROC glad_glProgramUniform3dv; -#define glProgramUniform3dv glad_glProgramUniform3dv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -GLAPI PFNGLPROGRAMUNIFORM3UIPROC glad_glProgramUniform3ui; -#define glProgramUniform3ui glad_glProgramUniform3ui -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC)(GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI PFNGLPROGRAMUNIFORM3UIVPROC glad_glProgramUniform3uiv; -#define glProgramUniform3uiv glad_glProgramUniform3uiv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI PFNGLPROGRAMUNIFORM4IPROC glad_glProgramUniform4i; -#define glProgramUniform4i glad_glProgramUniform4i -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC)(GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI PFNGLPROGRAMUNIFORM4IVPROC glad_glProgramUniform4iv; -#define glProgramUniform4iv glad_glProgramUniform4iv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI PFNGLPROGRAMUNIFORM4FPROC glad_glProgramUniform4f; -#define glProgramUniform4f glad_glProgramUniform4f -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC)(GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORM4FVPROC glad_glProgramUniform4fv; -#define glProgramUniform4fv glad_glProgramUniform4fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC)(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); -GLAPI PFNGLPROGRAMUNIFORM4DPROC glad_glProgramUniform4d; -#define glProgramUniform4d glad_glProgramUniform4d -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC)(GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORM4DVPROC glad_glProgramUniform4dv; -#define glProgramUniform4dv glad_glProgramUniform4dv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GLAPI PFNGLPROGRAMUNIFORM4UIPROC glad_glProgramUniform4ui; -#define glProgramUniform4ui glad_glProgramUniform4ui -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC)(GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI PFNGLPROGRAMUNIFORM4UIVPROC glad_glProgramUniform4uiv; -#define glProgramUniform4uiv glad_glProgramUniform4uiv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX2FVPROC glad_glProgramUniformMatrix2fv; -#define glProgramUniformMatrix2fv glad_glProgramUniformMatrix2fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX3FVPROC glad_glProgramUniformMatrix3fv; -#define glProgramUniformMatrix3fv glad_glProgramUniformMatrix3fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX4FVPROC glad_glProgramUniformMatrix4fv; -#define glProgramUniformMatrix4fv glad_glProgramUniformMatrix4fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX2DVPROC glad_glProgramUniformMatrix2dv; -#define glProgramUniformMatrix2dv glad_glProgramUniformMatrix2dv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX3DVPROC glad_glProgramUniformMatrix3dv; -#define glProgramUniformMatrix3dv glad_glProgramUniformMatrix3dv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX4DVPROC glad_glProgramUniformMatrix4dv; -#define glProgramUniformMatrix4dv glad_glProgramUniformMatrix4dv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC glad_glProgramUniformMatrix2x3fv; -#define glProgramUniformMatrix2x3fv glad_glProgramUniformMatrix2x3fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC glad_glProgramUniformMatrix3x2fv; -#define glProgramUniformMatrix3x2fv glad_glProgramUniformMatrix3x2fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC glad_glProgramUniformMatrix2x4fv; -#define glProgramUniformMatrix2x4fv glad_glProgramUniformMatrix2x4fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC glad_glProgramUniformMatrix4x2fv; -#define glProgramUniformMatrix4x2fv glad_glProgramUniformMatrix4x2fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC glad_glProgramUniformMatrix3x4fv; -#define glProgramUniformMatrix3x4fv glad_glProgramUniformMatrix3x4fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC glad_glProgramUniformMatrix4x3fv; -#define glProgramUniformMatrix4x3fv glad_glProgramUniformMatrix4x3fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC glad_glProgramUniformMatrix2x3dv; -#define glProgramUniformMatrix2x3dv glad_glProgramUniformMatrix2x3dv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC glad_glProgramUniformMatrix3x2dv; -#define glProgramUniformMatrix3x2dv glad_glProgramUniformMatrix3x2dv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC glad_glProgramUniformMatrix2x4dv; -#define glProgramUniformMatrix2x4dv glad_glProgramUniformMatrix2x4dv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC glad_glProgramUniformMatrix4x2dv; -#define glProgramUniformMatrix4x2dv glad_glProgramUniformMatrix4x2dv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC glad_glProgramUniformMatrix3x4dv; -#define glProgramUniformMatrix3x4dv glad_glProgramUniformMatrix3x4dv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC glad_glProgramUniformMatrix4x3dv; -#define glProgramUniformMatrix4x3dv glad_glProgramUniformMatrix4x3dv -typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC)(GLuint pipeline); -GLAPI PFNGLVALIDATEPROGRAMPIPELINEPROC glad_glValidateProgramPipeline; -#define glValidateProgramPipeline glad_glValidateProgramPipeline -typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC)(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GLAPI PFNGLGETPROGRAMPIPELINEINFOLOGPROC glad_glGetProgramPipelineInfoLog; -#define glGetProgramPipelineInfoLog glad_glGetProgramPipelineInfoLog -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC)(GLuint index, GLdouble x); -GLAPI PFNGLVERTEXATTRIBL1DPROC glad_glVertexAttribL1d; -#define glVertexAttribL1d glad_glVertexAttribL1d -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC)(GLuint index, GLdouble x, GLdouble y); -GLAPI PFNGLVERTEXATTRIBL2DPROC glad_glVertexAttribL2d; -#define glVertexAttribL2d glad_glVertexAttribL2d -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI PFNGLVERTEXATTRIBL3DPROC glad_glVertexAttribL3d; -#define glVertexAttribL3d glad_glVertexAttribL3d -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI PFNGLVERTEXATTRIBL4DPROC glad_glVertexAttribL4d; -#define glVertexAttribL4d glad_glVertexAttribL4d -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC)(GLuint index, const GLdouble *v); -GLAPI PFNGLVERTEXATTRIBL1DVPROC glad_glVertexAttribL1dv; -#define glVertexAttribL1dv glad_glVertexAttribL1dv -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC)(GLuint index, const GLdouble *v); -GLAPI PFNGLVERTEXATTRIBL2DVPROC glad_glVertexAttribL2dv; -#define glVertexAttribL2dv glad_glVertexAttribL2dv -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC)(GLuint index, const GLdouble *v); -GLAPI PFNGLVERTEXATTRIBL3DVPROC glad_glVertexAttribL3dv; -#define glVertexAttribL3dv glad_glVertexAttribL3dv -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC)(GLuint index, const GLdouble *v); -GLAPI PFNGLVERTEXATTRIBL4DVPROC glad_glVertexAttribL4dv; -#define glVertexAttribL4dv glad_glVertexAttribL4dv -typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC)(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); -GLAPI PFNGLVERTEXATTRIBLPOINTERPROC glad_glVertexAttribLPointer; -#define glVertexAttribLPointer glad_glVertexAttribLPointer -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC)(GLuint index, GLenum pname, GLdouble *params); -GLAPI PFNGLGETVERTEXATTRIBLDVPROC glad_glGetVertexAttribLdv; -#define glGetVertexAttribLdv glad_glGetVertexAttribLdv -typedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC)(GLuint first, GLsizei count, const GLfloat *v); -GLAPI PFNGLVIEWPORTARRAYVPROC glad_glViewportArrayv; -#define glViewportArrayv glad_glViewportArrayv -typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); -GLAPI PFNGLVIEWPORTINDEXEDFPROC glad_glViewportIndexedf; -#define glViewportIndexedf glad_glViewportIndexedf -typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC)(GLuint index, const GLfloat *v); -GLAPI PFNGLVIEWPORTINDEXEDFVPROC glad_glViewportIndexedfv; -#define glViewportIndexedfv glad_glViewportIndexedfv -typedef void (APIENTRYP PFNGLSCISSORARRAYVPROC)(GLuint first, GLsizei count, const GLint *v); -GLAPI PFNGLSCISSORARRAYVPROC glad_glScissorArrayv; -#define glScissorArrayv glad_glScissorArrayv -typedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC)(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); -GLAPI PFNGLSCISSORINDEXEDPROC glad_glScissorIndexed; -#define glScissorIndexed glad_glScissorIndexed -typedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC)(GLuint index, const GLint *v); -GLAPI PFNGLSCISSORINDEXEDVPROC glad_glScissorIndexedv; -#define glScissorIndexedv glad_glScissorIndexedv -typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC)(GLuint first, GLsizei count, const GLdouble *v); -GLAPI PFNGLDEPTHRANGEARRAYVPROC glad_glDepthRangeArrayv; -#define glDepthRangeArrayv glad_glDepthRangeArrayv -typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC)(GLuint index, GLdouble n, GLdouble f); -GLAPI PFNGLDEPTHRANGEINDEXEDPROC glad_glDepthRangeIndexed; -#define glDepthRangeIndexed glad_glDepthRangeIndexed -typedef void (APIENTRYP PFNGLGETFLOATI_VPROC)(GLenum target, GLuint index, GLfloat *data); -GLAPI PFNGLGETFLOATI_VPROC glad_glGetFloati_v; -#define glGetFloati_v glad_glGetFloati_v -typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC)(GLenum target, GLuint index, GLdouble *data); -GLAPI PFNGLGETDOUBLEI_VPROC glad_glGetDoublei_v; -#define glGetDoublei_v glad_glGetDoublei_v -#endif -#ifndef GL_VERSION_4_2 -#define GL_VERSION_4_2 1 -GLAPI int GLAD_GL_VERSION_4_2; -typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC)(GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); -GLAPI PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC glad_glDrawArraysInstancedBaseInstance; -#define glDrawArraysInstancedBaseInstance glad_glDrawArraysInstancedBaseInstance -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); -GLAPI PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC glad_glDrawElementsInstancedBaseInstance; -#define glDrawElementsInstancedBaseInstance glad_glDrawElementsInstancedBaseInstance -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); -GLAPI PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC glad_glDrawElementsInstancedBaseVertexBaseInstance; -#define glDrawElementsInstancedBaseVertexBaseInstance glad_glDrawElementsInstancedBaseVertexBaseInstance -typedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC)(GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint *params); -GLAPI PFNGLGETINTERNALFORMATIVPROC glad_glGetInternalformativ; -#define glGetInternalformativ glad_glGetInternalformativ -typedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC)(GLuint program, GLuint bufferIndex, GLenum pname, GLint *params); -GLAPI PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC glad_glGetActiveAtomicCounterBufferiv; -#define glGetActiveAtomicCounterBufferiv glad_glGetActiveAtomicCounterBufferiv -typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC)(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); -GLAPI PFNGLBINDIMAGETEXTUREPROC glad_glBindImageTexture; -#define glBindImageTexture glad_glBindImageTexture -typedef void (APIENTRYP PFNGLMEMORYBARRIERPROC)(GLbitfield barriers); -GLAPI PFNGLMEMORYBARRIERPROC glad_glMemoryBarrier; -#define glMemoryBarrier glad_glMemoryBarrier -typedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -GLAPI PFNGLTEXSTORAGE1DPROC glad_glTexStorage1D; -#define glTexStorage1D glad_glTexStorage1D -typedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI PFNGLTEXSTORAGE2DPROC glad_glTexStorage2D; -#define glTexStorage2D glad_glTexStorage2D -typedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -GLAPI PFNGLTEXSTORAGE3DPROC glad_glTexStorage3D; -#define glTexStorage3D glad_glTexStorage3D -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC)(GLenum mode, GLuint id, GLsizei instancecount); -GLAPI PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC glad_glDrawTransformFeedbackInstanced; -#define glDrawTransformFeedbackInstanced glad_glDrawTransformFeedbackInstanced -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC)(GLenum mode, GLuint id, GLuint stream, GLsizei instancecount); -GLAPI PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC glad_glDrawTransformFeedbackStreamInstanced; -#define glDrawTransformFeedbackStreamInstanced glad_glDrawTransformFeedbackStreamInstanced -#endif -#ifndef GL_VERSION_4_3 -#define GL_VERSION_4_3 1 -GLAPI int GLAD_GL_VERSION_4_3; -typedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC)(GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data); -GLAPI PFNGLCLEARBUFFERDATAPROC glad_glClearBufferData; -#define glClearBufferData glad_glClearBufferData -typedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC)(GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); -GLAPI PFNGLCLEARBUFFERSUBDATAPROC glad_glClearBufferSubData; -#define glClearBufferSubData glad_glClearBufferSubData -typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEPROC)(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); -GLAPI PFNGLDISPATCHCOMPUTEPROC glad_glDispatchCompute; -#define glDispatchCompute glad_glDispatchCompute -typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC)(GLintptr indirect); -GLAPI PFNGLDISPATCHCOMPUTEINDIRECTPROC glad_glDispatchComputeIndirect; -#define glDispatchComputeIndirect glad_glDispatchComputeIndirect -typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATAPROC)(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); -GLAPI PFNGLCOPYIMAGESUBDATAPROC glad_glCopyImageSubData; -#define glCopyImageSubData glad_glCopyImageSubData -typedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC)(GLenum target, GLenum pname, GLint param); -GLAPI PFNGLFRAMEBUFFERPARAMETERIPROC glad_glFramebufferParameteri; -#define glFramebufferParameteri glad_glFramebufferParameteri -typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint *params); -GLAPI PFNGLGETFRAMEBUFFERPARAMETERIVPROC glad_glGetFramebufferParameteriv; -#define glGetFramebufferParameteriv glad_glGetFramebufferParameteriv -typedef void (APIENTRYP PFNGLGETINTERNALFORMATI64VPROC)(GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint64 *params); -GLAPI PFNGLGETINTERNALFORMATI64VPROC glad_glGetInternalformati64v; -#define glGetInternalformati64v glad_glGetInternalformati64v -typedef void (APIENTRYP PFNGLINVALIDATETEXSUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth); -GLAPI PFNGLINVALIDATETEXSUBIMAGEPROC glad_glInvalidateTexSubImage; -#define glInvalidateTexSubImage glad_glInvalidateTexSubImage -typedef void (APIENTRYP PFNGLINVALIDATETEXIMAGEPROC)(GLuint texture, GLint level); -GLAPI PFNGLINVALIDATETEXIMAGEPROC glad_glInvalidateTexImage; -#define glInvalidateTexImage glad_glInvalidateTexImage -typedef void (APIENTRYP PFNGLINVALIDATEBUFFERSUBDATAPROC)(GLuint buffer, GLintptr offset, GLsizeiptr length); -GLAPI PFNGLINVALIDATEBUFFERSUBDATAPROC glad_glInvalidateBufferSubData; -#define glInvalidateBufferSubData glad_glInvalidateBufferSubData -typedef void (APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC)(GLuint buffer); -GLAPI PFNGLINVALIDATEBUFFERDATAPROC glad_glInvalidateBufferData; -#define glInvalidateBufferData glad_glInvalidateBufferData -typedef void (APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC)(GLenum target, GLsizei numAttachments, const GLenum *attachments); -GLAPI PFNGLINVALIDATEFRAMEBUFFERPROC glad_glInvalidateFramebuffer; -#define glInvalidateFramebuffer glad_glInvalidateFramebuffer -typedef void (APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC)(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI PFNGLINVALIDATESUBFRAMEBUFFERPROC glad_glInvalidateSubFramebuffer; -#define glInvalidateSubFramebuffer glad_glInvalidateSubFramebuffer -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTPROC)(GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride); -GLAPI PFNGLMULTIDRAWARRAYSINDIRECTPROC glad_glMultiDrawArraysIndirect; -#define glMultiDrawArraysIndirect glad_glMultiDrawArraysIndirect -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTPROC)(GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride); -GLAPI PFNGLMULTIDRAWELEMENTSINDIRECTPROC glad_glMultiDrawElementsIndirect; -#define glMultiDrawElementsIndirect glad_glMultiDrawElementsIndirect -typedef void (APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC)(GLuint program, GLenum programInterface, GLenum pname, GLint *params); -GLAPI PFNGLGETPROGRAMINTERFACEIVPROC glad_glGetProgramInterfaceiv; -#define glGetProgramInterfaceiv glad_glGetProgramInterfaceiv -typedef GLuint (APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC)(GLuint program, GLenum programInterface, const GLchar *name); -GLAPI PFNGLGETPROGRAMRESOURCEINDEXPROC glad_glGetProgramResourceIndex; -#define glGetProgramResourceIndex glad_glGetProgramResourceIndex -typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC)(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); -GLAPI PFNGLGETPROGRAMRESOURCENAMEPROC glad_glGetProgramResourceName; -#define glGetProgramResourceName glad_glGetProgramResourceName -typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC)(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei count, GLsizei *length, GLint *params); -GLAPI PFNGLGETPROGRAMRESOURCEIVPROC glad_glGetProgramResourceiv; -#define glGetProgramResourceiv glad_glGetProgramResourceiv -typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC)(GLuint program, GLenum programInterface, const GLchar *name); -GLAPI PFNGLGETPROGRAMRESOURCELOCATIONPROC glad_glGetProgramResourceLocation; -#define glGetProgramResourceLocation glad_glGetProgramResourceLocation -typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC)(GLuint program, GLenum programInterface, const GLchar *name); -GLAPI PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC glad_glGetProgramResourceLocationIndex; -#define glGetProgramResourceLocationIndex glad_glGetProgramResourceLocationIndex -typedef void (APIENTRYP PFNGLSHADERSTORAGEBLOCKBINDINGPROC)(GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding); -GLAPI PFNGLSHADERSTORAGEBLOCKBINDINGPROC glad_glShaderStorageBlockBinding; -#define glShaderStorageBlockBinding glad_glShaderStorageBlockBinding -typedef void (APIENTRYP PFNGLTEXBUFFERRANGEPROC)(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI PFNGLTEXBUFFERRANGEPROC glad_glTexBufferRange; -#define glTexBufferRange glad_glTexBufferRange -typedef void (APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -GLAPI PFNGLTEXSTORAGE2DMULTISAMPLEPROC glad_glTexStorage2DMultisample; -#define glTexStorage2DMultisample glad_glTexStorage2DMultisample -typedef void (APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -GLAPI PFNGLTEXSTORAGE3DMULTISAMPLEPROC glad_glTexStorage3DMultisample; -#define glTexStorage3DMultisample glad_glTexStorage3DMultisample -typedef void (APIENTRYP PFNGLTEXTUREVIEWPROC)(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); -GLAPI PFNGLTEXTUREVIEWPROC glad_glTextureView; -#define glTextureView glad_glTextureView -typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERPROC)(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -GLAPI PFNGLBINDVERTEXBUFFERPROC glad_glBindVertexBuffer; -#define glBindVertexBuffer glad_glBindVertexBuffer -typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATPROC)(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -GLAPI PFNGLVERTEXATTRIBFORMATPROC glad_glVertexAttribFormat; -#define glVertexAttribFormat glad_glVertexAttribFormat -typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC)(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GLAPI PFNGLVERTEXATTRIBIFORMATPROC glad_glVertexAttribIFormat; -#define glVertexAttribIFormat glad_glVertexAttribIFormat -typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATPROC)(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GLAPI PFNGLVERTEXATTRIBLFORMATPROC glad_glVertexAttribLFormat; -#define glVertexAttribLFormat glad_glVertexAttribLFormat -typedef void (APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC)(GLuint attribindex, GLuint bindingindex); -GLAPI PFNGLVERTEXATTRIBBINDINGPROC glad_glVertexAttribBinding; -#define glVertexAttribBinding glad_glVertexAttribBinding -typedef void (APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC)(GLuint bindingindex, GLuint divisor); -GLAPI PFNGLVERTEXBINDINGDIVISORPROC glad_glVertexBindingDivisor; -#define glVertexBindingDivisor glad_glVertexBindingDivisor -typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC)(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -GLAPI PFNGLDEBUGMESSAGECONTROLPROC glad_glDebugMessageControl; -#define glDebugMessageControl glad_glDebugMessageControl -typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -GLAPI PFNGLDEBUGMESSAGEINSERTPROC glad_glDebugMessageInsert; -#define glDebugMessageInsert glad_glDebugMessageInsert -typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC)(GLDEBUGPROC callback, const void *userParam); -GLAPI PFNGLDEBUGMESSAGECALLBACKPROC glad_glDebugMessageCallback; -#define glDebugMessageCallback glad_glDebugMessageCallback -typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC)(GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -GLAPI PFNGLGETDEBUGMESSAGELOGPROC glad_glGetDebugMessageLog; -#define glGetDebugMessageLog glad_glGetDebugMessageLog -typedef void (APIENTRYP PFNGLPUSHDEBUGGROUPPROC)(GLenum source, GLuint id, GLsizei length, const GLchar *message); -GLAPI PFNGLPUSHDEBUGGROUPPROC glad_glPushDebugGroup; -#define glPushDebugGroup glad_glPushDebugGroup -typedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC)(void); -GLAPI PFNGLPOPDEBUGGROUPPROC glad_glPopDebugGroup; -#define glPopDebugGroup glad_glPopDebugGroup -typedef void (APIENTRYP PFNGLOBJECTLABELPROC)(GLenum identifier, GLuint name, GLsizei length, const GLchar *label); -GLAPI PFNGLOBJECTLABELPROC glad_glObjectLabel; -#define glObjectLabel glad_glObjectLabel -typedef void (APIENTRYP PFNGLGETOBJECTLABELPROC)(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); -GLAPI PFNGLGETOBJECTLABELPROC glad_glGetObjectLabel; -#define glGetObjectLabel glad_glGetObjectLabel -typedef void (APIENTRYP PFNGLOBJECTPTRLABELPROC)(const void *ptr, GLsizei length, const GLchar *label); -GLAPI PFNGLOBJECTPTRLABELPROC glad_glObjectPtrLabel; -#define glObjectPtrLabel glad_glObjectPtrLabel -typedef void (APIENTRYP PFNGLGETOBJECTPTRLABELPROC)(const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); -GLAPI PFNGLGETOBJECTPTRLABELPROC glad_glGetObjectPtrLabel; -#define glGetObjectPtrLabel glad_glGetObjectPtrLabel -typedef void (APIENTRYP PFNGLGETPOINTERVPROC)(GLenum pname, void **params); -GLAPI PFNGLGETPOINTERVPROC glad_glGetPointerv; -#define glGetPointerv glad_glGetPointerv -#endif -#ifndef GL_VERSION_4_4 -#define GL_VERSION_4_4 1 -GLAPI int GLAD_GL_VERSION_4_4; -typedef void (APIENTRYP PFNGLBUFFERSTORAGEPROC)(GLenum target, GLsizeiptr size, const void *data, GLbitfield flags); -GLAPI PFNGLBUFFERSTORAGEPROC glad_glBufferStorage; -#define glBufferStorage glad_glBufferStorage -typedef void (APIENTRYP PFNGLCLEARTEXIMAGEPROC)(GLuint texture, GLint level, GLenum format, GLenum type, const void *data); -GLAPI PFNGLCLEARTEXIMAGEPROC glad_glClearTexImage; -#define glClearTexImage glad_glClearTexImage -typedef void (APIENTRYP PFNGLCLEARTEXSUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data); -GLAPI PFNGLCLEARTEXSUBIMAGEPROC glad_glClearTexSubImage; -#define glClearTexSubImage glad_glClearTexSubImage -typedef void (APIENTRYP PFNGLBINDBUFFERSBASEPROC)(GLenum target, GLuint first, GLsizei count, const GLuint *buffers); -GLAPI PFNGLBINDBUFFERSBASEPROC glad_glBindBuffersBase; -#define glBindBuffersBase glad_glBindBuffersBase -typedef void (APIENTRYP PFNGLBINDBUFFERSRANGEPROC)(GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes); -GLAPI PFNGLBINDBUFFERSRANGEPROC glad_glBindBuffersRange; -#define glBindBuffersRange glad_glBindBuffersRange -typedef void (APIENTRYP PFNGLBINDTEXTURESPROC)(GLuint first, GLsizei count, const GLuint *textures); -GLAPI PFNGLBINDTEXTURESPROC glad_glBindTextures; -#define glBindTextures glad_glBindTextures -typedef void (APIENTRYP PFNGLBINDSAMPLERSPROC)(GLuint first, GLsizei count, const GLuint *samplers); -GLAPI PFNGLBINDSAMPLERSPROC glad_glBindSamplers; -#define glBindSamplers glad_glBindSamplers -typedef void (APIENTRYP PFNGLBINDIMAGETEXTURESPROC)(GLuint first, GLsizei count, const GLuint *textures); -GLAPI PFNGLBINDIMAGETEXTURESPROC glad_glBindImageTextures; -#define glBindImageTextures glad_glBindImageTextures -typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERSPROC)(GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides); -GLAPI PFNGLBINDVERTEXBUFFERSPROC glad_glBindVertexBuffers; -#define glBindVertexBuffers glad_glBindVertexBuffers -#endif -#ifndef GL_VERSION_4_5 -#define GL_VERSION_4_5 1 -GLAPI int GLAD_GL_VERSION_4_5; -typedef void (APIENTRYP PFNGLCLIPCONTROLPROC)(GLenum origin, GLenum depth); -GLAPI PFNGLCLIPCONTROLPROC glad_glClipControl; -#define glClipControl glad_glClipControl -typedef void (APIENTRYP PFNGLCREATETRANSFORMFEEDBACKSPROC)(GLsizei n, GLuint *ids); -GLAPI PFNGLCREATETRANSFORMFEEDBACKSPROC glad_glCreateTransformFeedbacks; -#define glCreateTransformFeedbacks glad_glCreateTransformFeedbacks -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC)(GLuint xfb, GLuint index, GLuint buffer); -GLAPI PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC glad_glTransformFeedbackBufferBase; -#define glTransformFeedbackBufferBase glad_glTransformFeedbackBufferBase -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC)(GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC glad_glTransformFeedbackBufferRange; -#define glTransformFeedbackBufferRange glad_glTransformFeedbackBufferRange -typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKIVPROC)(GLuint xfb, GLenum pname, GLint *param); -GLAPI PFNGLGETTRANSFORMFEEDBACKIVPROC glad_glGetTransformFeedbackiv; -#define glGetTransformFeedbackiv glad_glGetTransformFeedbackiv -typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI_VPROC)(GLuint xfb, GLenum pname, GLuint index, GLint *param); -GLAPI PFNGLGETTRANSFORMFEEDBACKI_VPROC glad_glGetTransformFeedbacki_v; -#define glGetTransformFeedbacki_v glad_glGetTransformFeedbacki_v -typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI64_VPROC)(GLuint xfb, GLenum pname, GLuint index, GLint64 *param); -GLAPI PFNGLGETTRANSFORMFEEDBACKI64_VPROC glad_glGetTransformFeedbacki64_v; -#define glGetTransformFeedbacki64_v glad_glGetTransformFeedbacki64_v -typedef void (APIENTRYP PFNGLCREATEBUFFERSPROC)(GLsizei n, GLuint *buffers); -GLAPI PFNGLCREATEBUFFERSPROC glad_glCreateBuffers; -#define glCreateBuffers glad_glCreateBuffers -typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEPROC)(GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); -GLAPI PFNGLNAMEDBUFFERSTORAGEPROC glad_glNamedBufferStorage; -#define glNamedBufferStorage glad_glNamedBufferStorage -typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAPROC)(GLuint buffer, GLsizeiptr size, const void *data, GLenum usage); -GLAPI PFNGLNAMEDBUFFERDATAPROC glad_glNamedBufferData; -#define glNamedBufferData glad_glNamedBufferData -typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAPROC)(GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); -GLAPI PFNGLNAMEDBUFFERSUBDATAPROC glad_glNamedBufferSubData; -#define glNamedBufferSubData glad_glNamedBufferSubData -typedef void (APIENTRYP PFNGLCOPYNAMEDBUFFERSUBDATAPROC)(GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -GLAPI PFNGLCOPYNAMEDBUFFERSUBDATAPROC glad_glCopyNamedBufferSubData; -#define glCopyNamedBufferSubData glad_glCopyNamedBufferSubData -typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAPROC)(GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); -GLAPI PFNGLCLEARNAMEDBUFFERDATAPROC glad_glClearNamedBufferData; -#define glClearNamedBufferData glad_glClearNamedBufferData -typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAPROC)(GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); -GLAPI PFNGLCLEARNAMEDBUFFERSUBDATAPROC glad_glClearNamedBufferSubData; -#define glClearNamedBufferSubData glad_glClearNamedBufferSubData -typedef void * (APIENTRYP PFNGLMAPNAMEDBUFFERPROC)(GLuint buffer, GLenum access); -GLAPI PFNGLMAPNAMEDBUFFERPROC glad_glMapNamedBuffer; -#define glMapNamedBuffer glad_glMapNamedBuffer -typedef void * (APIENTRYP PFNGLMAPNAMEDBUFFERRANGEPROC)(GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); -GLAPI PFNGLMAPNAMEDBUFFERRANGEPROC glad_glMapNamedBufferRange; -#define glMapNamedBufferRange glad_glMapNamedBufferRange -typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFERPROC)(GLuint buffer); -GLAPI PFNGLUNMAPNAMEDBUFFERPROC glad_glUnmapNamedBuffer; -#define glUnmapNamedBuffer glad_glUnmapNamedBuffer -typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC)(GLuint buffer, GLintptr offset, GLsizeiptr length); -GLAPI PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC glad_glFlushMappedNamedBufferRange; -#define glFlushMappedNamedBufferRange glad_glFlushMappedNamedBufferRange -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVPROC)(GLuint buffer, GLenum pname, GLint *params); -GLAPI PFNGLGETNAMEDBUFFERPARAMETERIVPROC glad_glGetNamedBufferParameteriv; -#define glGetNamedBufferParameteriv glad_glGetNamedBufferParameteriv -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERI64VPROC)(GLuint buffer, GLenum pname, GLint64 *params); -GLAPI PFNGLGETNAMEDBUFFERPARAMETERI64VPROC glad_glGetNamedBufferParameteri64v; -#define glGetNamedBufferParameteri64v glad_glGetNamedBufferParameteri64v -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVPROC)(GLuint buffer, GLenum pname, void **params); -GLAPI PFNGLGETNAMEDBUFFERPOINTERVPROC glad_glGetNamedBufferPointerv; -#define glGetNamedBufferPointerv glad_glGetNamedBufferPointerv -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAPROC)(GLuint buffer, GLintptr offset, GLsizeiptr size, void *data); -GLAPI PFNGLGETNAMEDBUFFERSUBDATAPROC glad_glGetNamedBufferSubData; -#define glGetNamedBufferSubData glad_glGetNamedBufferSubData -typedef void (APIENTRYP PFNGLCREATEFRAMEBUFFERSPROC)(GLsizei n, GLuint *framebuffers); -GLAPI PFNGLCREATEFRAMEBUFFERSPROC glad_glCreateFramebuffers; -#define glCreateFramebuffers glad_glCreateFramebuffers -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC)(GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GLAPI PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC glad_glNamedFramebufferRenderbuffer; -#define glNamedFramebufferRenderbuffer glad_glNamedFramebufferRenderbuffer -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC)(GLuint framebuffer, GLenum pname, GLint param); -GLAPI PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC glad_glNamedFramebufferParameteri; -#define glNamedFramebufferParameteri glad_glNamedFramebufferParameteri -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREPROC)(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); -GLAPI PFNGLNAMEDFRAMEBUFFERTEXTUREPROC glad_glNamedFramebufferTexture; -#define glNamedFramebufferTexture glad_glNamedFramebufferTexture -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC)(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); -GLAPI PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC glad_glNamedFramebufferTextureLayer; -#define glNamedFramebufferTextureLayer glad_glNamedFramebufferTextureLayer -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC)(GLuint framebuffer, GLenum buf); -GLAPI PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC glad_glNamedFramebufferDrawBuffer; -#define glNamedFramebufferDrawBuffer glad_glNamedFramebufferDrawBuffer -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC)(GLuint framebuffer, GLsizei n, const GLenum *bufs); -GLAPI PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC glad_glNamedFramebufferDrawBuffers; -#define glNamedFramebufferDrawBuffers glad_glNamedFramebufferDrawBuffers -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC)(GLuint framebuffer, GLenum src); -GLAPI PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC glad_glNamedFramebufferReadBuffer; -#define glNamedFramebufferReadBuffer glad_glNamedFramebufferReadBuffer -typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC)(GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments); -GLAPI PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC glad_glInvalidateNamedFramebufferData; -#define glInvalidateNamedFramebufferData glad_glInvalidateNamedFramebufferData -typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC)(GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC glad_glInvalidateNamedFramebufferSubData; -#define glInvalidateNamedFramebufferSubData glad_glInvalidateNamedFramebufferSubData -typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERIVPROC)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value); -GLAPI PFNGLCLEARNAMEDFRAMEBUFFERIVPROC glad_glClearNamedFramebufferiv; -#define glClearNamedFramebufferiv glad_glClearNamedFramebufferiv -typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value); -GLAPI PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC glad_glClearNamedFramebufferuiv; -#define glClearNamedFramebufferuiv glad_glClearNamedFramebufferuiv -typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFVPROC)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value); -GLAPI PFNGLCLEARNAMEDFRAMEBUFFERFVPROC glad_glClearNamedFramebufferfv; -#define glClearNamedFramebufferfv glad_glClearNamedFramebufferfv -typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFIPROC)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -GLAPI PFNGLCLEARNAMEDFRAMEBUFFERFIPROC glad_glClearNamedFramebufferfi; -#define glClearNamedFramebufferfi glad_glClearNamedFramebufferfi -typedef void (APIENTRYP PFNGLBLITNAMEDFRAMEBUFFERPROC)(GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -GLAPI PFNGLBLITNAMEDFRAMEBUFFERPROC glad_glBlitNamedFramebuffer; -#define glBlitNamedFramebuffer glad_glBlitNamedFramebuffer -typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC)(GLuint framebuffer, GLenum target); -GLAPI PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC glad_glCheckNamedFramebufferStatus; -#define glCheckNamedFramebufferStatus glad_glCheckNamedFramebufferStatus -typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC)(GLuint framebuffer, GLenum pname, GLint *param); -GLAPI PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC glad_glGetNamedFramebufferParameteriv; -#define glGetNamedFramebufferParameteriv glad_glGetNamedFramebufferParameteriv -typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC)(GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); -GLAPI PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC glad_glGetNamedFramebufferAttachmentParameteriv; -#define glGetNamedFramebufferAttachmentParameteriv glad_glGetNamedFramebufferAttachmentParameteriv -typedef void (APIENTRYP PFNGLCREATERENDERBUFFERSPROC)(GLsizei n, GLuint *renderbuffers); -GLAPI PFNGLCREATERENDERBUFFERSPROC glad_glCreateRenderbuffers; -#define glCreateRenderbuffers glad_glCreateRenderbuffers -typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEPROC)(GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI PFNGLNAMEDRENDERBUFFERSTORAGEPROC glad_glNamedRenderbufferStorage; -#define glNamedRenderbufferStorage glad_glNamedRenderbufferStorage -typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC)(GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC glad_glNamedRenderbufferStorageMultisample; -#define glNamedRenderbufferStorageMultisample glad_glNamedRenderbufferStorageMultisample -typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC)(GLuint renderbuffer, GLenum pname, GLint *params); -GLAPI PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC glad_glGetNamedRenderbufferParameteriv; -#define glGetNamedRenderbufferParameteriv glad_glGetNamedRenderbufferParameteriv -typedef void (APIENTRYP PFNGLCREATETEXTURESPROC)(GLenum target, GLsizei n, GLuint *textures); -GLAPI PFNGLCREATETEXTURESPROC glad_glCreateTextures; -#define glCreateTextures glad_glCreateTextures -typedef void (APIENTRYP PFNGLTEXTUREBUFFERPROC)(GLuint texture, GLenum internalformat, GLuint buffer); -GLAPI PFNGLTEXTUREBUFFERPROC glad_glTextureBuffer; -#define glTextureBuffer glad_glTextureBuffer -typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEPROC)(GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI PFNGLTEXTUREBUFFERRANGEPROC glad_glTextureBufferRange; -#define glTextureBufferRange glad_glTextureBufferRange -typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DPROC)(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width); -GLAPI PFNGLTEXTURESTORAGE1DPROC glad_glTextureStorage1D; -#define glTextureStorage1D glad_glTextureStorage1D -typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DPROC)(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI PFNGLTEXTURESTORAGE2DPROC glad_glTextureStorage2D; -#define glTextureStorage2D glad_glTextureStorage2D -typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DPROC)(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -GLAPI PFNGLTEXTURESTORAGE3DPROC glad_glTextureStorage3D; -#define glTextureStorage3D glad_glTextureStorage3D -typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC)(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -GLAPI PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC glad_glTextureStorage2DMultisample; -#define glTextureStorage2DMultisample glad_glTextureStorage2DMultisample -typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC)(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -GLAPI PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC glad_glTextureStorage3DMultisample; -#define glTextureStorage3DMultisample glad_glTextureStorage3DMultisample -typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DPROC)(GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); -GLAPI PFNGLTEXTURESUBIMAGE1DPROC glad_glTextureSubImage1D; -#define glTextureSubImage1D glad_glTextureSubImage1D -typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -GLAPI PFNGLTEXTURESUBIMAGE2DPROC glad_glTextureSubImage2D; -#define glTextureSubImage2D glad_glTextureSubImage2D -typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -GLAPI PFNGLTEXTURESUBIMAGE3DPROC glad_glTextureSubImage3D; -#define glTextureSubImage3D glad_glTextureSubImage3D -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC)(GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); -GLAPI PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC glad_glCompressedTextureSubImage1D; -#define glCompressedTextureSubImage1D glad_glCompressedTextureSubImage1D -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); -GLAPI PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC glad_glCompressedTextureSubImage2D; -#define glCompressedTextureSubImage2D glad_glCompressedTextureSubImage2D -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -GLAPI PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC glad_glCompressedTextureSubImage3D; -#define glCompressedTextureSubImage3D glad_glCompressedTextureSubImage3D -typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DPROC)(GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -GLAPI PFNGLCOPYTEXTURESUBIMAGE1DPROC glad_glCopyTextureSubImage1D; -#define glCopyTextureSubImage1D glad_glCopyTextureSubImage1D -typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI PFNGLCOPYTEXTURESUBIMAGE2DPROC glad_glCopyTextureSubImage2D; -#define glCopyTextureSubImage2D glad_glCopyTextureSubImage2D -typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI PFNGLCOPYTEXTURESUBIMAGE3DPROC glad_glCopyTextureSubImage3D; -#define glCopyTextureSubImage3D glad_glCopyTextureSubImage3D -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFPROC)(GLuint texture, GLenum pname, GLfloat param); -GLAPI PFNGLTEXTUREPARAMETERFPROC glad_glTextureParameterf; -#define glTextureParameterf glad_glTextureParameterf -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVPROC)(GLuint texture, GLenum pname, const GLfloat *param); -GLAPI PFNGLTEXTUREPARAMETERFVPROC glad_glTextureParameterfv; -#define glTextureParameterfv glad_glTextureParameterfv -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIPROC)(GLuint texture, GLenum pname, GLint param); -GLAPI PFNGLTEXTUREPARAMETERIPROC glad_glTextureParameteri; -#define glTextureParameteri glad_glTextureParameteri -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVPROC)(GLuint texture, GLenum pname, const GLint *params); -GLAPI PFNGLTEXTUREPARAMETERIIVPROC glad_glTextureParameterIiv; -#define glTextureParameterIiv glad_glTextureParameterIiv -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVPROC)(GLuint texture, GLenum pname, const GLuint *params); -GLAPI PFNGLTEXTUREPARAMETERIUIVPROC glad_glTextureParameterIuiv; -#define glTextureParameterIuiv glad_glTextureParameterIuiv -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVPROC)(GLuint texture, GLenum pname, const GLint *param); -GLAPI PFNGLTEXTUREPARAMETERIVPROC glad_glTextureParameteriv; -#define glTextureParameteriv glad_glTextureParameteriv -typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPPROC)(GLuint texture); -GLAPI PFNGLGENERATETEXTUREMIPMAPPROC glad_glGenerateTextureMipmap; -#define glGenerateTextureMipmap glad_glGenerateTextureMipmap -typedef void (APIENTRYP PFNGLBINDTEXTUREUNITPROC)(GLuint unit, GLuint texture); -GLAPI PFNGLBINDTEXTUREUNITPROC glad_glBindTextureUnit; -#define glBindTextureUnit glad_glBindTextureUnit -typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEPROC)(GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels); -GLAPI PFNGLGETTEXTUREIMAGEPROC glad_glGetTextureImage; -#define glGetTextureImage glad_glGetTextureImage -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC)(GLuint texture, GLint level, GLsizei bufSize, void *pixels); -GLAPI PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC glad_glGetCompressedTextureImage; -#define glGetCompressedTextureImage glad_glGetCompressedTextureImage -typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVPROC)(GLuint texture, GLint level, GLenum pname, GLfloat *params); -GLAPI PFNGLGETTEXTURELEVELPARAMETERFVPROC glad_glGetTextureLevelParameterfv; -#define glGetTextureLevelParameterfv glad_glGetTextureLevelParameterfv -typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVPROC)(GLuint texture, GLint level, GLenum pname, GLint *params); -GLAPI PFNGLGETTEXTURELEVELPARAMETERIVPROC glad_glGetTextureLevelParameteriv; -#define glGetTextureLevelParameteriv glad_glGetTextureLevelParameteriv -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVPROC)(GLuint texture, GLenum pname, GLfloat *params); -GLAPI PFNGLGETTEXTUREPARAMETERFVPROC glad_glGetTextureParameterfv; -#define glGetTextureParameterfv glad_glGetTextureParameterfv -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVPROC)(GLuint texture, GLenum pname, GLint *params); -GLAPI PFNGLGETTEXTUREPARAMETERIIVPROC glad_glGetTextureParameterIiv; -#define glGetTextureParameterIiv glad_glGetTextureParameterIiv -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVPROC)(GLuint texture, GLenum pname, GLuint *params); -GLAPI PFNGLGETTEXTUREPARAMETERIUIVPROC glad_glGetTextureParameterIuiv; -#define glGetTextureParameterIuiv glad_glGetTextureParameterIuiv -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVPROC)(GLuint texture, GLenum pname, GLint *params); -GLAPI PFNGLGETTEXTUREPARAMETERIVPROC glad_glGetTextureParameteriv; -#define glGetTextureParameteriv glad_glGetTextureParameteriv -typedef void (APIENTRYP PFNGLCREATEVERTEXARRAYSPROC)(GLsizei n, GLuint *arrays); -GLAPI PFNGLCREATEVERTEXARRAYSPROC glad_glCreateVertexArrays; -#define glCreateVertexArrays glad_glCreateVertexArrays -typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBPROC)(GLuint vaobj, GLuint index); -GLAPI PFNGLDISABLEVERTEXARRAYATTRIBPROC glad_glDisableVertexArrayAttrib; -#define glDisableVertexArrayAttrib glad_glDisableVertexArrayAttrib -typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBPROC)(GLuint vaobj, GLuint index); -GLAPI PFNGLENABLEVERTEXARRAYATTRIBPROC glad_glEnableVertexArrayAttrib; -#define glEnableVertexArrayAttrib glad_glEnableVertexArrayAttrib -typedef void (APIENTRYP PFNGLVERTEXARRAYELEMENTBUFFERPROC)(GLuint vaobj, GLuint buffer); -GLAPI PFNGLVERTEXARRAYELEMENTBUFFERPROC glad_glVertexArrayElementBuffer; -#define glVertexArrayElementBuffer glad_glVertexArrayElementBuffer -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERPROC)(GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -GLAPI PFNGLVERTEXARRAYVERTEXBUFFERPROC glad_glVertexArrayVertexBuffer; -#define glVertexArrayVertexBuffer glad_glVertexArrayVertexBuffer -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERSPROC)(GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides); -GLAPI PFNGLVERTEXARRAYVERTEXBUFFERSPROC glad_glVertexArrayVertexBuffers; -#define glVertexArrayVertexBuffers glad_glVertexArrayVertexBuffers -typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBBINDINGPROC)(GLuint vaobj, GLuint attribindex, GLuint bindingindex); -GLAPI PFNGLVERTEXARRAYATTRIBBINDINGPROC glad_glVertexArrayAttribBinding; -#define glVertexArrayAttribBinding glad_glVertexArrayAttribBinding -typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBFORMATPROC)(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -GLAPI PFNGLVERTEXARRAYATTRIBFORMATPROC glad_glVertexArrayAttribFormat; -#define glVertexArrayAttribFormat glad_glVertexArrayAttribFormat -typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBIFORMATPROC)(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GLAPI PFNGLVERTEXARRAYATTRIBIFORMATPROC glad_glVertexArrayAttribIFormat; -#define glVertexArrayAttribIFormat glad_glVertexArrayAttribIFormat -typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBLFORMATPROC)(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GLAPI PFNGLVERTEXARRAYATTRIBLFORMATPROC glad_glVertexArrayAttribLFormat; -#define glVertexArrayAttribLFormat glad_glVertexArrayAttribLFormat -typedef void (APIENTRYP PFNGLVERTEXARRAYBINDINGDIVISORPROC)(GLuint vaobj, GLuint bindingindex, GLuint divisor); -GLAPI PFNGLVERTEXARRAYBINDINGDIVISORPROC glad_glVertexArrayBindingDivisor; -#define glVertexArrayBindingDivisor glad_glVertexArrayBindingDivisor -typedef void (APIENTRYP PFNGLGETVERTEXARRAYIVPROC)(GLuint vaobj, GLenum pname, GLint *param); -GLAPI PFNGLGETVERTEXARRAYIVPROC glad_glGetVertexArrayiv; -#define glGetVertexArrayiv glad_glGetVertexArrayiv -typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXEDIVPROC)(GLuint vaobj, GLuint index, GLenum pname, GLint *param); -GLAPI PFNGLGETVERTEXARRAYINDEXEDIVPROC glad_glGetVertexArrayIndexediv; -#define glGetVertexArrayIndexediv glad_glGetVertexArrayIndexediv -typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXED64IVPROC)(GLuint vaobj, GLuint index, GLenum pname, GLint64 *param); -GLAPI PFNGLGETVERTEXARRAYINDEXED64IVPROC glad_glGetVertexArrayIndexed64iv; -#define glGetVertexArrayIndexed64iv glad_glGetVertexArrayIndexed64iv -typedef void (APIENTRYP PFNGLCREATESAMPLERSPROC)(GLsizei n, GLuint *samplers); -GLAPI PFNGLCREATESAMPLERSPROC glad_glCreateSamplers; -#define glCreateSamplers glad_glCreateSamplers -typedef void (APIENTRYP PFNGLCREATEPROGRAMPIPELINESPROC)(GLsizei n, GLuint *pipelines); -GLAPI PFNGLCREATEPROGRAMPIPELINESPROC glad_glCreateProgramPipelines; -#define glCreateProgramPipelines glad_glCreateProgramPipelines -typedef void (APIENTRYP PFNGLCREATEQUERIESPROC)(GLenum target, GLsizei n, GLuint *ids); -GLAPI PFNGLCREATEQUERIESPROC glad_glCreateQueries; -#define glCreateQueries glad_glCreateQueries -typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTI64VPROC)(GLuint id, GLuint buffer, GLenum pname, GLintptr offset); -GLAPI PFNGLGETQUERYBUFFEROBJECTI64VPROC glad_glGetQueryBufferObjecti64v; -#define glGetQueryBufferObjecti64v glad_glGetQueryBufferObjecti64v -typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTIVPROC)(GLuint id, GLuint buffer, GLenum pname, GLintptr offset); -GLAPI PFNGLGETQUERYBUFFEROBJECTIVPROC glad_glGetQueryBufferObjectiv; -#define glGetQueryBufferObjectiv glad_glGetQueryBufferObjectiv -typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTUI64VPROC)(GLuint id, GLuint buffer, GLenum pname, GLintptr offset); -GLAPI PFNGLGETQUERYBUFFEROBJECTUI64VPROC glad_glGetQueryBufferObjectui64v; -#define glGetQueryBufferObjectui64v glad_glGetQueryBufferObjectui64v -typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTUIVPROC)(GLuint id, GLuint buffer, GLenum pname, GLintptr offset); -GLAPI PFNGLGETQUERYBUFFEROBJECTUIVPROC glad_glGetQueryBufferObjectuiv; -#define glGetQueryBufferObjectuiv glad_glGetQueryBufferObjectuiv -typedef void (APIENTRYP PFNGLMEMORYBARRIERBYREGIONPROC)(GLbitfield barriers); -GLAPI PFNGLMEMORYBARRIERBYREGIONPROC glad_glMemoryBarrierByRegion; -#define glMemoryBarrierByRegion glad_glMemoryBarrierByRegion -typedef void (APIENTRYP PFNGLGETTEXTURESUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels); -GLAPI PFNGLGETTEXTURESUBIMAGEPROC glad_glGetTextureSubImage; -#define glGetTextureSubImage glad_glGetTextureSubImage -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels); -GLAPI PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC glad_glGetCompressedTextureSubImage; -#define glGetCompressedTextureSubImage glad_glGetCompressedTextureSubImage -typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSPROC)(void); -GLAPI PFNGLGETGRAPHICSRESETSTATUSPROC glad_glGetGraphicsResetStatus; -#define glGetGraphicsResetStatus glad_glGetGraphicsResetStatus -typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEPROC)(GLenum target, GLint lod, GLsizei bufSize, void *pixels); -GLAPI PFNGLGETNCOMPRESSEDTEXIMAGEPROC glad_glGetnCompressedTexImage; -#define glGetnCompressedTexImage glad_glGetnCompressedTexImage -typedef void (APIENTRYP PFNGLGETNTEXIMAGEPROC)(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels); -GLAPI PFNGLGETNTEXIMAGEPROC glad_glGetnTexImage; -#define glGetnTexImage glad_glGetnTexImage -typedef void (APIENTRYP PFNGLGETNUNIFORMDVPROC)(GLuint program, GLint location, GLsizei bufSize, GLdouble *params); -GLAPI PFNGLGETNUNIFORMDVPROC glad_glGetnUniformdv; -#define glGetnUniformdv glad_glGetnUniformdv -typedef void (APIENTRYP PFNGLGETNUNIFORMFVPROC)(GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -GLAPI PFNGLGETNUNIFORMFVPROC glad_glGetnUniformfv; -#define glGetnUniformfv glad_glGetnUniformfv -typedef void (APIENTRYP PFNGLGETNUNIFORMIVPROC)(GLuint program, GLint location, GLsizei bufSize, GLint *params); -GLAPI PFNGLGETNUNIFORMIVPROC glad_glGetnUniformiv; -#define glGetnUniformiv glad_glGetnUniformiv -typedef void (APIENTRYP PFNGLGETNUNIFORMUIVPROC)(GLuint program, GLint location, GLsizei bufSize, GLuint *params); -GLAPI PFNGLGETNUNIFORMUIVPROC glad_glGetnUniformuiv; -#define glGetnUniformuiv glad_glGetnUniformuiv -typedef void (APIENTRYP PFNGLREADNPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); -GLAPI PFNGLREADNPIXELSPROC glad_glReadnPixels; -#define glReadnPixels glad_glReadnPixels -typedef void (APIENTRYP PFNGLGETNMAPDVPROC)(GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); -GLAPI PFNGLGETNMAPDVPROC glad_glGetnMapdv; -#define glGetnMapdv glad_glGetnMapdv -typedef void (APIENTRYP PFNGLGETNMAPFVPROC)(GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); -GLAPI PFNGLGETNMAPFVPROC glad_glGetnMapfv; -#define glGetnMapfv glad_glGetnMapfv -typedef void (APIENTRYP PFNGLGETNMAPIVPROC)(GLenum target, GLenum query, GLsizei bufSize, GLint *v); -GLAPI PFNGLGETNMAPIVPROC glad_glGetnMapiv; -#define glGetnMapiv glad_glGetnMapiv -typedef void (APIENTRYP PFNGLGETNPIXELMAPFVPROC)(GLenum map, GLsizei bufSize, GLfloat *values); -GLAPI PFNGLGETNPIXELMAPFVPROC glad_glGetnPixelMapfv; -#define glGetnPixelMapfv glad_glGetnPixelMapfv -typedef void (APIENTRYP PFNGLGETNPIXELMAPUIVPROC)(GLenum map, GLsizei bufSize, GLuint *values); -GLAPI PFNGLGETNPIXELMAPUIVPROC glad_glGetnPixelMapuiv; -#define glGetnPixelMapuiv glad_glGetnPixelMapuiv -typedef void (APIENTRYP PFNGLGETNPIXELMAPUSVPROC)(GLenum map, GLsizei bufSize, GLushort *values); -GLAPI PFNGLGETNPIXELMAPUSVPROC glad_glGetnPixelMapusv; -#define glGetnPixelMapusv glad_glGetnPixelMapusv -typedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEPROC)(GLsizei bufSize, GLubyte *pattern); -GLAPI PFNGLGETNPOLYGONSTIPPLEPROC glad_glGetnPolygonStipple; -#define glGetnPolygonStipple glad_glGetnPolygonStipple -typedef void (APIENTRYP PFNGLGETNCOLORTABLEPROC)(GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table); -GLAPI PFNGLGETNCOLORTABLEPROC glad_glGetnColorTable; -#define glGetnColorTable glad_glGetnColorTable -typedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERPROC)(GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image); -GLAPI PFNGLGETNCONVOLUTIONFILTERPROC glad_glGetnConvolutionFilter; -#define glGetnConvolutionFilter glad_glGetnConvolutionFilter -typedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERPROC)(GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span); -GLAPI PFNGLGETNSEPARABLEFILTERPROC glad_glGetnSeparableFilter; -#define glGetnSeparableFilter glad_glGetnSeparableFilter -typedef void (APIENTRYP PFNGLGETNHISTOGRAMPROC)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); -GLAPI PFNGLGETNHISTOGRAMPROC glad_glGetnHistogram; -#define glGetnHistogram glad_glGetnHistogram -typedef void (APIENTRYP PFNGLGETNMINMAXPROC)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); -GLAPI PFNGLGETNMINMAXPROC glad_glGetnMinmax; -#define glGetnMinmax glad_glGetnMinmax -typedef void (APIENTRYP PFNGLTEXTUREBARRIERPROC)(void); -GLAPI PFNGLTEXTUREBARRIERPROC glad_glTextureBarrier; -#define glTextureBarrier glad_glTextureBarrier -#endif -#ifndef GL_VERSION_4_6 -#define GL_VERSION_4_6 1 -GLAPI int GLAD_GL_VERSION_4_6; -typedef void (APIENTRYP PFNGLSPECIALIZESHADERPROC)(GLuint shader, const GLchar *pEntryPoint, GLuint numSpecializationConstants, const GLuint *pConstantIndex, const GLuint *pConstantValue); -GLAPI PFNGLSPECIALIZESHADERPROC glad_glSpecializeShader; -#define glSpecializeShader glad_glSpecializeShader -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC)(GLenum mode, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); -GLAPI PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC glad_glMultiDrawArraysIndirectCount; -#define glMultiDrawArraysIndirectCount glad_glMultiDrawArraysIndirectCount -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC)(GLenum mode, GLenum type, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); -GLAPI PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC glad_glMultiDrawElementsIndirectCount; -#define glMultiDrawElementsIndirectCount glad_glMultiDrawElementsIndirectCount -typedef void (APIENTRYP PFNGLPOLYGONOFFSETCLAMPPROC)(GLfloat factor, GLfloat units, GLfloat clamp); -GLAPI PFNGLPOLYGONOFFSETCLAMPPROC glad_glPolygonOffsetClamp; -#define glPolygonOffsetClamp glad_glPolygonOffsetClamp -#endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/Navigator/vendor/glad/premake5.lua b/Navigator/vendor/glad/premake5.lua deleted file mode 100644 index d0e26fc..0000000 --- a/Navigator/vendor/glad/premake5.lua +++ /dev/null @@ -1,35 +0,0 @@ - -project "GLAD" - kind "StaticLib" - language "C" - staticruntime "on" - - targetdir ("bin/" .. outputdir .. "/%{prj.name}") - objdir ("bin-int/" .. outputdir .. "/%{prj.name}") - - files { - "include/glad/glad.h", - "include/KHR/khrplatform.h", - "src/glad.c" - } - - includedirs { - "include" - } - - filter "system:windows" - systemversion "latest" - filter "system:linux or macosx" - systemversion "latest" - pic "on" - filter "system:macosx" - systemversion "latest" - sysincludedirs { "include" } - - filter "configurations:Debug" - runtime "Debug" - symbols "on" - - filter "configurations:Release" - runtime "Release" - optimize "on" diff --git a/Navigator/vendor/glad/src/glad.c b/Navigator/vendor/glad/src/glad.c deleted file mode 100644 index b9614c0..0000000 --- a/Navigator/vendor/glad/src/glad.c +++ /dev/null @@ -1,1833 +0,0 @@ -/* - - OpenGL loader generated by glad 0.1.34 on Sun Dec 19 21:33:48 2021. - - Language/Generator: C/C++ - Specification: gl - APIs: gl=4.6 - Profile: core - Extensions: - - Loader: True - Local files: False - Omit khrplatform: False - Reproducible: False - - Commandline: - --profile="core" --api="gl=4.6" --generator="c" --spec="gl" --extensions="" - Online: - https://glad.dav1d.de/#profile=core&language=c&specification=gl&loader=on&api=gl%3D4.6 -*/ - -#include -#include -#include -#include - -static void* get_proc(const char *namez); - -#if defined(_WIN32) || defined(__CYGWIN__) -#ifndef _WINDOWS_ -#undef APIENTRY -#endif -#include -static HMODULE libGL; - -typedef void* (APIENTRYP PFNWGLGETPROCADDRESSPROC_PRIVATE)(const char*); -static PFNWGLGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr; - -#ifdef _MSC_VER -#ifdef __has_include - #if __has_include() - #define HAVE_WINAPIFAMILY 1 - #endif -#elif _MSC_VER >= 1700 && !_USING_V110_SDK71_ - #define HAVE_WINAPIFAMILY 1 -#endif -#endif - -#ifdef HAVE_WINAPIFAMILY - #include - #if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) - #define IS_UWP 1 - #endif -#endif - -static -int open_gl(void) { -#ifndef IS_UWP - libGL = LoadLibraryW(L"opengl32.dll"); - if(libGL != NULL) { - void (* tmp)(void); - tmp = (void(*)(void)) GetProcAddress(libGL, "wglGetProcAddress"); - gladGetProcAddressPtr = (PFNWGLGETPROCADDRESSPROC_PRIVATE) tmp; - return gladGetProcAddressPtr != NULL; - } -#endif - - return 0; -} - -static -void close_gl(void) { - if(libGL != NULL) { - FreeLibrary((HMODULE) libGL); - libGL = NULL; - } -} -#else -#include -static void* libGL; - -#if !defined(__APPLE__) && !defined(__HAIKU__) -typedef void* (APIENTRYP PFNGLXGETPROCADDRESSPROC_PRIVATE)(const char*); -static PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr; -#endif - -static -int open_gl(void) { -#ifdef __APPLE__ - static const char *NAMES[] = { - "../Frameworks/OpenGL.framework/OpenGL", - "/Library/Frameworks/OpenGL.framework/OpenGL", - "/System/Library/Frameworks/OpenGL.framework/OpenGL", - "/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL" - }; -#else - static const char *NAMES[] = {"libGL.so.1", "libGL.so"}; -#endif - - unsigned int index = 0; - for(index = 0; index < (sizeof(NAMES) / sizeof(NAMES[0])); index++) { - libGL = dlopen(NAMES[index], RTLD_NOW | RTLD_GLOBAL); - - if(libGL != NULL) { -#if defined(__APPLE__) || defined(__HAIKU__) - return 1; -#else - gladGetProcAddressPtr = (PFNGLXGETPROCADDRESSPROC_PRIVATE)dlsym(libGL, - "glXGetProcAddressARB"); - return gladGetProcAddressPtr != NULL; -#endif - } - } - - return 0; -} - -static -void close_gl(void) { - if(libGL != NULL) { - dlclose(libGL); - libGL = NULL; - } -} -#endif - -static -void* get_proc(const char *namez) { - void* result = NULL; - if(libGL == NULL) return NULL; - -#if !defined(__APPLE__) && !defined(__HAIKU__) - if(gladGetProcAddressPtr != NULL) { - result = gladGetProcAddressPtr(namez); - } -#endif - if(result == NULL) { -#if defined(_WIN32) || defined(__CYGWIN__) - result = (void*)GetProcAddress((HMODULE) libGL, namez); -#else - result = dlsym(libGL, namez); -#endif - } - - return result; -} - -int gladLoadGL(void) { - int status = 0; - - if(open_gl()) { - status = gladLoadGLLoader(&get_proc); - close_gl(); - } - - return status; -} - -struct gladGLversionStruct GLVersion = { 0, 0 }; - -#if defined(GL_ES_VERSION_3_0) || defined(GL_VERSION_3_0) -#define _GLAD_IS_SOME_NEW_VERSION 1 -#endif - -static int max_loaded_major; -static int max_loaded_minor; - -static const char *exts = NULL; -static int num_exts_i = 0; -static char **exts_i = NULL; - -static int get_exts(void) { -#ifdef _GLAD_IS_SOME_NEW_VERSION - if(max_loaded_major < 3) { -#endif - exts = (const char *)glGetString(GL_EXTENSIONS); -#ifdef _GLAD_IS_SOME_NEW_VERSION - } else { - unsigned int index; - - num_exts_i = 0; - glGetIntegerv(GL_NUM_EXTENSIONS, &num_exts_i); - if (num_exts_i > 0) { - exts_i = (char **)malloc((size_t)num_exts_i * (sizeof *exts_i)); - } - - if (exts_i == NULL) { - return 0; - } - - for(index = 0; index < (unsigned)num_exts_i; index++) { - const char *gl_str_tmp = (const char*)glGetStringi(GL_EXTENSIONS, index); - size_t len = strlen(gl_str_tmp); - - char *local_str = (char*)malloc((len+1) * sizeof(char)); - if(local_str != NULL) { - memcpy(local_str, gl_str_tmp, (len+1) * sizeof(char)); - } - exts_i[index] = local_str; - } - } -#endif - return 1; -} - -static void free_exts(void) { - if (exts_i != NULL) { - int index; - for(index = 0; index < num_exts_i; index++) { - free((char *)exts_i[index]); - } - free((void *)exts_i); - exts_i = NULL; - } -} - -static int has_ext(const char *ext) { -#ifdef _GLAD_IS_SOME_NEW_VERSION - if(max_loaded_major < 3) { -#endif - const char *extensions; - const char *loc; - const char *terminator; - extensions = exts; - if(extensions == NULL || ext == NULL) { - return 0; - } - - while(1) { - loc = strstr(extensions, ext); - if(loc == NULL) { - return 0; - } - - terminator = loc + strlen(ext); - if((loc == extensions || *(loc - 1) == ' ') && - (*terminator == ' ' || *terminator == '\0')) { - return 1; - } - extensions = terminator; - } -#ifdef _GLAD_IS_SOME_NEW_VERSION - } else { - int index; - if(exts_i == NULL) return 0; - for(index = 0; index < num_exts_i; index++) { - const char *e = exts_i[index]; - - if(exts_i[index] != NULL && strcmp(e, ext) == 0) { - return 1; - } - } - } -#endif - - return 0; -} -int GLAD_GL_VERSION_1_0 = 0; -int GLAD_GL_VERSION_1_1 = 0; -int GLAD_GL_VERSION_1_2 = 0; -int GLAD_GL_VERSION_1_3 = 0; -int GLAD_GL_VERSION_1_4 = 0; -int GLAD_GL_VERSION_1_5 = 0; -int GLAD_GL_VERSION_2_0 = 0; -int GLAD_GL_VERSION_2_1 = 0; -int GLAD_GL_VERSION_3_0 = 0; -int GLAD_GL_VERSION_3_1 = 0; -int GLAD_GL_VERSION_3_2 = 0; -int GLAD_GL_VERSION_3_3 = 0; -int GLAD_GL_VERSION_4_0 = 0; -int GLAD_GL_VERSION_4_1 = 0; -int GLAD_GL_VERSION_4_2 = 0; -int GLAD_GL_VERSION_4_3 = 0; -int GLAD_GL_VERSION_4_4 = 0; -int GLAD_GL_VERSION_4_5 = 0; -int GLAD_GL_VERSION_4_6 = 0; -PFNGLACTIVESHADERPROGRAMPROC glad_glActiveShaderProgram = NULL; -PFNGLACTIVETEXTUREPROC glad_glActiveTexture = NULL; -PFNGLATTACHSHADERPROC glad_glAttachShader = NULL; -PFNGLBEGINCONDITIONALRENDERPROC glad_glBeginConditionalRender = NULL; -PFNGLBEGINQUERYPROC glad_glBeginQuery = NULL; -PFNGLBEGINQUERYINDEXEDPROC glad_glBeginQueryIndexed = NULL; -PFNGLBEGINTRANSFORMFEEDBACKPROC glad_glBeginTransformFeedback = NULL; -PFNGLBINDATTRIBLOCATIONPROC glad_glBindAttribLocation = NULL; -PFNGLBINDBUFFERPROC glad_glBindBuffer = NULL; -PFNGLBINDBUFFERBASEPROC glad_glBindBufferBase = NULL; -PFNGLBINDBUFFERRANGEPROC glad_glBindBufferRange = NULL; -PFNGLBINDBUFFERSBASEPROC glad_glBindBuffersBase = NULL; -PFNGLBINDBUFFERSRANGEPROC glad_glBindBuffersRange = NULL; -PFNGLBINDFRAGDATALOCATIONPROC glad_glBindFragDataLocation = NULL; -PFNGLBINDFRAGDATALOCATIONINDEXEDPROC glad_glBindFragDataLocationIndexed = NULL; -PFNGLBINDFRAMEBUFFERPROC glad_glBindFramebuffer = NULL; -PFNGLBINDIMAGETEXTUREPROC glad_glBindImageTexture = NULL; -PFNGLBINDIMAGETEXTURESPROC glad_glBindImageTextures = NULL; -PFNGLBINDPROGRAMPIPELINEPROC glad_glBindProgramPipeline = NULL; -PFNGLBINDRENDERBUFFERPROC glad_glBindRenderbuffer = NULL; -PFNGLBINDSAMPLERPROC glad_glBindSampler = NULL; -PFNGLBINDSAMPLERSPROC glad_glBindSamplers = NULL; -PFNGLBINDTEXTUREPROC glad_glBindTexture = NULL; -PFNGLBINDTEXTUREUNITPROC glad_glBindTextureUnit = NULL; -PFNGLBINDTEXTURESPROC glad_glBindTextures = NULL; -PFNGLBINDTRANSFORMFEEDBACKPROC glad_glBindTransformFeedback = NULL; -PFNGLBINDVERTEXARRAYPROC glad_glBindVertexArray = NULL; -PFNGLBINDVERTEXBUFFERPROC glad_glBindVertexBuffer = NULL; -PFNGLBINDVERTEXBUFFERSPROC glad_glBindVertexBuffers = NULL; -PFNGLBLENDCOLORPROC glad_glBlendColor = NULL; -PFNGLBLENDEQUATIONPROC glad_glBlendEquation = NULL; -PFNGLBLENDEQUATIONSEPARATEPROC glad_glBlendEquationSeparate = NULL; -PFNGLBLENDEQUATIONSEPARATEIPROC glad_glBlendEquationSeparatei = NULL; -PFNGLBLENDEQUATIONIPROC glad_glBlendEquationi = NULL; -PFNGLBLENDFUNCPROC glad_glBlendFunc = NULL; -PFNGLBLENDFUNCSEPARATEPROC glad_glBlendFuncSeparate = NULL; -PFNGLBLENDFUNCSEPARATEIPROC glad_glBlendFuncSeparatei = NULL; -PFNGLBLENDFUNCIPROC glad_glBlendFunci = NULL; -PFNGLBLITFRAMEBUFFERPROC glad_glBlitFramebuffer = NULL; -PFNGLBLITNAMEDFRAMEBUFFERPROC glad_glBlitNamedFramebuffer = NULL; -PFNGLBUFFERDATAPROC glad_glBufferData = NULL; -PFNGLBUFFERSTORAGEPROC glad_glBufferStorage = NULL; -PFNGLBUFFERSUBDATAPROC glad_glBufferSubData = NULL; -PFNGLCHECKFRAMEBUFFERSTATUSPROC glad_glCheckFramebufferStatus = NULL; -PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC glad_glCheckNamedFramebufferStatus = NULL; -PFNGLCLAMPCOLORPROC glad_glClampColor = NULL; -PFNGLCLEARPROC glad_glClear = NULL; -PFNGLCLEARBUFFERDATAPROC glad_glClearBufferData = NULL; -PFNGLCLEARBUFFERSUBDATAPROC glad_glClearBufferSubData = NULL; -PFNGLCLEARBUFFERFIPROC glad_glClearBufferfi = NULL; -PFNGLCLEARBUFFERFVPROC glad_glClearBufferfv = NULL; -PFNGLCLEARBUFFERIVPROC glad_glClearBufferiv = NULL; -PFNGLCLEARBUFFERUIVPROC glad_glClearBufferuiv = NULL; -PFNGLCLEARCOLORPROC glad_glClearColor = NULL; -PFNGLCLEARDEPTHPROC glad_glClearDepth = NULL; -PFNGLCLEARDEPTHFPROC glad_glClearDepthf = NULL; -PFNGLCLEARNAMEDBUFFERDATAPROC glad_glClearNamedBufferData = NULL; -PFNGLCLEARNAMEDBUFFERSUBDATAPROC glad_glClearNamedBufferSubData = NULL; -PFNGLCLEARNAMEDFRAMEBUFFERFIPROC glad_glClearNamedFramebufferfi = NULL; -PFNGLCLEARNAMEDFRAMEBUFFERFVPROC glad_glClearNamedFramebufferfv = NULL; -PFNGLCLEARNAMEDFRAMEBUFFERIVPROC glad_glClearNamedFramebufferiv = NULL; -PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC glad_glClearNamedFramebufferuiv = NULL; -PFNGLCLEARSTENCILPROC glad_glClearStencil = NULL; -PFNGLCLEARTEXIMAGEPROC glad_glClearTexImage = NULL; -PFNGLCLEARTEXSUBIMAGEPROC glad_glClearTexSubImage = NULL; -PFNGLCLIENTWAITSYNCPROC glad_glClientWaitSync = NULL; -PFNGLCLIPCONTROLPROC glad_glClipControl = NULL; -PFNGLCOLORMASKPROC glad_glColorMask = NULL; -PFNGLCOLORMASKIPROC glad_glColorMaski = NULL; -PFNGLCOLORP3UIPROC glad_glColorP3ui = NULL; -PFNGLCOLORP3UIVPROC glad_glColorP3uiv = NULL; -PFNGLCOLORP4UIPROC glad_glColorP4ui = NULL; -PFNGLCOLORP4UIVPROC glad_glColorP4uiv = NULL; -PFNGLCOMPILESHADERPROC glad_glCompileShader = NULL; -PFNGLCOMPRESSEDTEXIMAGE1DPROC glad_glCompressedTexImage1D = NULL; -PFNGLCOMPRESSEDTEXIMAGE2DPROC glad_glCompressedTexImage2D = NULL; -PFNGLCOMPRESSEDTEXIMAGE3DPROC glad_glCompressedTexImage3D = NULL; -PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glad_glCompressedTexSubImage1D = NULL; -PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glad_glCompressedTexSubImage2D = NULL; -PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glad_glCompressedTexSubImage3D = NULL; -PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC glad_glCompressedTextureSubImage1D = NULL; -PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC glad_glCompressedTextureSubImage2D = NULL; -PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC glad_glCompressedTextureSubImage3D = NULL; -PFNGLCOPYBUFFERSUBDATAPROC glad_glCopyBufferSubData = NULL; -PFNGLCOPYIMAGESUBDATAPROC glad_glCopyImageSubData = NULL; -PFNGLCOPYNAMEDBUFFERSUBDATAPROC glad_glCopyNamedBufferSubData = NULL; -PFNGLCOPYTEXIMAGE1DPROC glad_glCopyTexImage1D = NULL; -PFNGLCOPYTEXIMAGE2DPROC glad_glCopyTexImage2D = NULL; -PFNGLCOPYTEXSUBIMAGE1DPROC glad_glCopyTexSubImage1D = NULL; -PFNGLCOPYTEXSUBIMAGE2DPROC glad_glCopyTexSubImage2D = NULL; -PFNGLCOPYTEXSUBIMAGE3DPROC glad_glCopyTexSubImage3D = NULL; -PFNGLCOPYTEXTURESUBIMAGE1DPROC glad_glCopyTextureSubImage1D = NULL; -PFNGLCOPYTEXTURESUBIMAGE2DPROC glad_glCopyTextureSubImage2D = NULL; -PFNGLCOPYTEXTURESUBIMAGE3DPROC glad_glCopyTextureSubImage3D = NULL; -PFNGLCREATEBUFFERSPROC glad_glCreateBuffers = NULL; -PFNGLCREATEFRAMEBUFFERSPROC glad_glCreateFramebuffers = NULL; -PFNGLCREATEPROGRAMPROC glad_glCreateProgram = NULL; -PFNGLCREATEPROGRAMPIPELINESPROC glad_glCreateProgramPipelines = NULL; -PFNGLCREATEQUERIESPROC glad_glCreateQueries = NULL; -PFNGLCREATERENDERBUFFERSPROC glad_glCreateRenderbuffers = NULL; -PFNGLCREATESAMPLERSPROC glad_glCreateSamplers = NULL; -PFNGLCREATESHADERPROC glad_glCreateShader = NULL; -PFNGLCREATESHADERPROGRAMVPROC glad_glCreateShaderProgramv = NULL; -PFNGLCREATETEXTURESPROC glad_glCreateTextures = NULL; -PFNGLCREATETRANSFORMFEEDBACKSPROC glad_glCreateTransformFeedbacks = NULL; -PFNGLCREATEVERTEXARRAYSPROC glad_glCreateVertexArrays = NULL; -PFNGLCULLFACEPROC glad_glCullFace = NULL; -PFNGLDEBUGMESSAGECALLBACKPROC glad_glDebugMessageCallback = NULL; -PFNGLDEBUGMESSAGECONTROLPROC glad_glDebugMessageControl = NULL; -PFNGLDEBUGMESSAGEINSERTPROC glad_glDebugMessageInsert = NULL; -PFNGLDELETEBUFFERSPROC glad_glDeleteBuffers = NULL; -PFNGLDELETEFRAMEBUFFERSPROC glad_glDeleteFramebuffers = NULL; -PFNGLDELETEPROGRAMPROC glad_glDeleteProgram = NULL; -PFNGLDELETEPROGRAMPIPELINESPROC glad_glDeleteProgramPipelines = NULL; -PFNGLDELETEQUERIESPROC glad_glDeleteQueries = NULL; -PFNGLDELETERENDERBUFFERSPROC glad_glDeleteRenderbuffers = NULL; -PFNGLDELETESAMPLERSPROC glad_glDeleteSamplers = NULL; -PFNGLDELETESHADERPROC glad_glDeleteShader = NULL; -PFNGLDELETESYNCPROC glad_glDeleteSync = NULL; -PFNGLDELETETEXTURESPROC glad_glDeleteTextures = NULL; -PFNGLDELETETRANSFORMFEEDBACKSPROC glad_glDeleteTransformFeedbacks = NULL; -PFNGLDELETEVERTEXARRAYSPROC glad_glDeleteVertexArrays = NULL; -PFNGLDEPTHFUNCPROC glad_glDepthFunc = NULL; -PFNGLDEPTHMASKPROC glad_glDepthMask = NULL; -PFNGLDEPTHRANGEPROC glad_glDepthRange = NULL; -PFNGLDEPTHRANGEARRAYVPROC glad_glDepthRangeArrayv = NULL; -PFNGLDEPTHRANGEINDEXEDPROC glad_glDepthRangeIndexed = NULL; -PFNGLDEPTHRANGEFPROC glad_glDepthRangef = NULL; -PFNGLDETACHSHADERPROC glad_glDetachShader = NULL; -PFNGLDISABLEPROC glad_glDisable = NULL; -PFNGLDISABLEVERTEXARRAYATTRIBPROC glad_glDisableVertexArrayAttrib = NULL; -PFNGLDISABLEVERTEXATTRIBARRAYPROC glad_glDisableVertexAttribArray = NULL; -PFNGLDISABLEIPROC glad_glDisablei = NULL; -PFNGLDISPATCHCOMPUTEPROC glad_glDispatchCompute = NULL; -PFNGLDISPATCHCOMPUTEINDIRECTPROC glad_glDispatchComputeIndirect = NULL; -PFNGLDRAWARRAYSPROC glad_glDrawArrays = NULL; -PFNGLDRAWARRAYSINDIRECTPROC glad_glDrawArraysIndirect = NULL; -PFNGLDRAWARRAYSINSTANCEDPROC glad_glDrawArraysInstanced = NULL; -PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC glad_glDrawArraysInstancedBaseInstance = NULL; -PFNGLDRAWBUFFERPROC glad_glDrawBuffer = NULL; -PFNGLDRAWBUFFERSPROC glad_glDrawBuffers = NULL; -PFNGLDRAWELEMENTSPROC glad_glDrawElements = NULL; -PFNGLDRAWELEMENTSBASEVERTEXPROC glad_glDrawElementsBaseVertex = NULL; -PFNGLDRAWELEMENTSINDIRECTPROC glad_glDrawElementsIndirect = NULL; -PFNGLDRAWELEMENTSINSTANCEDPROC glad_glDrawElementsInstanced = NULL; -PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC glad_glDrawElementsInstancedBaseInstance = NULL; -PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glad_glDrawElementsInstancedBaseVertex = NULL; -PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC glad_glDrawElementsInstancedBaseVertexBaseInstance = NULL; -PFNGLDRAWRANGEELEMENTSPROC glad_glDrawRangeElements = NULL; -PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC glad_glDrawRangeElementsBaseVertex = NULL; -PFNGLDRAWTRANSFORMFEEDBACKPROC glad_glDrawTransformFeedback = NULL; -PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC glad_glDrawTransformFeedbackInstanced = NULL; -PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC glad_glDrawTransformFeedbackStream = NULL; -PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC glad_glDrawTransformFeedbackStreamInstanced = NULL; -PFNGLENABLEPROC glad_glEnable = NULL; -PFNGLENABLEVERTEXARRAYATTRIBPROC glad_glEnableVertexArrayAttrib = NULL; -PFNGLENABLEVERTEXATTRIBARRAYPROC glad_glEnableVertexAttribArray = NULL; -PFNGLENABLEIPROC glad_glEnablei = NULL; -PFNGLENDCONDITIONALRENDERPROC glad_glEndConditionalRender = NULL; -PFNGLENDQUERYPROC glad_glEndQuery = NULL; -PFNGLENDQUERYINDEXEDPROC glad_glEndQueryIndexed = NULL; -PFNGLENDTRANSFORMFEEDBACKPROC glad_glEndTransformFeedback = NULL; -PFNGLFENCESYNCPROC glad_glFenceSync = NULL; -PFNGLFINISHPROC glad_glFinish = NULL; -PFNGLFLUSHPROC glad_glFlush = NULL; -PFNGLFLUSHMAPPEDBUFFERRANGEPROC glad_glFlushMappedBufferRange = NULL; -PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC glad_glFlushMappedNamedBufferRange = NULL; -PFNGLFRAMEBUFFERPARAMETERIPROC glad_glFramebufferParameteri = NULL; -PFNGLFRAMEBUFFERRENDERBUFFERPROC glad_glFramebufferRenderbuffer = NULL; -PFNGLFRAMEBUFFERTEXTUREPROC glad_glFramebufferTexture = NULL; -PFNGLFRAMEBUFFERTEXTURE1DPROC glad_glFramebufferTexture1D = NULL; -PFNGLFRAMEBUFFERTEXTURE2DPROC glad_glFramebufferTexture2D = NULL; -PFNGLFRAMEBUFFERTEXTURE3DPROC glad_glFramebufferTexture3D = NULL; -PFNGLFRAMEBUFFERTEXTURELAYERPROC glad_glFramebufferTextureLayer = NULL; -PFNGLFRONTFACEPROC glad_glFrontFace = NULL; -PFNGLGENBUFFERSPROC glad_glGenBuffers = NULL; -PFNGLGENFRAMEBUFFERSPROC glad_glGenFramebuffers = NULL; -PFNGLGENPROGRAMPIPELINESPROC glad_glGenProgramPipelines = NULL; -PFNGLGENQUERIESPROC glad_glGenQueries = NULL; -PFNGLGENRENDERBUFFERSPROC glad_glGenRenderbuffers = NULL; -PFNGLGENSAMPLERSPROC glad_glGenSamplers = NULL; -PFNGLGENTEXTURESPROC glad_glGenTextures = NULL; -PFNGLGENTRANSFORMFEEDBACKSPROC glad_glGenTransformFeedbacks = NULL; -PFNGLGENVERTEXARRAYSPROC glad_glGenVertexArrays = NULL; -PFNGLGENERATEMIPMAPPROC glad_glGenerateMipmap = NULL; -PFNGLGENERATETEXTUREMIPMAPPROC glad_glGenerateTextureMipmap = NULL; -PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC glad_glGetActiveAtomicCounterBufferiv = NULL; -PFNGLGETACTIVEATTRIBPROC glad_glGetActiveAttrib = NULL; -PFNGLGETACTIVESUBROUTINENAMEPROC glad_glGetActiveSubroutineName = NULL; -PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC glad_glGetActiveSubroutineUniformName = NULL; -PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC glad_glGetActiveSubroutineUniformiv = NULL; -PFNGLGETACTIVEUNIFORMPROC glad_glGetActiveUniform = NULL; -PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glad_glGetActiveUniformBlockName = NULL; -PFNGLGETACTIVEUNIFORMBLOCKIVPROC glad_glGetActiveUniformBlockiv = NULL; -PFNGLGETACTIVEUNIFORMNAMEPROC glad_glGetActiveUniformName = NULL; -PFNGLGETACTIVEUNIFORMSIVPROC glad_glGetActiveUniformsiv = NULL; -PFNGLGETATTACHEDSHADERSPROC glad_glGetAttachedShaders = NULL; -PFNGLGETATTRIBLOCATIONPROC glad_glGetAttribLocation = NULL; -PFNGLGETBOOLEANI_VPROC glad_glGetBooleani_v = NULL; -PFNGLGETBOOLEANVPROC glad_glGetBooleanv = NULL; -PFNGLGETBUFFERPARAMETERI64VPROC glad_glGetBufferParameteri64v = NULL; -PFNGLGETBUFFERPARAMETERIVPROC glad_glGetBufferParameteriv = NULL; -PFNGLGETBUFFERPOINTERVPROC glad_glGetBufferPointerv = NULL; -PFNGLGETBUFFERSUBDATAPROC glad_glGetBufferSubData = NULL; -PFNGLGETCOMPRESSEDTEXIMAGEPROC glad_glGetCompressedTexImage = NULL; -PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC glad_glGetCompressedTextureImage = NULL; -PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC glad_glGetCompressedTextureSubImage = NULL; -PFNGLGETDEBUGMESSAGELOGPROC glad_glGetDebugMessageLog = NULL; -PFNGLGETDOUBLEI_VPROC glad_glGetDoublei_v = NULL; -PFNGLGETDOUBLEVPROC glad_glGetDoublev = NULL; -PFNGLGETERRORPROC glad_glGetError = NULL; -PFNGLGETFLOATI_VPROC glad_glGetFloati_v = NULL; -PFNGLGETFLOATVPROC glad_glGetFloatv = NULL; -PFNGLGETFRAGDATAINDEXPROC glad_glGetFragDataIndex = NULL; -PFNGLGETFRAGDATALOCATIONPROC glad_glGetFragDataLocation = NULL; -PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glad_glGetFramebufferAttachmentParameteriv = NULL; -PFNGLGETFRAMEBUFFERPARAMETERIVPROC glad_glGetFramebufferParameteriv = NULL; -PFNGLGETGRAPHICSRESETSTATUSPROC glad_glGetGraphicsResetStatus = NULL; -PFNGLGETINTEGER64I_VPROC glad_glGetInteger64i_v = NULL; -PFNGLGETINTEGER64VPROC glad_glGetInteger64v = NULL; -PFNGLGETINTEGERI_VPROC glad_glGetIntegeri_v = NULL; -PFNGLGETINTEGERVPROC glad_glGetIntegerv = NULL; -PFNGLGETINTERNALFORMATI64VPROC glad_glGetInternalformati64v = NULL; -PFNGLGETINTERNALFORMATIVPROC glad_glGetInternalformativ = NULL; -PFNGLGETMULTISAMPLEFVPROC glad_glGetMultisamplefv = NULL; -PFNGLGETNAMEDBUFFERPARAMETERI64VPROC glad_glGetNamedBufferParameteri64v = NULL; -PFNGLGETNAMEDBUFFERPARAMETERIVPROC glad_glGetNamedBufferParameteriv = NULL; -PFNGLGETNAMEDBUFFERPOINTERVPROC glad_glGetNamedBufferPointerv = NULL; -PFNGLGETNAMEDBUFFERSUBDATAPROC glad_glGetNamedBufferSubData = NULL; -PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC glad_glGetNamedFramebufferAttachmentParameteriv = NULL; -PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC glad_glGetNamedFramebufferParameteriv = NULL; -PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC glad_glGetNamedRenderbufferParameteriv = NULL; -PFNGLGETOBJECTLABELPROC glad_glGetObjectLabel = NULL; -PFNGLGETOBJECTPTRLABELPROC glad_glGetObjectPtrLabel = NULL; -PFNGLGETPOINTERVPROC glad_glGetPointerv = NULL; -PFNGLGETPROGRAMBINARYPROC glad_glGetProgramBinary = NULL; -PFNGLGETPROGRAMINFOLOGPROC glad_glGetProgramInfoLog = NULL; -PFNGLGETPROGRAMINTERFACEIVPROC glad_glGetProgramInterfaceiv = NULL; -PFNGLGETPROGRAMPIPELINEINFOLOGPROC glad_glGetProgramPipelineInfoLog = NULL; -PFNGLGETPROGRAMPIPELINEIVPROC glad_glGetProgramPipelineiv = NULL; -PFNGLGETPROGRAMRESOURCEINDEXPROC glad_glGetProgramResourceIndex = NULL; -PFNGLGETPROGRAMRESOURCELOCATIONPROC glad_glGetProgramResourceLocation = NULL; -PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC glad_glGetProgramResourceLocationIndex = NULL; -PFNGLGETPROGRAMRESOURCENAMEPROC glad_glGetProgramResourceName = NULL; -PFNGLGETPROGRAMRESOURCEIVPROC glad_glGetProgramResourceiv = NULL; -PFNGLGETPROGRAMSTAGEIVPROC glad_glGetProgramStageiv = NULL; -PFNGLGETPROGRAMIVPROC glad_glGetProgramiv = NULL; -PFNGLGETQUERYBUFFEROBJECTI64VPROC glad_glGetQueryBufferObjecti64v = NULL; -PFNGLGETQUERYBUFFEROBJECTIVPROC glad_glGetQueryBufferObjectiv = NULL; -PFNGLGETQUERYBUFFEROBJECTUI64VPROC glad_glGetQueryBufferObjectui64v = NULL; -PFNGLGETQUERYBUFFEROBJECTUIVPROC glad_glGetQueryBufferObjectuiv = NULL; -PFNGLGETQUERYINDEXEDIVPROC glad_glGetQueryIndexediv = NULL; -PFNGLGETQUERYOBJECTI64VPROC glad_glGetQueryObjecti64v = NULL; -PFNGLGETQUERYOBJECTIVPROC glad_glGetQueryObjectiv = NULL; -PFNGLGETQUERYOBJECTUI64VPROC glad_glGetQueryObjectui64v = NULL; -PFNGLGETQUERYOBJECTUIVPROC glad_glGetQueryObjectuiv = NULL; -PFNGLGETQUERYIVPROC glad_glGetQueryiv = NULL; -PFNGLGETRENDERBUFFERPARAMETERIVPROC glad_glGetRenderbufferParameteriv = NULL; -PFNGLGETSAMPLERPARAMETERIIVPROC glad_glGetSamplerParameterIiv = NULL; -PFNGLGETSAMPLERPARAMETERIUIVPROC glad_glGetSamplerParameterIuiv = NULL; -PFNGLGETSAMPLERPARAMETERFVPROC glad_glGetSamplerParameterfv = NULL; -PFNGLGETSAMPLERPARAMETERIVPROC glad_glGetSamplerParameteriv = NULL; -PFNGLGETSHADERINFOLOGPROC glad_glGetShaderInfoLog = NULL; -PFNGLGETSHADERPRECISIONFORMATPROC glad_glGetShaderPrecisionFormat = NULL; -PFNGLGETSHADERSOURCEPROC glad_glGetShaderSource = NULL; -PFNGLGETSHADERIVPROC glad_glGetShaderiv = NULL; -PFNGLGETSTRINGPROC glad_glGetString = NULL; -PFNGLGETSTRINGIPROC glad_glGetStringi = NULL; -PFNGLGETSUBROUTINEINDEXPROC glad_glGetSubroutineIndex = NULL; -PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC glad_glGetSubroutineUniformLocation = NULL; -PFNGLGETSYNCIVPROC glad_glGetSynciv = NULL; -PFNGLGETTEXIMAGEPROC glad_glGetTexImage = NULL; -PFNGLGETTEXLEVELPARAMETERFVPROC glad_glGetTexLevelParameterfv = NULL; -PFNGLGETTEXLEVELPARAMETERIVPROC glad_glGetTexLevelParameteriv = NULL; -PFNGLGETTEXPARAMETERIIVPROC glad_glGetTexParameterIiv = NULL; -PFNGLGETTEXPARAMETERIUIVPROC glad_glGetTexParameterIuiv = NULL; -PFNGLGETTEXPARAMETERFVPROC glad_glGetTexParameterfv = NULL; -PFNGLGETTEXPARAMETERIVPROC glad_glGetTexParameteriv = NULL; -PFNGLGETTEXTUREIMAGEPROC glad_glGetTextureImage = NULL; -PFNGLGETTEXTURELEVELPARAMETERFVPROC glad_glGetTextureLevelParameterfv = NULL; -PFNGLGETTEXTURELEVELPARAMETERIVPROC glad_glGetTextureLevelParameteriv = NULL; -PFNGLGETTEXTUREPARAMETERIIVPROC glad_glGetTextureParameterIiv = NULL; -PFNGLGETTEXTUREPARAMETERIUIVPROC glad_glGetTextureParameterIuiv = NULL; -PFNGLGETTEXTUREPARAMETERFVPROC glad_glGetTextureParameterfv = NULL; -PFNGLGETTEXTUREPARAMETERIVPROC glad_glGetTextureParameteriv = NULL; -PFNGLGETTEXTURESUBIMAGEPROC glad_glGetTextureSubImage = NULL; -PFNGLGETTRANSFORMFEEDBACKVARYINGPROC glad_glGetTransformFeedbackVarying = NULL; -PFNGLGETTRANSFORMFEEDBACKI64_VPROC glad_glGetTransformFeedbacki64_v = NULL; -PFNGLGETTRANSFORMFEEDBACKI_VPROC glad_glGetTransformFeedbacki_v = NULL; -PFNGLGETTRANSFORMFEEDBACKIVPROC glad_glGetTransformFeedbackiv = NULL; -PFNGLGETUNIFORMBLOCKINDEXPROC glad_glGetUniformBlockIndex = NULL; -PFNGLGETUNIFORMINDICESPROC glad_glGetUniformIndices = NULL; -PFNGLGETUNIFORMLOCATIONPROC glad_glGetUniformLocation = NULL; -PFNGLGETUNIFORMSUBROUTINEUIVPROC glad_glGetUniformSubroutineuiv = NULL; -PFNGLGETUNIFORMDVPROC glad_glGetUniformdv = NULL; -PFNGLGETUNIFORMFVPROC glad_glGetUniformfv = NULL; -PFNGLGETUNIFORMIVPROC glad_glGetUniformiv = NULL; -PFNGLGETUNIFORMUIVPROC glad_glGetUniformuiv = NULL; -PFNGLGETVERTEXARRAYINDEXED64IVPROC glad_glGetVertexArrayIndexed64iv = NULL; -PFNGLGETVERTEXARRAYINDEXEDIVPROC glad_glGetVertexArrayIndexediv = NULL; -PFNGLGETVERTEXARRAYIVPROC glad_glGetVertexArrayiv = NULL; -PFNGLGETVERTEXATTRIBIIVPROC glad_glGetVertexAttribIiv = NULL; -PFNGLGETVERTEXATTRIBIUIVPROC glad_glGetVertexAttribIuiv = NULL; -PFNGLGETVERTEXATTRIBLDVPROC glad_glGetVertexAttribLdv = NULL; -PFNGLGETVERTEXATTRIBPOINTERVPROC glad_glGetVertexAttribPointerv = NULL; -PFNGLGETVERTEXATTRIBDVPROC glad_glGetVertexAttribdv = NULL; -PFNGLGETVERTEXATTRIBFVPROC glad_glGetVertexAttribfv = NULL; -PFNGLGETVERTEXATTRIBIVPROC glad_glGetVertexAttribiv = NULL; -PFNGLGETNCOLORTABLEPROC glad_glGetnColorTable = NULL; -PFNGLGETNCOMPRESSEDTEXIMAGEPROC glad_glGetnCompressedTexImage = NULL; -PFNGLGETNCONVOLUTIONFILTERPROC glad_glGetnConvolutionFilter = NULL; -PFNGLGETNHISTOGRAMPROC glad_glGetnHistogram = NULL; -PFNGLGETNMAPDVPROC glad_glGetnMapdv = NULL; -PFNGLGETNMAPFVPROC glad_glGetnMapfv = NULL; -PFNGLGETNMAPIVPROC glad_glGetnMapiv = NULL; -PFNGLGETNMINMAXPROC glad_glGetnMinmax = NULL; -PFNGLGETNPIXELMAPFVPROC glad_glGetnPixelMapfv = NULL; -PFNGLGETNPIXELMAPUIVPROC glad_glGetnPixelMapuiv = NULL; -PFNGLGETNPIXELMAPUSVPROC glad_glGetnPixelMapusv = NULL; -PFNGLGETNPOLYGONSTIPPLEPROC glad_glGetnPolygonStipple = NULL; -PFNGLGETNSEPARABLEFILTERPROC glad_glGetnSeparableFilter = NULL; -PFNGLGETNTEXIMAGEPROC glad_glGetnTexImage = NULL; -PFNGLGETNUNIFORMDVPROC glad_glGetnUniformdv = NULL; -PFNGLGETNUNIFORMFVPROC glad_glGetnUniformfv = NULL; -PFNGLGETNUNIFORMIVPROC glad_glGetnUniformiv = NULL; -PFNGLGETNUNIFORMUIVPROC glad_glGetnUniformuiv = NULL; -PFNGLHINTPROC glad_glHint = NULL; -PFNGLINVALIDATEBUFFERDATAPROC glad_glInvalidateBufferData = NULL; -PFNGLINVALIDATEBUFFERSUBDATAPROC glad_glInvalidateBufferSubData = NULL; -PFNGLINVALIDATEFRAMEBUFFERPROC glad_glInvalidateFramebuffer = NULL; -PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC glad_glInvalidateNamedFramebufferData = NULL; -PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC glad_glInvalidateNamedFramebufferSubData = NULL; -PFNGLINVALIDATESUBFRAMEBUFFERPROC glad_glInvalidateSubFramebuffer = NULL; -PFNGLINVALIDATETEXIMAGEPROC glad_glInvalidateTexImage = NULL; -PFNGLINVALIDATETEXSUBIMAGEPROC glad_glInvalidateTexSubImage = NULL; -PFNGLISBUFFERPROC glad_glIsBuffer = NULL; -PFNGLISENABLEDPROC glad_glIsEnabled = NULL; -PFNGLISENABLEDIPROC glad_glIsEnabledi = NULL; -PFNGLISFRAMEBUFFERPROC glad_glIsFramebuffer = NULL; -PFNGLISPROGRAMPROC glad_glIsProgram = NULL; -PFNGLISPROGRAMPIPELINEPROC glad_glIsProgramPipeline = NULL; -PFNGLISQUERYPROC glad_glIsQuery = NULL; -PFNGLISRENDERBUFFERPROC glad_glIsRenderbuffer = NULL; -PFNGLISSAMPLERPROC glad_glIsSampler = NULL; -PFNGLISSHADERPROC glad_glIsShader = NULL; -PFNGLISSYNCPROC glad_glIsSync = NULL; -PFNGLISTEXTUREPROC glad_glIsTexture = NULL; -PFNGLISTRANSFORMFEEDBACKPROC glad_glIsTransformFeedback = NULL; -PFNGLISVERTEXARRAYPROC glad_glIsVertexArray = NULL; -PFNGLLINEWIDTHPROC glad_glLineWidth = NULL; -PFNGLLINKPROGRAMPROC glad_glLinkProgram = NULL; -PFNGLLOGICOPPROC glad_glLogicOp = NULL; -PFNGLMAPBUFFERPROC glad_glMapBuffer = NULL; -PFNGLMAPBUFFERRANGEPROC glad_glMapBufferRange = NULL; -PFNGLMAPNAMEDBUFFERPROC glad_glMapNamedBuffer = NULL; -PFNGLMAPNAMEDBUFFERRANGEPROC glad_glMapNamedBufferRange = NULL; -PFNGLMEMORYBARRIERPROC glad_glMemoryBarrier = NULL; -PFNGLMEMORYBARRIERBYREGIONPROC glad_glMemoryBarrierByRegion = NULL; -PFNGLMINSAMPLESHADINGPROC glad_glMinSampleShading = NULL; -PFNGLMULTIDRAWARRAYSPROC glad_glMultiDrawArrays = NULL; -PFNGLMULTIDRAWARRAYSINDIRECTPROC glad_glMultiDrawArraysIndirect = NULL; -PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC glad_glMultiDrawArraysIndirectCount = NULL; -PFNGLMULTIDRAWELEMENTSPROC glad_glMultiDrawElements = NULL; -PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC glad_glMultiDrawElementsBaseVertex = NULL; -PFNGLMULTIDRAWELEMENTSINDIRECTPROC glad_glMultiDrawElementsIndirect = NULL; -PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC glad_glMultiDrawElementsIndirectCount = NULL; -PFNGLMULTITEXCOORDP1UIPROC glad_glMultiTexCoordP1ui = NULL; -PFNGLMULTITEXCOORDP1UIVPROC glad_glMultiTexCoordP1uiv = NULL; -PFNGLMULTITEXCOORDP2UIPROC glad_glMultiTexCoordP2ui = NULL; -PFNGLMULTITEXCOORDP2UIVPROC glad_glMultiTexCoordP2uiv = NULL; -PFNGLMULTITEXCOORDP3UIPROC glad_glMultiTexCoordP3ui = NULL; -PFNGLMULTITEXCOORDP3UIVPROC glad_glMultiTexCoordP3uiv = NULL; -PFNGLMULTITEXCOORDP4UIPROC glad_glMultiTexCoordP4ui = NULL; -PFNGLMULTITEXCOORDP4UIVPROC glad_glMultiTexCoordP4uiv = NULL; -PFNGLNAMEDBUFFERDATAPROC glad_glNamedBufferData = NULL; -PFNGLNAMEDBUFFERSTORAGEPROC glad_glNamedBufferStorage = NULL; -PFNGLNAMEDBUFFERSUBDATAPROC glad_glNamedBufferSubData = NULL; -PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC glad_glNamedFramebufferDrawBuffer = NULL; -PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC glad_glNamedFramebufferDrawBuffers = NULL; -PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC glad_glNamedFramebufferParameteri = NULL; -PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC glad_glNamedFramebufferReadBuffer = NULL; -PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC glad_glNamedFramebufferRenderbuffer = NULL; -PFNGLNAMEDFRAMEBUFFERTEXTUREPROC glad_glNamedFramebufferTexture = NULL; -PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC glad_glNamedFramebufferTextureLayer = NULL; -PFNGLNAMEDRENDERBUFFERSTORAGEPROC glad_glNamedRenderbufferStorage = NULL; -PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC glad_glNamedRenderbufferStorageMultisample = NULL; -PFNGLNORMALP3UIPROC glad_glNormalP3ui = NULL; -PFNGLNORMALP3UIVPROC glad_glNormalP3uiv = NULL; -PFNGLOBJECTLABELPROC glad_glObjectLabel = NULL; -PFNGLOBJECTPTRLABELPROC glad_glObjectPtrLabel = NULL; -PFNGLPATCHPARAMETERFVPROC glad_glPatchParameterfv = NULL; -PFNGLPATCHPARAMETERIPROC glad_glPatchParameteri = NULL; -PFNGLPAUSETRANSFORMFEEDBACKPROC glad_glPauseTransformFeedback = NULL; -PFNGLPIXELSTOREFPROC glad_glPixelStoref = NULL; -PFNGLPIXELSTOREIPROC glad_glPixelStorei = NULL; -PFNGLPOINTPARAMETERFPROC glad_glPointParameterf = NULL; -PFNGLPOINTPARAMETERFVPROC glad_glPointParameterfv = NULL; -PFNGLPOINTPARAMETERIPROC glad_glPointParameteri = NULL; -PFNGLPOINTPARAMETERIVPROC glad_glPointParameteriv = NULL; -PFNGLPOINTSIZEPROC glad_glPointSize = NULL; -PFNGLPOLYGONMODEPROC glad_glPolygonMode = NULL; -PFNGLPOLYGONOFFSETPROC glad_glPolygonOffset = NULL; -PFNGLPOLYGONOFFSETCLAMPPROC glad_glPolygonOffsetClamp = NULL; -PFNGLPOPDEBUGGROUPPROC glad_glPopDebugGroup = NULL; -PFNGLPRIMITIVERESTARTINDEXPROC glad_glPrimitiveRestartIndex = NULL; -PFNGLPROGRAMBINARYPROC glad_glProgramBinary = NULL; -PFNGLPROGRAMPARAMETERIPROC glad_glProgramParameteri = NULL; -PFNGLPROGRAMUNIFORM1DPROC glad_glProgramUniform1d = NULL; -PFNGLPROGRAMUNIFORM1DVPROC glad_glProgramUniform1dv = NULL; -PFNGLPROGRAMUNIFORM1FPROC glad_glProgramUniform1f = NULL; -PFNGLPROGRAMUNIFORM1FVPROC glad_glProgramUniform1fv = NULL; -PFNGLPROGRAMUNIFORM1IPROC glad_glProgramUniform1i = NULL; -PFNGLPROGRAMUNIFORM1IVPROC glad_glProgramUniform1iv = NULL; -PFNGLPROGRAMUNIFORM1UIPROC glad_glProgramUniform1ui = NULL; -PFNGLPROGRAMUNIFORM1UIVPROC glad_glProgramUniform1uiv = NULL; -PFNGLPROGRAMUNIFORM2DPROC glad_glProgramUniform2d = NULL; -PFNGLPROGRAMUNIFORM2DVPROC glad_glProgramUniform2dv = NULL; -PFNGLPROGRAMUNIFORM2FPROC glad_glProgramUniform2f = NULL; -PFNGLPROGRAMUNIFORM2FVPROC glad_glProgramUniform2fv = NULL; -PFNGLPROGRAMUNIFORM2IPROC glad_glProgramUniform2i = NULL; -PFNGLPROGRAMUNIFORM2IVPROC glad_glProgramUniform2iv = NULL; -PFNGLPROGRAMUNIFORM2UIPROC glad_glProgramUniform2ui = NULL; -PFNGLPROGRAMUNIFORM2UIVPROC glad_glProgramUniform2uiv = NULL; -PFNGLPROGRAMUNIFORM3DPROC glad_glProgramUniform3d = NULL; -PFNGLPROGRAMUNIFORM3DVPROC glad_glProgramUniform3dv = NULL; -PFNGLPROGRAMUNIFORM3FPROC glad_glProgramUniform3f = NULL; -PFNGLPROGRAMUNIFORM3FVPROC glad_glProgramUniform3fv = NULL; -PFNGLPROGRAMUNIFORM3IPROC glad_glProgramUniform3i = NULL; -PFNGLPROGRAMUNIFORM3IVPROC glad_glProgramUniform3iv = NULL; -PFNGLPROGRAMUNIFORM3UIPROC glad_glProgramUniform3ui = NULL; -PFNGLPROGRAMUNIFORM3UIVPROC glad_glProgramUniform3uiv = NULL; -PFNGLPROGRAMUNIFORM4DPROC glad_glProgramUniform4d = NULL; -PFNGLPROGRAMUNIFORM4DVPROC glad_glProgramUniform4dv = NULL; -PFNGLPROGRAMUNIFORM4FPROC glad_glProgramUniform4f = NULL; -PFNGLPROGRAMUNIFORM4FVPROC glad_glProgramUniform4fv = NULL; -PFNGLPROGRAMUNIFORM4IPROC glad_glProgramUniform4i = NULL; -PFNGLPROGRAMUNIFORM4IVPROC glad_glProgramUniform4iv = NULL; -PFNGLPROGRAMUNIFORM4UIPROC glad_glProgramUniform4ui = NULL; -PFNGLPROGRAMUNIFORM4UIVPROC glad_glProgramUniform4uiv = NULL; -PFNGLPROGRAMUNIFORMMATRIX2DVPROC glad_glProgramUniformMatrix2dv = NULL; -PFNGLPROGRAMUNIFORMMATRIX2FVPROC glad_glProgramUniformMatrix2fv = NULL; -PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC glad_glProgramUniformMatrix2x3dv = NULL; -PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC glad_glProgramUniformMatrix2x3fv = NULL; -PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC glad_glProgramUniformMatrix2x4dv = NULL; -PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC glad_glProgramUniformMatrix2x4fv = NULL; -PFNGLPROGRAMUNIFORMMATRIX3DVPROC glad_glProgramUniformMatrix3dv = NULL; -PFNGLPROGRAMUNIFORMMATRIX3FVPROC glad_glProgramUniformMatrix3fv = NULL; -PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC glad_glProgramUniformMatrix3x2dv = NULL; -PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC glad_glProgramUniformMatrix3x2fv = NULL; -PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC glad_glProgramUniformMatrix3x4dv = NULL; -PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC glad_glProgramUniformMatrix3x4fv = NULL; -PFNGLPROGRAMUNIFORMMATRIX4DVPROC glad_glProgramUniformMatrix4dv = NULL; -PFNGLPROGRAMUNIFORMMATRIX4FVPROC glad_glProgramUniformMatrix4fv = NULL; -PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC glad_glProgramUniformMatrix4x2dv = NULL; -PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC glad_glProgramUniformMatrix4x2fv = NULL; -PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC glad_glProgramUniformMatrix4x3dv = NULL; -PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC glad_glProgramUniformMatrix4x3fv = NULL; -PFNGLPROVOKINGVERTEXPROC glad_glProvokingVertex = NULL; -PFNGLPUSHDEBUGGROUPPROC glad_glPushDebugGroup = NULL; -PFNGLQUERYCOUNTERPROC glad_glQueryCounter = NULL; -PFNGLREADBUFFERPROC glad_glReadBuffer = NULL; -PFNGLREADPIXELSPROC glad_glReadPixels = NULL; -PFNGLREADNPIXELSPROC glad_glReadnPixels = NULL; -PFNGLRELEASESHADERCOMPILERPROC glad_glReleaseShaderCompiler = NULL; -PFNGLRENDERBUFFERSTORAGEPROC glad_glRenderbufferStorage = NULL; -PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glad_glRenderbufferStorageMultisample = NULL; -PFNGLRESUMETRANSFORMFEEDBACKPROC glad_glResumeTransformFeedback = NULL; -PFNGLSAMPLECOVERAGEPROC glad_glSampleCoverage = NULL; -PFNGLSAMPLEMASKIPROC glad_glSampleMaski = NULL; -PFNGLSAMPLERPARAMETERIIVPROC glad_glSamplerParameterIiv = NULL; -PFNGLSAMPLERPARAMETERIUIVPROC glad_glSamplerParameterIuiv = NULL; -PFNGLSAMPLERPARAMETERFPROC glad_glSamplerParameterf = NULL; -PFNGLSAMPLERPARAMETERFVPROC glad_glSamplerParameterfv = NULL; -PFNGLSAMPLERPARAMETERIPROC glad_glSamplerParameteri = NULL; -PFNGLSAMPLERPARAMETERIVPROC glad_glSamplerParameteriv = NULL; -PFNGLSCISSORPROC glad_glScissor = NULL; -PFNGLSCISSORARRAYVPROC glad_glScissorArrayv = NULL; -PFNGLSCISSORINDEXEDPROC glad_glScissorIndexed = NULL; -PFNGLSCISSORINDEXEDVPROC glad_glScissorIndexedv = NULL; -PFNGLSECONDARYCOLORP3UIPROC glad_glSecondaryColorP3ui = NULL; -PFNGLSECONDARYCOLORP3UIVPROC glad_glSecondaryColorP3uiv = NULL; -PFNGLSHADERBINARYPROC glad_glShaderBinary = NULL; -PFNGLSHADERSOURCEPROC glad_glShaderSource = NULL; -PFNGLSHADERSTORAGEBLOCKBINDINGPROC glad_glShaderStorageBlockBinding = NULL; -PFNGLSPECIALIZESHADERPROC glad_glSpecializeShader = NULL; -PFNGLSTENCILFUNCPROC glad_glStencilFunc = NULL; -PFNGLSTENCILFUNCSEPARATEPROC glad_glStencilFuncSeparate = NULL; -PFNGLSTENCILMASKPROC glad_glStencilMask = NULL; -PFNGLSTENCILMASKSEPARATEPROC glad_glStencilMaskSeparate = NULL; -PFNGLSTENCILOPPROC glad_glStencilOp = NULL; -PFNGLSTENCILOPSEPARATEPROC glad_glStencilOpSeparate = NULL; -PFNGLTEXBUFFERPROC glad_glTexBuffer = NULL; -PFNGLTEXBUFFERRANGEPROC glad_glTexBufferRange = NULL; -PFNGLTEXCOORDP1UIPROC glad_glTexCoordP1ui = NULL; -PFNGLTEXCOORDP1UIVPROC glad_glTexCoordP1uiv = NULL; -PFNGLTEXCOORDP2UIPROC glad_glTexCoordP2ui = NULL; -PFNGLTEXCOORDP2UIVPROC glad_glTexCoordP2uiv = NULL; -PFNGLTEXCOORDP3UIPROC glad_glTexCoordP3ui = NULL; -PFNGLTEXCOORDP3UIVPROC glad_glTexCoordP3uiv = NULL; -PFNGLTEXCOORDP4UIPROC glad_glTexCoordP4ui = NULL; -PFNGLTEXCOORDP4UIVPROC glad_glTexCoordP4uiv = NULL; -PFNGLTEXIMAGE1DPROC glad_glTexImage1D = NULL; -PFNGLTEXIMAGE2DPROC glad_glTexImage2D = NULL; -PFNGLTEXIMAGE2DMULTISAMPLEPROC glad_glTexImage2DMultisample = NULL; -PFNGLTEXIMAGE3DPROC glad_glTexImage3D = NULL; -PFNGLTEXIMAGE3DMULTISAMPLEPROC glad_glTexImage3DMultisample = NULL; -PFNGLTEXPARAMETERIIVPROC glad_glTexParameterIiv = NULL; -PFNGLTEXPARAMETERIUIVPROC glad_glTexParameterIuiv = NULL; -PFNGLTEXPARAMETERFPROC glad_glTexParameterf = NULL; -PFNGLTEXPARAMETERFVPROC glad_glTexParameterfv = NULL; -PFNGLTEXPARAMETERIPROC glad_glTexParameteri = NULL; -PFNGLTEXPARAMETERIVPROC glad_glTexParameteriv = NULL; -PFNGLTEXSTORAGE1DPROC glad_glTexStorage1D = NULL; -PFNGLTEXSTORAGE2DPROC glad_glTexStorage2D = NULL; -PFNGLTEXSTORAGE2DMULTISAMPLEPROC glad_glTexStorage2DMultisample = NULL; -PFNGLTEXSTORAGE3DPROC glad_glTexStorage3D = NULL; -PFNGLTEXSTORAGE3DMULTISAMPLEPROC glad_glTexStorage3DMultisample = NULL; -PFNGLTEXSUBIMAGE1DPROC glad_glTexSubImage1D = NULL; -PFNGLTEXSUBIMAGE2DPROC glad_glTexSubImage2D = NULL; -PFNGLTEXSUBIMAGE3DPROC glad_glTexSubImage3D = NULL; -PFNGLTEXTUREBARRIERPROC glad_glTextureBarrier = NULL; -PFNGLTEXTUREBUFFERPROC glad_glTextureBuffer = NULL; -PFNGLTEXTUREBUFFERRANGEPROC glad_glTextureBufferRange = NULL; -PFNGLTEXTUREPARAMETERIIVPROC glad_glTextureParameterIiv = NULL; -PFNGLTEXTUREPARAMETERIUIVPROC glad_glTextureParameterIuiv = NULL; -PFNGLTEXTUREPARAMETERFPROC glad_glTextureParameterf = NULL; -PFNGLTEXTUREPARAMETERFVPROC glad_glTextureParameterfv = NULL; -PFNGLTEXTUREPARAMETERIPROC glad_glTextureParameteri = NULL; -PFNGLTEXTUREPARAMETERIVPROC glad_glTextureParameteriv = NULL; -PFNGLTEXTURESTORAGE1DPROC glad_glTextureStorage1D = NULL; -PFNGLTEXTURESTORAGE2DPROC glad_glTextureStorage2D = NULL; -PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC glad_glTextureStorage2DMultisample = NULL; -PFNGLTEXTURESTORAGE3DPROC glad_glTextureStorage3D = NULL; -PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC glad_glTextureStorage3DMultisample = NULL; -PFNGLTEXTURESUBIMAGE1DPROC glad_glTextureSubImage1D = NULL; -PFNGLTEXTURESUBIMAGE2DPROC glad_glTextureSubImage2D = NULL; -PFNGLTEXTURESUBIMAGE3DPROC glad_glTextureSubImage3D = NULL; -PFNGLTEXTUREVIEWPROC glad_glTextureView = NULL; -PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC glad_glTransformFeedbackBufferBase = NULL; -PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC glad_glTransformFeedbackBufferRange = NULL; -PFNGLTRANSFORMFEEDBACKVARYINGSPROC glad_glTransformFeedbackVaryings = NULL; -PFNGLUNIFORM1DPROC glad_glUniform1d = NULL; -PFNGLUNIFORM1DVPROC glad_glUniform1dv = NULL; -PFNGLUNIFORM1FPROC glad_glUniform1f = NULL; -PFNGLUNIFORM1FVPROC glad_glUniform1fv = NULL; -PFNGLUNIFORM1IPROC glad_glUniform1i = NULL; -PFNGLUNIFORM1IVPROC glad_glUniform1iv = NULL; -PFNGLUNIFORM1UIPROC glad_glUniform1ui = NULL; -PFNGLUNIFORM1UIVPROC glad_glUniform1uiv = NULL; -PFNGLUNIFORM2DPROC glad_glUniform2d = NULL; -PFNGLUNIFORM2DVPROC glad_glUniform2dv = NULL; -PFNGLUNIFORM2FPROC glad_glUniform2f = NULL; -PFNGLUNIFORM2FVPROC glad_glUniform2fv = NULL; -PFNGLUNIFORM2IPROC glad_glUniform2i = NULL; -PFNGLUNIFORM2IVPROC glad_glUniform2iv = NULL; -PFNGLUNIFORM2UIPROC glad_glUniform2ui = NULL; -PFNGLUNIFORM2UIVPROC glad_glUniform2uiv = NULL; -PFNGLUNIFORM3DPROC glad_glUniform3d = NULL; -PFNGLUNIFORM3DVPROC glad_glUniform3dv = NULL; -PFNGLUNIFORM3FPROC glad_glUniform3f = NULL; -PFNGLUNIFORM3FVPROC glad_glUniform3fv = NULL; -PFNGLUNIFORM3IPROC glad_glUniform3i = NULL; -PFNGLUNIFORM3IVPROC glad_glUniform3iv = NULL; -PFNGLUNIFORM3UIPROC glad_glUniform3ui = NULL; -PFNGLUNIFORM3UIVPROC glad_glUniform3uiv = NULL; -PFNGLUNIFORM4DPROC glad_glUniform4d = NULL; -PFNGLUNIFORM4DVPROC glad_glUniform4dv = NULL; -PFNGLUNIFORM4FPROC glad_glUniform4f = NULL; -PFNGLUNIFORM4FVPROC glad_glUniform4fv = NULL; -PFNGLUNIFORM4IPROC glad_glUniform4i = NULL; -PFNGLUNIFORM4IVPROC glad_glUniform4iv = NULL; -PFNGLUNIFORM4UIPROC glad_glUniform4ui = NULL; -PFNGLUNIFORM4UIVPROC glad_glUniform4uiv = NULL; -PFNGLUNIFORMBLOCKBINDINGPROC glad_glUniformBlockBinding = NULL; -PFNGLUNIFORMMATRIX2DVPROC glad_glUniformMatrix2dv = NULL; -PFNGLUNIFORMMATRIX2FVPROC glad_glUniformMatrix2fv = NULL; -PFNGLUNIFORMMATRIX2X3DVPROC glad_glUniformMatrix2x3dv = NULL; -PFNGLUNIFORMMATRIX2X3FVPROC glad_glUniformMatrix2x3fv = NULL; -PFNGLUNIFORMMATRIX2X4DVPROC glad_glUniformMatrix2x4dv = NULL; -PFNGLUNIFORMMATRIX2X4FVPROC glad_glUniformMatrix2x4fv = NULL; -PFNGLUNIFORMMATRIX3DVPROC glad_glUniformMatrix3dv = NULL; -PFNGLUNIFORMMATRIX3FVPROC glad_glUniformMatrix3fv = NULL; -PFNGLUNIFORMMATRIX3X2DVPROC glad_glUniformMatrix3x2dv = NULL; -PFNGLUNIFORMMATRIX3X2FVPROC glad_glUniformMatrix3x2fv = NULL; -PFNGLUNIFORMMATRIX3X4DVPROC glad_glUniformMatrix3x4dv = NULL; -PFNGLUNIFORMMATRIX3X4FVPROC glad_glUniformMatrix3x4fv = NULL; -PFNGLUNIFORMMATRIX4DVPROC glad_glUniformMatrix4dv = NULL; -PFNGLUNIFORMMATRIX4FVPROC glad_glUniformMatrix4fv = NULL; -PFNGLUNIFORMMATRIX4X2DVPROC glad_glUniformMatrix4x2dv = NULL; -PFNGLUNIFORMMATRIX4X2FVPROC glad_glUniformMatrix4x2fv = NULL; -PFNGLUNIFORMMATRIX4X3DVPROC glad_glUniformMatrix4x3dv = NULL; -PFNGLUNIFORMMATRIX4X3FVPROC glad_glUniformMatrix4x3fv = NULL; -PFNGLUNIFORMSUBROUTINESUIVPROC glad_glUniformSubroutinesuiv = NULL; -PFNGLUNMAPBUFFERPROC glad_glUnmapBuffer = NULL; -PFNGLUNMAPNAMEDBUFFERPROC glad_glUnmapNamedBuffer = NULL; -PFNGLUSEPROGRAMPROC glad_glUseProgram = NULL; -PFNGLUSEPROGRAMSTAGESPROC glad_glUseProgramStages = NULL; -PFNGLVALIDATEPROGRAMPROC glad_glValidateProgram = NULL; -PFNGLVALIDATEPROGRAMPIPELINEPROC glad_glValidateProgramPipeline = NULL; -PFNGLVERTEXARRAYATTRIBBINDINGPROC glad_glVertexArrayAttribBinding = NULL; -PFNGLVERTEXARRAYATTRIBFORMATPROC glad_glVertexArrayAttribFormat = NULL; -PFNGLVERTEXARRAYATTRIBIFORMATPROC glad_glVertexArrayAttribIFormat = NULL; -PFNGLVERTEXARRAYATTRIBLFORMATPROC glad_glVertexArrayAttribLFormat = NULL; -PFNGLVERTEXARRAYBINDINGDIVISORPROC glad_glVertexArrayBindingDivisor = NULL; -PFNGLVERTEXARRAYELEMENTBUFFERPROC glad_glVertexArrayElementBuffer = NULL; -PFNGLVERTEXARRAYVERTEXBUFFERPROC glad_glVertexArrayVertexBuffer = NULL; -PFNGLVERTEXARRAYVERTEXBUFFERSPROC glad_glVertexArrayVertexBuffers = NULL; -PFNGLVERTEXATTRIB1DPROC glad_glVertexAttrib1d = NULL; -PFNGLVERTEXATTRIB1DVPROC glad_glVertexAttrib1dv = NULL; -PFNGLVERTEXATTRIB1FPROC glad_glVertexAttrib1f = NULL; -PFNGLVERTEXATTRIB1FVPROC glad_glVertexAttrib1fv = NULL; -PFNGLVERTEXATTRIB1SPROC glad_glVertexAttrib1s = NULL; -PFNGLVERTEXATTRIB1SVPROC glad_glVertexAttrib1sv = NULL; -PFNGLVERTEXATTRIB2DPROC glad_glVertexAttrib2d = NULL; -PFNGLVERTEXATTRIB2DVPROC glad_glVertexAttrib2dv = NULL; -PFNGLVERTEXATTRIB2FPROC glad_glVertexAttrib2f = NULL; -PFNGLVERTEXATTRIB2FVPROC glad_glVertexAttrib2fv = NULL; -PFNGLVERTEXATTRIB2SPROC glad_glVertexAttrib2s = NULL; -PFNGLVERTEXATTRIB2SVPROC glad_glVertexAttrib2sv = NULL; -PFNGLVERTEXATTRIB3DPROC glad_glVertexAttrib3d = NULL; -PFNGLVERTEXATTRIB3DVPROC glad_glVertexAttrib3dv = NULL; -PFNGLVERTEXATTRIB3FPROC glad_glVertexAttrib3f = NULL; -PFNGLVERTEXATTRIB3FVPROC glad_glVertexAttrib3fv = NULL; -PFNGLVERTEXATTRIB3SPROC glad_glVertexAttrib3s = NULL; -PFNGLVERTEXATTRIB3SVPROC glad_glVertexAttrib3sv = NULL; -PFNGLVERTEXATTRIB4NBVPROC glad_glVertexAttrib4Nbv = NULL; -PFNGLVERTEXATTRIB4NIVPROC glad_glVertexAttrib4Niv = NULL; -PFNGLVERTEXATTRIB4NSVPROC glad_glVertexAttrib4Nsv = NULL; -PFNGLVERTEXATTRIB4NUBPROC glad_glVertexAttrib4Nub = NULL; -PFNGLVERTEXATTRIB4NUBVPROC glad_glVertexAttrib4Nubv = NULL; -PFNGLVERTEXATTRIB4NUIVPROC glad_glVertexAttrib4Nuiv = NULL; -PFNGLVERTEXATTRIB4NUSVPROC glad_glVertexAttrib4Nusv = NULL; -PFNGLVERTEXATTRIB4BVPROC glad_glVertexAttrib4bv = NULL; -PFNGLVERTEXATTRIB4DPROC glad_glVertexAttrib4d = NULL; -PFNGLVERTEXATTRIB4DVPROC glad_glVertexAttrib4dv = NULL; -PFNGLVERTEXATTRIB4FPROC glad_glVertexAttrib4f = NULL; -PFNGLVERTEXATTRIB4FVPROC glad_glVertexAttrib4fv = NULL; -PFNGLVERTEXATTRIB4IVPROC glad_glVertexAttrib4iv = NULL; -PFNGLVERTEXATTRIB4SPROC glad_glVertexAttrib4s = NULL; -PFNGLVERTEXATTRIB4SVPROC glad_glVertexAttrib4sv = NULL; -PFNGLVERTEXATTRIB4UBVPROC glad_glVertexAttrib4ubv = NULL; -PFNGLVERTEXATTRIB4UIVPROC glad_glVertexAttrib4uiv = NULL; -PFNGLVERTEXATTRIB4USVPROC glad_glVertexAttrib4usv = NULL; -PFNGLVERTEXATTRIBBINDINGPROC glad_glVertexAttribBinding = NULL; -PFNGLVERTEXATTRIBDIVISORPROC glad_glVertexAttribDivisor = NULL; -PFNGLVERTEXATTRIBFORMATPROC glad_glVertexAttribFormat = NULL; -PFNGLVERTEXATTRIBI1IPROC glad_glVertexAttribI1i = NULL; -PFNGLVERTEXATTRIBI1IVPROC glad_glVertexAttribI1iv = NULL; -PFNGLVERTEXATTRIBI1UIPROC glad_glVertexAttribI1ui = NULL; -PFNGLVERTEXATTRIBI1UIVPROC glad_glVertexAttribI1uiv = NULL; -PFNGLVERTEXATTRIBI2IPROC glad_glVertexAttribI2i = NULL; -PFNGLVERTEXATTRIBI2IVPROC glad_glVertexAttribI2iv = NULL; -PFNGLVERTEXATTRIBI2UIPROC glad_glVertexAttribI2ui = NULL; -PFNGLVERTEXATTRIBI2UIVPROC glad_glVertexAttribI2uiv = NULL; -PFNGLVERTEXATTRIBI3IPROC glad_glVertexAttribI3i = NULL; -PFNGLVERTEXATTRIBI3IVPROC glad_glVertexAttribI3iv = NULL; -PFNGLVERTEXATTRIBI3UIPROC glad_glVertexAttribI3ui = NULL; -PFNGLVERTEXATTRIBI3UIVPROC glad_glVertexAttribI3uiv = NULL; -PFNGLVERTEXATTRIBI4BVPROC glad_glVertexAttribI4bv = NULL; -PFNGLVERTEXATTRIBI4IPROC glad_glVertexAttribI4i = NULL; -PFNGLVERTEXATTRIBI4IVPROC glad_glVertexAttribI4iv = NULL; -PFNGLVERTEXATTRIBI4SVPROC glad_glVertexAttribI4sv = NULL; -PFNGLVERTEXATTRIBI4UBVPROC glad_glVertexAttribI4ubv = NULL; -PFNGLVERTEXATTRIBI4UIPROC glad_glVertexAttribI4ui = NULL; -PFNGLVERTEXATTRIBI4UIVPROC glad_glVertexAttribI4uiv = NULL; -PFNGLVERTEXATTRIBI4USVPROC glad_glVertexAttribI4usv = NULL; -PFNGLVERTEXATTRIBIFORMATPROC glad_glVertexAttribIFormat = NULL; -PFNGLVERTEXATTRIBIPOINTERPROC glad_glVertexAttribIPointer = NULL; -PFNGLVERTEXATTRIBL1DPROC glad_glVertexAttribL1d = NULL; -PFNGLVERTEXATTRIBL1DVPROC glad_glVertexAttribL1dv = NULL; -PFNGLVERTEXATTRIBL2DPROC glad_glVertexAttribL2d = NULL; -PFNGLVERTEXATTRIBL2DVPROC glad_glVertexAttribL2dv = NULL; -PFNGLVERTEXATTRIBL3DPROC glad_glVertexAttribL3d = NULL; -PFNGLVERTEXATTRIBL3DVPROC glad_glVertexAttribL3dv = NULL; -PFNGLVERTEXATTRIBL4DPROC glad_glVertexAttribL4d = NULL; -PFNGLVERTEXATTRIBL4DVPROC glad_glVertexAttribL4dv = NULL; -PFNGLVERTEXATTRIBLFORMATPROC glad_glVertexAttribLFormat = NULL; -PFNGLVERTEXATTRIBLPOINTERPROC glad_glVertexAttribLPointer = NULL; -PFNGLVERTEXATTRIBP1UIPROC glad_glVertexAttribP1ui = NULL; -PFNGLVERTEXATTRIBP1UIVPROC glad_glVertexAttribP1uiv = NULL; -PFNGLVERTEXATTRIBP2UIPROC glad_glVertexAttribP2ui = NULL; -PFNGLVERTEXATTRIBP2UIVPROC glad_glVertexAttribP2uiv = NULL; -PFNGLVERTEXATTRIBP3UIPROC glad_glVertexAttribP3ui = NULL; -PFNGLVERTEXATTRIBP3UIVPROC glad_glVertexAttribP3uiv = NULL; -PFNGLVERTEXATTRIBP4UIPROC glad_glVertexAttribP4ui = NULL; -PFNGLVERTEXATTRIBP4UIVPROC glad_glVertexAttribP4uiv = NULL; -PFNGLVERTEXATTRIBPOINTERPROC glad_glVertexAttribPointer = NULL; -PFNGLVERTEXBINDINGDIVISORPROC glad_glVertexBindingDivisor = NULL; -PFNGLVERTEXP2UIPROC glad_glVertexP2ui = NULL; -PFNGLVERTEXP2UIVPROC glad_glVertexP2uiv = NULL; -PFNGLVERTEXP3UIPROC glad_glVertexP3ui = NULL; -PFNGLVERTEXP3UIVPROC glad_glVertexP3uiv = NULL; -PFNGLVERTEXP4UIPROC glad_glVertexP4ui = NULL; -PFNGLVERTEXP4UIVPROC glad_glVertexP4uiv = NULL; -PFNGLVIEWPORTPROC glad_glViewport = NULL; -PFNGLVIEWPORTARRAYVPROC glad_glViewportArrayv = NULL; -PFNGLVIEWPORTINDEXEDFPROC glad_glViewportIndexedf = NULL; -PFNGLVIEWPORTINDEXEDFVPROC glad_glViewportIndexedfv = NULL; -PFNGLWAITSYNCPROC glad_glWaitSync = NULL; -static void load_GL_VERSION_1_0(GLADloadproc load) { - if(!GLAD_GL_VERSION_1_0) return; - glad_glCullFace = (PFNGLCULLFACEPROC)load("glCullFace"); - glad_glFrontFace = (PFNGLFRONTFACEPROC)load("glFrontFace"); - glad_glHint = (PFNGLHINTPROC)load("glHint"); - glad_glLineWidth = (PFNGLLINEWIDTHPROC)load("glLineWidth"); - glad_glPointSize = (PFNGLPOINTSIZEPROC)load("glPointSize"); - glad_glPolygonMode = (PFNGLPOLYGONMODEPROC)load("glPolygonMode"); - glad_glScissor = (PFNGLSCISSORPROC)load("glScissor"); - glad_glTexParameterf = (PFNGLTEXPARAMETERFPROC)load("glTexParameterf"); - glad_glTexParameterfv = (PFNGLTEXPARAMETERFVPROC)load("glTexParameterfv"); - glad_glTexParameteri = (PFNGLTEXPARAMETERIPROC)load("glTexParameteri"); - glad_glTexParameteriv = (PFNGLTEXPARAMETERIVPROC)load("glTexParameteriv"); - glad_glTexImage1D = (PFNGLTEXIMAGE1DPROC)load("glTexImage1D"); - glad_glTexImage2D = (PFNGLTEXIMAGE2DPROC)load("glTexImage2D"); - glad_glDrawBuffer = (PFNGLDRAWBUFFERPROC)load("glDrawBuffer"); - glad_glClear = (PFNGLCLEARPROC)load("glClear"); - glad_glClearColor = (PFNGLCLEARCOLORPROC)load("glClearColor"); - glad_glClearStencil = (PFNGLCLEARSTENCILPROC)load("glClearStencil"); - glad_glClearDepth = (PFNGLCLEARDEPTHPROC)load("glClearDepth"); - glad_glStencilMask = (PFNGLSTENCILMASKPROC)load("glStencilMask"); - glad_glColorMask = (PFNGLCOLORMASKPROC)load("glColorMask"); - glad_glDepthMask = (PFNGLDEPTHMASKPROC)load("glDepthMask"); - glad_glDisable = (PFNGLDISABLEPROC)load("glDisable"); - glad_glEnable = (PFNGLENABLEPROC)load("glEnable"); - glad_glFinish = (PFNGLFINISHPROC)load("glFinish"); - glad_glFlush = (PFNGLFLUSHPROC)load("glFlush"); - glad_glBlendFunc = (PFNGLBLENDFUNCPROC)load("glBlendFunc"); - glad_glLogicOp = (PFNGLLOGICOPPROC)load("glLogicOp"); - glad_glStencilFunc = (PFNGLSTENCILFUNCPROC)load("glStencilFunc"); - glad_glStencilOp = (PFNGLSTENCILOPPROC)load("glStencilOp"); - glad_glDepthFunc = (PFNGLDEPTHFUNCPROC)load("glDepthFunc"); - glad_glPixelStoref = (PFNGLPIXELSTOREFPROC)load("glPixelStoref"); - glad_glPixelStorei = (PFNGLPIXELSTOREIPROC)load("glPixelStorei"); - glad_glReadBuffer = (PFNGLREADBUFFERPROC)load("glReadBuffer"); - glad_glReadPixels = (PFNGLREADPIXELSPROC)load("glReadPixels"); - glad_glGetBooleanv = (PFNGLGETBOOLEANVPROC)load("glGetBooleanv"); - glad_glGetDoublev = (PFNGLGETDOUBLEVPROC)load("glGetDoublev"); - glad_glGetError = (PFNGLGETERRORPROC)load("glGetError"); - glad_glGetFloatv = (PFNGLGETFLOATVPROC)load("glGetFloatv"); - glad_glGetIntegerv = (PFNGLGETINTEGERVPROC)load("glGetIntegerv"); - glad_glGetString = (PFNGLGETSTRINGPROC)load("glGetString"); - glad_glGetTexImage = (PFNGLGETTEXIMAGEPROC)load("glGetTexImage"); - glad_glGetTexParameterfv = (PFNGLGETTEXPARAMETERFVPROC)load("glGetTexParameterfv"); - glad_glGetTexParameteriv = (PFNGLGETTEXPARAMETERIVPROC)load("glGetTexParameteriv"); - glad_glGetTexLevelParameterfv = (PFNGLGETTEXLEVELPARAMETERFVPROC)load("glGetTexLevelParameterfv"); - glad_glGetTexLevelParameteriv = (PFNGLGETTEXLEVELPARAMETERIVPROC)load("glGetTexLevelParameteriv"); - glad_glIsEnabled = (PFNGLISENABLEDPROC)load("glIsEnabled"); - glad_glDepthRange = (PFNGLDEPTHRANGEPROC)load("glDepthRange"); - glad_glViewport = (PFNGLVIEWPORTPROC)load("glViewport"); -} -static void load_GL_VERSION_1_1(GLADloadproc load) { - if(!GLAD_GL_VERSION_1_1) return; - glad_glDrawArrays = (PFNGLDRAWARRAYSPROC)load("glDrawArrays"); - glad_glDrawElements = (PFNGLDRAWELEMENTSPROC)load("glDrawElements"); - glad_glPolygonOffset = (PFNGLPOLYGONOFFSETPROC)load("glPolygonOffset"); - glad_glCopyTexImage1D = (PFNGLCOPYTEXIMAGE1DPROC)load("glCopyTexImage1D"); - glad_glCopyTexImage2D = (PFNGLCOPYTEXIMAGE2DPROC)load("glCopyTexImage2D"); - glad_glCopyTexSubImage1D = (PFNGLCOPYTEXSUBIMAGE1DPROC)load("glCopyTexSubImage1D"); - glad_glCopyTexSubImage2D = (PFNGLCOPYTEXSUBIMAGE2DPROC)load("glCopyTexSubImage2D"); - glad_glTexSubImage1D = (PFNGLTEXSUBIMAGE1DPROC)load("glTexSubImage1D"); - glad_glTexSubImage2D = (PFNGLTEXSUBIMAGE2DPROC)load("glTexSubImage2D"); - glad_glBindTexture = (PFNGLBINDTEXTUREPROC)load("glBindTexture"); - glad_glDeleteTextures = (PFNGLDELETETEXTURESPROC)load("glDeleteTextures"); - glad_glGenTextures = (PFNGLGENTEXTURESPROC)load("glGenTextures"); - glad_glIsTexture = (PFNGLISTEXTUREPROC)load("glIsTexture"); -} -static void load_GL_VERSION_1_2(GLADloadproc load) { - if(!GLAD_GL_VERSION_1_2) return; - glad_glDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC)load("glDrawRangeElements"); - glad_glTexImage3D = (PFNGLTEXIMAGE3DPROC)load("glTexImage3D"); - glad_glTexSubImage3D = (PFNGLTEXSUBIMAGE3DPROC)load("glTexSubImage3D"); - glad_glCopyTexSubImage3D = (PFNGLCOPYTEXSUBIMAGE3DPROC)load("glCopyTexSubImage3D"); -} -static void load_GL_VERSION_1_3(GLADloadproc load) { - if(!GLAD_GL_VERSION_1_3) return; - glad_glActiveTexture = (PFNGLACTIVETEXTUREPROC)load("glActiveTexture"); - glad_glSampleCoverage = (PFNGLSAMPLECOVERAGEPROC)load("glSampleCoverage"); - glad_glCompressedTexImage3D = (PFNGLCOMPRESSEDTEXIMAGE3DPROC)load("glCompressedTexImage3D"); - glad_glCompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC)load("glCompressedTexImage2D"); - glad_glCompressedTexImage1D = (PFNGLCOMPRESSEDTEXIMAGE1DPROC)load("glCompressedTexImage1D"); - glad_glCompressedTexSubImage3D = (PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC)load("glCompressedTexSubImage3D"); - glad_glCompressedTexSubImage2D = (PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)load("glCompressedTexSubImage2D"); - glad_glCompressedTexSubImage1D = (PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC)load("glCompressedTexSubImage1D"); - glad_glGetCompressedTexImage = (PFNGLGETCOMPRESSEDTEXIMAGEPROC)load("glGetCompressedTexImage"); -} -static void load_GL_VERSION_1_4(GLADloadproc load) { - if(!GLAD_GL_VERSION_1_4) return; - glad_glBlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC)load("glBlendFuncSeparate"); - glad_glMultiDrawArrays = (PFNGLMULTIDRAWARRAYSPROC)load("glMultiDrawArrays"); - glad_glMultiDrawElements = (PFNGLMULTIDRAWELEMENTSPROC)load("glMultiDrawElements"); - glad_glPointParameterf = (PFNGLPOINTPARAMETERFPROC)load("glPointParameterf"); - glad_glPointParameterfv = (PFNGLPOINTPARAMETERFVPROC)load("glPointParameterfv"); - glad_glPointParameteri = (PFNGLPOINTPARAMETERIPROC)load("glPointParameteri"); - glad_glPointParameteriv = (PFNGLPOINTPARAMETERIVPROC)load("glPointParameteriv"); - glad_glBlendColor = (PFNGLBLENDCOLORPROC)load("glBlendColor"); - glad_glBlendEquation = (PFNGLBLENDEQUATIONPROC)load("glBlendEquation"); -} -static void load_GL_VERSION_1_5(GLADloadproc load) { - if(!GLAD_GL_VERSION_1_5) return; - glad_glGenQueries = (PFNGLGENQUERIESPROC)load("glGenQueries"); - glad_glDeleteQueries = (PFNGLDELETEQUERIESPROC)load("glDeleteQueries"); - glad_glIsQuery = (PFNGLISQUERYPROC)load("glIsQuery"); - glad_glBeginQuery = (PFNGLBEGINQUERYPROC)load("glBeginQuery"); - glad_glEndQuery = (PFNGLENDQUERYPROC)load("glEndQuery"); - glad_glGetQueryiv = (PFNGLGETQUERYIVPROC)load("glGetQueryiv"); - glad_glGetQueryObjectiv = (PFNGLGETQUERYOBJECTIVPROC)load("glGetQueryObjectiv"); - glad_glGetQueryObjectuiv = (PFNGLGETQUERYOBJECTUIVPROC)load("glGetQueryObjectuiv"); - glad_glBindBuffer = (PFNGLBINDBUFFERPROC)load("glBindBuffer"); - glad_glDeleteBuffers = (PFNGLDELETEBUFFERSPROC)load("glDeleteBuffers"); - glad_glGenBuffers = (PFNGLGENBUFFERSPROC)load("glGenBuffers"); - glad_glIsBuffer = (PFNGLISBUFFERPROC)load("glIsBuffer"); - glad_glBufferData = (PFNGLBUFFERDATAPROC)load("glBufferData"); - glad_glBufferSubData = (PFNGLBUFFERSUBDATAPROC)load("glBufferSubData"); - glad_glGetBufferSubData = (PFNGLGETBUFFERSUBDATAPROC)load("glGetBufferSubData"); - glad_glMapBuffer = (PFNGLMAPBUFFERPROC)load("glMapBuffer"); - glad_glUnmapBuffer = (PFNGLUNMAPBUFFERPROC)load("glUnmapBuffer"); - glad_glGetBufferParameteriv = (PFNGLGETBUFFERPARAMETERIVPROC)load("glGetBufferParameteriv"); - glad_glGetBufferPointerv = (PFNGLGETBUFFERPOINTERVPROC)load("glGetBufferPointerv"); -} -static void load_GL_VERSION_2_0(GLADloadproc load) { - if(!GLAD_GL_VERSION_2_0) return; - glad_glBlendEquationSeparate = (PFNGLBLENDEQUATIONSEPARATEPROC)load("glBlendEquationSeparate"); - glad_glDrawBuffers = (PFNGLDRAWBUFFERSPROC)load("glDrawBuffers"); - glad_glStencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC)load("glStencilOpSeparate"); - glad_glStencilFuncSeparate = (PFNGLSTENCILFUNCSEPARATEPROC)load("glStencilFuncSeparate"); - glad_glStencilMaskSeparate = (PFNGLSTENCILMASKSEPARATEPROC)load("glStencilMaskSeparate"); - glad_glAttachShader = (PFNGLATTACHSHADERPROC)load("glAttachShader"); - glad_glBindAttribLocation = (PFNGLBINDATTRIBLOCATIONPROC)load("glBindAttribLocation"); - glad_glCompileShader = (PFNGLCOMPILESHADERPROC)load("glCompileShader"); - glad_glCreateProgram = (PFNGLCREATEPROGRAMPROC)load("glCreateProgram"); - glad_glCreateShader = (PFNGLCREATESHADERPROC)load("glCreateShader"); - glad_glDeleteProgram = (PFNGLDELETEPROGRAMPROC)load("glDeleteProgram"); - glad_glDeleteShader = (PFNGLDELETESHADERPROC)load("glDeleteShader"); - glad_glDetachShader = (PFNGLDETACHSHADERPROC)load("glDetachShader"); - glad_glDisableVertexAttribArray = (PFNGLDISABLEVERTEXATTRIBARRAYPROC)load("glDisableVertexAttribArray"); - glad_glEnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC)load("glEnableVertexAttribArray"); - glad_glGetActiveAttrib = (PFNGLGETACTIVEATTRIBPROC)load("glGetActiveAttrib"); - glad_glGetActiveUniform = (PFNGLGETACTIVEUNIFORMPROC)load("glGetActiveUniform"); - glad_glGetAttachedShaders = (PFNGLGETATTACHEDSHADERSPROC)load("glGetAttachedShaders"); - glad_glGetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC)load("glGetAttribLocation"); - glad_glGetProgramiv = (PFNGLGETPROGRAMIVPROC)load("glGetProgramiv"); - glad_glGetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC)load("glGetProgramInfoLog"); - glad_glGetShaderiv = (PFNGLGETSHADERIVPROC)load("glGetShaderiv"); - glad_glGetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC)load("glGetShaderInfoLog"); - glad_glGetShaderSource = (PFNGLGETSHADERSOURCEPROC)load("glGetShaderSource"); - glad_glGetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC)load("glGetUniformLocation"); - glad_glGetUniformfv = (PFNGLGETUNIFORMFVPROC)load("glGetUniformfv"); - glad_glGetUniformiv = (PFNGLGETUNIFORMIVPROC)load("glGetUniformiv"); - glad_glGetVertexAttribdv = (PFNGLGETVERTEXATTRIBDVPROC)load("glGetVertexAttribdv"); - glad_glGetVertexAttribfv = (PFNGLGETVERTEXATTRIBFVPROC)load("glGetVertexAttribfv"); - glad_glGetVertexAttribiv = (PFNGLGETVERTEXATTRIBIVPROC)load("glGetVertexAttribiv"); - glad_glGetVertexAttribPointerv = (PFNGLGETVERTEXATTRIBPOINTERVPROC)load("glGetVertexAttribPointerv"); - glad_glIsProgram = (PFNGLISPROGRAMPROC)load("glIsProgram"); - glad_glIsShader = (PFNGLISSHADERPROC)load("glIsShader"); - glad_glLinkProgram = (PFNGLLINKPROGRAMPROC)load("glLinkProgram"); - glad_glShaderSource = (PFNGLSHADERSOURCEPROC)load("glShaderSource"); - glad_glUseProgram = (PFNGLUSEPROGRAMPROC)load("glUseProgram"); - glad_glUniform1f = (PFNGLUNIFORM1FPROC)load("glUniform1f"); - glad_glUniform2f = (PFNGLUNIFORM2FPROC)load("glUniform2f"); - glad_glUniform3f = (PFNGLUNIFORM3FPROC)load("glUniform3f"); - glad_glUniform4f = (PFNGLUNIFORM4FPROC)load("glUniform4f"); - glad_glUniform1i = (PFNGLUNIFORM1IPROC)load("glUniform1i"); - glad_glUniform2i = (PFNGLUNIFORM2IPROC)load("glUniform2i"); - glad_glUniform3i = (PFNGLUNIFORM3IPROC)load("glUniform3i"); - glad_glUniform4i = (PFNGLUNIFORM4IPROC)load("glUniform4i"); - glad_glUniform1fv = (PFNGLUNIFORM1FVPROC)load("glUniform1fv"); - glad_glUniform2fv = (PFNGLUNIFORM2FVPROC)load("glUniform2fv"); - glad_glUniform3fv = (PFNGLUNIFORM3FVPROC)load("glUniform3fv"); - glad_glUniform4fv = (PFNGLUNIFORM4FVPROC)load("glUniform4fv"); - glad_glUniform1iv = (PFNGLUNIFORM1IVPROC)load("glUniform1iv"); - glad_glUniform2iv = (PFNGLUNIFORM2IVPROC)load("glUniform2iv"); - glad_glUniform3iv = (PFNGLUNIFORM3IVPROC)load("glUniform3iv"); - glad_glUniform4iv = (PFNGLUNIFORM4IVPROC)load("glUniform4iv"); - glad_glUniformMatrix2fv = (PFNGLUNIFORMMATRIX2FVPROC)load("glUniformMatrix2fv"); - glad_glUniformMatrix3fv = (PFNGLUNIFORMMATRIX3FVPROC)load("glUniformMatrix3fv"); - glad_glUniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC)load("glUniformMatrix4fv"); - glad_glValidateProgram = (PFNGLVALIDATEPROGRAMPROC)load("glValidateProgram"); - glad_glVertexAttrib1d = (PFNGLVERTEXATTRIB1DPROC)load("glVertexAttrib1d"); - glad_glVertexAttrib1dv = (PFNGLVERTEXATTRIB1DVPROC)load("glVertexAttrib1dv"); - glad_glVertexAttrib1f = (PFNGLVERTEXATTRIB1FPROC)load("glVertexAttrib1f"); - glad_glVertexAttrib1fv = (PFNGLVERTEXATTRIB1FVPROC)load("glVertexAttrib1fv"); - glad_glVertexAttrib1s = (PFNGLVERTEXATTRIB1SPROC)load("glVertexAttrib1s"); - glad_glVertexAttrib1sv = (PFNGLVERTEXATTRIB1SVPROC)load("glVertexAttrib1sv"); - glad_glVertexAttrib2d = (PFNGLVERTEXATTRIB2DPROC)load("glVertexAttrib2d"); - glad_glVertexAttrib2dv = (PFNGLVERTEXATTRIB2DVPROC)load("glVertexAttrib2dv"); - glad_glVertexAttrib2f = (PFNGLVERTEXATTRIB2FPROC)load("glVertexAttrib2f"); - glad_glVertexAttrib2fv = (PFNGLVERTEXATTRIB2FVPROC)load("glVertexAttrib2fv"); - glad_glVertexAttrib2s = (PFNGLVERTEXATTRIB2SPROC)load("glVertexAttrib2s"); - glad_glVertexAttrib2sv = (PFNGLVERTEXATTRIB2SVPROC)load("glVertexAttrib2sv"); - glad_glVertexAttrib3d = (PFNGLVERTEXATTRIB3DPROC)load("glVertexAttrib3d"); - glad_glVertexAttrib3dv = (PFNGLVERTEXATTRIB3DVPROC)load("glVertexAttrib3dv"); - glad_glVertexAttrib3f = (PFNGLVERTEXATTRIB3FPROC)load("glVertexAttrib3f"); - glad_glVertexAttrib3fv = (PFNGLVERTEXATTRIB3FVPROC)load("glVertexAttrib3fv"); - glad_glVertexAttrib3s = (PFNGLVERTEXATTRIB3SPROC)load("glVertexAttrib3s"); - glad_glVertexAttrib3sv = (PFNGLVERTEXATTRIB3SVPROC)load("glVertexAttrib3sv"); - glad_glVertexAttrib4Nbv = (PFNGLVERTEXATTRIB4NBVPROC)load("glVertexAttrib4Nbv"); - glad_glVertexAttrib4Niv = (PFNGLVERTEXATTRIB4NIVPROC)load("glVertexAttrib4Niv"); - glad_glVertexAttrib4Nsv = (PFNGLVERTEXATTRIB4NSVPROC)load("glVertexAttrib4Nsv"); - glad_glVertexAttrib4Nub = (PFNGLVERTEXATTRIB4NUBPROC)load("glVertexAttrib4Nub"); - glad_glVertexAttrib4Nubv = (PFNGLVERTEXATTRIB4NUBVPROC)load("glVertexAttrib4Nubv"); - glad_glVertexAttrib4Nuiv = (PFNGLVERTEXATTRIB4NUIVPROC)load("glVertexAttrib4Nuiv"); - glad_glVertexAttrib4Nusv = (PFNGLVERTEXATTRIB4NUSVPROC)load("glVertexAttrib4Nusv"); - glad_glVertexAttrib4bv = (PFNGLVERTEXATTRIB4BVPROC)load("glVertexAttrib4bv"); - glad_glVertexAttrib4d = (PFNGLVERTEXATTRIB4DPROC)load("glVertexAttrib4d"); - glad_glVertexAttrib4dv = (PFNGLVERTEXATTRIB4DVPROC)load("glVertexAttrib4dv"); - glad_glVertexAttrib4f = (PFNGLVERTEXATTRIB4FPROC)load("glVertexAttrib4f"); - glad_glVertexAttrib4fv = (PFNGLVERTEXATTRIB4FVPROC)load("glVertexAttrib4fv"); - glad_glVertexAttrib4iv = (PFNGLVERTEXATTRIB4IVPROC)load("glVertexAttrib4iv"); - glad_glVertexAttrib4s = (PFNGLVERTEXATTRIB4SPROC)load("glVertexAttrib4s"); - glad_glVertexAttrib4sv = (PFNGLVERTEXATTRIB4SVPROC)load("glVertexAttrib4sv"); - glad_glVertexAttrib4ubv = (PFNGLVERTEXATTRIB4UBVPROC)load("glVertexAttrib4ubv"); - glad_glVertexAttrib4uiv = (PFNGLVERTEXATTRIB4UIVPROC)load("glVertexAttrib4uiv"); - glad_glVertexAttrib4usv = (PFNGLVERTEXATTRIB4USVPROC)load("glVertexAttrib4usv"); - glad_glVertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC)load("glVertexAttribPointer"); -} -static void load_GL_VERSION_2_1(GLADloadproc load) { - if(!GLAD_GL_VERSION_2_1) return; - glad_glUniformMatrix2x3fv = (PFNGLUNIFORMMATRIX2X3FVPROC)load("glUniformMatrix2x3fv"); - glad_glUniformMatrix3x2fv = (PFNGLUNIFORMMATRIX3X2FVPROC)load("glUniformMatrix3x2fv"); - glad_glUniformMatrix2x4fv = (PFNGLUNIFORMMATRIX2X4FVPROC)load("glUniformMatrix2x4fv"); - glad_glUniformMatrix4x2fv = (PFNGLUNIFORMMATRIX4X2FVPROC)load("glUniformMatrix4x2fv"); - glad_glUniformMatrix3x4fv = (PFNGLUNIFORMMATRIX3X4FVPROC)load("glUniformMatrix3x4fv"); - glad_glUniformMatrix4x3fv = (PFNGLUNIFORMMATRIX4X3FVPROC)load("glUniformMatrix4x3fv"); -} -static void load_GL_VERSION_3_0(GLADloadproc load) { - if(!GLAD_GL_VERSION_3_0) return; - glad_glColorMaski = (PFNGLCOLORMASKIPROC)load("glColorMaski"); - glad_glGetBooleani_v = (PFNGLGETBOOLEANI_VPROC)load("glGetBooleani_v"); - glad_glGetIntegeri_v = (PFNGLGETINTEGERI_VPROC)load("glGetIntegeri_v"); - glad_glEnablei = (PFNGLENABLEIPROC)load("glEnablei"); - glad_glDisablei = (PFNGLDISABLEIPROC)load("glDisablei"); - glad_glIsEnabledi = (PFNGLISENABLEDIPROC)load("glIsEnabledi"); - glad_glBeginTransformFeedback = (PFNGLBEGINTRANSFORMFEEDBACKPROC)load("glBeginTransformFeedback"); - glad_glEndTransformFeedback = (PFNGLENDTRANSFORMFEEDBACKPROC)load("glEndTransformFeedback"); - glad_glBindBufferRange = (PFNGLBINDBUFFERRANGEPROC)load("glBindBufferRange"); - glad_glBindBufferBase = (PFNGLBINDBUFFERBASEPROC)load("glBindBufferBase"); - glad_glTransformFeedbackVaryings = (PFNGLTRANSFORMFEEDBACKVARYINGSPROC)load("glTransformFeedbackVaryings"); - glad_glGetTransformFeedbackVarying = (PFNGLGETTRANSFORMFEEDBACKVARYINGPROC)load("glGetTransformFeedbackVarying"); - glad_glClampColor = (PFNGLCLAMPCOLORPROC)load("glClampColor"); - glad_glBeginConditionalRender = (PFNGLBEGINCONDITIONALRENDERPROC)load("glBeginConditionalRender"); - glad_glEndConditionalRender = (PFNGLENDCONDITIONALRENDERPROC)load("glEndConditionalRender"); - glad_glVertexAttribIPointer = (PFNGLVERTEXATTRIBIPOINTERPROC)load("glVertexAttribIPointer"); - glad_glGetVertexAttribIiv = (PFNGLGETVERTEXATTRIBIIVPROC)load("glGetVertexAttribIiv"); - glad_glGetVertexAttribIuiv = (PFNGLGETVERTEXATTRIBIUIVPROC)load("glGetVertexAttribIuiv"); - glad_glVertexAttribI1i = (PFNGLVERTEXATTRIBI1IPROC)load("glVertexAttribI1i"); - glad_glVertexAttribI2i = (PFNGLVERTEXATTRIBI2IPROC)load("glVertexAttribI2i"); - glad_glVertexAttribI3i = (PFNGLVERTEXATTRIBI3IPROC)load("glVertexAttribI3i"); - glad_glVertexAttribI4i = (PFNGLVERTEXATTRIBI4IPROC)load("glVertexAttribI4i"); - glad_glVertexAttribI1ui = (PFNGLVERTEXATTRIBI1UIPROC)load("glVertexAttribI1ui"); - glad_glVertexAttribI2ui = (PFNGLVERTEXATTRIBI2UIPROC)load("glVertexAttribI2ui"); - glad_glVertexAttribI3ui = (PFNGLVERTEXATTRIBI3UIPROC)load("glVertexAttribI3ui"); - glad_glVertexAttribI4ui = (PFNGLVERTEXATTRIBI4UIPROC)load("glVertexAttribI4ui"); - glad_glVertexAttribI1iv = (PFNGLVERTEXATTRIBI1IVPROC)load("glVertexAttribI1iv"); - glad_glVertexAttribI2iv = (PFNGLVERTEXATTRIBI2IVPROC)load("glVertexAttribI2iv"); - glad_glVertexAttribI3iv = (PFNGLVERTEXATTRIBI3IVPROC)load("glVertexAttribI3iv"); - glad_glVertexAttribI4iv = (PFNGLVERTEXATTRIBI4IVPROC)load("glVertexAttribI4iv"); - glad_glVertexAttribI1uiv = (PFNGLVERTEXATTRIBI1UIVPROC)load("glVertexAttribI1uiv"); - glad_glVertexAttribI2uiv = (PFNGLVERTEXATTRIBI2UIVPROC)load("glVertexAttribI2uiv"); - glad_glVertexAttribI3uiv = (PFNGLVERTEXATTRIBI3UIVPROC)load("glVertexAttribI3uiv"); - glad_glVertexAttribI4uiv = (PFNGLVERTEXATTRIBI4UIVPROC)load("glVertexAttribI4uiv"); - glad_glVertexAttribI4bv = (PFNGLVERTEXATTRIBI4BVPROC)load("glVertexAttribI4bv"); - glad_glVertexAttribI4sv = (PFNGLVERTEXATTRIBI4SVPROC)load("glVertexAttribI4sv"); - glad_glVertexAttribI4ubv = (PFNGLVERTEXATTRIBI4UBVPROC)load("glVertexAttribI4ubv"); - glad_glVertexAttribI4usv = (PFNGLVERTEXATTRIBI4USVPROC)load("glVertexAttribI4usv"); - glad_glGetUniformuiv = (PFNGLGETUNIFORMUIVPROC)load("glGetUniformuiv"); - glad_glBindFragDataLocation = (PFNGLBINDFRAGDATALOCATIONPROC)load("glBindFragDataLocation"); - glad_glGetFragDataLocation = (PFNGLGETFRAGDATALOCATIONPROC)load("glGetFragDataLocation"); - glad_glUniform1ui = (PFNGLUNIFORM1UIPROC)load("glUniform1ui"); - glad_glUniform2ui = (PFNGLUNIFORM2UIPROC)load("glUniform2ui"); - glad_glUniform3ui = (PFNGLUNIFORM3UIPROC)load("glUniform3ui"); - glad_glUniform4ui = (PFNGLUNIFORM4UIPROC)load("glUniform4ui"); - glad_glUniform1uiv = (PFNGLUNIFORM1UIVPROC)load("glUniform1uiv"); - glad_glUniform2uiv = (PFNGLUNIFORM2UIVPROC)load("glUniform2uiv"); - glad_glUniform3uiv = (PFNGLUNIFORM3UIVPROC)load("glUniform3uiv"); - glad_glUniform4uiv = (PFNGLUNIFORM4UIVPROC)load("glUniform4uiv"); - glad_glTexParameterIiv = (PFNGLTEXPARAMETERIIVPROC)load("glTexParameterIiv"); - glad_glTexParameterIuiv = (PFNGLTEXPARAMETERIUIVPROC)load("glTexParameterIuiv"); - glad_glGetTexParameterIiv = (PFNGLGETTEXPARAMETERIIVPROC)load("glGetTexParameterIiv"); - glad_glGetTexParameterIuiv = (PFNGLGETTEXPARAMETERIUIVPROC)load("glGetTexParameterIuiv"); - glad_glClearBufferiv = (PFNGLCLEARBUFFERIVPROC)load("glClearBufferiv"); - glad_glClearBufferuiv = (PFNGLCLEARBUFFERUIVPROC)load("glClearBufferuiv"); - glad_glClearBufferfv = (PFNGLCLEARBUFFERFVPROC)load("glClearBufferfv"); - glad_glClearBufferfi = (PFNGLCLEARBUFFERFIPROC)load("glClearBufferfi"); - glad_glGetStringi = (PFNGLGETSTRINGIPROC)load("glGetStringi"); - glad_glIsRenderbuffer = (PFNGLISRENDERBUFFERPROC)load("glIsRenderbuffer"); - glad_glBindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC)load("glBindRenderbuffer"); - glad_glDeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSPROC)load("glDeleteRenderbuffers"); - glad_glGenRenderbuffers = (PFNGLGENRENDERBUFFERSPROC)load("glGenRenderbuffers"); - glad_glRenderbufferStorage = (PFNGLRENDERBUFFERSTORAGEPROC)load("glRenderbufferStorage"); - glad_glGetRenderbufferParameteriv = (PFNGLGETRENDERBUFFERPARAMETERIVPROC)load("glGetRenderbufferParameteriv"); - glad_glIsFramebuffer = (PFNGLISFRAMEBUFFERPROC)load("glIsFramebuffer"); - glad_glBindFramebuffer = (PFNGLBINDFRAMEBUFFERPROC)load("glBindFramebuffer"); - glad_glDeleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSPROC)load("glDeleteFramebuffers"); - glad_glGenFramebuffers = (PFNGLGENFRAMEBUFFERSPROC)load("glGenFramebuffers"); - glad_glCheckFramebufferStatus = (PFNGLCHECKFRAMEBUFFERSTATUSPROC)load("glCheckFramebufferStatus"); - glad_glFramebufferTexture1D = (PFNGLFRAMEBUFFERTEXTURE1DPROC)load("glFramebufferTexture1D"); - glad_glFramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DPROC)load("glFramebufferTexture2D"); - glad_glFramebufferTexture3D = (PFNGLFRAMEBUFFERTEXTURE3DPROC)load("glFramebufferTexture3D"); - glad_glFramebufferRenderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFERPROC)load("glFramebufferRenderbuffer"); - glad_glGetFramebufferAttachmentParameteriv = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)load("glGetFramebufferAttachmentParameteriv"); - glad_glGenerateMipmap = (PFNGLGENERATEMIPMAPPROC)load("glGenerateMipmap"); - glad_glBlitFramebuffer = (PFNGLBLITFRAMEBUFFERPROC)load("glBlitFramebuffer"); - glad_glRenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC)load("glRenderbufferStorageMultisample"); - glad_glFramebufferTextureLayer = (PFNGLFRAMEBUFFERTEXTURELAYERPROC)load("glFramebufferTextureLayer"); - glad_glMapBufferRange = (PFNGLMAPBUFFERRANGEPROC)load("glMapBufferRange"); - glad_glFlushMappedBufferRange = (PFNGLFLUSHMAPPEDBUFFERRANGEPROC)load("glFlushMappedBufferRange"); - glad_glBindVertexArray = (PFNGLBINDVERTEXARRAYPROC)load("glBindVertexArray"); - glad_glDeleteVertexArrays = (PFNGLDELETEVERTEXARRAYSPROC)load("glDeleteVertexArrays"); - glad_glGenVertexArrays = (PFNGLGENVERTEXARRAYSPROC)load("glGenVertexArrays"); - glad_glIsVertexArray = (PFNGLISVERTEXARRAYPROC)load("glIsVertexArray"); -} -static void load_GL_VERSION_3_1(GLADloadproc load) { - if(!GLAD_GL_VERSION_3_1) return; - glad_glDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDPROC)load("glDrawArraysInstanced"); - glad_glDrawElementsInstanced = (PFNGLDRAWELEMENTSINSTANCEDPROC)load("glDrawElementsInstanced"); - glad_glTexBuffer = (PFNGLTEXBUFFERPROC)load("glTexBuffer"); - glad_glPrimitiveRestartIndex = (PFNGLPRIMITIVERESTARTINDEXPROC)load("glPrimitiveRestartIndex"); - glad_glCopyBufferSubData = (PFNGLCOPYBUFFERSUBDATAPROC)load("glCopyBufferSubData"); - glad_glGetUniformIndices = (PFNGLGETUNIFORMINDICESPROC)load("glGetUniformIndices"); - glad_glGetActiveUniformsiv = (PFNGLGETACTIVEUNIFORMSIVPROC)load("glGetActiveUniformsiv"); - glad_glGetActiveUniformName = (PFNGLGETACTIVEUNIFORMNAMEPROC)load("glGetActiveUniformName"); - glad_glGetUniformBlockIndex = (PFNGLGETUNIFORMBLOCKINDEXPROC)load("glGetUniformBlockIndex"); - glad_glGetActiveUniformBlockiv = (PFNGLGETACTIVEUNIFORMBLOCKIVPROC)load("glGetActiveUniformBlockiv"); - glad_glGetActiveUniformBlockName = (PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC)load("glGetActiveUniformBlockName"); - glad_glUniformBlockBinding = (PFNGLUNIFORMBLOCKBINDINGPROC)load("glUniformBlockBinding"); - glad_glBindBufferRange = (PFNGLBINDBUFFERRANGEPROC)load("glBindBufferRange"); - glad_glBindBufferBase = (PFNGLBINDBUFFERBASEPROC)load("glBindBufferBase"); - glad_glGetIntegeri_v = (PFNGLGETINTEGERI_VPROC)load("glGetIntegeri_v"); -} -static void load_GL_VERSION_3_2(GLADloadproc load) { - if(!GLAD_GL_VERSION_3_2) return; - glad_glDrawElementsBaseVertex = (PFNGLDRAWELEMENTSBASEVERTEXPROC)load("glDrawElementsBaseVertex"); - glad_glDrawRangeElementsBaseVertex = (PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC)load("glDrawRangeElementsBaseVertex"); - glad_glDrawElementsInstancedBaseVertex = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC)load("glDrawElementsInstancedBaseVertex"); - glad_glMultiDrawElementsBaseVertex = (PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC)load("glMultiDrawElementsBaseVertex"); - glad_glProvokingVertex = (PFNGLPROVOKINGVERTEXPROC)load("glProvokingVertex"); - glad_glFenceSync = (PFNGLFENCESYNCPROC)load("glFenceSync"); - glad_glIsSync = (PFNGLISSYNCPROC)load("glIsSync"); - glad_glDeleteSync = (PFNGLDELETESYNCPROC)load("glDeleteSync"); - glad_glClientWaitSync = (PFNGLCLIENTWAITSYNCPROC)load("glClientWaitSync"); - glad_glWaitSync = (PFNGLWAITSYNCPROC)load("glWaitSync"); - glad_glGetInteger64v = (PFNGLGETINTEGER64VPROC)load("glGetInteger64v"); - glad_glGetSynciv = (PFNGLGETSYNCIVPROC)load("glGetSynciv"); - glad_glGetInteger64i_v = (PFNGLGETINTEGER64I_VPROC)load("glGetInteger64i_v"); - glad_glGetBufferParameteri64v = (PFNGLGETBUFFERPARAMETERI64VPROC)load("glGetBufferParameteri64v"); - glad_glFramebufferTexture = (PFNGLFRAMEBUFFERTEXTUREPROC)load("glFramebufferTexture"); - glad_glTexImage2DMultisample = (PFNGLTEXIMAGE2DMULTISAMPLEPROC)load("glTexImage2DMultisample"); - glad_glTexImage3DMultisample = (PFNGLTEXIMAGE3DMULTISAMPLEPROC)load("glTexImage3DMultisample"); - glad_glGetMultisamplefv = (PFNGLGETMULTISAMPLEFVPROC)load("glGetMultisamplefv"); - glad_glSampleMaski = (PFNGLSAMPLEMASKIPROC)load("glSampleMaski"); -} -static void load_GL_VERSION_3_3(GLADloadproc load) { - if(!GLAD_GL_VERSION_3_3) return; - glad_glBindFragDataLocationIndexed = (PFNGLBINDFRAGDATALOCATIONINDEXEDPROC)load("glBindFragDataLocationIndexed"); - glad_glGetFragDataIndex = (PFNGLGETFRAGDATAINDEXPROC)load("glGetFragDataIndex"); - glad_glGenSamplers = (PFNGLGENSAMPLERSPROC)load("glGenSamplers"); - glad_glDeleteSamplers = (PFNGLDELETESAMPLERSPROC)load("glDeleteSamplers"); - glad_glIsSampler = (PFNGLISSAMPLERPROC)load("glIsSampler"); - glad_glBindSampler = (PFNGLBINDSAMPLERPROC)load("glBindSampler"); - glad_glSamplerParameteri = (PFNGLSAMPLERPARAMETERIPROC)load("glSamplerParameteri"); - glad_glSamplerParameteriv = (PFNGLSAMPLERPARAMETERIVPROC)load("glSamplerParameteriv"); - glad_glSamplerParameterf = (PFNGLSAMPLERPARAMETERFPROC)load("glSamplerParameterf"); - glad_glSamplerParameterfv = (PFNGLSAMPLERPARAMETERFVPROC)load("glSamplerParameterfv"); - glad_glSamplerParameterIiv = (PFNGLSAMPLERPARAMETERIIVPROC)load("glSamplerParameterIiv"); - glad_glSamplerParameterIuiv = (PFNGLSAMPLERPARAMETERIUIVPROC)load("glSamplerParameterIuiv"); - glad_glGetSamplerParameteriv = (PFNGLGETSAMPLERPARAMETERIVPROC)load("glGetSamplerParameteriv"); - glad_glGetSamplerParameterIiv = (PFNGLGETSAMPLERPARAMETERIIVPROC)load("glGetSamplerParameterIiv"); - glad_glGetSamplerParameterfv = (PFNGLGETSAMPLERPARAMETERFVPROC)load("glGetSamplerParameterfv"); - glad_glGetSamplerParameterIuiv = (PFNGLGETSAMPLERPARAMETERIUIVPROC)load("glGetSamplerParameterIuiv"); - glad_glQueryCounter = (PFNGLQUERYCOUNTERPROC)load("glQueryCounter"); - glad_glGetQueryObjecti64v = (PFNGLGETQUERYOBJECTI64VPROC)load("glGetQueryObjecti64v"); - glad_glGetQueryObjectui64v = (PFNGLGETQUERYOBJECTUI64VPROC)load("glGetQueryObjectui64v"); - glad_glVertexAttribDivisor = (PFNGLVERTEXATTRIBDIVISORPROC)load("glVertexAttribDivisor"); - glad_glVertexAttribP1ui = (PFNGLVERTEXATTRIBP1UIPROC)load("glVertexAttribP1ui"); - glad_glVertexAttribP1uiv = (PFNGLVERTEXATTRIBP1UIVPROC)load("glVertexAttribP1uiv"); - glad_glVertexAttribP2ui = (PFNGLVERTEXATTRIBP2UIPROC)load("glVertexAttribP2ui"); - glad_glVertexAttribP2uiv = (PFNGLVERTEXATTRIBP2UIVPROC)load("glVertexAttribP2uiv"); - glad_glVertexAttribP3ui = (PFNGLVERTEXATTRIBP3UIPROC)load("glVertexAttribP3ui"); - glad_glVertexAttribP3uiv = (PFNGLVERTEXATTRIBP3UIVPROC)load("glVertexAttribP3uiv"); - glad_glVertexAttribP4ui = (PFNGLVERTEXATTRIBP4UIPROC)load("glVertexAttribP4ui"); - glad_glVertexAttribP4uiv = (PFNGLVERTEXATTRIBP4UIVPROC)load("glVertexAttribP4uiv"); - glad_glVertexP2ui = (PFNGLVERTEXP2UIPROC)load("glVertexP2ui"); - glad_glVertexP2uiv = (PFNGLVERTEXP2UIVPROC)load("glVertexP2uiv"); - glad_glVertexP3ui = (PFNGLVERTEXP3UIPROC)load("glVertexP3ui"); - glad_glVertexP3uiv = (PFNGLVERTEXP3UIVPROC)load("glVertexP3uiv"); - glad_glVertexP4ui = (PFNGLVERTEXP4UIPROC)load("glVertexP4ui"); - glad_glVertexP4uiv = (PFNGLVERTEXP4UIVPROC)load("glVertexP4uiv"); - glad_glTexCoordP1ui = (PFNGLTEXCOORDP1UIPROC)load("glTexCoordP1ui"); - glad_glTexCoordP1uiv = (PFNGLTEXCOORDP1UIVPROC)load("glTexCoordP1uiv"); - glad_glTexCoordP2ui = (PFNGLTEXCOORDP2UIPROC)load("glTexCoordP2ui"); - glad_glTexCoordP2uiv = (PFNGLTEXCOORDP2UIVPROC)load("glTexCoordP2uiv"); - glad_glTexCoordP3ui = (PFNGLTEXCOORDP3UIPROC)load("glTexCoordP3ui"); - glad_glTexCoordP3uiv = (PFNGLTEXCOORDP3UIVPROC)load("glTexCoordP3uiv"); - glad_glTexCoordP4ui = (PFNGLTEXCOORDP4UIPROC)load("glTexCoordP4ui"); - glad_glTexCoordP4uiv = (PFNGLTEXCOORDP4UIVPROC)load("glTexCoordP4uiv"); - glad_glMultiTexCoordP1ui = (PFNGLMULTITEXCOORDP1UIPROC)load("glMultiTexCoordP1ui"); - glad_glMultiTexCoordP1uiv = (PFNGLMULTITEXCOORDP1UIVPROC)load("glMultiTexCoordP1uiv"); - glad_glMultiTexCoordP2ui = (PFNGLMULTITEXCOORDP2UIPROC)load("glMultiTexCoordP2ui"); - glad_glMultiTexCoordP2uiv = (PFNGLMULTITEXCOORDP2UIVPROC)load("glMultiTexCoordP2uiv"); - glad_glMultiTexCoordP3ui = (PFNGLMULTITEXCOORDP3UIPROC)load("glMultiTexCoordP3ui"); - glad_glMultiTexCoordP3uiv = (PFNGLMULTITEXCOORDP3UIVPROC)load("glMultiTexCoordP3uiv"); - glad_glMultiTexCoordP4ui = (PFNGLMULTITEXCOORDP4UIPROC)load("glMultiTexCoordP4ui"); - glad_glMultiTexCoordP4uiv = (PFNGLMULTITEXCOORDP4UIVPROC)load("glMultiTexCoordP4uiv"); - glad_glNormalP3ui = (PFNGLNORMALP3UIPROC)load("glNormalP3ui"); - glad_glNormalP3uiv = (PFNGLNORMALP3UIVPROC)load("glNormalP3uiv"); - glad_glColorP3ui = (PFNGLCOLORP3UIPROC)load("glColorP3ui"); - glad_glColorP3uiv = (PFNGLCOLORP3UIVPROC)load("glColorP3uiv"); - glad_glColorP4ui = (PFNGLCOLORP4UIPROC)load("glColorP4ui"); - glad_glColorP4uiv = (PFNGLCOLORP4UIVPROC)load("glColorP4uiv"); - glad_glSecondaryColorP3ui = (PFNGLSECONDARYCOLORP3UIPROC)load("glSecondaryColorP3ui"); - glad_glSecondaryColorP3uiv = (PFNGLSECONDARYCOLORP3UIVPROC)load("glSecondaryColorP3uiv"); -} -static void load_GL_VERSION_4_0(GLADloadproc load) { - if(!GLAD_GL_VERSION_4_0) return; - glad_glMinSampleShading = (PFNGLMINSAMPLESHADINGPROC)load("glMinSampleShading"); - glad_glBlendEquationi = (PFNGLBLENDEQUATIONIPROC)load("glBlendEquationi"); - glad_glBlendEquationSeparatei = (PFNGLBLENDEQUATIONSEPARATEIPROC)load("glBlendEquationSeparatei"); - glad_glBlendFunci = (PFNGLBLENDFUNCIPROC)load("glBlendFunci"); - glad_glBlendFuncSeparatei = (PFNGLBLENDFUNCSEPARATEIPROC)load("glBlendFuncSeparatei"); - glad_glDrawArraysIndirect = (PFNGLDRAWARRAYSINDIRECTPROC)load("glDrawArraysIndirect"); - glad_glDrawElementsIndirect = (PFNGLDRAWELEMENTSINDIRECTPROC)load("glDrawElementsIndirect"); - glad_glUniform1d = (PFNGLUNIFORM1DPROC)load("glUniform1d"); - glad_glUniform2d = (PFNGLUNIFORM2DPROC)load("glUniform2d"); - glad_glUniform3d = (PFNGLUNIFORM3DPROC)load("glUniform3d"); - glad_glUniform4d = (PFNGLUNIFORM4DPROC)load("glUniform4d"); - glad_glUniform1dv = (PFNGLUNIFORM1DVPROC)load("glUniform1dv"); - glad_glUniform2dv = (PFNGLUNIFORM2DVPROC)load("glUniform2dv"); - glad_glUniform3dv = (PFNGLUNIFORM3DVPROC)load("glUniform3dv"); - glad_glUniform4dv = (PFNGLUNIFORM4DVPROC)load("glUniform4dv"); - glad_glUniformMatrix2dv = (PFNGLUNIFORMMATRIX2DVPROC)load("glUniformMatrix2dv"); - glad_glUniformMatrix3dv = (PFNGLUNIFORMMATRIX3DVPROC)load("glUniformMatrix3dv"); - glad_glUniformMatrix4dv = (PFNGLUNIFORMMATRIX4DVPROC)load("glUniformMatrix4dv"); - glad_glUniformMatrix2x3dv = (PFNGLUNIFORMMATRIX2X3DVPROC)load("glUniformMatrix2x3dv"); - glad_glUniformMatrix2x4dv = (PFNGLUNIFORMMATRIX2X4DVPROC)load("glUniformMatrix2x4dv"); - glad_glUniformMatrix3x2dv = (PFNGLUNIFORMMATRIX3X2DVPROC)load("glUniformMatrix3x2dv"); - glad_glUniformMatrix3x4dv = (PFNGLUNIFORMMATRIX3X4DVPROC)load("glUniformMatrix3x4dv"); - glad_glUniformMatrix4x2dv = (PFNGLUNIFORMMATRIX4X2DVPROC)load("glUniformMatrix4x2dv"); - glad_glUniformMatrix4x3dv = (PFNGLUNIFORMMATRIX4X3DVPROC)load("glUniformMatrix4x3dv"); - glad_glGetUniformdv = (PFNGLGETUNIFORMDVPROC)load("glGetUniformdv"); - glad_glGetSubroutineUniformLocation = (PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC)load("glGetSubroutineUniformLocation"); - glad_glGetSubroutineIndex = (PFNGLGETSUBROUTINEINDEXPROC)load("glGetSubroutineIndex"); - glad_glGetActiveSubroutineUniformiv = (PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC)load("glGetActiveSubroutineUniformiv"); - glad_glGetActiveSubroutineUniformName = (PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC)load("glGetActiveSubroutineUniformName"); - glad_glGetActiveSubroutineName = (PFNGLGETACTIVESUBROUTINENAMEPROC)load("glGetActiveSubroutineName"); - glad_glUniformSubroutinesuiv = (PFNGLUNIFORMSUBROUTINESUIVPROC)load("glUniformSubroutinesuiv"); - glad_glGetUniformSubroutineuiv = (PFNGLGETUNIFORMSUBROUTINEUIVPROC)load("glGetUniformSubroutineuiv"); - glad_glGetProgramStageiv = (PFNGLGETPROGRAMSTAGEIVPROC)load("glGetProgramStageiv"); - glad_glPatchParameteri = (PFNGLPATCHPARAMETERIPROC)load("glPatchParameteri"); - glad_glPatchParameterfv = (PFNGLPATCHPARAMETERFVPROC)load("glPatchParameterfv"); - glad_glBindTransformFeedback = (PFNGLBINDTRANSFORMFEEDBACKPROC)load("glBindTransformFeedback"); - glad_glDeleteTransformFeedbacks = (PFNGLDELETETRANSFORMFEEDBACKSPROC)load("glDeleteTransformFeedbacks"); - glad_glGenTransformFeedbacks = (PFNGLGENTRANSFORMFEEDBACKSPROC)load("glGenTransformFeedbacks"); - glad_glIsTransformFeedback = (PFNGLISTRANSFORMFEEDBACKPROC)load("glIsTransformFeedback"); - glad_glPauseTransformFeedback = (PFNGLPAUSETRANSFORMFEEDBACKPROC)load("glPauseTransformFeedback"); - glad_glResumeTransformFeedback = (PFNGLRESUMETRANSFORMFEEDBACKPROC)load("glResumeTransformFeedback"); - glad_glDrawTransformFeedback = (PFNGLDRAWTRANSFORMFEEDBACKPROC)load("glDrawTransformFeedback"); - glad_glDrawTransformFeedbackStream = (PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC)load("glDrawTransformFeedbackStream"); - glad_glBeginQueryIndexed = (PFNGLBEGINQUERYINDEXEDPROC)load("glBeginQueryIndexed"); - glad_glEndQueryIndexed = (PFNGLENDQUERYINDEXEDPROC)load("glEndQueryIndexed"); - glad_glGetQueryIndexediv = (PFNGLGETQUERYINDEXEDIVPROC)load("glGetQueryIndexediv"); -} -static void load_GL_VERSION_4_1(GLADloadproc load) { - if(!GLAD_GL_VERSION_4_1) return; - glad_glReleaseShaderCompiler = (PFNGLRELEASESHADERCOMPILERPROC)load("glReleaseShaderCompiler"); - glad_glShaderBinary = (PFNGLSHADERBINARYPROC)load("glShaderBinary"); - glad_glGetShaderPrecisionFormat = (PFNGLGETSHADERPRECISIONFORMATPROC)load("glGetShaderPrecisionFormat"); - glad_glDepthRangef = (PFNGLDEPTHRANGEFPROC)load("glDepthRangef"); - glad_glClearDepthf = (PFNGLCLEARDEPTHFPROC)load("glClearDepthf"); - glad_glGetProgramBinary = (PFNGLGETPROGRAMBINARYPROC)load("glGetProgramBinary"); - glad_glProgramBinary = (PFNGLPROGRAMBINARYPROC)load("glProgramBinary"); - glad_glProgramParameteri = (PFNGLPROGRAMPARAMETERIPROC)load("glProgramParameteri"); - glad_glUseProgramStages = (PFNGLUSEPROGRAMSTAGESPROC)load("glUseProgramStages"); - glad_glActiveShaderProgram = (PFNGLACTIVESHADERPROGRAMPROC)load("glActiveShaderProgram"); - glad_glCreateShaderProgramv = (PFNGLCREATESHADERPROGRAMVPROC)load("glCreateShaderProgramv"); - glad_glBindProgramPipeline = (PFNGLBINDPROGRAMPIPELINEPROC)load("glBindProgramPipeline"); - glad_glDeleteProgramPipelines = (PFNGLDELETEPROGRAMPIPELINESPROC)load("glDeleteProgramPipelines"); - glad_glGenProgramPipelines = (PFNGLGENPROGRAMPIPELINESPROC)load("glGenProgramPipelines"); - glad_glIsProgramPipeline = (PFNGLISPROGRAMPIPELINEPROC)load("glIsProgramPipeline"); - glad_glGetProgramPipelineiv = (PFNGLGETPROGRAMPIPELINEIVPROC)load("glGetProgramPipelineiv"); - glad_glProgramParameteri = (PFNGLPROGRAMPARAMETERIPROC)load("glProgramParameteri"); - glad_glProgramUniform1i = (PFNGLPROGRAMUNIFORM1IPROC)load("glProgramUniform1i"); - glad_glProgramUniform1iv = (PFNGLPROGRAMUNIFORM1IVPROC)load("glProgramUniform1iv"); - glad_glProgramUniform1f = (PFNGLPROGRAMUNIFORM1FPROC)load("glProgramUniform1f"); - glad_glProgramUniform1fv = (PFNGLPROGRAMUNIFORM1FVPROC)load("glProgramUniform1fv"); - glad_glProgramUniform1d = (PFNGLPROGRAMUNIFORM1DPROC)load("glProgramUniform1d"); - glad_glProgramUniform1dv = (PFNGLPROGRAMUNIFORM1DVPROC)load("glProgramUniform1dv"); - glad_glProgramUniform1ui = (PFNGLPROGRAMUNIFORM1UIPROC)load("glProgramUniform1ui"); - glad_glProgramUniform1uiv = (PFNGLPROGRAMUNIFORM1UIVPROC)load("glProgramUniform1uiv"); - glad_glProgramUniform2i = (PFNGLPROGRAMUNIFORM2IPROC)load("glProgramUniform2i"); - glad_glProgramUniform2iv = (PFNGLPROGRAMUNIFORM2IVPROC)load("glProgramUniform2iv"); - glad_glProgramUniform2f = (PFNGLPROGRAMUNIFORM2FPROC)load("glProgramUniform2f"); - glad_glProgramUniform2fv = (PFNGLPROGRAMUNIFORM2FVPROC)load("glProgramUniform2fv"); - glad_glProgramUniform2d = (PFNGLPROGRAMUNIFORM2DPROC)load("glProgramUniform2d"); - glad_glProgramUniform2dv = (PFNGLPROGRAMUNIFORM2DVPROC)load("glProgramUniform2dv"); - glad_glProgramUniform2ui = (PFNGLPROGRAMUNIFORM2UIPROC)load("glProgramUniform2ui"); - glad_glProgramUniform2uiv = (PFNGLPROGRAMUNIFORM2UIVPROC)load("glProgramUniform2uiv"); - glad_glProgramUniform3i = (PFNGLPROGRAMUNIFORM3IPROC)load("glProgramUniform3i"); - glad_glProgramUniform3iv = (PFNGLPROGRAMUNIFORM3IVPROC)load("glProgramUniform3iv"); - glad_glProgramUniform3f = (PFNGLPROGRAMUNIFORM3FPROC)load("glProgramUniform3f"); - glad_glProgramUniform3fv = (PFNGLPROGRAMUNIFORM3FVPROC)load("glProgramUniform3fv"); - glad_glProgramUniform3d = (PFNGLPROGRAMUNIFORM3DPROC)load("glProgramUniform3d"); - glad_glProgramUniform3dv = (PFNGLPROGRAMUNIFORM3DVPROC)load("glProgramUniform3dv"); - glad_glProgramUniform3ui = (PFNGLPROGRAMUNIFORM3UIPROC)load("glProgramUniform3ui"); - glad_glProgramUniform3uiv = (PFNGLPROGRAMUNIFORM3UIVPROC)load("glProgramUniform3uiv"); - glad_glProgramUniform4i = (PFNGLPROGRAMUNIFORM4IPROC)load("glProgramUniform4i"); - glad_glProgramUniform4iv = (PFNGLPROGRAMUNIFORM4IVPROC)load("glProgramUniform4iv"); - glad_glProgramUniform4f = (PFNGLPROGRAMUNIFORM4FPROC)load("glProgramUniform4f"); - glad_glProgramUniform4fv = (PFNGLPROGRAMUNIFORM4FVPROC)load("glProgramUniform4fv"); - glad_glProgramUniform4d = (PFNGLPROGRAMUNIFORM4DPROC)load("glProgramUniform4d"); - glad_glProgramUniform4dv = (PFNGLPROGRAMUNIFORM4DVPROC)load("glProgramUniform4dv"); - glad_glProgramUniform4ui = (PFNGLPROGRAMUNIFORM4UIPROC)load("glProgramUniform4ui"); - glad_glProgramUniform4uiv = (PFNGLPROGRAMUNIFORM4UIVPROC)load("glProgramUniform4uiv"); - glad_glProgramUniformMatrix2fv = (PFNGLPROGRAMUNIFORMMATRIX2FVPROC)load("glProgramUniformMatrix2fv"); - glad_glProgramUniformMatrix3fv = (PFNGLPROGRAMUNIFORMMATRIX3FVPROC)load("glProgramUniformMatrix3fv"); - glad_glProgramUniformMatrix4fv = (PFNGLPROGRAMUNIFORMMATRIX4FVPROC)load("glProgramUniformMatrix4fv"); - glad_glProgramUniformMatrix2dv = (PFNGLPROGRAMUNIFORMMATRIX2DVPROC)load("glProgramUniformMatrix2dv"); - glad_glProgramUniformMatrix3dv = (PFNGLPROGRAMUNIFORMMATRIX3DVPROC)load("glProgramUniformMatrix3dv"); - glad_glProgramUniformMatrix4dv = (PFNGLPROGRAMUNIFORMMATRIX4DVPROC)load("glProgramUniformMatrix4dv"); - glad_glProgramUniformMatrix2x3fv = (PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC)load("glProgramUniformMatrix2x3fv"); - glad_glProgramUniformMatrix3x2fv = (PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC)load("glProgramUniformMatrix3x2fv"); - glad_glProgramUniformMatrix2x4fv = (PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC)load("glProgramUniformMatrix2x4fv"); - glad_glProgramUniformMatrix4x2fv = (PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC)load("glProgramUniformMatrix4x2fv"); - glad_glProgramUniformMatrix3x4fv = (PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC)load("glProgramUniformMatrix3x4fv"); - glad_glProgramUniformMatrix4x3fv = (PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC)load("glProgramUniformMatrix4x3fv"); - glad_glProgramUniformMatrix2x3dv = (PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC)load("glProgramUniformMatrix2x3dv"); - glad_glProgramUniformMatrix3x2dv = (PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC)load("glProgramUniformMatrix3x2dv"); - glad_glProgramUniformMatrix2x4dv = (PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC)load("glProgramUniformMatrix2x4dv"); - glad_glProgramUniformMatrix4x2dv = (PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC)load("glProgramUniformMatrix4x2dv"); - glad_glProgramUniformMatrix3x4dv = (PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC)load("glProgramUniformMatrix3x4dv"); - glad_glProgramUniformMatrix4x3dv = (PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC)load("glProgramUniformMatrix4x3dv"); - glad_glValidateProgramPipeline = (PFNGLVALIDATEPROGRAMPIPELINEPROC)load("glValidateProgramPipeline"); - glad_glGetProgramPipelineInfoLog = (PFNGLGETPROGRAMPIPELINEINFOLOGPROC)load("glGetProgramPipelineInfoLog"); - glad_glVertexAttribL1d = (PFNGLVERTEXATTRIBL1DPROC)load("glVertexAttribL1d"); - glad_glVertexAttribL2d = (PFNGLVERTEXATTRIBL2DPROC)load("glVertexAttribL2d"); - glad_glVertexAttribL3d = (PFNGLVERTEXATTRIBL3DPROC)load("glVertexAttribL3d"); - glad_glVertexAttribL4d = (PFNGLVERTEXATTRIBL4DPROC)load("glVertexAttribL4d"); - glad_glVertexAttribL1dv = (PFNGLVERTEXATTRIBL1DVPROC)load("glVertexAttribL1dv"); - glad_glVertexAttribL2dv = (PFNGLVERTEXATTRIBL2DVPROC)load("glVertexAttribL2dv"); - glad_glVertexAttribL3dv = (PFNGLVERTEXATTRIBL3DVPROC)load("glVertexAttribL3dv"); - glad_glVertexAttribL4dv = (PFNGLVERTEXATTRIBL4DVPROC)load("glVertexAttribL4dv"); - glad_glVertexAttribLPointer = (PFNGLVERTEXATTRIBLPOINTERPROC)load("glVertexAttribLPointer"); - glad_glGetVertexAttribLdv = (PFNGLGETVERTEXATTRIBLDVPROC)load("glGetVertexAttribLdv"); - glad_glViewportArrayv = (PFNGLVIEWPORTARRAYVPROC)load("glViewportArrayv"); - glad_glViewportIndexedf = (PFNGLVIEWPORTINDEXEDFPROC)load("glViewportIndexedf"); - glad_glViewportIndexedfv = (PFNGLVIEWPORTINDEXEDFVPROC)load("glViewportIndexedfv"); - glad_glScissorArrayv = (PFNGLSCISSORARRAYVPROC)load("glScissorArrayv"); - glad_glScissorIndexed = (PFNGLSCISSORINDEXEDPROC)load("glScissorIndexed"); - glad_glScissorIndexedv = (PFNGLSCISSORINDEXEDVPROC)load("glScissorIndexedv"); - glad_glDepthRangeArrayv = (PFNGLDEPTHRANGEARRAYVPROC)load("glDepthRangeArrayv"); - glad_glDepthRangeIndexed = (PFNGLDEPTHRANGEINDEXEDPROC)load("glDepthRangeIndexed"); - glad_glGetFloati_v = (PFNGLGETFLOATI_VPROC)load("glGetFloati_v"); - glad_glGetDoublei_v = (PFNGLGETDOUBLEI_VPROC)load("glGetDoublei_v"); -} -static void load_GL_VERSION_4_2(GLADloadproc load) { - if(!GLAD_GL_VERSION_4_2) return; - glad_glDrawArraysInstancedBaseInstance = (PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC)load("glDrawArraysInstancedBaseInstance"); - glad_glDrawElementsInstancedBaseInstance = (PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC)load("glDrawElementsInstancedBaseInstance"); - glad_glDrawElementsInstancedBaseVertexBaseInstance = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC)load("glDrawElementsInstancedBaseVertexBaseInstance"); - glad_glGetInternalformativ = (PFNGLGETINTERNALFORMATIVPROC)load("glGetInternalformativ"); - glad_glGetActiveAtomicCounterBufferiv = (PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC)load("glGetActiveAtomicCounterBufferiv"); - glad_glBindImageTexture = (PFNGLBINDIMAGETEXTUREPROC)load("glBindImageTexture"); - glad_glMemoryBarrier = (PFNGLMEMORYBARRIERPROC)load("glMemoryBarrier"); - glad_glTexStorage1D = (PFNGLTEXSTORAGE1DPROC)load("glTexStorage1D"); - glad_glTexStorage2D = (PFNGLTEXSTORAGE2DPROC)load("glTexStorage2D"); - glad_glTexStorage3D = (PFNGLTEXSTORAGE3DPROC)load("glTexStorage3D"); - glad_glDrawTransformFeedbackInstanced = (PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC)load("glDrawTransformFeedbackInstanced"); - glad_glDrawTransformFeedbackStreamInstanced = (PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC)load("glDrawTransformFeedbackStreamInstanced"); -} -static void load_GL_VERSION_4_3(GLADloadproc load) { - if(!GLAD_GL_VERSION_4_3) return; - glad_glClearBufferData = (PFNGLCLEARBUFFERDATAPROC)load("glClearBufferData"); - glad_glClearBufferSubData = (PFNGLCLEARBUFFERSUBDATAPROC)load("glClearBufferSubData"); - glad_glDispatchCompute = (PFNGLDISPATCHCOMPUTEPROC)load("glDispatchCompute"); - glad_glDispatchComputeIndirect = (PFNGLDISPATCHCOMPUTEINDIRECTPROC)load("glDispatchComputeIndirect"); - glad_glCopyImageSubData = (PFNGLCOPYIMAGESUBDATAPROC)load("glCopyImageSubData"); - glad_glFramebufferParameteri = (PFNGLFRAMEBUFFERPARAMETERIPROC)load("glFramebufferParameteri"); - glad_glGetFramebufferParameteriv = (PFNGLGETFRAMEBUFFERPARAMETERIVPROC)load("glGetFramebufferParameteriv"); - glad_glGetInternalformati64v = (PFNGLGETINTERNALFORMATI64VPROC)load("glGetInternalformati64v"); - glad_glInvalidateTexSubImage = (PFNGLINVALIDATETEXSUBIMAGEPROC)load("glInvalidateTexSubImage"); - glad_glInvalidateTexImage = (PFNGLINVALIDATETEXIMAGEPROC)load("glInvalidateTexImage"); - glad_glInvalidateBufferSubData = (PFNGLINVALIDATEBUFFERSUBDATAPROC)load("glInvalidateBufferSubData"); - glad_glInvalidateBufferData = (PFNGLINVALIDATEBUFFERDATAPROC)load("glInvalidateBufferData"); - glad_glInvalidateFramebuffer = (PFNGLINVALIDATEFRAMEBUFFERPROC)load("glInvalidateFramebuffer"); - glad_glInvalidateSubFramebuffer = (PFNGLINVALIDATESUBFRAMEBUFFERPROC)load("glInvalidateSubFramebuffer"); - glad_glMultiDrawArraysIndirect = (PFNGLMULTIDRAWARRAYSINDIRECTPROC)load("glMultiDrawArraysIndirect"); - glad_glMultiDrawElementsIndirect = (PFNGLMULTIDRAWELEMENTSINDIRECTPROC)load("glMultiDrawElementsIndirect"); - glad_glGetProgramInterfaceiv = (PFNGLGETPROGRAMINTERFACEIVPROC)load("glGetProgramInterfaceiv"); - glad_glGetProgramResourceIndex = (PFNGLGETPROGRAMRESOURCEINDEXPROC)load("glGetProgramResourceIndex"); - glad_glGetProgramResourceName = (PFNGLGETPROGRAMRESOURCENAMEPROC)load("glGetProgramResourceName"); - glad_glGetProgramResourceiv = (PFNGLGETPROGRAMRESOURCEIVPROC)load("glGetProgramResourceiv"); - glad_glGetProgramResourceLocation = (PFNGLGETPROGRAMRESOURCELOCATIONPROC)load("glGetProgramResourceLocation"); - glad_glGetProgramResourceLocationIndex = (PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC)load("glGetProgramResourceLocationIndex"); - glad_glShaderStorageBlockBinding = (PFNGLSHADERSTORAGEBLOCKBINDINGPROC)load("glShaderStorageBlockBinding"); - glad_glTexBufferRange = (PFNGLTEXBUFFERRANGEPROC)load("glTexBufferRange"); - glad_glTexStorage2DMultisample = (PFNGLTEXSTORAGE2DMULTISAMPLEPROC)load("glTexStorage2DMultisample"); - glad_glTexStorage3DMultisample = (PFNGLTEXSTORAGE3DMULTISAMPLEPROC)load("glTexStorage3DMultisample"); - glad_glTextureView = (PFNGLTEXTUREVIEWPROC)load("glTextureView"); - glad_glBindVertexBuffer = (PFNGLBINDVERTEXBUFFERPROC)load("glBindVertexBuffer"); - glad_glVertexAttribFormat = (PFNGLVERTEXATTRIBFORMATPROC)load("glVertexAttribFormat"); - glad_glVertexAttribIFormat = (PFNGLVERTEXATTRIBIFORMATPROC)load("glVertexAttribIFormat"); - glad_glVertexAttribLFormat = (PFNGLVERTEXATTRIBLFORMATPROC)load("glVertexAttribLFormat"); - glad_glVertexAttribBinding = (PFNGLVERTEXATTRIBBINDINGPROC)load("glVertexAttribBinding"); - glad_glVertexBindingDivisor = (PFNGLVERTEXBINDINGDIVISORPROC)load("glVertexBindingDivisor"); - glad_glDebugMessageControl = (PFNGLDEBUGMESSAGECONTROLPROC)load("glDebugMessageControl"); - glad_glDebugMessageInsert = (PFNGLDEBUGMESSAGEINSERTPROC)load("glDebugMessageInsert"); - glad_glDebugMessageCallback = (PFNGLDEBUGMESSAGECALLBACKPROC)load("glDebugMessageCallback"); - glad_glGetDebugMessageLog = (PFNGLGETDEBUGMESSAGELOGPROC)load("glGetDebugMessageLog"); - glad_glPushDebugGroup = (PFNGLPUSHDEBUGGROUPPROC)load("glPushDebugGroup"); - glad_glPopDebugGroup = (PFNGLPOPDEBUGGROUPPROC)load("glPopDebugGroup"); - glad_glObjectLabel = (PFNGLOBJECTLABELPROC)load("glObjectLabel"); - glad_glGetObjectLabel = (PFNGLGETOBJECTLABELPROC)load("glGetObjectLabel"); - glad_glObjectPtrLabel = (PFNGLOBJECTPTRLABELPROC)load("glObjectPtrLabel"); - glad_glGetObjectPtrLabel = (PFNGLGETOBJECTPTRLABELPROC)load("glGetObjectPtrLabel"); - glad_glGetPointerv = (PFNGLGETPOINTERVPROC)load("glGetPointerv"); -} -static void load_GL_VERSION_4_4(GLADloadproc load) { - if(!GLAD_GL_VERSION_4_4) return; - glad_glBufferStorage = (PFNGLBUFFERSTORAGEPROC)load("glBufferStorage"); - glad_glClearTexImage = (PFNGLCLEARTEXIMAGEPROC)load("glClearTexImage"); - glad_glClearTexSubImage = (PFNGLCLEARTEXSUBIMAGEPROC)load("glClearTexSubImage"); - glad_glBindBuffersBase = (PFNGLBINDBUFFERSBASEPROC)load("glBindBuffersBase"); - glad_glBindBuffersRange = (PFNGLBINDBUFFERSRANGEPROC)load("glBindBuffersRange"); - glad_glBindTextures = (PFNGLBINDTEXTURESPROC)load("glBindTextures"); - glad_glBindSamplers = (PFNGLBINDSAMPLERSPROC)load("glBindSamplers"); - glad_glBindImageTextures = (PFNGLBINDIMAGETEXTURESPROC)load("glBindImageTextures"); - glad_glBindVertexBuffers = (PFNGLBINDVERTEXBUFFERSPROC)load("glBindVertexBuffers"); -} -static void load_GL_VERSION_4_5(GLADloadproc load) { - if(!GLAD_GL_VERSION_4_5) return; - glad_glClipControl = (PFNGLCLIPCONTROLPROC)load("glClipControl"); - glad_glCreateTransformFeedbacks = (PFNGLCREATETRANSFORMFEEDBACKSPROC)load("glCreateTransformFeedbacks"); - glad_glTransformFeedbackBufferBase = (PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC)load("glTransformFeedbackBufferBase"); - glad_glTransformFeedbackBufferRange = (PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC)load("glTransformFeedbackBufferRange"); - glad_glGetTransformFeedbackiv = (PFNGLGETTRANSFORMFEEDBACKIVPROC)load("glGetTransformFeedbackiv"); - glad_glGetTransformFeedbacki_v = (PFNGLGETTRANSFORMFEEDBACKI_VPROC)load("glGetTransformFeedbacki_v"); - glad_glGetTransformFeedbacki64_v = (PFNGLGETTRANSFORMFEEDBACKI64_VPROC)load("glGetTransformFeedbacki64_v"); - glad_glCreateBuffers = (PFNGLCREATEBUFFERSPROC)load("glCreateBuffers"); - glad_glNamedBufferStorage = (PFNGLNAMEDBUFFERSTORAGEPROC)load("glNamedBufferStorage"); - glad_glNamedBufferData = (PFNGLNAMEDBUFFERDATAPROC)load("glNamedBufferData"); - glad_glNamedBufferSubData = (PFNGLNAMEDBUFFERSUBDATAPROC)load("glNamedBufferSubData"); - glad_glCopyNamedBufferSubData = (PFNGLCOPYNAMEDBUFFERSUBDATAPROC)load("glCopyNamedBufferSubData"); - glad_glClearNamedBufferData = (PFNGLCLEARNAMEDBUFFERDATAPROC)load("glClearNamedBufferData"); - glad_glClearNamedBufferSubData = (PFNGLCLEARNAMEDBUFFERSUBDATAPROC)load("glClearNamedBufferSubData"); - glad_glMapNamedBuffer = (PFNGLMAPNAMEDBUFFERPROC)load("glMapNamedBuffer"); - glad_glMapNamedBufferRange = (PFNGLMAPNAMEDBUFFERRANGEPROC)load("glMapNamedBufferRange"); - glad_glUnmapNamedBuffer = (PFNGLUNMAPNAMEDBUFFERPROC)load("glUnmapNamedBuffer"); - glad_glFlushMappedNamedBufferRange = (PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC)load("glFlushMappedNamedBufferRange"); - glad_glGetNamedBufferParameteriv = (PFNGLGETNAMEDBUFFERPARAMETERIVPROC)load("glGetNamedBufferParameteriv"); - glad_glGetNamedBufferParameteri64v = (PFNGLGETNAMEDBUFFERPARAMETERI64VPROC)load("glGetNamedBufferParameteri64v"); - glad_glGetNamedBufferPointerv = (PFNGLGETNAMEDBUFFERPOINTERVPROC)load("glGetNamedBufferPointerv"); - glad_glGetNamedBufferSubData = (PFNGLGETNAMEDBUFFERSUBDATAPROC)load("glGetNamedBufferSubData"); - glad_glCreateFramebuffers = (PFNGLCREATEFRAMEBUFFERSPROC)load("glCreateFramebuffers"); - glad_glNamedFramebufferRenderbuffer = (PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC)load("glNamedFramebufferRenderbuffer"); - glad_glNamedFramebufferParameteri = (PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC)load("glNamedFramebufferParameteri"); - glad_glNamedFramebufferTexture = (PFNGLNAMEDFRAMEBUFFERTEXTUREPROC)load("glNamedFramebufferTexture"); - glad_glNamedFramebufferTextureLayer = (PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC)load("glNamedFramebufferTextureLayer"); - glad_glNamedFramebufferDrawBuffer = (PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC)load("glNamedFramebufferDrawBuffer"); - glad_glNamedFramebufferDrawBuffers = (PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC)load("glNamedFramebufferDrawBuffers"); - glad_glNamedFramebufferReadBuffer = (PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC)load("glNamedFramebufferReadBuffer"); - glad_glInvalidateNamedFramebufferData = (PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC)load("glInvalidateNamedFramebufferData"); - glad_glInvalidateNamedFramebufferSubData = (PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC)load("glInvalidateNamedFramebufferSubData"); - glad_glClearNamedFramebufferiv = (PFNGLCLEARNAMEDFRAMEBUFFERIVPROC)load("glClearNamedFramebufferiv"); - glad_glClearNamedFramebufferuiv = (PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC)load("glClearNamedFramebufferuiv"); - glad_glClearNamedFramebufferfv = (PFNGLCLEARNAMEDFRAMEBUFFERFVPROC)load("glClearNamedFramebufferfv"); - glad_glClearNamedFramebufferfi = (PFNGLCLEARNAMEDFRAMEBUFFERFIPROC)load("glClearNamedFramebufferfi"); - glad_glBlitNamedFramebuffer = (PFNGLBLITNAMEDFRAMEBUFFERPROC)load("glBlitNamedFramebuffer"); - glad_glCheckNamedFramebufferStatus = (PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC)load("glCheckNamedFramebufferStatus"); - glad_glGetNamedFramebufferParameteriv = (PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC)load("glGetNamedFramebufferParameteriv"); - glad_glGetNamedFramebufferAttachmentParameteriv = (PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC)load("glGetNamedFramebufferAttachmentParameteriv"); - glad_glCreateRenderbuffers = (PFNGLCREATERENDERBUFFERSPROC)load("glCreateRenderbuffers"); - glad_glNamedRenderbufferStorage = (PFNGLNAMEDRENDERBUFFERSTORAGEPROC)load("glNamedRenderbufferStorage"); - glad_glNamedRenderbufferStorageMultisample = (PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC)load("glNamedRenderbufferStorageMultisample"); - glad_glGetNamedRenderbufferParameteriv = (PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC)load("glGetNamedRenderbufferParameteriv"); - glad_glCreateTextures = (PFNGLCREATETEXTURESPROC)load("glCreateTextures"); - glad_glTextureBuffer = (PFNGLTEXTUREBUFFERPROC)load("glTextureBuffer"); - glad_glTextureBufferRange = (PFNGLTEXTUREBUFFERRANGEPROC)load("glTextureBufferRange"); - glad_glTextureStorage1D = (PFNGLTEXTURESTORAGE1DPROC)load("glTextureStorage1D"); - glad_glTextureStorage2D = (PFNGLTEXTURESTORAGE2DPROC)load("glTextureStorage2D"); - glad_glTextureStorage3D = (PFNGLTEXTURESTORAGE3DPROC)load("glTextureStorage3D"); - glad_glTextureStorage2DMultisample = (PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC)load("glTextureStorage2DMultisample"); - glad_glTextureStorage3DMultisample = (PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC)load("glTextureStorage3DMultisample"); - glad_glTextureSubImage1D = (PFNGLTEXTURESUBIMAGE1DPROC)load("glTextureSubImage1D"); - glad_glTextureSubImage2D = (PFNGLTEXTURESUBIMAGE2DPROC)load("glTextureSubImage2D"); - glad_glTextureSubImage3D = (PFNGLTEXTURESUBIMAGE3DPROC)load("glTextureSubImage3D"); - glad_glCompressedTextureSubImage1D = (PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC)load("glCompressedTextureSubImage1D"); - glad_glCompressedTextureSubImage2D = (PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC)load("glCompressedTextureSubImage2D"); - glad_glCompressedTextureSubImage3D = (PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC)load("glCompressedTextureSubImage3D"); - glad_glCopyTextureSubImage1D = (PFNGLCOPYTEXTURESUBIMAGE1DPROC)load("glCopyTextureSubImage1D"); - glad_glCopyTextureSubImage2D = (PFNGLCOPYTEXTURESUBIMAGE2DPROC)load("glCopyTextureSubImage2D"); - glad_glCopyTextureSubImage3D = (PFNGLCOPYTEXTURESUBIMAGE3DPROC)load("glCopyTextureSubImage3D"); - glad_glTextureParameterf = (PFNGLTEXTUREPARAMETERFPROC)load("glTextureParameterf"); - glad_glTextureParameterfv = (PFNGLTEXTUREPARAMETERFVPROC)load("glTextureParameterfv"); - glad_glTextureParameteri = (PFNGLTEXTUREPARAMETERIPROC)load("glTextureParameteri"); - glad_glTextureParameterIiv = (PFNGLTEXTUREPARAMETERIIVPROC)load("glTextureParameterIiv"); - glad_glTextureParameterIuiv = (PFNGLTEXTUREPARAMETERIUIVPROC)load("glTextureParameterIuiv"); - glad_glTextureParameteriv = (PFNGLTEXTUREPARAMETERIVPROC)load("glTextureParameteriv"); - glad_glGenerateTextureMipmap = (PFNGLGENERATETEXTUREMIPMAPPROC)load("glGenerateTextureMipmap"); - glad_glBindTextureUnit = (PFNGLBINDTEXTUREUNITPROC)load("glBindTextureUnit"); - glad_glGetTextureImage = (PFNGLGETTEXTUREIMAGEPROC)load("glGetTextureImage"); - glad_glGetCompressedTextureImage = (PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC)load("glGetCompressedTextureImage"); - glad_glGetTextureLevelParameterfv = (PFNGLGETTEXTURELEVELPARAMETERFVPROC)load("glGetTextureLevelParameterfv"); - glad_glGetTextureLevelParameteriv = (PFNGLGETTEXTURELEVELPARAMETERIVPROC)load("glGetTextureLevelParameteriv"); - glad_glGetTextureParameterfv = (PFNGLGETTEXTUREPARAMETERFVPROC)load("glGetTextureParameterfv"); - glad_glGetTextureParameterIiv = (PFNGLGETTEXTUREPARAMETERIIVPROC)load("glGetTextureParameterIiv"); - glad_glGetTextureParameterIuiv = (PFNGLGETTEXTUREPARAMETERIUIVPROC)load("glGetTextureParameterIuiv"); - glad_glGetTextureParameteriv = (PFNGLGETTEXTUREPARAMETERIVPROC)load("glGetTextureParameteriv"); - glad_glCreateVertexArrays = (PFNGLCREATEVERTEXARRAYSPROC)load("glCreateVertexArrays"); - glad_glDisableVertexArrayAttrib = (PFNGLDISABLEVERTEXARRAYATTRIBPROC)load("glDisableVertexArrayAttrib"); - glad_glEnableVertexArrayAttrib = (PFNGLENABLEVERTEXARRAYATTRIBPROC)load("glEnableVertexArrayAttrib"); - glad_glVertexArrayElementBuffer = (PFNGLVERTEXARRAYELEMENTBUFFERPROC)load("glVertexArrayElementBuffer"); - glad_glVertexArrayVertexBuffer = (PFNGLVERTEXARRAYVERTEXBUFFERPROC)load("glVertexArrayVertexBuffer"); - glad_glVertexArrayVertexBuffers = (PFNGLVERTEXARRAYVERTEXBUFFERSPROC)load("glVertexArrayVertexBuffers"); - glad_glVertexArrayAttribBinding = (PFNGLVERTEXARRAYATTRIBBINDINGPROC)load("glVertexArrayAttribBinding"); - glad_glVertexArrayAttribFormat = (PFNGLVERTEXARRAYATTRIBFORMATPROC)load("glVertexArrayAttribFormat"); - glad_glVertexArrayAttribIFormat = (PFNGLVERTEXARRAYATTRIBIFORMATPROC)load("glVertexArrayAttribIFormat"); - glad_glVertexArrayAttribLFormat = (PFNGLVERTEXARRAYATTRIBLFORMATPROC)load("glVertexArrayAttribLFormat"); - glad_glVertexArrayBindingDivisor = (PFNGLVERTEXARRAYBINDINGDIVISORPROC)load("glVertexArrayBindingDivisor"); - glad_glGetVertexArrayiv = (PFNGLGETVERTEXARRAYIVPROC)load("glGetVertexArrayiv"); - glad_glGetVertexArrayIndexediv = (PFNGLGETVERTEXARRAYINDEXEDIVPROC)load("glGetVertexArrayIndexediv"); - glad_glGetVertexArrayIndexed64iv = (PFNGLGETVERTEXARRAYINDEXED64IVPROC)load("glGetVertexArrayIndexed64iv"); - glad_glCreateSamplers = (PFNGLCREATESAMPLERSPROC)load("glCreateSamplers"); - glad_glCreateProgramPipelines = (PFNGLCREATEPROGRAMPIPELINESPROC)load("glCreateProgramPipelines"); - glad_glCreateQueries = (PFNGLCREATEQUERIESPROC)load("glCreateQueries"); - glad_glGetQueryBufferObjecti64v = (PFNGLGETQUERYBUFFEROBJECTI64VPROC)load("glGetQueryBufferObjecti64v"); - glad_glGetQueryBufferObjectiv = (PFNGLGETQUERYBUFFEROBJECTIVPROC)load("glGetQueryBufferObjectiv"); - glad_glGetQueryBufferObjectui64v = (PFNGLGETQUERYBUFFEROBJECTUI64VPROC)load("glGetQueryBufferObjectui64v"); - glad_glGetQueryBufferObjectuiv = (PFNGLGETQUERYBUFFEROBJECTUIVPROC)load("glGetQueryBufferObjectuiv"); - glad_glMemoryBarrierByRegion = (PFNGLMEMORYBARRIERBYREGIONPROC)load("glMemoryBarrierByRegion"); - glad_glGetTextureSubImage = (PFNGLGETTEXTURESUBIMAGEPROC)load("glGetTextureSubImage"); - glad_glGetCompressedTextureSubImage = (PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC)load("glGetCompressedTextureSubImage"); - glad_glGetGraphicsResetStatus = (PFNGLGETGRAPHICSRESETSTATUSPROC)load("glGetGraphicsResetStatus"); - glad_glGetnCompressedTexImage = (PFNGLGETNCOMPRESSEDTEXIMAGEPROC)load("glGetnCompressedTexImage"); - glad_glGetnTexImage = (PFNGLGETNTEXIMAGEPROC)load("glGetnTexImage"); - glad_glGetnUniformdv = (PFNGLGETNUNIFORMDVPROC)load("glGetnUniformdv"); - glad_glGetnUniformfv = (PFNGLGETNUNIFORMFVPROC)load("glGetnUniformfv"); - glad_glGetnUniformiv = (PFNGLGETNUNIFORMIVPROC)load("glGetnUniformiv"); - glad_glGetnUniformuiv = (PFNGLGETNUNIFORMUIVPROC)load("glGetnUniformuiv"); - glad_glReadnPixels = (PFNGLREADNPIXELSPROC)load("glReadnPixels"); - glad_glGetnMapdv = (PFNGLGETNMAPDVPROC)load("glGetnMapdv"); - glad_glGetnMapfv = (PFNGLGETNMAPFVPROC)load("glGetnMapfv"); - glad_glGetnMapiv = (PFNGLGETNMAPIVPROC)load("glGetnMapiv"); - glad_glGetnPixelMapfv = (PFNGLGETNPIXELMAPFVPROC)load("glGetnPixelMapfv"); - glad_glGetnPixelMapuiv = (PFNGLGETNPIXELMAPUIVPROC)load("glGetnPixelMapuiv"); - glad_glGetnPixelMapusv = (PFNGLGETNPIXELMAPUSVPROC)load("glGetnPixelMapusv"); - glad_glGetnPolygonStipple = (PFNGLGETNPOLYGONSTIPPLEPROC)load("glGetnPolygonStipple"); - glad_glGetnColorTable = (PFNGLGETNCOLORTABLEPROC)load("glGetnColorTable"); - glad_glGetnConvolutionFilter = (PFNGLGETNCONVOLUTIONFILTERPROC)load("glGetnConvolutionFilter"); - glad_glGetnSeparableFilter = (PFNGLGETNSEPARABLEFILTERPROC)load("glGetnSeparableFilter"); - glad_glGetnHistogram = (PFNGLGETNHISTOGRAMPROC)load("glGetnHistogram"); - glad_glGetnMinmax = (PFNGLGETNMINMAXPROC)load("glGetnMinmax"); - glad_glTextureBarrier = (PFNGLTEXTUREBARRIERPROC)load("glTextureBarrier"); -} -static void load_GL_VERSION_4_6(GLADloadproc load) { - if(!GLAD_GL_VERSION_4_6) return; - glad_glSpecializeShader = (PFNGLSPECIALIZESHADERPROC)load("glSpecializeShader"); - glad_glMultiDrawArraysIndirectCount = (PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC)load("glMultiDrawArraysIndirectCount"); - glad_glMultiDrawElementsIndirectCount = (PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC)load("glMultiDrawElementsIndirectCount"); - glad_glPolygonOffsetClamp = (PFNGLPOLYGONOFFSETCLAMPPROC)load("glPolygonOffsetClamp"); -} -static int find_extensionsGL(void) { - if (!get_exts()) return 0; - (void)&has_ext; - free_exts(); - return 1; -} - -static void find_coreGL(void) { - - /* Thank you @elmindreda - * https://github.com/elmindreda/greg/blob/master/templates/greg.c.in#L176 - * https://github.com/glfw/glfw/blob/master/src/context.c#L36 - */ - int i, major, minor; - - const char* version; - const char* prefixes[] = { - "OpenGL ES-CM ", - "OpenGL ES-CL ", - "OpenGL ES ", - NULL - }; - - version = (const char*) glGetString(GL_VERSION); - if (!version) return; - - for (i = 0; prefixes[i]; i++) { - const size_t length = strlen(prefixes[i]); - if (strncmp(version, prefixes[i], length) == 0) { - version += length; - break; - } - } - -/* PR #18 */ -#ifdef _MSC_VER - sscanf_s(version, "%d.%d", &major, &minor); -#else - sscanf(version, "%d.%d", &major, &minor); -#endif - - GLVersion.major = major; GLVersion.minor = minor; - max_loaded_major = major; max_loaded_minor = minor; - GLAD_GL_VERSION_1_0 = (major == 1 && minor >= 0) || major > 1; - GLAD_GL_VERSION_1_1 = (major == 1 && minor >= 1) || major > 1; - GLAD_GL_VERSION_1_2 = (major == 1 && minor >= 2) || major > 1; - GLAD_GL_VERSION_1_3 = (major == 1 && minor >= 3) || major > 1; - GLAD_GL_VERSION_1_4 = (major == 1 && minor >= 4) || major > 1; - GLAD_GL_VERSION_1_5 = (major == 1 && minor >= 5) || major > 1; - GLAD_GL_VERSION_2_0 = (major == 2 && minor >= 0) || major > 2; - GLAD_GL_VERSION_2_1 = (major == 2 && minor >= 1) || major > 2; - GLAD_GL_VERSION_3_0 = (major == 3 && minor >= 0) || major > 3; - GLAD_GL_VERSION_3_1 = (major == 3 && minor >= 1) || major > 3; - GLAD_GL_VERSION_3_2 = (major == 3 && minor >= 2) || major > 3; - GLAD_GL_VERSION_3_3 = (major == 3 && minor >= 3) || major > 3; - GLAD_GL_VERSION_4_0 = (major == 4 && minor >= 0) || major > 4; - GLAD_GL_VERSION_4_1 = (major == 4 && minor >= 1) || major > 4; - GLAD_GL_VERSION_4_2 = (major == 4 && minor >= 2) || major > 4; - GLAD_GL_VERSION_4_3 = (major == 4 && minor >= 3) || major > 4; - GLAD_GL_VERSION_4_4 = (major == 4 && minor >= 4) || major > 4; - GLAD_GL_VERSION_4_5 = (major == 4 && minor >= 5) || major > 4; - GLAD_GL_VERSION_4_6 = (major == 4 && minor >= 6) || major > 4; - if (GLVersion.major > 4 || (GLVersion.major >= 4 && GLVersion.minor >= 6)) { - max_loaded_major = 4; - max_loaded_minor = 6; - } -} - -int gladLoadGLLoader(GLADloadproc load) { - GLVersion.major = 0; GLVersion.minor = 0; - glGetString = (PFNGLGETSTRINGPROC)load("glGetString"); - if(glGetString == NULL) return 0; - if(glGetString(GL_VERSION) == NULL) return 0; - find_coreGL(); - load_GL_VERSION_1_0(load); - load_GL_VERSION_1_1(load); - load_GL_VERSION_1_2(load); - load_GL_VERSION_1_3(load); - load_GL_VERSION_1_4(load); - load_GL_VERSION_1_5(load); - load_GL_VERSION_2_0(load); - load_GL_VERSION_2_1(load); - load_GL_VERSION_3_0(load); - load_GL_VERSION_3_1(load); - load_GL_VERSION_3_2(load); - load_GL_VERSION_3_3(load); - load_GL_VERSION_4_0(load); - load_GL_VERSION_4_1(load); - load_GL_VERSION_4_2(load); - load_GL_VERSION_4_3(load); - load_GL_VERSION_4_4(load); - load_GL_VERSION_4_5(load); - load_GL_VERSION_4_6(load); - - if (!find_extensionsGL()) return 0; - return GLVersion.major != 0 || GLVersion.minor != 0; -} - diff --git a/Navigator/vendor/glfw b/Navigator/vendor/glfw deleted file mode 160000 index facec25..0000000 --- a/Navigator/vendor/glfw +++ /dev/null @@ -1 +0,0 @@ -Subproject commit facec25e0e1f1ef91ad8db3c5327d518f49901fd diff --git a/Navigator/vendor/glm b/Navigator/vendor/glm deleted file mode 160000 index cc98465..0000000 --- a/Navigator/vendor/glm +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cc98465e3508535ba8c7f6208df934c156a018dc diff --git a/Navigator/vendor/imgui b/Navigator/vendor/imgui deleted file mode 160000 index cbe4e3c..0000000 --- a/Navigator/vendor/imgui +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cbe4e3cd7c9789b514eeaf9a65d8f674d984be3e diff --git a/Navigator/vendor/implot b/Navigator/vendor/implot deleted file mode 160000 index d34204b..0000000 --- a/Navigator/vendor/implot +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d34204b5a762dcef600440f8d7502633626cd217 diff --git a/Navigator/vendor/spdlog b/Navigator/vendor/spdlog deleted file mode 160000 index 298a200..0000000 --- a/Navigator/vendor/spdlog +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 298a200f69d66114adde2d5d8ad34f2cce5a5b69