• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ ASSIGN_4V函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: _mesa_ProgramEnvParameter4fARB

/**
 * Set a program env parameter register.
 * \note Called from the GL API dispatcher.
 * Note, this function is also used by the GL_NV_vertex_program extension
 * (alias to ProgramParameterfNV)
 */
void GLAPIENTRY
_mesa_ProgramEnvParameter4fARB(GLenum target, GLuint index,
                               GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
   GET_CURRENT_CONTEXT(ctx);
   ASSERT_OUTSIDE_BEGIN_END(ctx);

   FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS);

   if (target == GL_FRAGMENT_PROGRAM_ARB
       && ctx->Extensions.ARB_fragment_program) {
      if (index >= ctx->Const.FragmentProgram.MaxEnvParams) {
         _mesa_error(ctx, GL_INVALID_VALUE, "glProgramEnvParameter(index)");
         return;
      }
      ASSIGN_4V(ctx->FragmentProgram.Parameters[index], x, y, z, w);
   }
   else if (target == GL_VERTEX_PROGRAM_ARB /* == GL_VERTEX_PROGRAM_NV */
       && (ctx->Extensions.ARB_vertex_program || ctx->Extensions.NV_vertex_program)) {
      if (index >= ctx->Const.VertexProgram.MaxEnvParams) {
         _mesa_error(ctx, GL_INVALID_VALUE, "glProgramEnvParameter(index)");
         return;
      }
      ASSIGN_4V(ctx->VertexProgram.Parameters[index], x, y, z, w);
   }
   else {
      _mesa_error(ctx, GL_INVALID_ENUM, "glProgramEnvParameter(target)");
      return;
   }
}
开发者ID:MttDs,项目名称:new-rexeno-tindpe,代码行数:36,代码来源:arbprogram.c


示例2: _mesa_init_vp_registers

/**
 * Load/initialize the vertex program registers.
 * This needs to be done per vertex.
 */
void
_mesa_init_vp_registers(GLcontext *ctx)
{
   GLuint i;

   /* Input registers get initialized from the current vertex attribs */
   MEMCPY(ctx->VertexProgram.Inputs, ctx->Current.Attrib,
          VERT_ATTRIB_MAX * 4 * sizeof(GLfloat));

   /* Output and temp regs are initialized to [0,0,0,1] */
   for (i = 0; i < MAX_NV_VERTEX_PROGRAM_OUTPUTS; i++) {
      ASSIGN_4V(ctx->VertexProgram.Outputs[i], 0.0F, 0.0F, 0.0F, 1.0F);
   }
   for (i = 0; i < MAX_NV_VERTEX_PROGRAM_TEMPS; i++) {
      ASSIGN_4V(ctx->VertexProgram.Temporaries[i], 0.0F, 0.0F, 0.0F, 1.0F);
   }

   /* The program parameters aren't touched */
   /* XXX: This should be moved to glBegin() time, but its safe (and slow!) 
    * here - Karl
    */
   if (ctx->VertexProgram.Current->Parameters) {
      /* Grab the state GL state and put into registers */
      _mesa_load_state_parameters(ctx, ctx->VertexProgram.Current->Parameters);
   }
}
开发者ID:basecq,项目名称:q2dos,代码行数:30,代码来源:nvvertexec.c


示例3: _mesa_init_rastpos

/**
 * Initialize the context current raster position information.
 *
 * \param ctx GL context.
 *
 * Initialize the current raster position information in
 * __struct gl_contextRec::Current, and adds the extension entry points to the
 * dispatcher.
 */
void _mesa_init_rastpos( struct gl_context * ctx )
{
   ASSIGN_4V( ctx->Current.RasterPos, 0.0, 0.0, 0.0, 1.0 );
   ctx->Current.RasterDistance = 0.0;
   ASSIGN_4V( ctx->Current.RasterColor, 1.0, 1.0, 1.0, 1.0 );
   ASSIGN_4V( ctx->Current.RasterTexCoords, 0.0, 0.0, 0.0, 1.0 );
   ctx->Current.RasterPosValid = GL_TRUE;
}
开发者ID:GYGit,项目名称:reactos,代码行数:17,代码来源:rastpos.c


