本文整理汇总了C++中I810_CONTEXT函数的典型用法代码示例。如果您正苦于以下问题:C++ I810_CONTEXT函数的具体用法?C++ I810_CONTEXT怎么用?C++ I810_CONTEXT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了I810_CONTEXT函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: i810BlendFuncSeparate
static void i810BlendFuncSeparate( GLcontext *ctx, GLenum sfactorRGB,
GLenum dfactorRGB, GLenum sfactorA,
GLenum dfactorA )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
GLuint a = SDM_UPDATE_SRC_BLEND | SDM_UPDATE_DST_BLEND;
GLboolean fallback = GL_FALSE;
switch (ctx->Color.BlendSrcRGB) {
case GL_ZERO: a |= SDM_SRC_ZERO; break;
case GL_SRC_ALPHA: a |= SDM_SRC_SRC_ALPHA; break;
case GL_ONE: a |= SDM_SRC_ONE; break;
case GL_DST_COLOR: a |= SDM_SRC_DST_COLOR; break;
case GL_ONE_MINUS_DST_COLOR: a |= SDM_SRC_INV_DST_COLOR; break;
case GL_ONE_MINUS_SRC_ALPHA: a |= SDM_SRC_INV_SRC_ALPHA; break;
case GL_DST_ALPHA: a |= SDM_SRC_ONE; break;
case GL_ONE_MINUS_DST_ALPHA: a |= SDM_SRC_ZERO; break;
case GL_SRC_ALPHA_SATURATE: /*a |= SDM_SRC_SRC_ALPHA; break;*/
case GL_CONSTANT_COLOR:
case GL_ONE_MINUS_CONSTANT_COLOR:
case GL_CONSTANT_ALPHA:
case GL_ONE_MINUS_CONSTANT_ALPHA:
fallback = GL_TRUE;
break;
default:
return;
}
switch (ctx->Color.BlendDstRGB) {
case GL_SRC_ALPHA: a |= SDM_DST_SRC_ALPHA; break;
case GL_ONE_MINUS_SRC_ALPHA: a |= SDM_DST_INV_SRC_ALPHA; break;
case GL_ZERO: a |= SDM_DST_ZERO; break;
case GL_ONE: a |= SDM_DST_ONE; break;
case GL_SRC_COLOR: a |= SDM_DST_SRC_COLOR; break;
case GL_ONE_MINUS_SRC_COLOR: a |= SDM_DST_INV_SRC_COLOR; break;
case GL_DST_ALPHA: a |= SDM_DST_ONE; break;
case GL_ONE_MINUS_DST_ALPHA: a |= SDM_DST_ZERO; break;
case GL_CONSTANT_COLOR:
case GL_ONE_MINUS_CONSTANT_COLOR:
case GL_CONSTANT_ALPHA:
case GL_ONE_MINUS_CONSTANT_ALPHA:
fallback = GL_TRUE;
break;
default:
return;
}
FALLBACK( imesa, I810_FALLBACK_BLEND_FUNC, fallback);
if (!fallback) {
I810_STATECHANGE(imesa, I810_UPLOAD_CTX);
imesa->Setup[I810_CTXREG_SDM] &= ~(SDM_SRC_MASK|SDM_DST_MASK);
imesa->Setup[I810_CTXREG_SDM] |= a;
}
}
开发者ID:BackupTheBerlios,项目名称:dri-ex-svn,代码行数:54,代码来源:i810state.c
示例17: i810LightModelfv
/* Seperate specular not fully implemented on the i810.
*/
static void i810LightModelfv(struct gl_context *ctx, GLenum pname,
const GLfloat *param)
{
if (pname == GL_LIGHT_MODEL_COLOR_CONTROL)
{
i810ContextPtr imesa = I810_CONTEXT( ctx );
FALLBACK( imesa, I810_FALLBACK_SPECULAR,
(ctx->Light.Enabled &&
ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR));
}
}
开发者ID:nikai3d,项目名称:mesa,代码行数:13,代码来源:i810state.c
示例18: i810InitStateFuncs
void i810InitStateFuncs(GLcontext *ctx)
{
/* Callbacks for internal Mesa events.
*/
ctx->Driver.UpdateState = i810InvalidateState;
/* API callbacks
*/
ctx->Driver.AlphaFunc = i810AlphaFunc;
ctx->Driver.BlendEquationSeparate = i810BlendEquationSeparate;
ctx->Driver.BlendFuncSeparate = i810BlendFuncSeparate;
ctx->Driver.ClearColor = i810ClearColor;
ctx->Driver.ColorMask = i810ColorMask;
ctx->Driver.CullFace = i810CullFaceFrontFace;
ctx->Driver.DepthFunc = i810DepthFunc;
ctx->Driver.DepthMask = i810DepthMask;
ctx->Driver.Enable = i810Enable;
ctx->Driver.Fogfv = i810Fogfv;
ctx->Driver.FrontFace = i810CullFaceFrontFace;
ctx->Driver.LineWidth = i810LineWidth;
ctx->Driver.LogicOpcode = i810LogicOp;
ctx->Driver.PolygonStipple = i810PolygonStipple;
ctx->Driver.RenderMode = i810RenderMode;
ctx->Driver.Scissor = i810Scissor;
ctx->Driver.DrawBuffer = i810DrawBuffer;
ctx->Driver.ReadBuffer = i810ReadBuffer;
ctx->Driver.ShadeModel = i810ShadeModel;
ctx->Driver.DepthRange = i810DepthRange;
ctx->Driver.Viewport = i810Viewport;
ctx->Driver.PointSize = i810PointSize;
if (IS_I815(I810_CONTEXT(ctx))) {
ctx->Driver.LightModelfv = i810LightModelfv_i815;
} else {
ctx->Driver.LightModelfv = i810LightModelfv;
}
/* Pixel path fallbacks.
*/
ctx->Driver.Accum = _swrast_Accum;
ctx->Driver.Bitmap = _swrast_Bitmap;
ctx->Driver.CopyPixels = _swrast_CopyPixels;
ctx->Driver.DrawPixels = _swrast_DrawPixels;
ctx->Driver.ReadPixels = _swrast_ReadPixels;
/* Swrast hooks for imaging extensions:
*/
ctx->Driver.CopyColorTable = _swrast_CopyColorTable;
ctx->Driver.CopyColorSubTable = _swrast_CopyColorSubTable;
ctx->Driver.CopyConvolutionFilter1D = _swrast_CopyConvolutionFilter1D;
ctx->Driver.CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D;
}
开发者ID:BackupTheBerlios,项目名称:dri-ex-svn,代码行数:52,代码来源:i810state.c
示例19: i810Fogfv
/* =============================================================
* Fog
*/
static void i810Fogfv(struct gl_context *ctx, GLenum pname, const GLfloat *param)
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
if (pname == GL_FOG_COLOR) {
GLuint color = (((GLubyte)(ctx->Fog.Color[0]*255.0F) << 16) |
((GLubyte)(ctx->Fog.Color[1]*255.0F) << 8) |
((GLubyte)(ctx->Fog.Color[2]*255.0F) << 0));
I810_STATECHANGE(imesa, I810_UPLOAD_CTX);
imesa->Setup[I810_CTXREG_FOG] = ((GFX_OP_FOG_COLOR | color) &
~FOG_RESERVED_MASK);
}
}
开发者ID:nikai3d,项目名称:mesa,代码行数:17,代码来源:i810state.c
示例20: i810LightModelfv_i815
/* But the 815 has it...
*/
static void i810LightModelfv_i815(struct gl_context *ctx, GLenum pname,
const GLfloat *param)
{
if (pname == GL_LIGHT_MODEL_COLOR_CONTROL)
{
i810ContextPtr imesa = I810_CONTEXT( ctx );
I810_STATECHANGE(imesa, I810_UPLOAD_CTX);
if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)
imesa->Setup[I810_CTXREG_B1] |= B1_SPEC_ENABLE;
else
imesa->Setup[I810_CTXREG_B1] &= ~B1_SPEC_ENABLE;
}
}
开发者ID:nikai3d,项目名称:mesa,代码行数:16,代码来源:i810state.c
注:本文中的I810_CONTEXT函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论