diff options
Diffstat (limited to 'src/model.c')
-rw-r--r-- | src/model.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/model.c b/src/model.c index 1e43297..c159aa1 100644 --- a/src/model.c +++ b/src/model.c @@ -78,14 +78,6 @@ static Primitive *model_add_primitive(Model *model, GLenum type, GLfloat *vertic Primitive *p; - /* Sanity check */ - if ( type == PRIMITIVE_HEMISPHERE ) { - if ( !(attribs & ATTRIB_RADIUS) ) { - fprintf(stderr, "Radius must be specified for all hemispheres in model '%s'\n", model->name); - return NULL; - } - } - p = malloc(sizeof(Primitive)); if ( p == NULL ) return NULL; @@ -124,9 +116,9 @@ static Primitive *model_add_primitive(Model *model, GLenum type, GLfloat *vertic p->radius = radius; p->shininess = shininess; - if ( vbos && ( type != PRIMITIVE_HEMISPHERE ) ) { + if ( vbos ) { - /* FIXME: Move this snippet to render.c is some tidy way */ + /* FIXME: Move this snippet to render.c in some tidy way */ glGenBuffers(1, &p->vertices_buffer); glBindBuffer(GL_ARRAY_BUFFER, p->vertices_buffer); @@ -257,9 +249,6 @@ static int model_load(ModelContext *ctx, const char *name, RenderContext *render if ( strncmp(line, "TRIANGLES", 9) == 0 ) { type = PRIMITIVE_TRIANGLES; } - if ( strncmp(line, "HEMISPHERE", 10) == 0 ) { - type = PRIMITIVE_HEMISPHERE; - } if ( sscanf(line, "%f %f %f %f %f", &forget, &forget, &forget, &x, &y) == 5 ) { texx = x; texy = y; |