示例4: _mesa_init_rastpos

/**
 * Initialize the context current raster position information.
 *
 * \param ctx GL context.
 *
 * Initialize the current raster position information in
 * __struct gl_contextRec::Current, and adds the extension entry points to the
 * dispatcher.
 */
void _mesa_init_rastpos( struct gl_context * ctx )
{
   unsigned i;

   ASSIGN_4V( ctx->Current.RasterPos, 0.0, 0.0, 0.0, 1.0 );
   ctx->Current.RasterDistance = 0.0;
   ASSIGN_4V( ctx->Current.RasterColor, 1.0, 1.0, 1.0, 1.0 );
   ASSIGN_4V( ctx->Current.RasterSecondaryColor, 0.0, 0.0, 0.0, 1.0 );
   for (i = 0; i < ARRAY_SIZE(ctx->Current.RasterTexCoords); i++)
      ASSIGN_4V( ctx->Current.RasterTexCoords[i], 0.0, 0.0, 0.0, 1.0 );
   ctx->Current.RasterPosValid = GL_TRUE;
}
开发者ID:mdaniel,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:21,代码来源:rastpos.c


示例5: _mesa_init_rastpos

/**
 * Initialize the context current raster position information.
 *
 * \param ctx GL context.
 *
 * Initialize the current raster position information in
 * __GLcontextRec::Current, and adds the extension entry points to the
 * dispatcher.
 */
void _mesa_init_rastpos( GLcontext * ctx )
{
   int i;

   ASSIGN_4V( ctx->Current.RasterPos, 0.0, 0.0, 0.0, 1.0 );
   ctx->Current.RasterDistance = 0.0;
   ASSIGN_4V( ctx->Current.RasterColor, 1.0, 1.0, 1.0, 1.0 );
   ASSIGN_4V( ctx->Current.RasterSecondaryColor, 0.0, 0.0, 0.0, 1.0 );
   ctx->Current.RasterIndex = 1.0;
   for (i=0; i<MAX_TEXTURE_UNITS; i++)
      ASSIGN_4V( ctx->Current.RasterTexCoords[i], 0.0, 0.0, 0.0, 1.0 );
   ctx->Current.RasterPosValid = GL_TRUE;
}
开发者ID:astrofimov,项目名称:vgallium,代码行数:22,代码来源:rastpos.c


示例6: _mesa_init_color

/**
 * Initialization of the context's Color attribute group.
 *
 * \param ctx GL context.
 *
 * Initializes the related fields in the context color attribute group,
 * __struct gl_contextRec::Color.
 */
