Changeset 22321 in vbox for trunk/src/VBox/Additions/WINNT
- Timestamp:
- Aug 18, 2009 11:32:24 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 51207
- 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 35 35 36 36 #include "config.h" 37 #include "wine/port.h" 37 38 #include <string.h> 38 39 #include <stdio.h> … … 179 180 int rc; 180 181 181 rc = _vsnprintf(base, SHADER_PGMSIZE - 1 - buffer->bsize, format, args);182 rc = vsnprintf(base, SHADER_PGMSIZE - 1 - buffer->bsize, format, args); 182 183 183 184 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 40 40 41 41 #include "config.h" 42 #include "wine/port.h" 42 43 #include <limits.h> 43 44 #include <stdio.h> … … 260 261 261 262 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); 263 264 name_loc = GL_EXTCALL(glGetUniformLocationARB(programId, sampler_name)); 264 265 if (name_loc != -1) { … … 285 286 286 287 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); 288 289 name_loc = GL_EXTCALL(glGetUniformLocationARB(programId, sampler_name)); 289 290 if (name_loc != -1) { … … 548 549 /* TODO: Benchmark and see if it would be beneficial to store the 549 550 * 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); 551 552 tmp_loc = GL_EXTCALL(glGetUniformLocationARB(programId, tmp_name)); 552 553 if (tmp_loc != -1) … … 567 568 TRACE_(d3d_constants)("Loading local constants %i: %i\n", idx, values[0]); 568 569 569 _snprintf(tmp_name, sizeof(tmp_name), "%s[%i]", prefix, idx);570 snprintf(tmp_name, sizeof(tmp_name), "%s[%i]", prefix, idx); 570 571 tmp_loc = GL_EXTCALL(glGetUniformLocationARB(programId, tmp_name)); 571 572 if (tmp_loc != -1) { … … 3696 3697 LIST_FOR_EACH_ENTRY(lconst, &shader->baseShader.constantsF, local_constant, entry) { 3697 3698 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); 3699 3700 tmp_loc = GL_EXTCALL(glGetUniformLocationARB(programId, glsl_name)); 3700 3701 GL_EXTCALL(glUniform4fvARB(tmp_loc, 1, value)); … … 4077 4078 if (!(map & 1)) continue; 4078 4079 4079 _snprintf(tmp_name, sizeof(tmp_name), "attrib%u", i);4080 snprintf(tmp_name, sizeof(tmp_name), "attrib%u", i); 4080 4081 GL_EXTCALL(glBindAttribLocationARB(programId, i, tmp_name)); 4081 4082 } … … 4104 4105 entry->vuniformF_locations = HeapAlloc(GetProcessHeap(), 0, sizeof(GLhandleARB) * GL_LIMITS(vshader_constantsF)); 4105 4106 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); 4107 4108 entry->vuniformF_locations[i] = GL_EXTCALL(glGetUniformLocationARB(programId, glsl_name)); 4108 4109 } 4109 4110 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); 4111 4112 entry->vuniformI_locations[i] = GL_EXTCALL(glGetUniformLocationARB(programId, glsl_name)); 4112 4113 } 4113 4114 entry->puniformF_locations = HeapAlloc(GetProcessHeap(), 0, sizeof(GLhandleARB) * GL_LIMITS(pshader_constantsF)); 4114 4115 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); 4116 4117 entry->puniformF_locations[i] = GL_EXTCALL(glGetUniformLocationARB(programId, glsl_name)); 4117 4118 } 4118 4119 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); 4120 4121 entry->puniformI_locations[i] = GL_EXTCALL(glGetUniformLocationARB(programId, glsl_name)); 4121 4122 }
Note:
See TracChangeset
for help on using the changeset viewer.