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

C++ READ_DATA函数代码示例

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

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



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

示例1: crUnpackTexImage3DEXT

void crUnpackTexImage3DEXT( void )
{
    GLenum target = READ_DATA( sizeof( int ) + 0, GLenum );
    GLint level = READ_DATA( sizeof( int ) + 4, GLint );
    GLenum internalformat = READ_DATA( sizeof( int ) + 8, GLint );
    GLsizei width = READ_DATA( sizeof( int ) + 12, GLsizei );
    GLsizei height = READ_DATA( sizeof( int ) + 16, GLsizei );
    GLsizei depth = READ_DATA( sizeof( int ) + 20, GLsizei );
    GLint border = READ_DATA( sizeof( int ) + 24, GLint );
    GLenum format = READ_DATA( sizeof( int ) + 28, GLenum );
    GLenum type = READ_DATA( sizeof( int ) + 32, GLenum );
    int noimagedata = READ_DATA( sizeof( int ) + 36, int );
    GLvoid *pixels;

    /*If there's no imagedata send, it's either that passed pointer was NULL or
      there was GL_PIXEL_UNPACK_BUFFER_ARB bound, in both cases 4bytes of passed
      pointer would convert to either NULL or offset in the bound buffer.
     */
    if ( noimagedata )
        pixels = (void*) (uintptr_t) READ_DATA(sizeof(int)+40, GLint);
    else
        pixels = DATA_POINTER( sizeof( int ) + 44, GLvoid );

    cr_unpackDispatch.TexImage3DEXT(target, level, internalformat, width,
                                    height, depth, border, format, type,
                                    pixels);
    INCR_VAR_PTR();
}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:28,代码来源:unpack_texture.c


示例2: crUnpackExtendShaderSource

void crUnpackExtendShaderSource(void)
{
    GLint *length = NULL;
    GLuint shader = READ_DATA(8, GLuint);
    GLsizei count = READ_DATA(12, GLsizei);
    GLint hasNonLocalLen = READ_DATA(16, GLsizei);
    GLint *pLocalLength = DATA_POINTER(20, GLint);
    const char **ppStrings = NULL;
    GLsizei i;
    int pos=20+count*sizeof(*pLocalLength);

    if (hasNonLocalLen>0)
    {
        length = DATA_POINTER(pos, GLint);
        pos += count*sizeof(*length);
    }

    ppStrings = crAlloc(count*sizeof(char*));
    if (!ppStrings) return;

    for (i=0; i<count; ++i)
    {
        ppStrings[i] = DATA_POINTER(pos, char);
        pos += pLocalLength[i];
        if (!length)
        {
            pLocalLength[i] -= 1;
        }
    }

    cr_unpackDispatch.ShaderSource(shader, count, ppStrings, length ? length : pLocalLength);
    crFree(ppStrings);
}
开发者ID:leopucci,项目名称:VirtualMonitor,代码行数:33,代码来源:unpack_shaders.c


示例3: crUnpackExtendFogCoordPointerEXT

void crUnpackExtendFogCoordPointerEXT(void)
{
    GLenum type = READ_DATA( 8, GLenum );
    GLsizei stride = READ_DATA( 12, GLsizei );
    GLintptrARB pointer = READ_DATA( 16, GLuint );
    cr_unpackDispatch.FogCoordPointerEXT( type, stride, (void *) pointer );
}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:7,代码来源:unpack_arrays.c


示例4: crUnpackExtendLockArraysEXT

void crUnpackExtendLockArraysEXT(void)
{
    GLint first    = READ_DATA(sizeof(int) + 4, GLint);
    GLint count    = READ_DATA(sizeof(int) + 8, GLint);
    int numenabled = READ_DATA(sizeof(int) + 12, int);

    CRContext *g = crStateGetCurrent();
    CRClientState *c = &g->client;
    CRClientPointer *cp;
    int i, index, offset;
    unsigned char *data;
    
    offset = 2*sizeof(int)+12;

    /*crDebug("crUnpackExtendLockArraysEXT(%i, %i) ne=%i", first, count, numenabled);*/

    for (i=0; i<numenabled; ++i)
    {
        index = READ_DATA(offset, int);
        offset += sizeof(int);
        cp = crStateGetClientPointerByIndex(index, &c->array);
        CRASSERT(cp && cp->enabled && (!cp->buffer || !cp->buffer->id));
        data = crAlloc((first+count)*cp->bytesPerIndex);
        crMemcpy(data+first*cp->bytesPerIndex, DATA_POINTER(offset, GLvoid), count*cp->bytesPerIndex);
        offset += count*cp->bytesPerIndex;
        /*crDebug("crUnpackExtendLockArraysEXT: old cp(%i): en/l=%i(%i) p=%p size=%i type=0x%x n=%i str=%i pp=%p pstr=%i",
                index, cp->enabled, cp->locked, cp->p, cp->size, cp->type, cp->normalized, cp->stride, cp->prevPtr, cp->prevStride);*/
        crUnpackSetClientPointerByIndex(index, cp->size, cp->type, cp->normalized, 0, data, c);
        /*crDebug("crUnpackExtendLockArraysEXT: new cp(%i): en/l=%i(%i) p=%p size=%i type=0x%x n=%i str=%i pp=%p pstr=%i",
                index, cp->enabled, cp->locked, cp->p, cp->size, cp->type, cp->normalized, cp->stride, cp->prevPtr, cp->prevStride);*/
    }
    cr_unpackDispatch.LockArraysEXT(first, count);
}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:33,代码来源:unpack_arrays.c


