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


C++ CR_GET_PACKER_CONTEXT函数代码示例

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


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

示例1: crPackCombinerParameterfvNV

void PACK_APIENTRY crPackCombinerParameterfvNV( GLenum pname, const GLfloat *params )
{
    CR_GET_PACKER_CONTEXT(pc);
    if (__handleCombinerParameterData( pname, params, CR_COMBINERPARAMETERFVNV_EXTEND_OPCODE ))
        WRITE_OPCODE( pc, CR_EXTEND_OPCODE );
    CR_UNLOCK_PACKER_CONTEXT(pc);
}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:7,代码来源:pack_regcombiner.c

示例2: crPackCanHoldBoundedBuffer

int crPackCanHoldBoundedBuffer( const CRPackBuffer *src )
{
	const int len_aligned = (src->data_current - src->opcode_current - 1 + 3) & ~3;
	CR_GET_PACKER_CONTEXT(pc);
	/* 24 is the size of the bounds-info packet... */
	return crPackCanHoldOpcode( pc, 1, len_aligned + 24 );
}
开发者ID:LastRitter,项目名称:vbox-haiku,代码行数:7,代码来源:pack_buffer.c

示例3: crPackAreProgramsResidentNV

void PACK_APIENTRY
crPackAreProgramsResidentNV(GLsizei n, const GLuint * programs,
                                                        GLboolean *residences, GLboolean *return_val,
                                                        int *writeback)
{
    CR_GET_PACKER_CONTEXT(pc);
    unsigned char *data_ptr;
    int packet_length;

    (void) return_val; /* Caller must compute this from residences!!! */

    packet_length = sizeof(int) +   /* packet length */
        sizeof(GLenum) +                        /* extend opcode */
        sizeof(n) +                                 /* num programs */
        n * sizeof(*programs) +         /* programs */
        8 + 8;

    CR_GET_BUFFERED_POINTER(pc, packet_length);
    WRITE_DATA(0, int, packet_length);
    WRITE_DATA(4, GLenum, CR_AREPROGRAMSRESIDENTNV_EXTEND_OPCODE);
    WRITE_DATA(8, GLsizei, n);
    crMemcpy(data_ptr + 12, programs, n * sizeof(*programs));
    WRITE_NETWORK_POINTER(12 + n * sizeof(*programs),   (void *) residences);
    WRITE_NETWORK_POINTER(20 + n * sizeof(*programs), (void *) writeback);
    WRITE_OPCODE(pc, CR_EXTEND_OPCODE);
    CR_CMDBLOCK_CHECK_FLUSH(pc);
    CR_UNLOCK_PACKER_CONTEXT(pc);
}
开发者ID:svn2github,项目名称:virtualbox,代码行数:28,代码来源:pack_program.c

示例4: crPackLoadTransposeMatrixfARB

void PACK_APIENTRY crPackLoadTransposeMatrixfARB( const GLfloat *m )
{
    CR_GET_PACKER_CONTEXT(pc);
    unsigned char *data_ptr;
    int packet_length = 16*sizeof( *m ) + sizeof(GLint) + sizeof(GLenum);
    CR_GET_BUFFERED_POINTER(pc, packet_length );
    WRITE_DATA( 0, GLint, packet_length );
    WRITE_DATA( 4, GLenum, CR_LOADTRANSPOSEMATRIXFARB_EXTEND_OPCODE );
    WRITE_DATA( 8 + 0*sizeof(GLfloat), GLfloat, m[ 0] );
    WRITE_DATA( 8 + 1*sizeof(GLfloat), GLfloat, m[ 1] );
    WRITE_DATA( 8 + 2*sizeof(GLfloat), GLfloat, m[ 2] );
    WRITE_DATA( 8 + 3*sizeof(GLfloat), GLfloat, m[ 3] );
    WRITE_DATA( 8 + 4*sizeof(GLfloat), GLfloat, m[ 4] );
    WRITE_DATA( 8 + 5*sizeof(GLfloat), GLfloat, m[ 5] );
    WRITE_DATA( 8 + 6*sizeof(GLfloat), GLfloat, m[ 6] );
    WRITE_DATA( 8 + 7*sizeof(GLfloat), GLfloat, m[ 7] );
    WRITE_DATA( 8 + 8*sizeof(GLfloat), GLfloat, m[ 8] );
    WRITE_DATA( 8 + 9*sizeof(GLfloat), GLfloat, m[ 9] );
    WRITE_DATA( 8 + 10*sizeof(GLfloat), GLfloat, m[10] );
    WRITE_DATA( 8 + 11*sizeof(GLfloat), GLfloat, m[11] );
    WRITE_DATA( 8 + 12*sizeof(GLfloat), GLfloat, m[12] );
    WRITE_DATA( 8 + 13*sizeof(GLfloat), GLfloat, m[13] );
    WRITE_DATA( 8 + 14*sizeof(GLfloat), GLfloat, m[14] );
    WRITE_DATA( 8 + 15*sizeof(GLfloat), GLfloat, m[15] );
    WRITE_OPCODE( pc, CR_EXTEND_OPCODE );
    CR_UNLOCK_PACKER_CONTEXT(pc);
}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:27,代码来源:pack_matrices.c

