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


C++ TDFX_CONTEXT函数代码示例

本文整理汇总了C++中TDFX_CONTEXT函数的典型用法代码示例。如果您正苦于以下问题:C++ TDFX_CONTEXT函数的具体用法?C++ TDFX_CONTEXT怎么用?C++ TDFX_CONTEXT使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了TDFX_CONTEXT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: copy_pv

static void copy_pv( GLcontext *ctx, GLuint edst, GLuint esrc )
{
    tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );
    tdfxVertex *dst = fxMesa->verts + edst;
    tdfxVertex *src = fxMesa->verts + esrc;
    *(GLuint *)&dst->color = *(GLuint *)&src->color;
}
开发者ID:emcmanus,项目名称:FlashMesa3D,代码行数:7,代码来源:tdfx_vb.c

示例2: tdfxDDDepthFunc

static void tdfxDDDepthFunc( GLcontext *ctx, GLenum func )
{
   tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );

   FLUSH_BATCH( fxMesa );
   fxMesa->new_state |= TDFX_NEW_DEPTH;
}
开发者ID:AchironOS,项目名称:chromium.src,代码行数:7,代码来源:tdfx_state.c

示例3: tdfxCheckTexSizes

void tdfxCheckTexSizes( GLcontext *ctx )
{
    TNLcontext *tnl = TNL_CONTEXT(ctx);
    tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );

    if (!setup_tab[fxMesa->SetupIndex].check_tex_sizes(ctx)) {
        GLuint ind = fxMesa->SetupIndex |= (TDFX_PTEX_BIT|TDFX_RGBA_BIT);

        /* Tdfx handles projective textures nicely; just have to change
         * up to the new vertex format.
         */
        if (setup_tab[ind].vertex_format != fxMesa->vertexFormat) {
            FLUSH_BATCH(fxMesa);
            fxMesa->dirty |= TDFX_UPLOAD_VERTEX_LAYOUT;
            fxMesa->vertexFormat = setup_tab[ind].vertex_format;

            /* This is required as we have just changed the vertex
             * format, so the interp and copy routines must also change.
             * In the unfilled and twosided cases we are using the
             * swrast_setup ones anyway, so leave them in place.
             */
            if (!(ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_TRI_UNFILLED))) {
                tnl->Driver.Render.Interp = setup_tab[fxMesa->SetupIndex].interp;
                tnl->Driver.Render.CopyPV = setup_tab[fxMesa->SetupIndex].copy_pv;
            }
        }
    }
}
开发者ID:emcmanus,项目名称:FlashMesa3D,代码行数:28,代码来源:tdfx_vb.c

示例4: tdfxDDStencilMask

static void tdfxDDStencilMask( GLcontext *ctx, GLuint mask )
{
   tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);

   FLUSH_BATCH( fxMesa );
   fxMesa->new_state |= TDFX_NEW_STENCIL;
}
开发者ID:BackupTheBerlios,项目名称:dri-ex-svn,代码行数:7,代码来源:tdfx_state.c

示例5: tdfxDDFrontFace

static void tdfxDDFrontFace( GLcontext *ctx, GLenum mode )
{
   tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );

   FLUSH_BATCH( fxMesa );
   fxMesa->new_state |= TDFX_NEW_CULL;
}
开发者ID:AchironOS,项目名称:chromium.src,代码行数:7,代码来源:tdfx_state.c

示例6: tdfxDDDepthMask

static void tdfxDDDepthMask( GLcontext *ctx, GLboolean flag )
{
   tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );

   FLUSH_BATCH( fxMesa );
   fxMesa->new_state |= TDFX_NEW_DEPTH;
}
开发者ID:AchironOS,项目名称:chromium.src,代码行数:7,代码来源:tdfx_state.c

示例7: tdfxDDClearDepth

static void tdfxDDClearDepth( GLcontext *ctx, GLclampd d )
{
   tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );

   FLUSH_BATCH( fxMesa );
   fxMesa->new_state |= TDFX_NEW_DEPTH;
}
开发者ID:AchironOS,项目名称:chromium.src,代码行数:7,代码来源:tdfx_state.c

示例8: tdfxDDFogfv

static void tdfxDDFogfv( GLcontext *ctx, GLenum pname, const GLfloat *param )
{
   tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);

   FLUSH_BATCH( fxMesa );
   fxMesa->new_state |= TDFX_NEW_FOG;

   switch (pname) {
      case GL_FOG_COORDINATE_SOURCE_EXT: {
         GLenum p = (GLenum)*param;
         if (p == GL_FOG_COORDINATE_EXT) {
            _swrast_allow_vertex_fog(ctx, GL_TRUE);
            _swrast_allow_pixel_fog(ctx, GL_FALSE);
            _tnl_allow_vertex_fog( ctx, GL_TRUE);
            _tnl_allow_pixel_fog( ctx, GL_FALSE);
         } else {
            _swrast_allow_vertex_fog(ctx, GL_FALSE);
            _swrast_allow_pixel_fog(ctx, GL_TRUE);
            _tnl_allow_vertex_fog( ctx, GL_FALSE);
            _tnl_allow_pixel_fog( ctx, GL_TRUE);
         }
         break;
      }
      default:
         ;
   }
}
开发者ID:AchironOS,项目名称:chromium.src,代码行数:27,代码来源:tdfx_state.c

示例9: tdfxDDAlphaFunc

static void tdfxDDAlphaFunc( GLcontext *ctx, GLenum func, GLfloat ref )
{
   tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );

   FLUSH_BATCH( fxMesa );
   fxMesa->new_state |= TDFX_NEW_ALPHA;
}
开发者ID:AchironOS,项目名称:chromium.src,代码行数:7,代码来源:tdfx_state.c