void _mesa_init_color( struct gl_context * ctx )
{
   GLuint i;

   /* Color buffer group */
   ctx->Color.IndexMask = ~0u;
   memset(ctx->Color.ColorMask, 0xff, sizeof(ctx->Color.ColorMask));
   ctx->Color.ClearIndex = 0;
   ASSIGN_4V( ctx->Color.ClearColor.f, 0, 0, 0, 0 );
   ctx->Color.AlphaEnabled = GL_FALSE;
   ctx->Color.AlphaFunc = GL_ALWAYS;
   ctx->Color.AlphaRef = 0;
   ctx->Color.BlendEnabled = 0x0;
   for (i = 0; i < ARRAY_SIZE(ctx->Color.Blend); i++) {
      ctx->Color.Blend[i].SrcRGB = GL_ONE;
      ctx->Color.Blend[i].DstRGB = GL_ZERO;
      ctx->Color.Blend[i].SrcA = GL_ONE;
      ctx->Color.Blend[i].DstA = GL_ZERO;
      ctx->Color.Blend[i].EquationRGB = GL_FUNC_ADD;
      ctx->Color.Blend[i].EquationA = GL_FUNC_ADD;
   }
   ASSIGN_4V( ctx->Color.BlendColor, 0.0, 0.0, 0.0, 0.0 );
   ASSIGN_4V( ctx->Color.BlendColorUnclamped, 0.0, 0.0, 0.0, 0.0 );
   ctx->Color.IndexLogicOpEnabled = GL_FALSE;
   ctx->Color.ColorLogicOpEnabled = GL_FALSE;
   ctx->Color.LogicOp = GL_COPY;
   ctx->Color.DitherFlag = GL_TRUE;

   /* GL_FRONT is not possible on GLES. Instead GL_BACK will render to either
    * the front or the back buffer depending on the config */
   if (ctx->Visual.doubleBufferMode || _mesa_is_gles(ctx)) {
      ctx->Color.DrawBuffer[0] = GL_BACK;
   }
   else {
      ctx->Color.DrawBuffer[0] = GL_FRONT;
   }

   ctx->Color.ClampFragmentColor = ctx->API == API_OPENGL_COMPAT ?
                                   GL_FIXED_ONLY_ARB : GL_FALSE;
   ctx->Color._ClampFragmentColor = GL_FALSE;
   ctx->Color.ClampReadColor = GL_FIXED_ONLY_ARB;

   /* GLES 1/2/3 behaves as though GL_FRAMEBUFFER_SRGB is always enabled
    * if EGL_KHR_gl_colorspace has been used to request sRGB.
    */
   ctx->Color.sRGBEnabled = _mesa_is_gles(ctx);

   ctx->Color.BlendCoherent = true;
}
开发者ID:etnaviv,项目名称:mesa,代码行数:57,代码来源:blend.c


示例7: _mesa_init_fog

void _mesa_init_fog( struct gl_context * ctx )
{
   /* Fog group */
   ctx->Fog.Enabled = GL_FALSE;
   ctx->Fog.Mode = GL_EXP;
   ASSIGN_4V( ctx->Fog.Color, 0.0, 0.0, 0.0, 0.0 );
   ASSIGN_4V( ctx->Fog.ColorUnclamped, 0.0, 0.0, 0.0, 0.0 );
   ctx->Fog.Index = 0.0;
   ctx->Fog.Density = 1.0;
   ctx->Fog.Start = 0.0;
   ctx->Fog.End = 1.0;
   ctx->Fog.ColorSumEnabled = GL_FALSE;
   ctx->Fog.FogCoordinateSource = GL_FRAGMENT_DEPTH_EXT;
   ctx->Fog._Scale = 1.0f;
   ctx->Fog.FogDistanceMode = GL_EYE_PLANE_ABSOLUTE_NV;
}
开发者ID:FASTCHIP,项目名称:kernel_3.4.67_lenovo_s939_mtk6592,代码行数:16,代码来源:fog.c


示例8: _mesa_Fogiv

void GLAPIENTRY
_mesa_Fogiv(GLenum pname, const GLint *params )
{
   GLfloat p[4];
   switch (pname) {
      case GL_FOG_MODE:
      case GL_FOG_DENSITY:
      case GL_FOG_START:
      case GL_FOG_END:
      case GL_FOG_INDEX:
      case GL_FOG_COORDINATE_SOURCE_EXT:
	 p[0] = (GLfloat) *params;
	 break;
      case GL_FOG_COLOR:
	 p[0] = INT_TO_FLOAT( params[0] );
	 p[1] = INT_TO_FLOAT( params[1] );
	 p[2] = INT_TO_FLOAT( params[2] );
	 p[3] = INT_TO_FLOAT( params[3] );
	 break;
      default:
         /* Error will be caught later in _mesa_Fogfv */
         ASSIGN_4V(p, 0.0F, 0.0F, 0.0F, 0.0F);
   }
   _mesa_Fogfv(pname, p);
}
开发者ID:chemecse,项目名称:mesa,代码行数:25,代码来源:fog.c


