\doxysection{GLContext.\+hpp}
\hypertarget{GLContext_8hpp_source}{}\label{GLContext_8hpp_source}\index{/home/chr/devel/PhD/Environment/pub/PCBEnv/pcbenv/cxx/UI/GLContext.hpp@{/home/chr/devel/PhD/Environment/pub/PCBEnv/pcbenv/cxx/UI/GLContext.hpp}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ }
\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#ifndef\ GYM\_PCB\_UI\_GLCONTEXT\_H}}
\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#define\ GYM\_PCB\_UI\_GLCONTEXT\_H}}
\DoxyCodeLine{00004\ }
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ "{}GLWidget.hpp"{}}}
\DoxyCodeLine{00006\ }
\DoxyCodeLine{00007\ \textcolor{keyword}{namespace\ }GL}
\DoxyCodeLine{00008\ \{}
\DoxyCodeLine{00009\ }
\DoxyCodeLine{00010\ \textcolor{keyword}{inline}\ GLWidget\ *getContext()}
\DoxyCodeLine{00011\ \{}
\DoxyCodeLine{00012\ \ \ \ \ \textcolor{keywordflow}{return}\ GLWidget::getInstance();}
\DoxyCodeLine{00013\ \}}
\DoxyCodeLine{00014\ }
\DoxyCodeLine{00015\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{bool}\ CheckErrors(\textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *info)}
\DoxyCodeLine{00016\ \{}
\DoxyCodeLine{00017\ \ \ \ \ \textcolor{keyword}{auto}\ ctx\ =\ getContext();}
\DoxyCodeLine{00018\ \ \ \ \ \textcolor{keyword}{auto}\ err\ =\ ctx-\/>glGetError();}
\DoxyCodeLine{00019\ \ \ \ \ \textcolor{keywordflow}{if}\ (err\ ==\ GL\_NO\_ERROR)}
\DoxyCodeLine{00020\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00021\ \ \ \ \ \textcolor{keywordflow}{do}\ \{}
\DoxyCodeLine{00022\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{switch}\ (err)\ \{}
\DoxyCodeLine{00023\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{default}:}
\DoxyCodeLine{00024\ \ \ \ \ \ \ \ \ \ \ \ \ qWarning(\textcolor{stringliteral}{"{}\%s:\ GL\_ERROR\_\%04x"{}},\ info,\ err);}
\DoxyCodeLine{00025\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{00026\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ GL\_INVALID\_OPERATION:\ qWarning(\textcolor{stringliteral}{"{}\%s:\ GL\_INVALID\_OPERATION"{}},\ info);\ \textcolor{keywordflow}{break};}
\DoxyCodeLine{00027\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00028\ \ \ \ \ \ \ \ \ err\ =\ ctx-\/>glGetError();}
\DoxyCodeLine{00029\ \ \ \ \ \}\ \textcolor{keywordflow}{while}\ (err\ !=\ GL\_NO\_ERROR);}
\DoxyCodeLine{00030\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00031\ \}}
\DoxyCodeLine{00032\ }
\DoxyCodeLine{00033\ \}\ \textcolor{comment}{//\ namespace\ GL}}
\DoxyCodeLine{00034\ }
\DoxyCodeLine{00035\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ GYM\_PCB\_UI\_GLCONTEXT\_H}}

\end{DoxyCode}