示例10: tdfxDDScissor

static void
tdfxDDScissor(GLcontext * ctx, GLint x, GLint y, GLsizei w, GLsizei h)
{
   tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
   FLUSH_BATCH( fxMesa );
   fxMesa->new_state |= TDFX_NEW_CLIP;
}
开发者ID:AchironOS,项目名称:chromium.src,代码行数:7,代码来源:tdfx_state.c

示例11: tdfxDDColorMask

static void tdfxDDColorMask( GLcontext *ctx,
			     GLboolean r, GLboolean g,
			     GLboolean b, GLboolean a )
{
   tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);

   FLUSH_BATCH( fxMesa );

   if ( fxMesa->Color.ColorMask[RCOMP] != r ||
	fxMesa->Color.ColorMask[GCOMP] != g ||
	fxMesa->Color.ColorMask[BCOMP] != b ||
	fxMesa->Color.ColorMask[ACOMP] != a ) {
      fxMesa->Color.ColorMask[RCOMP] = r;
      fxMesa->Color.ColorMask[GCOMP] = g;
      fxMesa->Color.ColorMask[BCOMP] = b;
      fxMesa->Color.ColorMask[ACOMP] = a;
      fxMesa->dirty |= TDFX_UPLOAD_COLOR_MASK;

      if (ctx->Visual.redBits < 8) {
         /* Can't do RGB colormasking in 16bpp mode. */
         /* We can completely ignore the alpha mask. */
	 FALLBACK( fxMesa, TDFX_FALLBACK_COLORMASK, (r != g || g != b) );
      }
   }
}
开发者ID:AchironOS,项目名称:chromium.src,代码行数:25,代码来源:tdfx_state.c

示例12: tdfxDDDrawBuffer

/* XXX support for separate read/draw buffers hasn't been tested */
static void tdfxDDDrawBuffer( GLcontext *ctx, GLenum mode )
{
   tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);

   if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) {
      fprintf( stderr, "%s()\n", __FUNCTION__ );
   }

   FLUSH_BATCH( fxMesa );

   if (ctx->DrawBuffer->_NumColorDrawBuffers > 1) {
      FALLBACK( fxMesa, TDFX_FALLBACK_DRAW_BUFFER, GL_TRUE );
      return;
   }

   switch ( ctx->DrawBuffer->_ColorDrawBufferIndexes[0] ) {
   case BUFFER_FRONT_LEFT:
      fxMesa->DrawBuffer = fxMesa->ReadBuffer = GR_BUFFER_FRONTBUFFER;
      fxMesa->new_state |= TDFX_NEW_RENDER;
      FALLBACK( fxMesa, TDFX_FALLBACK_DRAW_BUFFER, GL_FALSE );
      break;
   case BUFFER_BACK_LEFT:
      fxMesa->DrawBuffer = fxMesa->ReadBuffer = GR_BUFFER_BACKBUFFER;
      fxMesa->new_state |= TDFX_NEW_RENDER;
      FALLBACK( fxMesa, TDFX_FALLBACK_DRAW_BUFFER, GL_FALSE );
      break;
   case -1:
      FX_grColorMaskv( ctx, false4 );
      FALLBACK( fxMesa, TDFX_FALLBACK_DRAW_BUFFER, GL_FALSE );
      break;
   default:
      FALLBACK( fxMesa, TDFX_FALLBACK_DRAW_BUFFER, GL_TRUE );
      break;
   }
}
开发者ID:AchironOS,项目名称:chromium.src,代码行数:36,代码来源:tdfx_state.c

示例13: tdfxEndQuery

static void
tdfxEndQuery(GLcontext *ctx, struct gl_query_object *q)
{
   tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
   FxI32 total_pixels;
   FxI32 z_fail_pixels;


   if (q->Target == GL_SAMPLES_PASSED_ARB) {
      LOCK_HARDWARE(fxMesa);
      fxMesa->Glide.grFinish();

      fxMesa->Glide.grGet(GR_STATS_PIXELS_DEPTHFUNC_FAIL, sizeof(FxI32),
			  &z_fail_pixels);
      fxMesa->Glide.grGet(GR_STATS_PIXELS_IN, sizeof(FxI32), &total_pixels);

      q->Result = total_pixels - z_fail_pixels;
      
      /* Apparently, people have seen z_fail_pixels > total_pixels under
       * some conditions on some 3Dfx hardware.  The occlusion query spec
       * requires that we clamp to 0.
       */
      if (q->Result < 0) {
	 q->Result = 0;
      }

      q->Ready = GL_TRUE;

      UNLOCK_HARDWARE(fxMesa);
   }
}
开发者ID:emcmanus,项目名称:FlashMesa3D,代码行数:31,代码来源:tdfx_dd.c

示例14: tdfxDDViewport

static void tdfxDDViewport( GLcontext *ctx, GLint x, GLint y,
			    GLsizei w, GLsizei h )
{
   tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
   FLUSH_BATCH( fxMesa );
   fxMesa->new_state |= TDFX_NEW_VIEWPORT;
}
开发者ID:AchironOS,项目名称:chromium.src,代码行数:7,代码来源:tdfx_state.c

示例15: tdfxDDInvalidateState

static void tdfxDDInvalidateState( GLcontext *ctx, GLuint new_state )
{
   _swrast_InvalidateState( ctx, new_state );
   _swsetup_InvalidateState( ctx, new_state );
   _vbo_InvalidateState( ctx, new_state );
   _tnl_InvalidateState( ctx, new_state );
   TDFX_CONTEXT(ctx)->new_gl_state |= new_state;
}
开发者ID:AchironOS,项目名称:chromium.src,代码行数:8,代码来源:tdfx_state.c


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