本文整理汇总了C++中OGLPLUS_ERROR_INFO函数的典型用法代码示例。如果您正苦于以下问题:C++ OGLPLUS_ERROR_INFO函数的具体用法?C++ OGLPLUS_ERROR_INFO怎么用?C++ OGLPLUS_ERROR_INFO使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OGLPLUS_ERROR_INFO函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LogSink
/// Installs the @p callback and remembers the previous
LogSink(Callback callback)
: _callback(callback)
, _prev_callback(nullptr)
, _prev_context(nullptr)
{
// get the previous callback
GLDEBUGPROCARB _tmp_callback = nullptr;
void** _tmp_ptr=reinterpret_cast<void**>(&_tmp_callback);
OGLPLUS_GLFUNC(GetPointerv)(
GL_DEBUG_CALLBACK_FUNCTION_ARB,
_tmp_ptr
);
OGLPLUS_IGNORE(OGLPLUS_ERROR_INFO(GetPointerv));
_prev_callback = _tmp_callback;
//get the previous context
OGLPLUS_GLFUNC(GetPointerv)(
GL_DEBUG_CALLBACK_USER_PARAM_ARB,
&_prev_context
);
OGLPLUS_IGNORE(OGLPLUS_ERROR_INFO(GetPointerv));
OGLPLUS_GLFUNC(DebugMessageCallbackARB)(
&LogSink::_gl_debug_proc,
static_cast<void*>(this)
);
OGLPLUS_VERIFY(
OGLPLUS_ERROR_INFO(DebugMessageCallbackARB)
);
}
示例2: GetCounters
/**
* @glsymbols
* @glfunref{GetPerfMonitorCountersAMD}
*/
void GetCounters(
GLint& max_active_counters,
std::vector<PerfMonitorAMDCounter>& counters
) const
{
GLint count = 0;
OGLPLUS_GLFUNC(GetPerfMonitorCountersAMD)(
_group,
&count,
&max_active_counters,
0,
nullptr
);
OGLPLUS_CHECK(OGLPLUS_ERROR_INFO(GetPerfMonitorCountersAMD));
std::vector<GLuint> buffer(count);
OGLPLUS_GLFUNC(GetPerfMonitorCountersAMD)(
_group,
&count,
&max_active_counters,
buffer.size(),
buffer.data()
);
OGLPLUS_CHECK(OGLPLUS_ERROR_INFO(GetPerfMonitorCountersAMD));
counters.clear();
counters.reserve(count);
for(auto i=buffer.begin(), e=buffer.end(); i!=e; ++i)
counters.push_back(PerfMonitorAMDCounter(_group, *i));
}
示例3: PolygonMode
/**
* @glsymbols
* @glfunref{Get}
* @gldefref{POLYGON_MODE}
*/
static oglplus::PolygonMode PolygonMode(void)
{
GLint result[2];
OGLPLUS_GLFUNC(GetIntegerv)(GL_POLYGON_MODE, result);
OGLPLUS_VERIFY(OGLPLUS_ERROR_INFO(GetIntegerv));
return oglplus::PolygonMode(result[1]);
}
示例4: PushClientAttrib
/**
* @glsymbols
* @glfunref{PushClientAttrib}
*/
static void PushClientAttrib(
Bitfield<CompatibilityClientAttributeGroup> attrib_groups
)
{
OGLPLUS_GLFUNC(PushClientAttrib)(GLbitfield(attrib_groups));
OGLPLUS_VERIFY(OGLPLUS_ERROR_INFO(PushClientAttrib));
}
示例5: ProvokingVertex
/**
* @glvoereq{3,2,ARB,provoking_vertex}
* @glsymbols
* @glfunref{Get}
* @gldefref{PROVOKING_VERTEX}
*/
static ProvokeMode ProvokingVertex(void)
{
GLint result;
OGLPLUS_GLFUNC(GetIntegerv)(GL_PROVOKING_VERTEX, &result);
OGLPLUS_VERIFY(OGLPLUS_ERROR_INFO(GetIntegerv));
return ProvokeMode(result);
}
示例6: PointFadeThresholdSize
/**
* @glsymbols
* @glfunref{Get}
* @gldefref{POINT_FADE_THRESHOLD_SIZE}
*/
static GLfloat PointFadeThresholdSize(void)
{
GLfloat result;
OGLPLUS_GLFUNC(GetFloatv)(GL_POINT_FADE_THRESHOLD_SIZE,&result);
OGLPLUS_VERIFY(OGLPLUS_ERROR_INFO(GetFloatv));
return result;
}
示例7: PointSize
/**
* @glsymbols
* @glfunref{Get}
* @gldefref{POINT_SIZE}
*/
static GLfloat PointSize(void)
{
GLfloat result;
OGLPLUS_GLFUNC(GetFloatv)(GL_POINT_SIZE, &result);
OGLPLUS_VERIFY(OGLPLUS_ERROR_INFO(GetFloatv));
return result;
}
示例8: LineWidth
/**
* @glsymbols
* @glfunref{Get}
* @gldefref{LINE_WIDTH}
*/
static GLfloat LineWidth(void)
{
GLfloat result;
OGLPLUS_GLFUNC(GetFloatv)(GL_LINE_WIDTH, &result);
OGLPLUS_VERIFY(OGLPLUS_ERROR_INFO(GetFloatv));
return result;
}
示例9: PolygonOffsetUnits
/**
* @glsymbols
* @glfunref{Get}
* @gldefref{POLYGON_OFFSET_UNITS}
*/
static GLfloat PolygonOffsetUnits(void)
{
GLfloat result;
OGLPLUS_GLFUNC(GetFloatv)(GL_POLYGON_OFFSET_UNITS, &result);
OGLPLUS_VERIFY(OGLPLUS_ERROR_INFO(GetFloatv));
return result;
}
示例10: NumExtensions
/**
* @throws Error
*
* @see GetExtension
*
* @glsymbols
* @glfunref{Get}
* @gldefref{NUM_EXTENSIONS}
*/
static GLuint NumExtensions(void)
{
GLint result = 0;
OGLPLUS_GLFUNC(GetIntegerv)(GL_NUM_EXTENSIONS, &result);
OGLPLUS_VERIFY(OGLPLUS_ERROR_INFO(GetIntegerv));
return GLuint(result);
}
示例11: _query_limit
static GLuint _query_limit(void)
{
GLint limit = 0;
OGLPLUS_GLFUNC(GetIntegerv)(Query, &limit);
OGLPLUS_VERIFY(OGLPLUS_ERROR_INFO(GetIntegerv));
return GLuint(limit);
}
示例12: CullFaceMode
/**
* @glsymbols
* @glfunref{Get}
* @gldefref{CULL_FACE_MODE}
*/
static Face CullFaceMode(void)
{
GLint result;
OGLPLUS_GLFUNC(GetIntegerv)(GL_CULL_FACE_MODE, &result);
OGLPLUS_VERIFY(OGLPLUS_ERROR_INFO(GetIntegerv));
return Face(result);
}
示例13: LPointer
/**
* @glsymbols
* @glfunref{VertexAttribPointer}
*/
const VertexAttribArray& LPointer(
GLuint values_per_vertex,
DataType data_type,
GLsizei stride,
const void* pointer
) const
{
#if GL_VERSION_4_2 || GL_ARB_vertex_attrib_64bit
OGLPLUS_GLFUNC(VertexAttribLPointer)(
_location,
values_per_vertex,
GLenum(data_type),
stride,
pointer
);
OGLPLUS_CHECK(OGLPLUS_ERROR_INFO(VertexAttribLPointer));
#else
assert(!
"The glVertexAttribLPointer function is "
"required but not available! Double-precision "
"vertex attribute values are not supported."
);
#endif
return *this;
}
示例14: LogicOpMode
/**
* @glsymbols
* @glfunref{Get}
* @gldefref{COLOR_LOGIC_OP}
*/
static ColorLogicOperation LogicOpMode(void)
{
GLint result;
OGLPLUS_GLFUNC(GetIntegerv)(GL_LOGIC_OP_MODE, &result);
OGLPLUS_VERIFY(OGLPLUS_ERROR_INFO(GetIntegerv));
return ColorLogicOperation(result);
}
示例15: ScissorBox
/**
* @throws Error
*
* @glvoereq{4,1,ARB,viewport_array}
* @glsymbols
* @glfunref{Get}
* @gldefref{SCISSOR_BOX}
*/
static ScissorRectangle ScissorBox(GLuint viewport)
{
ScissorRectangle result;
OGLPLUS_GLFUNC(GetIntegeri_v)(GL_SCISSOR_BOX, viewport,result._v);
OGLPLUS_CHECK(OGLPLUS_ERROR_INFO(GetIntegeri_v));
return result;
}