VirtualBox

Changeset 22321 in vbox for trunk/src/VBox/Additions/WINNT


Ignore:
Timestamp:
Aug 18, 2009 11:32:24 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
51207
Message:

crOpenGL: wine proper change for snprintf/_snprintf etc.

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/baseshader.c

    r21731 r22321  
    3535
    3636#include "config.h"
     37#include "wine/port.h"
    3738#include <string.h>
    3839#include <stdio.h>
     
    179180    int rc;
    180181
    181     rc = _vsnprintf(base, SHADER_PGMSIZE - 1 - buffer->bsize, format, args);
     182    rc = vsnprintf(base, SHADER_PGMSIZE - 1 - buffer->bsize, format, args);
    182183
    183184    if (rc < 0 /* C89 */ || (unsigned int)rc > SHADER_PGMSIZE - 1 - buffer->bsize /* C99 */)
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/glsl_shader.c

    r21731 r22321  
    4040
    4141#include "config.h"
     42#include "wine/port.h"
    4243#include <limits.h>
    4344#include <stdio.h>
     
    260261
    261262    for (i = 0; i < MAX_FRAGMENT_SAMPLERS; ++i) {
    262         _snprintf(sampler_name, sizeof(sampler_name), "Psampler%d", i);
     263        snprintf(sampler_name, sizeof(sampler_name), "Psampler%d", i);
    263264        name_loc = GL_EXTCALL(glGetUniformLocationARB(programId, sampler_name));
    264265        if (name_loc != -1) {
     
    285286
    286287    for (i = 0; i < MAX_VERTEX_SAMPLERS; ++i) {
    287         _snprintf(sampler_name, sizeof(sampler_name), "Vsampler%d", i);
     288        snprintf(sampler_name, sizeof(sampler_name), "Vsampler%d", i);
    288289        name_loc = GL_EXTCALL(glGetUniformLocationARB(programId, sampler_name));
    289290        if (name_loc != -1) {
     
    548549        /* TODO: Benchmark and see if it would be beneficial to store the
    549550         * locations of the constants to avoid looking up each time */
    550         _snprintf(tmp_name, sizeof(tmp_name), "%s[%i]", prefix, i);
     551        snprintf(tmp_name, sizeof(tmp_name), "%s[%i]", prefix, i);
    551552        tmp_loc = GL_EXTCALL(glGetUniformLocationARB(programId, tmp_name));
    552553        if (tmp_loc != -1)
     
    567568        TRACE_(d3d_constants)("Loading local constants %i: %i\n", idx, values[0]);
    568569
    569         _snprintf(tmp_name, sizeof(tmp_name), "%s[%i]", prefix, idx);
     570        snprintf(tmp_name, sizeof(tmp_name), "%s[%i]", prefix, idx);
    570571        tmp_loc = GL_EXTCALL(glGetUniformLocationARB(programId, tmp_name));
    571572        if (tmp_loc != -1) {
     
    36963697    LIST_FOR_EACH_ENTRY(lconst, &shader->baseShader.constantsF, local_constant, entry) {
    36973698        value = (const float *)lconst->value;
    3698         _snprintf(glsl_name, sizeof(glsl_name), "%cLC%u", prefix, lconst->idx);
     3699        snprintf(glsl_name, sizeof(glsl_name), "%cLC%u", prefix, lconst->idx);
    36993700        tmp_loc = GL_EXTCALL(glGetUniformLocationARB(programId, glsl_name));
    37003701        GL_EXTCALL(glUniform4fvARB(tmp_loc, 1, value));
     
    40774078            if (!(map & 1)) continue;
    40784079
    4079             _snprintf(tmp_name, sizeof(tmp_name), "attrib%u", i);
     4080            snprintf(tmp_name, sizeof(tmp_name), "attrib%u", i);
    40804081            GL_EXTCALL(glBindAttribLocationARB(programId, i, tmp_name));
    40814082        }
     
    41044105    entry->vuniformF_locations = HeapAlloc(GetProcessHeap(), 0, sizeof(GLhandleARB) * GL_LIMITS(vshader_constantsF));
    41054106    for (i = 0; i < GL_LIMITS(vshader_constantsF); ++i) {
    4106         _snprintf(glsl_name, sizeof(glsl_name), "VC[%i]", i);
     4107        snprintf(glsl_name, sizeof(glsl_name), "VC[%i]", i);
    41074108        entry->vuniformF_locations[i] = GL_EXTCALL(glGetUniformLocationARB(programId, glsl_name));
    41084109    }
    41094110    for (i = 0; i < MAX_CONST_I; ++i) {
    4110         _snprintf(glsl_name, sizeof(glsl_name), "VI[%i]", i);
     4111        snprintf(glsl_name, sizeof(glsl_name), "VI[%i]", i);
    41114112        entry->vuniformI_locations[i] = GL_EXTCALL(glGetUniformLocationARB(programId, glsl_name));
    41124113    }
    41134114    entry->puniformF_locations = HeapAlloc(GetProcessHeap(), 0, sizeof(GLhandleARB) * GL_LIMITS(pshader_constantsF));
    41144115    for (i = 0; i < GL_LIMITS(pshader_constantsF); ++i) {
    4115         _snprintf(glsl_name, sizeof(glsl_name), "PC[%i]", i);
     4116        snprintf(glsl_name, sizeof(glsl_name), "PC[%i]", i);
    41164117        entry->puniformF_locations[i] = GL_EXTCALL(glGetUniformLocationARB(programId, glsl_name));
    41174118    }
    41184119    for (i = 0; i < MAX_CONST_I; ++i) {
    4119         _snprintf(glsl_name, sizeof(glsl_name), "PI[%i]", i);
     4120        snprintf(glsl_name, sizeof(glsl_name), "PI[%i]", i);
    41204121        entry->puniformI_locations[i] = GL_EXTCALL(glGetUniformLocationARB(programId, glsl_name));
    41214122    }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette