这篇教程C++ GetCurrentContext函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetCurrentContext函数的典型用法代码示例。如果您正苦于以下问题:C++ GetCurrentContext函数的具体用法?C++ GetCurrentContext怎么用?C++ GetCurrentContext使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetCurrentContext函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: DECLEXPORTDECLEXPORT(void) STATE_APIENTRY crStateUseProgram(GLuint program){ CRContext *g = GetCurrentContext(); if (program>0) { CRGLSLProgram *pProgram = crStateGetProgramObj(program); if (!pProgram) { crWarning("Unknown program %d", program); return; } g->glsl.activeProgram = pProgram; } else { g->glsl.activeProgram = NULL; }}
开发者ID:druidsbane,项目名称:VirtualMonitor,代码行数:21,
示例2: PlatformOpenGLCurrentContextEOpenGLCurrentContext PlatformOpenGLCurrentContext(FPlatformOpenGLDevice* Device){ HGLRC Context = GetCurrentContext(); if (Context == Device->RenderingContext.OpenGLContext) // most common case { return CONTEXT_Rendering; } else if (Context == Device->SharedContext.OpenGLContext) { return CONTEXT_Shared; } else if (Context) { return CONTEXT_Other; } else { return CONTEXT_Invalid; }}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:21,
示例3: crStateIsBufferBoundGLboolean crStateIsBufferBound(GLenum target){ CRContext *g = GetCurrentContext(); CRBufferObjectState *b = &(g->bufferobject); switch (target) { case GL_ARRAY_BUFFER_ARB: return b->arrayBuffer->id!=0; case GL_ELEMENT_ARRAY_BUFFER_ARB: return b->elementsBuffer->id!=0;#ifdef CR_ARB_pixel_buffer_object case GL_PIXEL_PACK_BUFFER_ARB: return b->packBuffer->id!=0; case GL_PIXEL_UNPACK_BUFFER_ARB: return b->unpackBuffer->id!=0;#endif default: return GL_FALSE; }}
开发者ID:LastRitter,项目名称:vbox-haiku,代码行数:21,
示例4: crStateSetCurrent/* * As above, but don't call crStateSwitchContext(). */void crStateSetCurrent( CRContext *ctx ){ CRContext *current = GetCurrentContext(); if (ctx == NULL) ctx = defaultContext; if (current == ctx) return; /* no-op */ CRASSERT(ctx);#ifdef CHROMIUM_THREADSAFE SetCurrentContext(ctx);#else __currentContext = ctx;#endif /* ensure matrix state is also current */ crStateMatrixMode(ctx->transform.matrixMode);}
开发者ID:quiquetux,项目名称:jokte-ba-as,代码行数:24,
示例5: DECLEXPORTDECLEXPORT(void) STATE_APIENTRYcrStateBindRenderbufferEXT(GLenum target, GLuint renderbuffer){ CRContext *g = GetCurrentContext(); CRFramebufferObjectState *fbo = &g->framebufferobject; CRSTATE_CHECKERR(g->current.inBeginEnd, GL_INVALID_OPERATION, "called in begin/end"); CRSTATE_CHECKERR(target!=GL_RENDERBUFFER_EXT, GL_INVALID_ENUM, "invalid target"); if (renderbuffer) { fbo->renderbuffer = (CRRenderbufferObject*) crHashtableSearch(g->shared->rbTable, renderbuffer); if (!fbo->renderbuffer) { CRSTATE_CHECKERR(!crHashtableIsKeyUsed(g->shared->rbTable, renderbuffer), GL_INVALID_OPERATION, "name is not a renderbuffer"); fbo->renderbuffer = crStateRenderbufferAllocate(g, renderbuffer); } CR_STATE_SHAREDOBJ_USAGE_SET(fbo->renderbuffer, g); } else fbo->renderbuffer = NULL;}
开发者ID:Klanly,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:21,
示例6: crStatePolygonModevoid STATE_APIENTRY crStatePolygonMode (GLenum face, GLenum mode) { CRContext *g = GetCurrentContext(); CRPolygonState *p = &(g->polygon); CRStateBits *sb = GetCurrentBits(); CRPolygonBits *pb = &(sb->polygon); if (g->current.inBeginEnd) { crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION, "glPolygonMode called in begin/end"); return; } FLUSH(); if (mode != GL_POINT && mode != GL_LINE && mode != GL_FILL) { crStateError(__LINE__, __FILE__, GL_INVALID_ENUM, "glPolygonMode called with bogus mode: 0x%x", mode); return; } switch (face) { case GL_FRONT: p->frontMode = mode; break; case GL_FRONT_AND_BACK: p->frontMode = mode; case GL_BACK: p->backMode = mode; break; default: crStateError(__LINE__, __FILE__, GL_INVALID_ENUM, "glPolygonMode called with bogus face: 0x%x", face); return; } DIRTY(pb->mode, g->neg_bitid); DIRTY(pb->dirty, g->neg_bitid);}
开发者ID:L3oV1nc3,项目名称:VMGL,代码行数:40,
示例7: PlatformGetNewRenderQueryvoid PlatformGetNewRenderQuery( GLuint* OutQuery, uint64* OutQueryContext ){ if( !ReleasedQueriesGuard ) { ReleasedQueriesGuard = new FCriticalSection; } { FScopeLock Lock(ReleasedQueriesGuard);#ifdef UE_BUILD_DEBUG check( OutQuery && OutQueryContext );#endif HGLRC Context = GetCurrentContext(); check( Context ); GLuint NewQuery = 0; // Check for possible query reuse const int32 ArraySize = ReleasedQueries.Num(); for( int32 Index = 0; Index < ArraySize; ++Index ) { if( ReleasedQueries[Index].Context == Context ) { NewQuery = ReleasedQueries[Index].Query; ReleasedQueries.RemoveAtSwap(Index); break; } } if( !NewQuery ) { FOpenGL::GenQueries( 1, &NewQuery ); } *OutQuery = NewQuery; *OutQueryContext = (uint64)Context; }}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:40,
示例8: crStateSecondaryColorPointerEXTvoid STATE_APIENTRY crStateSecondaryColorPointerEXT(GLint size, GLenum type, GLsizei stride, const GLvoid *p){ CRContext *g = GetCurrentContext(); CRClientState *c = &(g->client); CRStateBits *sb = GetCurrentBits(); CRClientBits *cb = &(sb->client); FLUSH(); if ( !g->extensions.EXT_secondary_color ) { crError( "glSecondaryColorPointerEXT called but EXT_secondary_color is disabled." ); return; } if (size != 3) { crStateError(__LINE__, __FILE__, GL_INVALID_VALUE, "glSecondaryColorPointerEXT: invalid size: %d", size); return; } if (type != GL_BYTE && type != GL_UNSIGNED_BYTE && type != GL_SHORT && type != GL_UNSIGNED_SHORT && type != GL_INT && type != GL_UNSIGNED_INT && type != GL_FLOAT && type != GL_DOUBLE) { crStateError(__LINE__, __FILE__, GL_INVALID_ENUM, "glSecondaryColorPointerEXT: invalid type: 0x%x", type); return; } if (stride < 0) { crStateError(__LINE__, __FILE__, GL_INVALID_VALUE, "glSecondaryColorPointerEXT: stride was negative: %d", stride); return; } crStateClientSetPointer(&(c->array.s), size, type, GL_TRUE, stride, p); DIRTY(cb->dirty, g->neg_bitid); DIRTY(cb->clientPointer, g->neg_bitid); DIRTY(cb->s, g->neg_bitid);}
开发者ID:L3oV1nc3,项目名称:VMGL,代码行数:40,
示例9: QString/** * /brief Get the currently selected key string * * If no key is selected, an empty string is returned. * * /return The currently selected key string */QString MythControls::GetCurrentKey(void){ MythUIButtonListItem* currentButton; if (m_leftListType == kKeyList && (currentButton = m_leftList->GetItemCurrent())) { return currentButton->GetText(); } if (GetFocusWidget() == m_leftList) return QString(); if ((m_leftListType == kContextList) && (m_rightListType == kActionList)) { QString context = GetCurrentContext(); QString action = GetCurrentAction(); uint b = GetCurrentButton(); QStringList keys = m_bindings->GetActionKeys(context, action); if (b < (uint)keys.count()) return keys[b]; return QString(); } currentButton = m_rightList->GetItemCurrent(); QString desc; if (currentButton) desc = currentButton->GetText(); int loc = desc.indexOf(" => "); if (loc == -1) return QString(); // Should not happen if (m_rightListType == kKeyList) return desc.left(loc); return desc.mid(loc + 4);}
开发者ID:JGunning,项目名称:OpenAOL-TV,代码行数:47,
示例10: crStateClearDepthvoid STATE_APIENTRY crStateClearDepth (GLclampd depth) { CRContext *g = GetCurrentContext(); CRBufferState *b = &(g->buffer); CRStateBits *sp = GetCurrentBits(); CRBufferBits *bb = &(sp->buffer); if (g->current.inBeginEnd) { crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION, "glClearDepth called in begin/end"); return; } FLUSH(); if (depth < 0.0) depth = 0.0; if (depth > 1.0) depth = 1.0; b->depthClearValue = (GLdefault) depth; DIRTY(bb->dirty, g->neg_bitid); DIRTY(bb->clearDepth, g->neg_bitid);}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:22,
示例11: crStatePolygonOffsetvoid STATE_APIENTRY crStatePolygonOffset (PCRStateTracker pState, GLfloat factor, GLfloat units) { CRContext *g = GetCurrentContext(pState); CRPolygonState *p = &(g->polygon); CRStateBits *sb = GetCurrentBits(pState); CRPolygonBits *pb = &(sb->polygon); if (g->current.inBeginEnd) { crStateError(pState, __LINE__, __FILE__, GL_INVALID_OPERATION, "glPolygonOffset called in begin/end"); return; } FLUSH(); p->offsetFactor = factor; p->offsetUnits = units; DIRTY(pb->offset, g->neg_bitid); DIRTY(pb->dirty, g->neg_bitid);}
开发者ID:mdaniel,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:22,
示例12: __glstate_StencilMaskvoid GLSTATE_DECL__glstate_StencilMask (GLuint mask) { GLcontext *g = GetCurrentContext(); GLstencilstate *s = &(g->stencil); GLstatebits *stateb = GetStateBits(); GLstencilbits *sb = &(stateb->stencil); /*ECHECK*/ if (g->current.beginend) if (__glerror(__LINE__, __FILE__, GL_INVALID_OPERATION, "glStencilMask called in begin/end")) return; /*ECHECK*/ s->mask = mask; sb->writemask = g->nbitID; sb->dirty = g->nbitID;}
开发者ID:kasicass,项目名称:glsim,代码行数:22,
示例13: __glstate_ClearStencilvoid GLSTATE_DECL__glstate_ClearStencil (GLint c) { GLcontext *g = GetCurrentContext(); GLstencilstate *s = &(g->stencil); GLstatebits *stateb = GetStateBits(); GLstencilbits *sb = &(stateb->stencil); /*ECHECK*/ if (g->current.beginend) if (__glerror(__LINE__, __FILE__, GL_INVALID_OPERATION, "glClearStencil called in begin/end")) return; /*ECHECK*/ s->clearvalue = c; sb->clearvalue = g->nbitID; sb->dirty = g->nbitID;}
开发者ID:kasicass,项目名称:glsim,代码行数:22,
示例14: crStateAlphaFuncvoid STATE_APIENTRY crStateAlphaFunc (GLenum func, GLclampf ref) { CRContext *g = GetCurrentContext(); CRBufferState *b = &(g->buffer); CRStateBits *sb = GetCurrentBits(); CRBufferBits *bb = &(sb->buffer); if (g->current.inBeginEnd) { crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION, "glAlphaFunc called in begin/end"); return; } FLUSH(); switch (func) { case GL_NEVER: case GL_LESS: case GL_EQUAL: case GL_LEQUAL: case GL_GREATER: case GL_GEQUAL: case GL_NOTEQUAL: case GL_ALWAYS: break; default: crStateError(__LINE__, __FILE__, GL_INVALID_ENUM, "glAlphaFunc: Invalid func: %d", func); return; } if (ref < 0.0f) ref = 0.0f; if (ref > 1.0f) ref = 1.0f; b->alphaTestFunc = func; b->alphaTestRef = ref; DIRTY(bb->dirty, g->neg_bitid); DIRTY(bb->alphaFunc, g->neg_bitid);}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:39,
示例15: crStateColorMaskvoid STATE_APIENTRY crStateColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { CRContext *g = GetCurrentContext(); CRBufferState *b = &(g->buffer); CRStateBits *sp = GetCurrentBits(); CRBufferBits *bb = &(sp->buffer); if (g->current.inBeginEnd) { crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION, "glReadBuffer called in begin/end"); return; } FLUSH(); b->colorWriteMask.r = red; b->colorWriteMask.g = green; b->colorWriteMask.b = blue; b->colorWriteMask.a = alpha; DIRTY(bb->dirty, g->neg_bitid); DIRTY(bb->colorWriteMask, g->neg_bitid);}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:22,
示例16: crStateVertexAttribPointerARBvoid STATE_APIENTRY crStateVertexAttribPointerARB(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *p) { CRContext *g = GetCurrentContext(); CRClientState *c = &(g->client); CRStateBits *sb = GetCurrentBits(); CRClientBits *cb = &(sb->client); FLUSH(); if (index > CR_MAX_VERTEX_ATTRIBS) { crStateError(__LINE__, __FILE__, GL_INVALID_VALUE, "glVertexAttribPointerARB: invalid index: %d", (int) index); return; } if (size != 1 && size != 2 && size != 3 && size != 4) { crStateError(__LINE__, __FILE__, GL_INVALID_VALUE, "glVertexAttribPointerARB: invalid size: %d", size); return; } if (type != GL_BYTE && type != GL_UNSIGNED_BYTE && type != GL_SHORT && type != GL_UNSIGNED_SHORT && type != GL_INT && type != GL_UNSIGNED_INT && type != GL_FLOAT && type != GL_DOUBLE) { crStateError(__LINE__, __FILE__, GL_INVALID_ENUM, "glVertexAttribPointerARB: invalid type: 0x%x", type); return; } if (stride < 0) { crStateError(__LINE__, __FILE__, GL_INVALID_VALUE, "glVertexAttribPointerARB: stride was negative: %d", stride); return; } crStateClientSetPointer(&(c->array.a[index]), size, type, normalized, stride, p); DIRTY(cb->dirty, g->neg_bitid); DIRTY(cb->clientPointer, g->neg_bitid); DIRTY(cb->a[index], g->neg_bitid);}
开发者ID:L3oV1nc3,项目名称:VMGL,代码行数:38,
示例17: crStateBlendEquationEXTvoid STATE_APIENTRY crStateBlendEquationEXT( GLenum mode ){ CRContext *g = GetCurrentContext(); CRBufferState *b = &(g->buffer); CRStateBits *sb = GetCurrentBits(); CRBufferBits *bb = &(sb->buffer); if( g->current.inBeginEnd ) { crStateError( __LINE__, __FILE__, GL_INVALID_OPERATION, "BlendEquationEXT called inside a Begin/End" ); return; } switch( mode ) {#if defined(CR_EXT_blend_minmax) || defined(CR_EXT_blend_subtract) || defined(CR_EXT_blend_logic_op) case GL_FUNC_ADD_EXT:#ifdef CR_EXT_blend_subtract case GL_FUNC_SUBTRACT_EXT: case GL_FUNC_REVERSE_SUBTRACT_EXT:#endif /* CR_EXT_blend_subtract */#ifdef CR_EXT_blend_minmax case GL_MIN_EXT: case GL_MAX_EXT:#endif /* CR_EXT_blend_minmax */#ifdef CR_EXT_blend_logic_op case GL_LOGIC_OP:#endif /* CR_EXT_blend_logic_op */ b->blendEquation = mode; break;#endif /* defined(CR_EXT_blend_minmax) || defined(CR_EXT_blend_subtract) || defined(CR_EXT_blend_logic_op) */ default: crStateError( __LINE__, __FILE__, GL_INVALID_ENUM, "BlendEquationEXT: mode called with illegal parameter: 0x%x", (GLenum) mode ); return; } DIRTY(bb->blendEquation, g->neg_bitid); DIRTY(bb->dirty, g->neg_bitid);}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:38,
示例18: ifvoid CContextManager::DestroyState(CState* pState){ for (unsigned int i = 0; i < m_contexts.size(); i++) { if (m_contexts[i] != pState) continue; m_contexts.erase(m_contexts.begin() + i); if ((int)i < m_current_context) m_current_context--; else if ((int)i == m_current_context) { if (i >= m_contexts.size()) m_current_context--; NotifyHandlers(GetCurrentContext(), STATECHANGE_CHANGEDCONTEXT, _T(""), 0, false); } break; } NotifyHandlers(pState, STATECHANGE_REMOVECONTEXT, _T(""), 0, false); delete pState;}
开发者ID:wy182000,项目名称:filezilla-filezillserver-vs2013,代码行数:23,
示例19: crStateDestroyContextvoid crStateDestroyContext( CRContext *ctx ){ CRContext *current = GetCurrentContext(); if (current == ctx) { /* destroying the current context - have to be careful here */ CRASSERT(defaultContext); /* Check to see if the differencer exists first, we may not have one, aka the packspu */ if (diff_api.AlphaFunc) crStateSwitchContext(current, defaultContext);#ifdef CHROMIUM_THREADSAFE crSetTSD(&__contextTSD, defaultContext);#else __currentContext = defaultContext;#endif /* ensure matrix state is also current */ crStateMatrixMode(defaultContext->transform.matrixMode); } g_availableContexts[ctx->id] = 0; crStateFreeContext(ctx);}
开发者ID:LastRitter,项目名称:vbox-haiku,代码行数:23,
示例20: crStateCombinerStageParameterfvNVvoid STATE_APIENTRY crStateCombinerStageParameterfvNV( GLenum stage, GLenum pname, const GLfloat *params ){ CRContext *g = GetCurrentContext(); CRRegCombinerState *r = &(g->regcombiner); CRStateBits *sb = GetCurrentBits(); CRRegCombinerBits *rb = &(sb->regcombiner); stage -= GL_COMBINER0_NV; if( stage >= g->limits.maxGeneralCombiners ) { crStateError(__LINE__, __FILE__, GL_INVALID_ENUM, "CombinerStageParameterfvNV passed bogus stage: 0x%x", stage+GL_COMBINER0_NV ); return; } switch( pname ) { case GL_CONSTANT_COLOR0_NV: r->stageConstantColor0[stage].r = params[0]; r->stageConstantColor0[stage].g = params[1]; r->stageConstantColor0[stage].b = params[2]; r->stageConstantColor0[stage].a = params[3]; DIRTY(rb->regCombinerStageColor0[stage], g->neg_bitid); break; case GL_CONSTANT_COLOR1_NV: r->stageConstantColor1[stage].r = params[0]; r->stageConstantColor1[stage].g = params[1]; r->stageConstantColor1[stage].b = params[2]; r->stageConstantColor1[stage].a = params[3]; DIRTY(rb->regCombinerStageColor1[stage], g->neg_bitid); break; default: crStateError( __LINE__, __FILE__, GL_INVALID_ENUM, "CombinerStageParameter passed bogus pname: 0x%x", pname ); return; } DIRTY(rb->dirty, g->neg_bitid);}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:37,
示例21: __glstate_StencilFuncvoid GLSTATE_DECL__glstate_StencilFunc(GLenum func, GLint ref, GLuint mask) { GLcontext *g = GetCurrentContext(); GLstencilstate *s = &(g->stencil); GLstatebits *stateb = GetStateBits(); GLstencilbits *sb = &(stateb->stencil); /*ECHECK*/ if (g->current.beginend) if (__glerror(__LINE__, __FILE__, GL_INVALID_OPERATION, "glStencilFunc called in begin/end")) return; if (func != GL_NEVER && func != GL_LESS && func != GL_LEQUAL && func != GL_GREATER && func != GL_GEQUAL && func != GL_EQUAL && func != GL_NOTEQUAL && func != GL_ALWAYS) if (__glerror(__LINE__, __FILE__, GL_INVALID_ENUM, "glStencilFunc called with bogu func: %d", func)) return; /*ECHECK*/ s->func = func; s->ref = ref; s->mask = mask; sb->func = g->nbitID; sb->dirty = g->nbitID;}
开发者ID:kasicass,项目名称:glsim,代码行数:36,
示例22: GetCurrentContext/** * /brief Delete the currently active key to action mapping * * TODO FIXME This code needs work to support deleteKey * in any mode exc. Context/Action */void MythControls::DeleteKey(void){ QString context = GetCurrentContext(); QString key = GetCurrentKey(); QString action = GetCurrentAction(); if (context.isEmpty() || key.isEmpty() || action.isEmpty()) { LOG(VB_GENERAL, LOG_ERR, "Unable to delete binding, missing information"); return; } if (m_bindings->RemoveActionKey(context, action, key)) { RefreshKeyInformation(); return; } QString label = tr("This action is mandatory and needs at least one key " "bound to it. Instead, try rebinding with another key."); MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); MythConfirmationDialog *confirmPopup = new MythConfirmationDialog(popupStack, label, false); if (confirmPopup->Create()) { confirmPopup->SetReturnEvent(this, "mandatorydelete"); popupStack->AddScreen(confirmPopup); } else delete confirmPopup;}
开发者ID:JGunning,项目名称:OpenAOL-TV,代码行数:42,
示例23: crStateGetQueryObjectuivARBvoid STATE_APIENTRYcrStateGetQueryObjectuivARB(GLuint id, GLenum pname, GLuint *params){ CRContext *g = GetCurrentContext(); CROcclusionState *o = &(g->occlusion); CROcclusionObject *q; FLUSH(); if (g->current.inBeginEnd) { crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION, "glGetGetQueryObjectuivARB called in begin/end"); return; } q = (CROcclusionObject *) crHashtableSearch(o->objects, id); if (!q || q->active) { crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION, "glGetQueryObjectuivARB"); return; } switch (pname) { case GL_QUERY_RESULT_ARB: *params = q->passedCounter; break; case GL_QUERY_RESULT_AVAILABLE_ARB: /* XXX revisit when we have a hardware implementation! */ *params = GL_TRUE; break; default: crStateError(__LINE__, __FILE__, GL_INVALID_ENUM, "glGetQueryObjectuivARB(pname)"); return; }}
开发者ID:L3oV1nc3,项目名称:VMGL,代码行数:36,
示例24: crStateGetVertexAttribPointervNVvoid STATE_APIENTRY crStateGetVertexAttribPointervNV(GLuint index, GLenum pname, GLvoid **pointer){ CRContext *g = GetCurrentContext(); if (g->current.inBeginEnd) { crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION, "glGetVertexAttribPointervNV called in Begin/End"); return; } if (index >= CR_MAX_VERTEX_ATTRIBS) { crStateError(__LINE__, __FILE__, GL_INVALID_VALUE, "glGetVertexAttribPointervNV(index)"); return; } if (pname != GL_ATTRIB_ARRAY_POINTER_NV) { crStateError(__LINE__, __FILE__, GL_INVALID_ENUM, "glGetVertexAttribPointervNV(pname)"); return; } *pointer = g->client.array.a[index].p;}
开发者ID:L3oV1nc3,项目名称:VMGL,代码行数:24,
示例25: crStateRegRenderbuffersvoid crStateRegRenderbuffers(GLsizei n, GLuint *buffers){ CRContext *g = GetCurrentContext(); crStateRegNames(g, g->shared->rbTable, n, buffers);}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:5,
示例26: crStateGenRenderbuffersEXTvoid STATE_APIENTRY crStateGenRenderbuffersEXT(GLsizei n, GLuint *buffers){ CRContext *g = GetCurrentContext(); crStateGenNames(g, g->shared->rbTable, n, buffers);}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:5,
示例27: crStateFogfvvoid STATE_APIENTRY crStateFogfv(PCRStateTracker pState, GLenum pname, const GLfloat *param) { CRContext *g = GetCurrentContext(pState); CRFogState *f = &(g->fog); CRStateBits *sb = GetCurrentBits(pState); CRFogBits *fb = &(sb->fog); if (g->current.inBeginEnd) { crStateError(pState, __LINE__, __FILE__, GL_INVALID_OPERATION, "glFogfv called in Begin/End"); return; } FLUSH(); switch (pname) { case GL_FOG_MODE: { GLenum e = (GLenum) *param; if (e != GL_LINEAR && e != GL_EXP && e != GL_EXP2) { crStateError(pState, __LINE__, __FILE__, GL_INVALID_ENUM, "Invalid param for glFog: %d", e); return; } f->mode = e; DIRTY(fb->mode, g->neg_bitid); } break; case GL_FOG_DENSITY: f->density = *param; if (f->density < 0.0f) { f->density = 0.0f; } DIRTY(fb->density, g->neg_bitid); break; case GL_FOG_START: f->start = *param; DIRTY(fb->start, g->neg_bitid); break; case GL_FOG_END: f->end = *param; DIRTY(fb->end, g->neg_bitid); break; case GL_FOG_INDEX: f->index = (GLint) *param; DIRTY(fb->index, g->neg_bitid); break; case GL_FOG_COLOR: f->color.r = param[0]; f->color.g = param[1]; f->color.b = param[2]; f->color.a = param[3]; DIRTY(fb->color, g->neg_bitid); break;#ifdef CR_NV_fog_distance case GL_FOG_DISTANCE_MODE_NV: if (g->extensions.NV_fog_distance) { if (param[0] != GL_EYE_RADIAL_NV && param[0] != GL_EYE_PLANE && param[0] != GL_EYE_PLANE_ABSOLUTE_NV ) { crStateError(pState, __LINE__, __FILE__, GL_INVALID_ENUM, "Fogfv: GL_FOG_DISTANCE_MODE_NV called with illegal parameter: 0x%x", (GLenum) param[0]); return; } f->fogDistanceMode = (GLenum) param[0]; DIRTY(fb->fogDistanceMode, g->neg_bitid); } else { crStateError(pState, __LINE__, __FILE__, GL_INVALID_VALUE, "Invalid glFog Param: %d", param); return; } break;#endif#ifdef CR_EXT_fog_coord case GL_FOG_COORDINATE_SOURCE_EXT: if (g->extensions.EXT_fog_coord) { if ((GLenum) param[0] != GL_FOG_COORDINATE_EXT && (GLenum) param[0] != GL_FRAGMENT_DEPTH_EXT) { crStateError(pState, __LINE__, __FILE__, GL_INVALID_ENUM, "Fogfv: GL_FOG_COORDINATE_SOURCE_EXT called with illegal parameter: 0x%x", (GLenum) param[0]); return; } f->fogCoordinateSource = (GLenum) param[0]; DIRTY(fb->fogCoordinateSource, g->neg_bitid); } else { crStateError(pState, __LINE__, __FILE__, GL_INVALID_VALUE, "Invalid glFog Param: 0x%x", (GLint) param[0]); return; } break;#endif default://.........这里部分代码省略.........
开发者ID:mdaniel,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:101,
示例28: GetCurrentContextCRContext *crStateGetCurrent(void){ return GetCurrentContext();}
开发者ID:LastRitter,项目名称:vbox-haiku,代码行数:4,
注:本文中的GetCurrentContext函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GetCurrentDir函数代码示例 C++ GetCurrentCommandId函数代码示例 |