当前位置: 首页>>代码示例>>C++>>正文


C++ I810_CONTEXT函数代码示例

本文整理汇总了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);

}
开发者ID:aosm,项目名称:X11,代码行数:27,代码来源:i810tex.c

示例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;
}
开发者ID:GunioRobot,项目名称:mesa-7.10.2-PS3,代码行数:42,代码来源:i810texstate.c

示例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;
}
开发者ID:nikai3d,项目名称:mesa,代码行数:26,代码来源:i810state.c

示例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));
}
开发者ID:nikai3d,项目名称:mesa,代码行数:16,代码来源:i810state.c

示例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 );
}
开发者ID:Multi2Sim,项目名称:m2s-bench-parsec-3.0-src,代码行数:9,代码来源:i810span.c

示例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 );

}
开发者ID:aosm,项目名称:X11,代码行数:25,代码来源:i810tex.c

示例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;
}
开发者ID:nikai3d,项目名称:mesa,代码行数:8,代码来源:i810state.c

示例8: i810FreeVB

void i810FreeVB( GLcontext *ctx )
{
   i810ContextPtr imesa = I810_CONTEXT(ctx);
   if (imesa->verts) {
      ALIGN_FREE(imesa->verts);
      imesa->verts = 0;
   }
}
开发者ID:emcmanus,项目名称:FlashMesa3D,代码行数:8,代码来源:i810vb.c

示例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); 
  
}
开发者ID:GunioRobot,项目名称:mesa-7.10.2-PS3,代码行数:9,代码来源:i810texstate.c

示例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;
}
开发者ID:nikai3d,项目名称:mesa,代码行数:11,代码来源:i810state.c

示例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];
}
开发者ID:GunioRobot,项目名称:mesa-7.10.2-PS3,代码行数:9,代码来源:t_dd.c

示例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));
}
开发者ID:emcmanus,项目名称:FlashMesa3D,代码行数:10,代码来源:i810vb.c

示例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;
}
开发者ID:nikai3d,项目名称:mesa,代码行数:10,代码来源:i810state.c

示例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 );
   }
}
开发者ID:aosm,项目名称:X11,代码行数:10,代码来源:i810tex.c

示例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] );
}
开发者ID:nikai3d,项目名称:mesa,代码行数:11,代码来源:i810state.c


注:本文中的I810_CONTEXT函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。