示例5: crPackLightfvSWAP

void PACK_APIENTRY crPackLightfvSWAP (GLenum light, GLenum pname, const GLfloat *params)
{
    CR_GET_PACKER_CONTEXT(pc);
    if (__handleLightData( light, pname, params ))
        WRITE_OPCODE( pc, CR_LIGHTFV_OPCODE );
    CR_UNLOCK_PACKER_CONTEXT(pc);
}
开发者ID:bayasist,项目名称:vbox,代码行数:7,代码来源:pack_lights_swap.c

示例6: crPackPolygonStipple

void PACK_APIENTRY crPackPolygonStipple( const GLubyte *mask )
{
    CR_GET_PACKER_CONTEXT(pc);
    unsigned char *data_ptr;
    int nodata = crStateIsBufferBound(GL_PIXEL_UNPACK_BUFFER_ARB);
    int packet_length = sizeof(int);

    if (nodata)
        packet_length += sizeof(GLint);
    else
        packet_length += 32*32/8;

    CR_GET_BUFFERED_POINTER(pc, packet_length );
    WRITE_DATA_AI(int, nodata);
    if (nodata)
    {
        WRITE_DATA_AI(GLint, (GLint)(uintptr_t)mask);
    }
    else
    {
       crMemcpy( data_ptr, mask, 32*32/8 );
    }
    WRITE_OPCODE( pc, CR_POLYGONSTIPPLE_OPCODE );
    CR_UNLOCK_PACKER_CONTEXT(pc);
}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:25,代码来源:pack_stipple.c

示例7: crPackLoadMatrixf

void PACK_APIENTRY crPackLoadMatrixf( const GLfloat *m )
{
    CR_GET_PACKER_CONTEXT(pc);
    unsigned char *data_ptr;
    int packet_length = 16*sizeof( *m );
    CR_GET_BUFFERED_POINTER(pc, packet_length );
    WRITE_DATA( 0*sizeof(GLfloat), GLfloat, m[ 0] );
    WRITE_DATA( 1*sizeof(GLfloat), GLfloat, m[ 1] );
    WRITE_DATA( 2*sizeof(GLfloat), GLfloat, m[ 2] );
    WRITE_DATA( 3*sizeof(GLfloat), GLfloat, m[ 3] );
    WRITE_DATA( 4*sizeof(GLfloat), GLfloat, m[ 4] );
    WRITE_DATA( 5*sizeof(GLfloat), GLfloat, m[ 5] );
    WRITE_DATA( 6*sizeof(GLfloat), GLfloat, m[ 6] );
    WRITE_DATA( 7*sizeof(GLfloat), GLfloat, m[ 7] );
    WRITE_DATA( 8*sizeof(GLfloat), GLfloat, m[ 8] );
    WRITE_DATA( 9*sizeof(GLfloat), GLfloat, m[ 9] );
    WRITE_DATA( 10*sizeof(GLfloat), GLfloat, m[10] );
    WRITE_DATA( 11*sizeof(GLfloat), GLfloat, m[11] );
    WRITE_DATA( 12*sizeof(GLfloat), GLfloat, m[12] );
    WRITE_DATA( 13*sizeof(GLfloat), GLfloat, m[13] );
    WRITE_DATA( 14*sizeof(GLfloat), GLfloat, m[14] );
    WRITE_DATA( 15*sizeof(GLfloat), GLfloat, m[15] );
    WRITE_OPCODE( pc, CR_LOADMATRIXF_OPCODE );
    CR_UNLOCK_PACKER_CONTEXT(pc);
}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:25,代码来源:pack_matrices.c