示例9: _mesa_init_transform

/** 
 * Initialize the context transform attribute group.
 *
 * \param ctx GL context.
 *
 * \todo Move this to a new file with other 'transform' routines.
 */
void _mesa_init_transform( GLcontext *ctx )
{
   GLint i;

   /* Transformation group */
   ctx->Transform.MatrixMode = GL_MODELVIEW;
   ctx->Transform.Normalize = GL_FALSE;
   ctx->Transform.RescaleNormals = GL_FALSE;
   ctx->Transform.RasterPositionUnclipped = GL_FALSE;
   for (i=0;i<MAX_CLIP_PLANES;i++) {
      ASSIGN_4V( ctx->Transform.EyeUserPlane[i], 0.0, 0.0, 0.0, 0.0 );
   }
   ctx->Transform.ClipPlanesEnabled = 0;

   ASSIGN_4V( ctx->Transform.CullObjPos, 0.0, 0.0, 1.0, 0.0 );
   ASSIGN_4V( ctx->Transform.CullEyePos, 0.0, 0.0, 1.0, 0.0 );
}
开发者ID:mariuz,项目名称:haiku,代码行数:24,代码来源:matrix.c


示例10: _mesa_noop_VertexAttrib2fNV

static void GLAPIENTRY _mesa_noop_VertexAttrib2fNV( GLuint index, GLfloat x, GLfloat y )
{
   GET_CURRENT_CONTEXT(ctx);
   if (index < MAX_NV_VERTEX_PROGRAM_INPUTS) {
      ASSIGN_4V(ctx->Current.Attrib[index], x, y, 0, 1);
   }
   else
      _mesa_error( ctx, GL_INVALID_VALUE, "glVertexAttrib2fNV(index)" );
}
开发者ID:AchironOS,项目名称:chromium.src,代码行数:9,代码来源:api_noop.c


示例11: _mesa_noop_VertexAttrib2fARB

void GLAPIENTRY _mesa_noop_VertexAttrib2fARB( GLuint index, GLfloat x, GLfloat y )
{
   GET_CURRENT_CONTEXT(ctx);
   if (index < VERT_ATTRIB_MAX) {
      ASSIGN_4V(ctx->Current.Attrib[index], x, y, 0, 1);
   }
   else
      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib2fARB" );
}
开发者ID:Magister,项目名称:x11rdp_xorg71,代码行数:9,代码来源:api_noop.c


示例12: _mesa_noop_VertexAttrib4fvARB

void GLAPIENTRY _mesa_noop_VertexAttrib4fvARB( GLuint index, const GLfloat *v )
{
   GET_CURRENT_CONTEXT(ctx);
   if (index < VERT_ATTRIB_MAX) {
      ASSIGN_4V(ctx->Current.Attrib[index], v[0], v[1], v[2], v[3]);
   }
   else
      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib4fvARB" );
}
开发者ID:Magister,项目名称:x11rdp_xorg71,代码行数:9,代码来源:api_noop.c


示例13: _mesa_noop_VertexAttrib4fvNV

static void GLAPIENTRY _mesa_noop_VertexAttrib4fvNV( GLuint index, const GLfloat *v )
{
   GET_CURRENT_CONTEXT(ctx);
   if (index < MAX_NV_VERTEX_PROGRAM_INPUTS) {
      ASSIGN_4V(ctx->Current.Attrib[index], v[0], v[1], v[2], v[3]);
   }
   else
      _mesa_error( ctx, GL_INVALID_VALUE, "glVertexAttrib4fvNV(index)" );
}
开发者ID:AchironOS,项目名称:chromium.src,代码行数:9,代码来源:api_noop.c


示例14: _mesa_noop_VertexAttrib4fvARB

