| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file is auto-generated. DO NOT EDIT! | 5 // This file is auto-generated. DO NOT EDIT! |
| 6 | 6 |
| 7 // This file is included by gles2_implementation.h to declare the | 7 // This file is included by gles2_implementation.h to declare the |
| 8 // GL api functions. | 8 // GL api functions. |
| 9 #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_AUTOGEN_H_ | 9 #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_AUTOGEN_H_ |
| 10 #define GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_AUTOGEN_H_ | 10 #define GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_AUTOGEN_H_ |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 GLenum target, GLint level, GLenum internalformat, GLsizei width, | 96 GLenum target, GLint level, GLenum internalformat, GLsizei width, |
| 97 GLsizei height, GLint border, GLsizei imageSize, const void* data); | 97 GLsizei height, GLint border, GLsizei imageSize, const void* data); |
| 98 | 98 |
| 99 void CompressedTexSubImage2D( | 99 void CompressedTexSubImage2D( |
| 100 GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, | 100 GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, |
| 101 GLsizei height, GLenum format, GLsizei imageSize, const void* data); | 101 GLsizei height, GLenum format, GLsizei imageSize, const void* data); |
| 102 | 102 |
| 103 void CopyTexImage2D( | 103 void CopyTexImage2D( |
| 104 GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, | 104 GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, |
| 105 GLsizei width, GLsizei height, GLint border) { | 105 GLsizei width, GLsizei height, GLint border) { |
| 106 if (width < 0) { |
| 107 SetGLError(GL_INVALID_VALUE); |
| 108 return; |
| 109 } |
| 110 if (height < 0) { |
| 111 SetGLError(GL_INVALID_VALUE); |
| 112 return; |
| 113 } |
| 106 helper_->CopyTexImage2D( | 114 helper_->CopyTexImage2D( |
| 107 target, level, internalformat, x, y, width, height, border); | 115 target, level, internalformat, x, y, width, height, border); |
| 108 } | 116 } |
| 109 | 117 |
| 110 void CopyTexSubImage2D( | 118 void CopyTexSubImage2D( |
| 111 GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, | 119 GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, |
| 112 GLsizei width, GLsizei height) { | 120 GLsizei width, GLsizei height) { |
| 121 if (width < 0) { |
| 122 SetGLError(GL_INVALID_VALUE); |
| 123 return; |
| 124 } |
| 125 if (height < 0) { |
| 126 SetGLError(GL_INVALID_VALUE); |
| 127 return; |
| 128 } |
| 113 helper_->CopyTexSubImage2D( | 129 helper_->CopyTexSubImage2D( |
| 114 target, level, xoffset, yoffset, x, y, width, height); | 130 target, level, xoffset, yoffset, x, y, width, height); |
| 115 } | 131 } |
| 116 | 132 |
| 117 GLuint CreateProgram() { | 133 GLuint CreateProgram() { |
| 118 GLuint client_id; | 134 GLuint client_id; |
| 119 MakeIds(1, &client_id); | 135 MakeIds(1, &client_id); |
| 120 helper_->CreateProgram(client_id); | 136 helper_->CreateProgram(client_id); |
| 121 return client_id; | 137 return client_id; |
| 122 } | 138 } |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 194 |
| 179 void Disable(GLenum cap) { | 195 void Disable(GLenum cap) { |
| 180 helper_->Disable(cap); | 196 helper_->Disable(cap); |
| 181 } | 197 } |
| 182 | 198 |
| 183 void DisableVertexAttribArray(GLuint index) { | 199 void DisableVertexAttribArray(GLuint index) { |
| 184 helper_->DisableVertexAttribArray(index); | 200 helper_->DisableVertexAttribArray(index); |
| 185 } | 201 } |
| 186 | 202 |
| 187 void DrawArrays(GLenum mode, GLint first, GLsizei count) { | 203 void DrawArrays(GLenum mode, GLint first, GLsizei count) { |
| 204 if (count < 0) { |
| 205 SetGLError(GL_INVALID_VALUE); |
| 206 return; |
| 207 } |
| 188 helper_->DrawArrays(mode, first, count); | 208 helper_->DrawArrays(mode, first, count); |
| 189 } | 209 } |
| 190 | 210 |
| 191 void DrawElements( | 211 void DrawElements( |
| 192 GLenum mode, GLsizei count, GLenum type, const void* indices); | 212 GLenum mode, GLsizei count, GLenum type, const void* indices); |
| 193 | 213 |
| 194 void Enable(GLenum cap) { | 214 void Enable(GLenum cap) { |
| 195 helper_->Enable(cap); | 215 helper_->Enable(cap); |
| 196 } | 216 } |
| 197 | 217 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 | 287 |
| 268 void GetBufferParameteriv(GLenum target, GLenum pname, GLint* params) { | 288 void GetBufferParameteriv(GLenum target, GLenum pname, GLint* params) { |
| 269 helper_->GetBufferParameteriv( | 289 helper_->GetBufferParameteriv( |
| 270 target, pname, result_shm_id(), result_shm_offset()); | 290 target, pname, result_shm_id(), result_shm_offset()); |
| 271 WaitForCmd(); | 291 WaitForCmd(); |
| 272 GLsizei num_values = util_.GLGetNumValuesReturned(pname); | 292 GLsizei num_values = util_.GLGetNumValuesReturned(pname); |
| 273 DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult); | 293 DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult); |
| 274 memcpy(params, result_buffer_, num_values * sizeof(*params)); | 294 memcpy(params, result_buffer_, num_values * sizeof(*params)); |
| 275 } | 295 } |
| 276 | 296 |
| 277 GLenum GetError() { | 297 GLenum GetError(); |
| 278 helper_->GetError(result_shm_id(), result_shm_offset()); | |
| 279 WaitForCmd(); | |
| 280 return GetResultAs<GLenum>(); | |
| 281 } | |
| 282 | 298 |
| 283 void GetFloatv(GLenum pname, GLfloat* params) { | 299 void GetFloatv(GLenum pname, GLfloat* params) { |
| 284 helper_->GetFloatv(pname, result_shm_id(), result_shm_offset()); | 300 helper_->GetFloatv(pname, result_shm_id(), result_shm_offset()); |
| 285 WaitForCmd(); | 301 WaitForCmd(); |
| 286 GLsizei num_values = util_.GLGetNumValuesReturned(pname); | 302 GLsizei num_values = util_.GLGetNumValuesReturned(pname); |
| 287 DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult); | 303 DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult); |
| 288 memcpy(params, result_buffer_, num_values * sizeof(*params)); | 304 memcpy(params, result_buffer_, num_values * sizeof(*params)); |
| 289 } | 305 } |
| 290 | 306 |
| 291 void GetFramebufferAttachmentParameteriv( | 307 void GetFramebufferAttachmentParameteriv( |
| (...skipping 15 matching lines...) Expand all Loading... |
| 307 } | 323 } |
| 308 | 324 |
| 309 void GetProgramiv(GLuint program, GLenum pname, GLint* params) { | 325 void GetProgramiv(GLuint program, GLenum pname, GLint* params) { |
| 310 helper_->GetProgramiv(program, pname, result_shm_id(), result_shm_offset()); | 326 helper_->GetProgramiv(program, pname, result_shm_id(), result_shm_offset()); |
| 311 WaitForCmd(); | 327 WaitForCmd(); |
| 312 GLsizei num_values = util_.GLGetNumValuesReturned(pname); | 328 GLsizei num_values = util_.GLGetNumValuesReturned(pname); |
| 313 DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult); | 329 DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult); |
| 314 memcpy(params, result_buffer_, num_values * sizeof(*params)); | 330 memcpy(params, result_buffer_, num_values * sizeof(*params)); |
| 315 } | 331 } |
| 316 | 332 |
| 317 // TODO(gman): Implement this | |
| 318 void GetProgramInfoLog( | 333 void GetProgramInfoLog( |
| 319 GLuint program, GLsizei bufsize, GLsizei* length, char* infolog); | 334 GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) { |
| 320 | 335 helper_->SetBucketSize(kResultBucketId, 0); |
| 336 helper_->GetProgramInfoLog(program, kResultBucketId); |
| 337 std::string str; |
| 338 if (GetBucketAsString(kResultBucketId, &str)) { |
| 339 GLsizei max_size = |
| 340 std::min(static_cast<size_t>(bufsize) - 1, str.size()); |
| 341 if (length != NULL) { |
| 342 *length = max_size; |
| 343 } |
| 344 memcpy(infolog, str.c_str(), max_size); |
| 345 infolog[max_size] = '\0'; |
| 346 } |
| 347 } |
| 321 void GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) { | 348 void GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) { |
| 322 helper_->GetRenderbufferParameteriv( | 349 helper_->GetRenderbufferParameteriv( |
| 323 target, pname, result_shm_id(), result_shm_offset()); | 350 target, pname, result_shm_id(), result_shm_offset()); |
| 324 WaitForCmd(); | 351 WaitForCmd(); |
| 325 GLsizei num_values = util_.GLGetNumValuesReturned(pname); | 352 GLsizei num_values = util_.GLGetNumValuesReturned(pname); |
| 326 DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult); | 353 DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult); |
| 327 memcpy(params, result_buffer_, num_values * sizeof(*params)); | 354 memcpy(params, result_buffer_, num_values * sizeof(*params)); |
| 328 } | 355 } |
| 329 | 356 |
| 330 void GetShaderiv(GLuint shader, GLenum pname, GLint* params) { | 357 void GetShaderiv(GLuint shader, GLenum pname, GLint* params) { |
| 331 helper_->GetShaderiv(shader, pname, result_shm_id(), result_shm_offset()); | 358 helper_->GetShaderiv(shader, pname, result_shm_id(), result_shm_offset()); |
| 332 WaitForCmd(); | 359 WaitForCmd(); |
| 333 GLsizei num_values = util_.GLGetNumValuesReturned(pname); | 360 GLsizei num_values = util_.GLGetNumValuesReturned(pname); |
| 334 DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult); | 361 DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult); |
| 335 memcpy(params, result_buffer_, num_values * sizeof(*params)); | 362 memcpy(params, result_buffer_, num_values * sizeof(*params)); |
| 336 } | 363 } |
| 337 | 364 |
| 338 // TODO(gman): Implement this | |
| 339 void GetShaderInfoLog( | 365 void GetShaderInfoLog( |
| 340 GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog); | 366 GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) { |
| 341 | 367 helper_->SetBucketSize(kResultBucketId, 0); |
| 368 helper_->GetShaderInfoLog(shader, kResultBucketId); |
| 369 std::string str; |
| 370 if (GetBucketAsString(kResultBucketId, &str)) { |
| 371 GLsizei max_size = |
| 372 std::min(static_cast<size_t>(bufsize) - 1, str.size()); |
| 373 if (length != NULL) { |
| 374 *length = max_size; |
| 375 } |
| 376 memcpy(infolog, str.c_str(), max_size); |
| 377 infolog[max_size] = '\0'; |
| 378 } |
| 379 } |
| 342 void GetShaderPrecisionFormat( | 380 void GetShaderPrecisionFormat( |
| 343 GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); | 381 GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); |
| 344 | 382 |
| 345 // TODO(gman): Implement this | |
| 346 void GetShaderSource( | 383 void GetShaderSource( |
| 347 GLuint shader, GLsizei bufsize, GLsizei* length, char* source); | 384 GLuint shader, GLsizei bufsize, GLsizei* length, char* source) { |
| 348 | 385 helper_->SetBucketSize(kResultBucketId, 0); |
| 386 helper_->GetShaderSource(shader, kResultBucketId); |
| 387 std::string str; |
| 388 if (GetBucketAsString(kResultBucketId, &str)) { |
| 389 GLsizei max_size = |
| 390 std::min(static_cast<size_t>(bufsize) - 1, str.size()); |
| 391 if (length != NULL) { |
| 392 *length = max_size; |
| 393 } |
| 394 memcpy(source, str.c_str(), max_size); |
| 395 source[max_size] = '\0'; |
| 396 } |
| 397 } |
| 349 const GLubyte* GetString(GLenum name); | 398 const GLubyte* GetString(GLenum name); |
| 350 | 399 |
| 351 void GetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) { | 400 void GetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) { |
| 352 helper_->GetTexParameterfv( | 401 helper_->GetTexParameterfv( |
| 353 target, pname, result_shm_id(), result_shm_offset()); | 402 target, pname, result_shm_id(), result_shm_offset()); |
| 354 WaitForCmd(); | 403 WaitForCmd(); |
| 355 GLsizei num_values = util_.GLGetNumValuesReturned(pname); | 404 GLsizei num_values = util_.GLGetNumValuesReturned(pname); |
| 356 DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult); | 405 DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult); |
| 357 memcpy(params, result_buffer_, num_values * sizeof(*params)); | 406 memcpy(params, result_buffer_, num_values * sizeof(*params)); |
| 358 } | 407 } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 memcpy(params, result_buffer_, num_values * sizeof(*params)); | 439 memcpy(params, result_buffer_, num_values * sizeof(*params)); |
| 391 } | 440 } |
| 392 | 441 |
| 393 void GetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer); | 442 void GetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer); |
| 394 | 443 |
| 395 void Hint(GLenum target, GLenum mode) { | 444 void Hint(GLenum target, GLenum mode) { |
| 396 helper_->Hint(target, mode); | 445 helper_->Hint(target, mode); |
| 397 } | 446 } |
| 398 | 447 |
| 399 GLboolean IsBuffer(GLuint buffer) { | 448 GLboolean IsBuffer(GLuint buffer) { |
| 449 typedef IsBuffer::Result Result; |
| 450 Result* result = GetResultAs<Result*>(); |
| 451 *result = 0; |
| 400 helper_->IsBuffer(buffer, result_shm_id(), result_shm_offset()); | 452 helper_->IsBuffer(buffer, result_shm_id(), result_shm_offset()); |
| 401 WaitForCmd(); | 453 WaitForCmd(); |
| 402 return GetResultAs<GLboolean>(); | 454 return *result; |
| 403 } | 455 } |
| 404 | 456 |
| 405 GLboolean IsEnabled(GLenum cap) { | 457 GLboolean IsEnabled(GLenum cap) { |
| 458 typedef IsEnabled::Result Result; |
| 459 Result* result = GetResultAs<Result*>(); |
| 460 *result = 0; |
| 406 helper_->IsEnabled(cap, result_shm_id(), result_shm_offset()); | 461 helper_->IsEnabled(cap, result_shm_id(), result_shm_offset()); |
| 407 WaitForCmd(); | 462 WaitForCmd(); |
| 408 return GetResultAs<GLboolean>(); | 463 return *result; |
| 409 } | 464 } |
| 410 | 465 |
| 411 GLboolean IsFramebuffer(GLuint framebuffer) { | 466 GLboolean IsFramebuffer(GLuint framebuffer) { |
| 467 typedef IsFramebuffer::Result Result; |
| 468 Result* result = GetResultAs<Result*>(); |
| 469 *result = 0; |
| 412 helper_->IsFramebuffer(framebuffer, result_shm_id(), result_shm_offset()); | 470 helper_->IsFramebuffer(framebuffer, result_shm_id(), result_shm_offset()); |
| 413 WaitForCmd(); | 471 WaitForCmd(); |
| 414 return GetResultAs<GLboolean>(); | 472 return *result; |
| 415 } | 473 } |
| 416 | 474 |
| 417 GLboolean IsProgram(GLuint program) { | 475 GLboolean IsProgram(GLuint program) { |
| 476 typedef IsProgram::Result Result; |
| 477 Result* result = GetResultAs<Result*>(); |
| 478 *result = 0; |
| 418 helper_->IsProgram(program, result_shm_id(), result_shm_offset()); | 479 helper_->IsProgram(program, result_shm_id(), result_shm_offset()); |
| 419 WaitForCmd(); | 480 WaitForCmd(); |
| 420 return GetResultAs<GLboolean>(); | 481 return *result; |
| 421 } | 482 } |
| 422 | 483 |
| 423 GLboolean IsRenderbuffer(GLuint renderbuffer) { | 484 GLboolean IsRenderbuffer(GLuint renderbuffer) { |
| 485 typedef IsRenderbuffer::Result Result; |
| 486 Result* result = GetResultAs<Result*>(); |
| 487 *result = 0; |
| 424 helper_->IsRenderbuffer(renderbuffer, result_shm_id(), result_shm_offset()); | 488 helper_->IsRenderbuffer(renderbuffer, result_shm_id(), result_shm_offset()); |
| 425 WaitForCmd(); | 489 WaitForCmd(); |
| 426 return GetResultAs<GLboolean>(); | 490 return *result; |
| 427 } | 491 } |
| 428 | 492 |
| 429 GLboolean IsShader(GLuint shader) { | 493 GLboolean IsShader(GLuint shader) { |
| 494 typedef IsShader::Result Result; |
| 495 Result* result = GetResultAs<Result*>(); |
| 496 *result = 0; |
| 430 helper_->IsShader(shader, result_shm_id(), result_shm_offset()); | 497 helper_->IsShader(shader, result_shm_id(), result_shm_offset()); |
| 431 WaitForCmd(); | 498 WaitForCmd(); |
| 432 return GetResultAs<GLboolean>(); | 499 return *result; |
| 433 } | 500 } |
| 434 | 501 |
| 435 GLboolean IsTexture(GLuint texture) { | 502 GLboolean IsTexture(GLuint texture) { |
| 503 typedef IsTexture::Result Result; |
| 504 Result* result = GetResultAs<Result*>(); |
| 505 *result = 0; |
| 436 helper_->IsTexture(texture, result_shm_id(), result_shm_offset()); | 506 helper_->IsTexture(texture, result_shm_id(), result_shm_offset()); |
| 437 WaitForCmd(); | 507 WaitForCmd(); |
| 438 return GetResultAs<GLboolean>(); | 508 return *result; |
| 439 } | 509 } |
| 440 | 510 |
| 441 void LineWidth(GLfloat width) { | 511 void LineWidth(GLfloat width) { |
| 442 helper_->LineWidth(width); | 512 helper_->LineWidth(width); |
| 443 } | 513 } |
| 444 | 514 |
| 445 void LinkProgram(GLuint program) { | 515 void LinkProgram(GLuint program) { |
| 446 helper_->LinkProgram(program); | 516 helper_->LinkProgram(program); |
| 447 } | 517 } |
| 448 | 518 |
| 449 void PixelStorei(GLenum pname, GLint param); | 519 void PixelStorei(GLenum pname, GLint param); |
| 450 | 520 |
| 451 void PolygonOffset(GLfloat factor, GLfloat units) { | 521 void PolygonOffset(GLfloat factor, GLfloat units) { |
| 452 helper_->PolygonOffset(factor, units); | 522 helper_->PolygonOffset(factor, units); |
| 453 } | 523 } |
| 454 | 524 |
| 455 void ReadPixels( | 525 void ReadPixels( |
| 456 GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, | 526 GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, |
| 457 void* pixels); | 527 void* pixels); |
| 458 | 528 |
| 459 void RenderbufferStorage( | 529 void RenderbufferStorage( |
| 460 GLenum target, GLenum internalformat, GLsizei width, GLsizei height) { | 530 GLenum target, GLenum internalformat, GLsizei width, GLsizei height) { |
| 531 if (width < 0) { |
| 532 SetGLError(GL_INVALID_VALUE); |
| 533 return; |
| 534 } |
| 535 if (height < 0) { |
| 536 SetGLError(GL_INVALID_VALUE); |
| 537 return; |
| 538 } |
| 461 helper_->RenderbufferStorage(target, internalformat, width, height); | 539 helper_->RenderbufferStorage(target, internalformat, width, height); |
| 462 } | 540 } |
| 463 | 541 |
| 464 void SampleCoverage(GLclampf value, GLboolean invert) { | 542 void SampleCoverage(GLclampf value, GLboolean invert) { |
| 465 helper_->SampleCoverage(value, invert); | 543 helper_->SampleCoverage(value, invert); |
| 466 } | 544 } |
| 467 | 545 |
| 468 void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) { | 546 void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) { |
| 547 if (width < 0) { |
| 548 SetGLError(GL_INVALID_VALUE); |
| 549 return; |
| 550 } |
| 551 if (height < 0) { |
| 552 SetGLError(GL_INVALID_VALUE); |
| 553 return; |
| 554 } |
| 469 helper_->Scissor(x, y, width, height); | 555 helper_->Scissor(x, y, width, height); |
| 470 } | 556 } |
| 471 | 557 |
| 472 void ShaderSource( | 558 void ShaderSource( |
| 473 GLuint shader, GLsizei count, const char** str, const GLint* length); | 559 GLuint shader, GLsizei count, const char** str, const GLint* length); |
| 474 | 560 |
| 475 void StencilFunc(GLenum func, GLint ref, GLuint mask) { | 561 void StencilFunc(GLenum func, GLint ref, GLuint mask) { |
| 476 helper_->StencilFunc(func, ref, mask); | 562 helper_->StencilFunc(func, ref, mask); |
| 477 } | 563 } |
| 478 | 564 |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 | 724 |
| 639 void VertexAttrib4fv(GLuint indx, const GLfloat* values) { | 725 void VertexAttrib4fv(GLuint indx, const GLfloat* values) { |
| 640 helper_->VertexAttrib4fvImmediate(indx, values); | 726 helper_->VertexAttrib4fvImmediate(indx, values); |
| 641 } | 727 } |
| 642 | 728 |
| 643 void VertexAttribPointer( | 729 void VertexAttribPointer( |
| 644 GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, | 730 GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, |
| 645 const void* ptr); | 731 const void* ptr); |
| 646 | 732 |
| 647 void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) { | 733 void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) { |
| 734 if (width < 0) { |
| 735 SetGLError(GL_INVALID_VALUE); |
| 736 return; |
| 737 } |
| 738 if (height < 0) { |
| 739 SetGLError(GL_INVALID_VALUE); |
| 740 return; |
| 741 } |
| 648 helper_->Viewport(x, y, width, height); | 742 helper_->Viewport(x, y, width, height); |
| 649 } | 743 } |
| 650 | 744 |
| 651 void SwapBuffers(); | 745 void SwapBuffers(); |
| 652 | 746 |
| 653 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_AUTOGEN_H_ | 747 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_AUTOGEN_H_ |
| 654 | 748 |
| OLD | NEW |