示例8: crPackWindowVisibleRegion

void PACK_APIENTRY crPackWindowVisibleRegion( CR_PACKER_CONTEXT_ARGDECL GLint window, GLint cRects, const GLint * pRects )
{
    GLint i, size, cnt;

    CR_GET_PACKER_CONTEXT(pc);
    unsigned char *data_ptr;
    (void) pc;
    size = 16 + cRects * 4 * sizeof(GLint);
    CR_GET_BUFFERED_POINTER( pc, size );
    WRITE_DATA( 0, GLint, size );
    WRITE_DATA( 4, GLenum, CR_WINDOWVISIBLEREGION_EXTEND_OPCODE );
    WRITE_DATA( 8, GLint, window );
    WRITE_DATA( 12, GLint, cRects );

    cnt = 16;
    for (i=0; i<cRects; ++i)
    {
        WRITE_DATA(cnt, GLint, (GLint) pRects[4*i+0]);
        WRITE_DATA(cnt+4, GLint, (GLint) pRects[4*i+1]);
        WRITE_DATA(cnt+8, GLint, (GLint) pRects[4*i+2]);
        WRITE_DATA(cnt+12, GLint, (GLint) pRects[4*i+3]);
        cnt += 16;
    }
    WRITE_OPCODE( pc, CR_EXTEND_OPCODE );
    CR_UNLOCK_PACKER_CONTEXT(pc);
}
开发者ID:svn2github,项目名称:virtualbox,代码行数:26,代码来源:pack_visibleregion.c

示例9: crPackMultMatrixd

void PACK_APIENTRY crPackMultMatrixd( const GLdouble *m )
{
    CR_GET_PACKER_CONTEXT(pc);
    unsigned char *data_ptr;
    int packet_length = 16*sizeof( *m );
    CR_GET_BUFFERED_POINTER(pc, packet_length );
    WRITE_DOUBLE( 0*sizeof(double), m[ 0] );
    WRITE_DOUBLE( 1*sizeof(double), m[ 1] );
    WRITE_DOUBLE( 2*sizeof(double), m[ 2] );
    WRITE_DOUBLE( 3*sizeof(double), m[ 3] );
    WRITE_DOUBLE( 4*sizeof(double), m[ 4] );
    WRITE_DOUBLE( 5*sizeof(double), m[ 5] );
    WRITE_DOUBLE( 6*sizeof(double), m[ 6] );
    WRITE_DOUBLE( 7*sizeof(double), m[ 7] );
    WRITE_DOUBLE( 8*sizeof(double), m[ 8] );
    WRITE_DOUBLE( 9*sizeof(double), m[ 9] );
    WRITE_DOUBLE( 10*sizeof(double), m[10] );
    WRITE_DOUBLE( 11*sizeof(double), m[11] );
    WRITE_DOUBLE( 12*sizeof(double), m[12] );
    WRITE_DOUBLE( 13*sizeof(double), m[13] );
    WRITE_DOUBLE( 14*sizeof(double), m[14] );
    WRITE_DOUBLE( 15*sizeof(double), m[15] );
    WRITE_OPCODE( pc, CR_MULTMATRIXD_OPCODE );
    CR_UNLOCK_PACKER_CONTEXT(pc);
}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:25,代码来源:pack_matrices.c

示例10: __handleLightModelData