示例5: crUnpackExtendNormalPointer

void crUnpackExtendNormalPointer(void)
{
    GLenum type = READ_DATA( 8, GLenum );
    GLsizei stride = READ_DATA( 12, GLsizei );
    GLintptrARB pointer = READ_DATA( 16, GLuint );
    cr_unpackDispatch.NormalPointer( type, stride, (void *) pointer );
}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:7,代码来源:unpack_arrays.c


示例6: crUnpackExtendInterleavedArrays

void crUnpackExtendInterleavedArrays(void)
{
    GLenum format = READ_DATA( 8, GLenum );
    GLsizei stride = READ_DATA( 12, GLsizei );
    GLintptrARB pointer = READ_DATA( 16, GLuint );
    cr_unpackDispatch.InterleavedArrays( format, stride, (void *) pointer );
}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:7,代码来源:unpack_arrays.c


示例7: crUnpackExtendCompressedTexSubImage3DARB

void crUnpackExtendCompressedTexSubImage3DARB( void )
{
	GLenum  target    = READ_DATA( 4 + sizeof(int) +  0, GLenum );
	GLint   level     = READ_DATA( 4 + sizeof(int) +  4, GLint );
	GLint   xoffset   = READ_DATA( 4 + sizeof(int) +  8, GLint );
	GLint   yoffset   = READ_DATA( 4 + sizeof(int) + 12, GLint );
	GLint   zoffset   = READ_DATA( 4 + sizeof(int) + 16, GLint );
	GLsizei width     = READ_DATA( 4 + sizeof(int) + 20, GLsizei );
	GLsizei height    = READ_DATA( 4 + sizeof(int) + 24, GLsizei );
	GLsizei depth     = READ_DATA( 4 + sizeof(int) + 28, GLsizei );
	GLenum  format    = READ_DATA( 4 + sizeof(int) + 32, GLenum );
	GLsizei imagesize = READ_DATA( 4 + sizeof(int) + 36, GLsizei );
	int     is_null   = READ_DATA( 4 + sizeof(int) + 40, int );
	GLvoid  *pixels;

	if( is_null )
		pixels = NULL;
	else
		pixels = DATA_POINTER( 4 + sizeof(int) + 44, GLvoid );

	cr_unpackDispatch.CompressedTexSubImage3DARB(target, level, xoffset,
	                                             yoffset, zoffset, width,
	                                             height, depth, format,
	                                             imagesize, pixels);
}
开发者ID:L3oV1nc3,项目名称:VMGL,代码行数:25,代码来源:unpack_texture.c


示例8: crUnpackExtendUniform2fv

void crUnpackExtendUniform2fv(void)
{
    GLint location = READ_DATA(8, GLint);
    GLsizei count = READ_DATA(12, GLsizei);
    const GLfloat *value = DATA_POINTER(16, const GLfloat);
    cr_unpackDispatch.Uniform2fv(location, count, value);
}
开发者ID:eaas-framework,项目名称:virtualbox,代码行数:7,代码来源:unpack_shaders.c


示例9: crUnpackExtendWindowVisibleRegion

void crUnpackExtendWindowVisibleRegion( void )
{
    GLint window = READ_DATA( 8, GLint );
    GLint cRects = READ_DATA( 12, GLint );
    GLvoid *pRects = DATA_POINTER( 16, GLvoid );;
    cr_unpackDispatch.WindowVisibleRegion( window, cRects, pRects );
}
开发者ID:svn2github,项目名称:virtualbox,代码行数:7,代码来源:unpack_visibleregion.c


示例10: crUnpackExtendSecondaryColorPointerEXT

void crUnpackExtendSecondaryColorPointerEXT(void)
{
    GLint size = READ_DATA( 8, GLint );
    GLenum type = READ_DATA( 12, GLenum );
    GLsizei stride = READ_DATA( 16, GLsizei );
    GLintptrARB pointer = READ_DATA( 20, GLuint );
    cr_unpackDispatch.SecondaryColorPointerEXT( size, type, stride, (void *) pointer );
}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:8,代码来源:unpack_arrays.c


示例11: crUnpackExtendTexCoordPointer

void crUnpackExtendTexCoordPointer(void)
{
    GLint size = READ_DATA( 8, GLint );
    GLenum type = READ_DATA( 12, GLenum );
    GLsizei stride = READ_DATA( 16, GLsizei );
    GLintptrARB pointer = READ_DATA( 20, GLuint );
    cr_unpackDispatch.TexCoordPointer( size, type, stride, (void *) pointer );
}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:8,代码来源:unpack_arrays.c


示例12: crUnpackExtendDrawElements

