Files Classes Functions Hierarchy
#include <gobj.h>
Public Member Functions | |
| gobjglBegin (GLenum mode_) | |
| gobjglBegin (stringc &arg) | |
| Construct from string. | |
| boolc | serializeInverse (stringc &arg) |
| Construct from string. | |
| void | draw () |
| Draw the object. | |
Public Attributes | |
| GLenum | mode |
Definition at line 296 of file gobj.h.
| gobjglBegin::gobjglBegin | ( | GLenum | mode_ | ) | [inline] |
| gobjglBegin::gobjglBegin | ( | stringc & | arg | ) |
Construct from string.
Definition at line 366 of file gobj.cpp.
References asserteval, and serializeInverse().
00367 { 00368 asserteval(serializeInverse(arg)); 00369 }
| void gobjglBegin::draw | ( | ) | [inline, virtual] |
Draw the object.
Implements gobj.
Definition at line 309 of file gobj.h.
References GOBJDEBUGCODE, and mode.
00310 { GOBJDEBUGCODE glBegin(mode); }
Construct from string.
Definition at line 296 of file gobj.cpp.
References mode.
Referenced by gobjglBegin().
00297 { 00298 string s1(arg); 00299 spacertrim<>()(s1); 00300 00301 if (s1=="GL_POINTS") 00302 { 00303 mode = GL_POINTS; 00304 return true; 00305 } 00306 00307 if (s1=="GL_LINES") 00308 { 00309 mode = GL_LINES; 00310 return true; 00311 } 00312 00313 if (s1=="GL_LINE_STRIP") 00314 { 00315 mode = GL_LINE_STRIP; 00316 return true; 00317 } 00318 00319 if (s1=="GL_LINE_LOOP") 00320 { 00321 mode = GL_LINE_LOOP; 00322 return true; 00323 } 00324 00325 if (s1=="GL_TRIANGLES") 00326 { 00327 mode = GL_TRIANGLES; 00328 return true; 00329 } 00330 00331 if (s1=="GL_TRIANGLE_STRIP") 00332 { 00333 mode = GL_TRIANGLE_STRIP; 00334 return true; 00335 } 00336 00337 if (s1=="GL_TRIANGLE_FAN") 00338 { 00339 mode = GL_TRIANGLE_FAN; 00340 return true; 00341 } 00342 if (s1=="GL_QUADS") 00343 { 00344 mode = GL_QUADS; 00345 return true; 00346 } 00347 00348 if (s1=="GL_QUAD_STRIP") 00349 { 00350 mode = GL_QUAD_STRIP; 00351 return true; 00352 } 00353 00354 if (s1=="GL_POLYGON") 00355 { 00356 mode = GL_POLYGON; 00357 return true; 00358 } 00359 00360 cout << "error: gobjglBegin(" << arg << ");" << endl; 00361 assert(false); 00362 00363 return false; 00364 }
| GLenum gobjglBegin::mode |
1.5.8