static GLboolean __handleLightModelData( GLenum pname, const GLfloat *params )
{
    CR_GET_PACKER_CONTEXT(pc);
    unsigned int packet_length = sizeof( int ) + sizeof( pname );
    unsigned int params_length = 0;
    unsigned char *data_ptr;
    switch( pname )
    {
        case GL_LIGHT_MODEL_AMBIENT:
            params_length = 4*sizeof( *params );
            break;
        case GL_LIGHT_MODEL_TWO_SIDE:
        case GL_LIGHT_MODEL_LOCAL_VIEWER:
            params_length = sizeof( *params );
            break;
        default:
            __PackError( __LINE__, __FILE__, GL_INVALID_ENUM,
                                     "crPackLightModelSWAP(bad pname)" );
            return GL_FALSE;
    }
    packet_length += params_length;
    CR_GET_BUFFERED_POINTER(pc, packet_length );
    WRITE_DATA( 0, int, SWAP32(packet_length) );
    WRITE_DATA( sizeof( int ) + 0, GLenum, SWAP32(pname) );
    WRITE_DATA( sizeof( int ) + 4, GLuint, SWAPFLOAT(params[0]) );
    if (params_length > sizeof( *params ))
    {
        WRITE_DATA( sizeof( int ) + 8, GLuint, SWAPFLOAT(params[1]) );
        WRITE_DATA( sizeof( int ) + 12, GLuint, SWAPFLOAT(params[2]) );
        WRITE_DATA( sizeof( int ) + 16, GLuint, SWAPFLOAT(params[3]) );
    }
    return GL_TRUE;
}
开发者ID:bayasist,项目名称:vbox,代码行数:33,代码来源:pack_lights_swap.c

示例11: crPackRequestResidentProgramsNV

void PACK_APIENTRY crPackRequestResidentProgramsNV(GLsizei n, const GLuint *ids)
{
    CR_GET_PACKER_CONTEXT(pc);
    (void) pc;
    (void) n;
    (void) ids;
    /* We're no-op'ing this function for now. */
}
开发者ID:svn2github,项目名称:virtualbox,代码行数:8,代码来源:pack_program.c

示例12: crPackDrawBuffersSWAP

void PACK_APIENTRY crPackDrawBuffersSWAP(GLsizei n, const GLenum *bufs)
{
    CR_GET_PACKER_CONTEXT(pc);
    (void)n;
    (void)bufs;
    (void)pc;
    crError ("No swap version");
}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:8,代码来源:pack_shaders.c

示例13: crPackLightivSWAP

void PACK_APIENTRY crPackLightivSWAP (GLenum light, GLenum pname, const GLint *params)
{
    /* floats and ints are the same size, so the packing should be the same */
    CR_GET_PACKER_CONTEXT(pc);
    if (__handleLightData( light, pname, (const GLfloat *) params ))
        WRITE_OPCODE( pc, CR_LIGHTIV_OPCODE );
    CR_UNLOCK_PACKER_CONTEXT(pc);
}
开发者ID:bayasist,项目名称:vbox,代码行数:8,代码来源:pack_lights_swap.c

示例14: crPackCombinerParameterivNV

void PACK_APIENTRY crPackCombinerParameterivNV( GLenum pname, const GLint *params )
{
    /* floats and ints are the same size, so the packing should be the same */
    CR_GET_PACKER_CONTEXT(pc);
    if (__handleCombinerParameterData( pname, (const GLfloat *) params, CR_COMBINERPARAMETERIVNV_EXTEND_OPCODE ))
        WRITE_OPCODE( pc, CR_EXTEND_OPCODE );
    CR_UNLOCK_PACKER_CONTEXT(pc);
}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:8,代码来源:pack_regcombiner.c

示例15: crPackUniform4ivSWAP

void PACK_APIENTRY crPackUniform4ivSWAP(GLint location, GLsizei count, const GLint *value)
{
    CR_GET_PACKER_CONTEXT(pc);
    (void)location;
    (void)count;
    (void)value;
    (void)pc;
    crError ("No swap version");
}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:9,代码来源:pack_shaders.c


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