void crUnpackExtendDrawElements(void)
{
	GLenum mode = READ_DATA( 8, GLenum );
	GLsizei count = READ_DATA( 12, GLsizei );
	GLenum type = READ_DATA( 16, GLenum );
	GLintptrARB indices = READ_DATA( 20, GLintptrARB );
	cr_unpackDispatch.DrawElements( mode, count, type, (void *) indices);
}
开发者ID:L3oV1nc3,项目名称:VMGL,代码行数:8,代码来源:unpack_arrays.c


示例13: crUnpackExtendGetShaderSource

void crUnpackExtendGetShaderSource(void)
{
    GLuint shader = READ_DATA(8, GLuint);
    GLsizei bufSize = READ_DATA(12, GLsizei);
    SET_RETURN_PTR(16);
    SET_WRITEBACK_PTR(24);
    cr_unpackDispatch.GetShaderSource(shader, bufSize, NULL, NULL);
}
开发者ID:eaas-framework,项目名称:virtualbox,代码行数:8,代码来源:unpack_shaders.c


示例14: crUnpackExtendGetUniformsLocations

void crUnpackExtendGetUniformsLocations(void)
{
	GLuint program = READ_DATA(8, GLuint);
	GLsizei maxcbData = READ_DATA(12, GLsizei);
	SET_RETURN_PTR(16);
	SET_WRITEBACK_PTR(24);
	cr_unpackDispatch.GetUniformsLocations(program, maxcbData, NULL, NULL);
}
开发者ID:eaas-framework,项目名称:virtualbox,代码行数:8,代码来源:unpack_shaders.c


示例15: crUnpackExtendProgramStringARB

void crUnpackExtendProgramStringARB(void)
{ 
      GLenum target = READ_DATA(8, GLenum);
      GLenum format = READ_DATA(12, GLuint);
      GLsizei len = READ_DATA(16, GLsizei);
      GLvoid *program = DATA_POINTER(20, GLvoid);
      cr_unpackDispatch.ProgramStringARB(target, format, len, program);
}
开发者ID:svn2github,项目名称:virtualbox,代码行数:8,代码来源:unpack_program.c


示例16: crUnpackExtendGetProgramInfoLog

void crUnpackExtendGetProgramInfoLog(void)
{
    GLuint program = READ_DATA(8, GLuint);
    GLsizei bufSize = READ_DATA(12, GLsizei);
    SET_RETURN_PTR(16);
    SET_WRITEBACK_PTR(24);
    cr_unpackDispatch.GetProgramInfoLog(program, bufSize, NULL, NULL);
}
开发者ID:eaas-framework,项目名称:virtualbox,代码行数:8,代码来源:unpack_shaders.c


示例17: crUnpackExtendGetAttachedShaders

void crUnpackExtendGetAttachedShaders(void)
{
    GLuint program = READ_DATA(8, GLuint);
    GLsizei maxCount = READ_DATA(12, GLsizei);
    SET_RETURN_PTR(16);
    SET_WRITEBACK_PTR(24);
    cr_unpackDispatch.GetAttachedShaders(program, maxCount, NULL, NULL);
}
开发者ID:eaas-framework,项目名称:virtualbox,代码行数:8,代码来源:unpack_shaders.c


示例18: crUnpackExtendGetAttachedObjectsARB

void crUnpackExtendGetAttachedObjectsARB(void)
{
	VBoxGLhandleARB containerObj = READ_DATA(8, VBoxGLhandleARB);
	GLsizei maxCount = READ_DATA(12, GLsizei);
	SET_RETURN_PTR(16);
	SET_WRITEBACK_PTR(24);
	cr_unpackDispatch.GetAttachedObjectsARB(containerObj, maxCount, NULL, NULL);
}
开发者ID:eaas-framework,项目名称:virtualbox,代码行数:8,代码来源:unpack_shaders.c


示例19: crUnpackExtendUniformMatrix4x3fv

void crUnpackExtendUniformMatrix4x3fv(void)
{
    GLint location = READ_DATA(8, GLint);
    GLsizei count = READ_DATA(12, GLsizei);
    GLboolean transpose = READ_DATA(16, GLboolean);
    const GLfloat *value = DATA_POINTER(16+sizeof(GLboolean), const GLfloat);
    cr_unpackDispatch.UniformMatrix4x3fv(location, count, transpose, value);
}
开发者ID:eaas-framework,项目名称:virtualbox,代码行数:8,代码来源:unpack_shaders.c


示例20: crUnpackExtendBindAttribLocation

void crUnpackExtendBindAttribLocation(void)
{
    GLuint program   = READ_DATA(8, GLuint);
    GLuint index     = READ_DATA(12, GLuint);
    const char *name = DATA_POINTER(16, const char);

    cr_unpackDispatch.BindAttribLocation(program, index, name);
}
开发者ID:eaas-framework,项目名称:virtualbox,代码行数:8,代码来源:unpack_shaders.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ READ_DONE函数代码示例发布时间:2022-05-30
下一篇:
C++ READ_BYTE函数代码示例发布时间: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