Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(452)

Side by Side Diff: gpu/command_buffer/client/gles2_implementation_autogen.h

Issue 660229: "/b/slave/chromium-rel-linux/build/src/gpu/command_buffer/client/gles2_demo_c... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
114 helper_->CopyTexImage2D( 106 helper_->CopyTexImage2D(
115 target, level, internalformat, x, y, width, height, border); 107 target, level, internalformat, x, y, width, height, border);
116 } 108 }
117 109
118 void CopyTexSubImage2D( 110 void CopyTexSubImage2D(
119 GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, 111 GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y,
120 GLsizei width, GLsizei height) { 112 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 }
129 helper_->CopyTexSubImage2D( 113 helper_->CopyTexSubImage2D(
130 target, level, xoffset, yoffset, x, y, width, height); 114 target, level, xoffset, yoffset, x, y, width, height);
131 } 115 }
132 116
133 GLuint CreateProgram() { 117 GLuint CreateProgram() {
134 GLuint client_id; 118 GLuint client_id;
135 MakeIds(1, &client_id); 119 MakeIds(1, &client_id);
136 helper_->CreateProgram(client_id); 120 helper_->CreateProgram(client_id);
137 return client_id; 121 return client_id;
138 } 122 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 178
195 void Disable(GLenum cap) { 179 void Disable(GLenum cap) {
196 helper_->Disable(cap); 180 helper_->Disable(cap);
197 } 181 }
198 182
199 void DisableVertexAttribArray(GLuint index) { 183 void DisableVertexAttribArray(GLuint index) {
200 helper_->DisableVertexAttribArray(index); 184 helper_->DisableVertexAttribArray(index);
201 } 185 }
202 186
203 void DrawArrays(GLenum mode, GLint first, GLsizei count) { 187 void DrawArrays(GLenum mode, GLint first, GLsizei count) {
204 if (count < 0) {
205 SetGLError(GL_INVALID_VALUE);
206 return;
207 }
208 helper_->DrawArrays(mode, first, count); 188 helper_->DrawArrays(mode, first, count);
209 } 189 }
210 190
211 void DrawElements( 191 void DrawElements(
212 GLenum mode, GLsizei count, GLenum type, const void* indices); 192 GLenum mode, GLsizei count, GLenum type, const void* indices);
213 193
214 void Enable(GLenum cap) { 194 void Enable(GLenum cap) {
215 helper_->Enable(cap); 195 helper_->Enable(cap);
216 } 196 }
217 197
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 267
288 void GetBufferParameteriv(GLenum target, GLenum pname, GLint* params) { 268 void GetBufferParameteriv(GLenum target, GLenum pname, GLint* params) {
289 helper_->GetBufferParameteriv( 269 helper_->GetBufferParameteriv(
290 target, pname, result_shm_id(), result_shm_offset()); 270 target, pname, result_shm_id(), result_shm_offset());
291 WaitForCmd(); 271 WaitForCmd();
292 GLsizei num_values = util_.GLGetNumValuesReturned(pname); 272 GLsizei num_values = util_.GLGetNumValuesReturned(pname);
293 DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult); 273 DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult);
294 memcpy(params, result_buffer_, num_values * sizeof(*params)); 274 memcpy(params, result_buffer_, num_values * sizeof(*params));
295 } 275 }
296 276
297 GLenum GetError(); 277 GLenum GetError() {
278 helper_->GetError(result_shm_id(), result_shm_offset());
279 WaitForCmd();
280 return GetResultAs<GLenum>();
281 }
298 282
299 void GetFloatv(GLenum pname, GLfloat* params) { 283 void GetFloatv(GLenum pname, GLfloat* params) {
300 helper_->GetFloatv(pname, result_shm_id(), result_shm_offset()); 284 helper_->GetFloatv(pname, result_shm_id(), result_shm_offset());
301 WaitForCmd(); 285 WaitForCmd();
302 GLsizei num_values = util_.GLGetNumValuesReturned(pname); 286 GLsizei num_values = util_.GLGetNumValuesReturned(pname);
303 DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult); 287 DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult);
304 memcpy(params, result_buffer_, num_values * sizeof(*params)); 288 memcpy(params, result_buffer_, num_values * sizeof(*params));
305 } 289 }
306 290
307 void GetFramebufferAttachmentParameteriv( 291 void GetFramebufferAttachmentParameteriv(
(...skipping 15 matching lines...) Expand all
323 } 307 }
324 308
325 void GetProgramiv(GLuint program, GLenum pname, GLint* params) { 309 void GetProgramiv(GLuint program, GLenum pname, GLint* params) {
326 helper_->GetProgramiv(program, pname, result_shm_id(), result_shm_offset()); 310 helper_->GetProgramiv(program, pname, result_shm_id(), result_shm_offset());
327 WaitForCmd(); 311 WaitForCmd();
328 GLsizei num_values = util_.GLGetNumValuesReturned(pname); 312 GLsizei num_values = util_.GLGetNumValuesReturned(pname);
329 DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult); 313 DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult);
330 memcpy(params, result_buffer_, num_values * sizeof(*params)); 314 memcpy(params, result_buffer_, num_values * sizeof(*params));
331 } 315 }
332 316
317 // TODO(gman): Implement this
333 void GetProgramInfoLog( 318 void GetProgramInfoLog(
334 GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) { 319 GLuint program, GLsizei bufsize, GLsizei* length, char* infolog);
335 helper_->SetBucketSize(kResultBucketId, 0); 320
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 }
348 void GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) { 321 void GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) {
349 helper_->GetRenderbufferParameteriv( 322 helper_->GetRenderbufferParameteriv(
350 target, pname, result_shm_id(), result_shm_offset()); 323 target, pname, result_shm_id(), result_shm_offset());
351 WaitForCmd(); 324 WaitForCmd();
352 GLsizei num_values = util_.GLGetNumValuesReturned(pname); 325 GLsizei num_values = util_.GLGetNumValuesReturned(pname);
353 DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult); 326 DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult);
354 memcpy(params, result_buffer_, num_values * sizeof(*params)); 327 memcpy(params, result_buffer_, num_values * sizeof(*params));
355 } 328 }
356 329
357 void GetShaderiv(GLuint shader, GLenum pname, GLint* params) { 330 void GetShaderiv(GLuint shader, GLenum pname, GLint* params) {
358 helper_->GetShaderiv(shader, pname, result_shm_id(), result_shm_offset()); 331 helper_->GetShaderiv(shader, pname, result_shm_id(), result_shm_offset());
359 WaitForCmd(); 332 WaitForCmd();
360 GLsizei num_values = util_.GLGetNumValuesReturned(pname); 333 GLsizei num_values = util_.GLGetNumValuesReturned(pname);
361 DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult); 334 DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult);
362 memcpy(params, result_buffer_, num_values * sizeof(*params)); 335 memcpy(params, result_buffer_, num_values * sizeof(*params));
363 } 336 }
364 337
338 // TODO(gman): Implement this
365 void GetShaderInfoLog( 339 void GetShaderInfoLog(
366 GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) { 340 GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog);
367 helper_->SetBucketSize(kResultBucketId, 0); 341
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 }
380 void GetShaderPrecisionFormat( 342 void GetShaderPrecisionFormat(
381 GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); 343 GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
382 344
345 // TODO(gman): Implement this
383 void GetShaderSource( 346 void GetShaderSource(
384 GLuint shader, GLsizei bufsize, GLsizei* length, char* source) { 347 GLuint shader, GLsizei bufsize, GLsizei* length, char* source);
385 helper_->SetBucketSize(kResultBucketId, 0); 348
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 }
398 const GLubyte* GetString(GLenum name); 349 const GLubyte* GetString(GLenum name);
399 350
400 void GetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) { 351 void GetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) {
401 helper_->GetTexParameterfv( 352 helper_->GetTexParameterfv(
402 target, pname, result_shm_id(), result_shm_offset()); 353 target, pname, result_shm_id(), result_shm_offset());
403 WaitForCmd(); 354 WaitForCmd();
404 GLsizei num_values = util_.GLGetNumValuesReturned(pname); 355 GLsizei num_values = util_.GLGetNumValuesReturned(pname);
405 DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult); 356 DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult);
406 memcpy(params, result_buffer_, num_values * sizeof(*params)); 357 memcpy(params, result_buffer_, num_values * sizeof(*params));
407 } 358 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 memcpy(params, result_buffer_, num_values * sizeof(*params)); 390 memcpy(params, result_buffer_, num_values * sizeof(*params));
440 } 391 }
441 392
442 void GetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer); 393 void GetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer);
443 394
444 void Hint(GLenum target, GLenum mode) { 395 void Hint(GLenum target, GLenum mode) {
445 helper_->Hint(target, mode); 396 helper_->Hint(target, mode);
446 } 397 }
447 398
448 GLboolean IsBuffer(GLuint buffer) { 399 GLboolean IsBuffer(GLuint buffer) {
449 typedef IsBuffer::Result Result;
450 Result* result = GetResultAs<Result*>();
451 *result = 0;
452 helper_->IsBuffer(buffer, result_shm_id(), result_shm_offset()); 400 helper_->IsBuffer(buffer, result_shm_id(), result_shm_offset());
453 WaitForCmd(); 401 WaitForCmd();
454 return *result; 402 return GetResultAs<GLboolean>();
455 } 403 }
456 404
457 GLboolean IsEnabled(GLenum cap) { 405 GLboolean IsEnabled(GLenum cap) {
458 typedef IsEnabled::Result Result;
459 Result* result = GetResultAs<Result*>();
460 *result = 0;
461 helper_->IsEnabled(cap, result_shm_id(), result_shm_offset()); 406 helper_->IsEnabled(cap, result_shm_id(), result_shm_offset());
462 WaitForCmd(); 407 WaitForCmd();
463 return *result; 408 return GetResultAs<GLboolean>();
464 } 409 }
465 410
466 GLboolean IsFramebuffer(GLuint framebuffer) { 411 GLboolean IsFramebuffer(GLuint framebuffer) {
467 typedef IsFramebuffer::Result Result;
468 Result* result = GetResultAs<Result*>();
469 *result = 0;
470 helper_->IsFramebuffer(framebuffer, result_shm_id(), result_shm_offset()); 412 helper_->IsFramebuffer(framebuffer, result_shm_id(), result_shm_offset());
471 WaitForCmd(); 413 WaitForCmd();
472 return *result; 414 return GetResultAs<GLboolean>();
473 } 415 }
474 416
475 GLboolean IsProgram(GLuint program) { 417 GLboolean IsProgram(GLuint program) {
476 typedef IsProgram::Result Result;
477 Result* result = GetResultAs<Result*>();
478 *result = 0;
479 helper_->IsProgram(program, result_shm_id(), result_shm_offset()); 418 helper_->IsProgram(program, result_shm_id(), result_shm_offset());
480 WaitForCmd(); 419 WaitForCmd();
481 return *result; 420 return GetResultAs<GLboolean>();
482 } 421 }
483 422
484 GLboolean IsRenderbuffer(GLuint renderbuffer) { 423 GLboolean IsRenderbuffer(GLuint renderbuffer) {
485 typedef IsRenderbuffer::Result Result;
486 Result* result = GetResultAs<Result*>();
487 *result = 0;
488 helper_->IsRenderbuffer(renderbuffer, result_shm_id(), result_shm_offset()); 424 helper_->IsRenderbuffer(renderbuffer, result_shm_id(), result_shm_offset());
489 WaitForCmd(); 425 WaitForCmd();
490 return *result; 426 return GetResultAs<GLboolean>();
491 } 427 }
492 428
493 GLboolean IsShader(GLuint shader) { 429 GLboolean IsShader(GLuint shader) {
494 typedef IsShader::Result Result;
495 Result* result = GetResultAs<Result*>();
496 *result = 0;
497 helper_->IsShader(shader, result_shm_id(), result_shm_offset()); 430 helper_->IsShader(shader, result_shm_id(), result_shm_offset());
498 WaitForCmd(); 431 WaitForCmd();
499 return *result; 432 return GetResultAs<GLboolean>();
500 } 433 }
501 434
502 GLboolean IsTexture(GLuint texture) { 435 GLboolean IsTexture(GLuint texture) {
503 typedef IsTexture::Result Result;
504 Result* result = GetResultAs<Result*>();
505 *result = 0;
506 helper_->IsTexture(texture, result_shm_id(), result_shm_offset()); 436 helper_->IsTexture(texture, result_shm_id(), result_shm_offset());
507 WaitForCmd(); 437 WaitForCmd();
508 return *result; 438 return GetResultAs<GLboolean>();
509 } 439 }
510 440
511 void LineWidth(GLfloat width) { 441 void LineWidth(GLfloat width) {
512 helper_->LineWidth(width); 442 helper_->LineWidth(width);
513 } 443 }
514 444
515 void LinkProgram(GLuint program) { 445 void LinkProgram(GLuint program) {
516 helper_->LinkProgram(program); 446 helper_->LinkProgram(program);
517 } 447 }
518 448
519 void PixelStorei(GLenum pname, GLint param); 449 void PixelStorei(GLenum pname, GLint param);
520 450
521 void PolygonOffset(GLfloat factor, GLfloat units) { 451 void PolygonOffset(GLfloat factor, GLfloat units) {
522 helper_->PolygonOffset(factor, units); 452 helper_->PolygonOffset(factor, units);
523 } 453 }
524 454
525 void ReadPixels( 455 void ReadPixels(
526 GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, 456 GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type,
527 void* pixels); 457 void* pixels);
528 458
529 void RenderbufferStorage( 459 void RenderbufferStorage(
530 GLenum target, GLenum internalformat, GLsizei width, GLsizei height) { 460 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 }
539 helper_->RenderbufferStorage(target, internalformat, width, height); 461 helper_->RenderbufferStorage(target, internalformat, width, height);
540 } 462 }
541 463
542 void SampleCoverage(GLclampf value, GLboolean invert) { 464 void SampleCoverage(GLclampf value, GLboolean invert) {
543 helper_->SampleCoverage(value, invert); 465 helper_->SampleCoverage(value, invert);
544 } 466 }
545 467
546 void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) { 468 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 }
555 helper_->Scissor(x, y, width, height); 469 helper_->Scissor(x, y, width, height);
556 } 470 }
557 471
558 void ShaderSource( 472 void ShaderSource(
559 GLuint shader, GLsizei count, const char** str, const GLint* length); 473 GLuint shader, GLsizei count, const char** str, const GLint* length);
560 474
561 void StencilFunc(GLenum func, GLint ref, GLuint mask) { 475 void StencilFunc(GLenum func, GLint ref, GLuint mask) {
562 helper_->StencilFunc(func, ref, mask); 476 helper_->StencilFunc(func, ref, mask);
563 } 477 }
564 478
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 638
725 void VertexAttrib4fv(GLuint indx, const GLfloat* values) { 639 void VertexAttrib4fv(GLuint indx, const GLfloat* values) {
726 helper_->VertexAttrib4fvImmediate(indx, values); 640 helper_->VertexAttrib4fvImmediate(indx, values);
727 } 641 }
728 642
729 void VertexAttribPointer( 643 void VertexAttribPointer(
730 GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, 644 GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride,
731 const void* ptr); 645 const void* ptr);
732 646
733 void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) { 647 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 }
742 helper_->Viewport(x, y, width, height); 648 helper_->Viewport(x, y, width, height);
743 } 649 }
744 650
745 void SwapBuffers(); 651 void SwapBuffers();
746 652
747 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_AUTOGEN_H_ 653 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_AUTOGEN_H_
748 654
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.cc ('k') | gpu/command_buffer/common/GLES2/gl2types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698