本文整理汇总了C++中I810_CONTEXT函数的典型用法代码示例。如果您正苦于以下问题:C++ I810_CONTEXT函数的具体用法?C++ I810_CONTEXT怎么用?C++ I810_CONTEXT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了I810_CONTEXT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: i810InitTextureFuncs
void i810InitTextureFuncs( GLcontext *ctx )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
ctx->Driver.TexEnv = i810TexEnv;
ctx->Driver.ChooseTextureFormat = i810ChooseTextureFormat;
ctx->Driver.TexImage1D = _mesa_store_teximage1d;
ctx->Driver.TexImage2D = i810TexImage2D;
ctx->Driver.TexImage3D = _mesa_store_teximage3d;
ctx->Driver.TexSubImage1D = _mesa_store_texsubimage1d;
ctx->Driver.TexSubImage2D = i810TexSubImage2D;
ctx->Driver.TexSubImage3D = _mesa_store_texsubimage3d;
ctx->Driver.CopyTexImage1D = _swrast_copy_teximage1d;
ctx->Driver.CopyTexImage2D = _swrast_copy_teximage2d;
ctx->Driver.CopyTexSubImage1D = _swrast_copy_texsubimage1d;
ctx->Driver.CopyTexSubImage2D = _swrast_copy_texsubimage2d;
ctx->Driver.CopyTexSubImage3D = _swrast_copy_texsubimage3d;
ctx->Driver.BindTexture = i810BindTexture;
ctx->Driver.DeleteTexture = i810DeleteTexture;
ctx->Driver.TexParameter = i810TexParameter;
ctx->Driver.UpdateTexturePalette = 0;
ctx->Driver.IsTextureResident = driIsTextureResident;
ctx->Driver.TestProxyTexImage = _mesa_test_proxy_teximage;
driInitTextureObjects( ctx, &imesa->swapped, DRI_TEXMGR_DO_TEXTURE_2D);
}
示例2: i810UpdateTexUnit
/**
* Update hardware state for a texture unit.
*
* \todo
* 1D textures should be supported! Just use a 2D texture with the second
* texture coordinate value fixed at 0.0.
*/
static void i810UpdateTexUnit( struct gl_context *ctx, GLuint unit,
int * next_color_stage, int * next_alpha_stage )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
GLboolean ret;
switch(texUnit->_ReallyEnabled) {
case TEXTURE_2D_BIT:
ret = enable_tex_common( ctx, unit);
ret &= enable_tex_2d(ctx, unit);
if (ret == GL_FALSE) {
FALLBACK( imesa, I810_FALLBACK_TEXTURE, GL_TRUE );
}
break;
case TEXTURE_RECT_BIT:
ret = enable_tex_common( ctx, unit);
ret &= enable_tex_rect(ctx, unit);
if (ret == GL_FALSE) {
FALLBACK( imesa, I810_FALLBACK_TEXTURE, GL_TRUE );
}
break;
case 0:
disable_tex(ctx, unit);
break;
}
if (!i810UpdateTexEnvCombine( ctx, unit,
next_color_stage, next_alpha_stage )) {
FALLBACK( imesa, I810_FALLBACK_TEXTURE, GL_TRUE );
}
return;
}
示例3: i810AlphaFunc
static void i810AlphaFunc(struct gl_context *ctx, GLenum func, GLfloat ref)
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
GLuint a = (ZA_UPDATE_ALPHAFUNC|ZA_UPDATE_ALPHAREF);
GLubyte refByte;
CLAMPED_FLOAT_TO_UBYTE(refByte, ref);
switch (ctx->Color.AlphaFunc) {
case GL_NEVER: a |= ZA_ALPHA_NEVER; break;
case GL_LESS: a |= ZA_ALPHA_LESS; break;
case GL_GEQUAL: a |= ZA_ALPHA_GEQUAL; break;
case GL_LEQUAL: a |= ZA_ALPHA_LEQUAL; break;
case GL_GREATER: a |= ZA_ALPHA_GREATER; break;
case GL_NOTEQUAL: a |= ZA_ALPHA_NOTEQUAL; break;
case GL_EQUAL: a |= ZA_ALPHA_EQUAL; break;
case GL_ALWAYS: a |= ZA_ALPHA_ALWAYS; break;
default: return;
}
a |= ((refByte & 0xfc) << ZA_ALPHAREF_SHIFT);
I810_STATECHANGE(imesa, I810_UPLOAD_CTX);
imesa->Setup[I810_CTXREG_ZA] &= ~(ZA_ALPHA_MASK|ZA_ALPHAREF_MASK);
imesa->Setup[I810_CTXREG_ZA] |= a;
}
示例4: i810BlendEquationSeparate
static void i810BlendEquationSeparate(struct gl_context *ctx,
GLenum modeRGB, GLenum modeA)
{
assert( modeRGB == modeA );
/* Can only do GL_ADD equation in hardware */
FALLBACK( I810_CONTEXT(ctx), I810_FALLBACK_BLEND_EQ,
modeRGB != GL_FUNC_ADD);
/* BlendEquation sets ColorLogicOpEnabled in an unexpected
* manner.
*/
FALLBACK( I810_CONTEXT(ctx), I810_FALLBACK_LOGICOP,
(ctx->Color.ColorLogicOpEnabled &&
ctx->Color.LogicOp != GL_COPY));
}
示例5: i810SpanRenderStart
/* Move locking out to get reasonable span performance.
*/
void i810SpanRenderStart( GLcontext *ctx )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
I810_FIREVERTICES(imesa);
LOCK_HARDWARE(imesa);
i810RegetLockQuiescent( imesa );
}
示例6: i810TexImage2D
static void i810TexImage2D( GLcontext *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
const struct gl_pixelstore_attrib *packing,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage )
{
driTextureObject *t = (driTextureObject *) texObj->DriverData;
if (t) {
I810_FIREVERTICES( I810_CONTEXT(ctx) );
driSwapOutTextureObject( t );
}
else {
t = (driTextureObject *) i810AllocTexObj( ctx, texObj );
if (!t) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D");
return;
}
}
_mesa_store_teximage2d( ctx, target, level, internalFormat,
width, height, border, format, type,
pixels, packing, texObj, texImage );
}
示例7: i810InvalidateState
static void i810InvalidateState( struct gl_context *ctx, GLuint new_state )
{
_swrast_InvalidateState( ctx, new_state );
_swsetup_InvalidateState( ctx, new_state );
_vbo_InvalidateState( ctx, new_state );
_tnl_InvalidateState( ctx, new_state );
I810_CONTEXT(ctx)->new_state |= new_state;
}
示例8: i810FreeVB
void i810FreeVB( GLcontext *ctx )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
if (imesa->verts) {
ALIGN_FREE(imesa->verts);
imesa->verts = 0;
}
}
示例9: disable_tex
static void disable_tex( struct gl_context *ctx, GLuint unit )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
imesa->CurrentTexObj[unit] = 0;
imesa->TexEnvImageFmt[unit] = 0;
imesa->dirty &= ~(I810_UPLOAD_TEX0<<unit);
}
示例10: i810ShadeModel
/* In Mesa 3.5 we can reliably do native flatshading.
*/
static void i810ShadeModel(struct gl_context *ctx, GLenum mode)
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
I810_STATECHANGE(imesa, I810_UPLOAD_CTX);
if (mode == GL_FLAT)
imesa->Setup[I810_CTXREG_LCS] |= LCS_INTERP_FLAT;
else
imesa->Setup[I810_CTXREG_LCS] &= ~LCS_INTERP_FLAT;
}
示例11: copy_pv_rgba3
static void copy_pv_rgba3( struct gl_context *ctx, GLuint edst, GLuint esrc )
{
i810ContextPtr imesa = I810_CONTEXT( ctx );
GLubyte *i810verts = (GLubyte *)imesa->verts;
GLuint shift = imesa->vertex_stride_shift;
i810Vertex *dst = (i810Vertex *)(i810verts + (edst << shift));
i810Vertex *src = (i810Vertex *)(i810verts + (esrc << shift));
dst->ui[3] = src->ui[3];
}
示例12: I810_CONTEXT
void *i810_emit_contiguous_verts( GLcontext *ctx,
GLuint start,
GLuint count,
void *dest )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
GLuint stride = imesa->vertex_size * 4;
setup_tab[imesa->SetupIndex].emit( ctx, start, count, dest, stride );
return (void *)((char *)dest + stride * (count - start));
}
示例13: i810DepthMask
static void i810DepthMask(struct gl_context *ctx, GLboolean flag)
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
I810_STATECHANGE(imesa, I810_UPLOAD_CTX);
if (flag)
imesa->Setup[I810_CTXREG_B2] |= B2_ZB_WRITE_ENABLE;
else
imesa->Setup[I810_CTXREG_B2] &= ~B2_ZB_WRITE_ENABLE;
}
示例14: i810DeleteTexture
static void i810DeleteTexture( GLcontext *ctx, struct gl_texture_object *tObj )
{
driTextureObject * t = (driTextureObject *) tObj->DriverData;
if (t) {
i810ContextPtr imesa = I810_CONTEXT( ctx );
if (imesa)
I810_FIREVERTICES( imesa );
driDestroyTextureObject( t );
}
}
示例15: i810ClearColor
static void i810ClearColor(struct gl_context *ctx, const GLfloat color[4] )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
GLubyte c[4];
CLAMPED_FLOAT_TO_UBYTE(c[0], color[0]);
CLAMPED_FLOAT_TO_UBYTE(c[1], color[1]);
CLAMPED_FLOAT_TO_UBYTE(c[2], color[2]);
CLAMPED_FLOAT_TO_UBYTE(c[3], color[3]);
imesa->ClearColor = i810PackColor( imesa->i810Screen->fbFormat,
c[0], c[1], c[2], c[3] );
}