static void GLAPIENTRY _mesa_noop_VertexAttrib4fvARB( GLuint index, const GLfloat *v )
{
   GET_CURRENT_CONTEXT(ctx);
   if (index < MAX_VERTEX_GENERIC_ATTRIBS) {
      ASSIGN_4V(ctx->Current.Attrib[VERT_ATTRIB_GENERIC0 + index], v[0], v[1], v[2], v[3]);
   }
   else
      _mesa_error( ctx, GL_INVALID_VALUE, "glVertexAttrib4fvARB(index)" );
}
开发者ID:AchironOS,项目名称:chromium.src,代码行数:9,代码来源:api_noop.c


示例15: _mesa_noop_VertexAttrib2fARB

static void GLAPIENTRY _mesa_noop_VertexAttrib2fARB( GLuint index, GLfloat x, GLfloat y )
{
   GET_CURRENT_CONTEXT(ctx);
   if (index < MAX_VERTEX_ATTRIBS) {
      ASSIGN_4V(ctx->Current.Attrib[VERT_ATTRIB_GENERIC0 + index], x, y, 0, 1);
   }
   else
      _mesa_error( ctx, GL_INVALID_VALUE, "glVertexAttrib2fARB(index)" );
}
开发者ID:Starlink,项目名称:mesa,代码行数:9,代码来源:api_noop.c


示例16: vbo_exec_do_EvalCoord1f

void vbo_exec_do_EvalCoord1f(struct vbo_exec_context *exec, GLfloat u)
{
    GLuint attr;

    for (attr = 1; attr <= VBO_ATTRIB_TEX7; attr++) {
        struct gl_1d_map *map = exec->eval.map1[attr].map;
        if (map) {
            GLfloat uu = (u - map->u1) * map->du;
            GLfloat data[4];

            ASSIGN_4V(data, 0, 0, 0, 1);

            _math_horner_bezier_curve(map->Points, data, uu,
                                      exec->eval.map1[attr].sz,
                                      map->Order);

            COPY_SZ_4V( exec->vtx.attrptr[attr],
                        exec->vtx.attrsz[attr],
                        data );
        }
    }

    /** Vertex -- EvalCoord1f is a noop if this map not enabled:
     **/
    if (exec->eval.map1[0].map) {
        struct gl_1d_map *map = exec->eval.map1[0].map;
        GLfloat uu = (u - map->u1) * map->du;
        GLfloat vertex[4];

        ASSIGN_4V(vertex, 0, 0, 0, 1);

        _math_horner_bezier_curve(map->Points, vertex, uu,
                                  exec->eval.map1[0].sz,
                                  map->Order);

        if (exec->eval.map1[0].sz == 4)
            CALL_Vertex4fv(GET_DISPATCH(), ( vertex ));
        else
            CALL_Vertex3fv(GET_DISPATCH(), ( vertex ));
    }
}
开发者ID:MaikuMori,项目名称:mesa,代码行数:41,代码来源:vbo_exec_eval.c


示例17: init_machine

/**
 * Initialize virtual machine state prior to executing vertex program.
 */
