本文整理汇总了C++中COGLGraphicsContext::IsExtensionSupported方法的典型用法代码示例。如果您正苦于以下问题:C++ COGLGraphicsContext::IsExtensionSupported方法的具体用法?C++ COGLGraphicsContext::IsExtensionSupported怎么用?C++ COGLGraphicsContext::IsExtensionSupported使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类COGLGraphicsContext
的用法示例。
在下文中一共展示了COGLGraphicsContext::IsExtensionSupported方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Initialize
void OGLRender::Initialize(void)
{
glViewportWrapper(0, windowSetting.statusBarHeightToUse, windowSetting.uDisplayWidth, windowSetting.uDisplayHeight);
OPENGL_CHECK_ERRORS;
COGLGraphicsContext *pcontext = (COGLGraphicsContext *)(CGraphicsContext::g_pGraphicsContext);
if( pcontext->IsExtensionSupported("GL_IBM_texture_mirrored_repeat") )
{
//OGLXUVFlagMaps[TEXTURE_UV_FLAG_MIRROR].realFlag = GL_MIRRORED_REPEAT_IBM;
}
else if( pcontext->IsExtensionSupported("ARB_texture_mirrored_repeat") )
{
//OGLXUVFlagMaps[TEXTURE_UV_FLAG_MIRROR].realFlag = GL_MIRRORED_REPEAT;
}
else
{
OGLXUVFlagMaps[TEXTURE_UV_FLAG_MIRROR].realFlag = GL_MIRRORED_REPEAT;
}
// if( pcontext->IsExtensionSupported("GL_texture_border_clamp") || pcontext->IsExtensionSupported("GL_EXT_texture_edge_clamp") )
// {
m_bSupportClampToEdge = true;
OGLXUVFlagMaps[TEXTURE_UV_FLAG_CLAMP].realFlag = GL_CLAMP_TO_EDGE;
// }
// else
// {
// m_bSupportClampToEdge = false;
// OGLXUVFlagMaps[TEXTURE_UV_FLAG_CLAMP].realFlag = GL_CLAMP_TO_EDGE;
// }
}
示例2: Initialize
bool COGLColorCombinerNvidia::Initialize(void)
{
m_bNVSupported = false;
if( COGLColorCombiner4::Initialize() )
{
m_bSupportMultiTexture = true;
COGLGraphicsContext *pcontext = (COGLGraphicsContext *)(CGraphicsContext::g_pGraphicsContext);
if( pcontext->IsExtensionSupported("GL_NV_texture_env_combine4") || pcontext->IsExtensionSupported("GL_NV_register_combiners") )
{
m_bNVSupported = true;
glEnable(GL_REGISTER_COMBINERS_NV);
return true;
}
else
{
DebugMessage(M64MSG_ERROR, "Your video card does not support Nvidia OpenGL extension combiner");
glDisable(GL_REGISTER_COMBINERS_NV);
return false;
}
}
glDisable(GL_REGISTER_COMBINERS_NV);
return false;
}
示例3: glGetIntegerv
bool COGLColorCombiner4::Initialize(void)
{
m_bSupportModAdd_ATI = false;
m_bSupportModSub_ATI = false;
m_maxTexUnits = 1;
#ifndef USE_GLES
if( COGLColorCombiner::Initialize() )
{
COGLGraphicsContext *pcontext = (COGLGraphicsContext *)(CGraphicsContext::g_pGraphicsContext);
glGetIntegerv(GL_MAX_TEXTURE_UNITS,&m_maxTexUnits);
OPENGL_CHECK_ERRORS;
if( m_maxTexUnits > 8 ) m_maxTexUnits = 8;
TRACE0("Starting Ogl 1.4 multitexture combiner" );
TRACE1("m_maxTexUnits = %d", m_maxTexUnits);
if( pcontext->IsExtensionSupported("ATI_texture_env_combine3") )
{
m_bSupportModAdd_ATI = true;
m_bSupportModSub_ATI = true;
}
m_supportedStages = m_maxTexUnits;
return true;
}
return false;
#else
return true;
#endif
}
示例4: Initialize
bool COGLColorCombiner::Initialize(void)
{
m_bSupportAdd = false;
m_bSupportSubtract = false;
m_supportedStages = 1;
COGLGraphicsContext *pcontext = (COGLGraphicsContext *)(CGraphicsContext::g_pGraphicsContext);
if( pcontext->IsExtensionSupported(OSAL_GL_ARB_TEXTURE_ENV_ADD) || pcontext->IsExtensionSupported("GL_EXT_texture_env_add") )
{
m_bSupportAdd = true;
}
if( pcontext->IsExtensionSupported("GL_EXT_blend_subtract") )
{
m_bSupportSubtract = true;
}
return true;
}
示例5: Initialize
bool COGL_FragmentProgramCombiner::Initialize(void)
{
if( !COGLColorCombiner4::Initialize() )
return false;
COGLGraphicsContext *pcontext = (COGLGraphicsContext *)(CGraphicsContext::g_pGraphicsContext);
if( pcontext->IsExtensionSupported("GL_ARB_fragment_program") )
{
m_bFragmentProgramIsSupported = true;
}
return true;
}
示例6: DebugMessage
bool COGLColorCombinerTNT2::Initialize(void)
{
m_bTNT2Supported = false;
if( COGLColorCombiner4::Initialize() )
{
m_bSupportMultiTexture = true;
COGLGraphicsContext *pcontext = (COGLGraphicsContext *)(CGraphicsContext::g_pGraphicsContext);
if( pcontext->IsExtensionSupported("GL_NV_texture_env_combine4") )
{
m_bTNT2Supported = true;
}
else
{
DebugMessage(M64MSG_ERROR, "Your video card does not support OpenGL TNT2 extension combiner, you can only use the OpenGL Ext combiner functions");
}
return true;
}
return false;
}
示例7: if
CColorCombiner * OGLDeviceBuilder::CreateColorCombiner(CRender *pRender)
{
if( m_pColorCombiner == NULL )
{
if( CGraphicsContext::g_pGraphicsContext == NULL && CGraphicsContext::g_pGraphicsContext->Ready() )
{
DebugMessage(M64MSG_ERROR, "Can not create ColorCombiner before creating and initializing GraphicsContext");
}
else
{
m_deviceType = (SupportedDeviceType)options.OpenglRenderSetting;
#if SDL_VIDEO_OPENGL
if (m_deviceType == NVIDIA_OGL_DEVICE && !bNvidiaExtensionsSupported)
{
DebugMessage(M64MSG_WARNING, "Your video card does not support Nvidia OpenGL extensions. Falling back to auto device.");
m_deviceType = OGL_DEVICE;
}
if( m_deviceType == OGL_DEVICE ) // Best fit
{
GLint maxUnit = 2;
COGLGraphicsContext *pcontext = (COGLGraphicsContext *)(CGraphicsContext::g_pGraphicsContext);
glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB,&maxUnit);
OPENGL_CHECK_ERRORS;
#ifndef HAVE_GLES
if( pcontext->IsExtensionSupported("GL_ARB_fragment_program") )
{
m_pColorCombiner = new COGL_FragmentProgramCombiner(pRender);
DebugMessage(M64MSG_VERBOSE, "OpenGL Combiner: Fragment Program");
}
else if( pcontext->IsExtensionSupported("GL_NV_texture_env_combine4") ||
pcontext->IsExtensionSupported("GL_NV_register_combiners") )
{
m_pColorCombiner = new COGLColorCombinerNvidia(pRender);
DebugMessage(M64MSG_VERBOSE, "OpenGL Combiner: NVidia");
}
else if( pcontext->IsExtensionSupported("GL_NV_texture_env_combine4") )
{
m_pColorCombiner = new COGLColorCombinerTNT2(pRender);
DebugMessage(M64MSG_VERBOSE, "OpenGL Combiner: TNT2");
}
else if( pcontext->IsExtensionSupported("GL_EXT_texture_env_combine") ||
pcontext->IsExtensionSupported("GL_ARB_texture_env_combine") )
{
if( pcontext->IsExtensionSupported("GL_ARB_texture_env_crossbar") )
#endif
{
#ifndef HAVE_GLES
if( maxUnit > 2 )
{
m_pColorCombiner = new COGLColorCombiner4v2(pRender);
DebugMessage(M64MSG_VERBOSE, "OpenGL Combiner: OGL 1.4 version 2");
}
else
#endif
{
m_pColorCombiner = new COGLColorCombiner4(pRender);
DebugMessage(M64MSG_VERBOSE, "OpenGL Combiner: OGL 1.4");
}
}
#ifndef HAVE_GLES
else
{
if( maxUnit > 2 )
{
m_pColorCombiner = new COGLColorCombiner4v2(pRender);
DebugMessage(M64MSG_VERBOSE, "OpenGL Combiner: OGL 1.4 version 2 (w/o env crossbar)");
}
else
{
m_pColorCombiner = new COGLColorCombiner2(pRender);
DebugMessage(M64MSG_VERBOSE, "OpenGL Combiner: OGL 1.2/1.3");
}
}
}
else
{
m_pColorCombiner = new COGLColorCombiner(pRender);
DebugMessage(M64MSG_VERBOSE, "OpenGL Combiner: Basic OGL");
}
#endif
}
else
{
switch(m_deviceType)
{
case OGL_1_1_DEVICE:
m_pColorCombiner = new COGLColorCombiner(pRender);
DebugMessage(M64MSG_VERBOSE, "OpenGL Combiner: Basic OGL");
break;
case OGL_1_2_DEVICE:
case OGL_1_3_DEVICE:
m_pColorCombiner = new COGLColorCombiner2(pRender);
DebugMessage(M64MSG_VERBOSE, "OpenGL Combiner: OGL 1.2/1.3");
break;
case OGL_1_4_DEVICE:
m_pColorCombiner = new COGLColorCombiner4(pRender);
DebugMessage(M64MSG_VERBOSE, "OpenGL Combiner: OGL 1.4");
break;
//.........这里部分代码省略.........
示例8: Initialize
void OGLRender::Initialize(void)
{
glMatrixMode(GL_MODELVIEW);
OPENGL_CHECK_ERRORS;
glLoadIdentity();
OPENGL_CHECK_ERRORS;
glViewportWrapper(0, windowSetting.statusBarHeightToUse, windowSetting.uDisplayWidth, windowSetting.uDisplayHeight);
OPENGL_CHECK_ERRORS;
#if SDL_VIDEO_OPENGL
COGLGraphicsContext *pcontext = (COGLGraphicsContext *)(CGraphicsContext::g_pGraphicsContext);
if( pcontext->IsExtensionSupported("GL_IBM_texture_mirrored_repeat") )
{
OGLXUVFlagMaps[TEXTURE_UV_FLAG_MIRROR].realFlag = GL_MIRRORED_REPEAT_IBM;
}
else if( pcontext->IsExtensionSupported("ARB_texture_mirrored_repeat") )
{
OGLXUVFlagMaps[TEXTURE_UV_FLAG_MIRROR].realFlag = GL_MIRRORED_REPEAT_ARB;
}
else
{
OGLXUVFlagMaps[TEXTURE_UV_FLAG_MIRROR].realFlag = GL_REPEAT;
}
if( pcontext->IsExtensionSupported("GL_ARB_texture_border_clamp") || pcontext->IsExtensionSupported("GL_EXT_texture_edge_clamp") )
{
m_bSupportClampToEdge = true;
OGLXUVFlagMaps[TEXTURE_UV_FLAG_CLAMP].realFlag = GL_CLAMP_TO_EDGE;
}
else
{
m_bSupportClampToEdge = false;
OGLXUVFlagMaps[TEXTURE_UV_FLAG_CLAMP].realFlag = GL_CLAMP;
}
glVertexPointer( 4, GL_FLOAT, sizeof(float)*5, &(g_vtxProjected5[0][0]) );
OPENGL_CHECK_ERRORS;
glEnableClientState( GL_VERTEX_ARRAY );
OPENGL_CHECK_ERRORS;
if( m_bMultiTexture )
{
pglClientActiveTextureARB( GL_TEXTURE0_ARB );
OPENGL_CHECK_ERRORS;
glTexCoordPointer( 2, GL_FLOAT, sizeof( TLITVERTEX ), &(g_vtxBuffer[0].tcord[0].u) );
OPENGL_CHECK_ERRORS;
glEnableClientState( GL_TEXTURE_COORD_ARRAY );
OPENGL_CHECK_ERRORS;
pglClientActiveTextureARB( GL_TEXTURE1_ARB );
OPENGL_CHECK_ERRORS;
glTexCoordPointer( 2, GL_FLOAT, sizeof( TLITVERTEX ), &(g_vtxBuffer[0].tcord[1].u) );
OPENGL_CHECK_ERRORS;
glEnableClientState( GL_TEXTURE_COORD_ARRAY );
OPENGL_CHECK_ERRORS;
}
else
{
glTexCoordPointer( 2, GL_FLOAT, sizeof( TLITVERTEX ), &(g_vtxBuffer[0].tcord[0].u) );
OPENGL_CHECK_ERRORS;
glEnableClientState( GL_TEXTURE_COORD_ARRAY );
OPENGL_CHECK_ERRORS;
}
if (m_bSupportFogCoordExt)
{
pglFogCoordPointerEXT( GL_FLOAT, sizeof(float)*5, &(g_vtxProjected5[0][4]) );
OPENGL_CHECK_ERRORS;
glEnableClientState( GL_FOG_COORDINATE_ARRAY_EXT );
OPENGL_CHECK_ERRORS;
glFogi( GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT );
OPENGL_CHECK_ERRORS;
glFogi(GL_FOG_MODE, GL_LINEAR); // Fog Mode
OPENGL_CHECK_ERRORS;
glFogf(GL_FOG_DENSITY, 1.0f); // How Dense Will The Fog Be
OPENGL_CHECK_ERRORS;
glHint(GL_FOG_HINT, GL_FASTEST); // Fog Hint Value
OPENGL_CHECK_ERRORS;
glFogi( GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT );
OPENGL_CHECK_ERRORS;
glFogf( GL_FOG_START, 0.0f );
OPENGL_CHECK_ERRORS;
glFogf( GL_FOG_END, 1.0f );
OPENGL_CHECK_ERRORS;
}
//glColorPointer( 1, GL_UNSIGNED_BYTE, sizeof(TLITVERTEX), &g_vtxBuffer[0].r);
glColorPointer( 4, GL_UNSIGNED_BYTE, sizeof(uint8)*4, &(g_oglVtxColors[0][0]) );
OPENGL_CHECK_ERRORS;
glEnableClientState( GL_COLOR_ARRAY );
OPENGL_CHECK_ERRORS;
if( pcontext->IsExtensionSupported("GL_NV_depth_clamp") )
{
glEnable(GL_DEPTH_CLAMP_NV);
OPENGL_CHECK_ERRORS;
}
#elif SDL_VIDEO_OPENGL_ES2
//.........这里部分代码省略.........