static void
init_machine(struct gl_context *ctx, struct gl_program_machine *machine,
             GLuint instID)
{
   /* Input registers get initialized from the current vertex attribs */
   memcpy(machine->VertAttribs, ctx->Current.Attrib,
          MAX_VERTEX_GENERIC_ATTRIBS * 4 * sizeof(GLfloat));

   if (ctx->VertexProgram._Current->IsNVProgram) {
      GLuint i;
      /* Output/result regs are initialized to [0,0,0,1] */
      for (i = 0; i < MAX_NV_VERTEX_PROGRAM_OUTPUTS; i++) {
         ASSIGN_4V(machine->Outputs[i], 0.0F, 0.0F, 0.0F, 1.0F);
      }
      /* Temp regs are initialized to [0,0,0,0] */
      for (i = 0; i < MAX_NV_VERTEX_PROGRAM_TEMPS; i++) {
         ASSIGN_4V(machine->Temporaries[i], 0.0F, 0.0F, 0.0F, 0.0F);
      }
      for (i = 0; i < MAX_VERTEX_PROGRAM_ADDRESS_REGS; i++) {
         ASSIGN_4V(machine->AddressReg[i], 0, 0, 0, 0);
      }
   }

   machine->NumDeriv = 0;

   /* init condition codes */
   machine->CondCodes[0] = COND_EQ;
   machine->CondCodes[1] = COND_EQ;
   machine->CondCodes[2] = COND_EQ;
   machine->CondCodes[3] = COND_EQ;

   /* init call stack */
   machine->StackDepth = 0;

   machine->FetchTexelLod = vp_fetch_texel;
   machine->FetchTexelDeriv = NULL; /* not used by vertex programs */

   machine->Samplers = ctx->VertexProgram._Current->Base.SamplerUnits;

   machine->SystemValues[SYSTEM_VALUE_INSTANCE_ID][0] = (GLfloat) instID;
}
开发者ID:FASTCHIP,项目名称:kernel_3.4.67_lenovo_s939_mtk6592,代码行数:44,代码来源:t_vb_program.c


示例18: meta_color_mask

static void meta_color_mask( struct intel_context *intel, GLboolean state )
{
   struct brw_context *brw = brw_context(&intel->ctx);

   if (state)
      COPY_4V(brw->metaops.attribs.Color->ColorMask, 
	      brw->intel.ctx.Color.ColorMask); 
   else
      ASSIGN_4V(brw->metaops.attribs.Color->ColorMask, 0, 0, 0, 0);

   brw->state.dirty.mesa |= _NEW_COLOR;
}
开发者ID:astrofimov,项目名称:vgallium,代码行数:12,代码来源:brw_metaops.c


示例19: _mesa_GetProgramLocalParameterdvARB

/**
 * Note, this function is also used by the GL_NV_fragment_program extension.
 */
void GLAPIENTRY
_mesa_GetProgramLocalParameterdvARB(GLenum target, GLuint index,
                                    GLdouble *params)
{
   GET_CURRENT_CONTEXT(ctx);
   GLfloat floatParams[4];
   ASSIGN_4V(floatParams, 0.0F, 0.0F, 0.0F, 0.0F);
   _mesa_GetProgramLocalParameterfvARB(target, index, floatParams);
   if (ctx->ErrorValue == GL_NO_ERROR) {
      COPY_4V(params, floatParams);
   }
}
开发者ID:MttDs,项目名称:new-rexeno-tindpe,代码行数:15,代码来源:arbprogram.c


示例20: CALLOC_STRUCT

struct draw_context *draw_create( void )
{
   struct draw_context *draw = CALLOC_STRUCT( draw_context );
   if (draw == NULL)
      goto fail;

   ASSIGN_4V( draw->plane[0], -1,  0,  0, 1 );
   ASSIGN_4V( draw->plane[1],  1,  0,  0, 1 );
   ASSIGN_4V( draw->plane[2],  0, -1,  0, 1 );
   ASSIGN_4V( draw->plane[3],  0,  1,  0, 1 );
   ASSIGN_4V( draw->plane[4],  0,  0,  1, 1 ); /* yes these are correct */
   ASSIGN_4V( draw->plane[5],  0,  0, -1, 1 ); /* mesa's a bit wonky */
   draw->nr_planes = 6;


   draw->reduced_prim = ~0; /* != any of PIPE_PRIM_x */


   if (!draw_pipeline_init( draw ))
      goto fail;

   if (!draw_pt_init( draw ))
      goto fail;

   if (!draw_vs_init( draw ))
      goto fail;

   return draw;

fail:
   draw_destroy( draw );   
   return NULL;
}
开发者ID:astrofimov,项目名称:vgallium,代码行数:33,代码来源:draw_context.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ASSIGN_STATE函数代码示例发布时间:2022-05-30
下一篇:
C++ ASSERTne函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap