Beispiel #1
0
void glBegin(GLenum mode) {
    if (! state.list.compiling) {
        state.list.active = alloc_renderlist();
    }
    memcpy(state.list.active->lastColor, state.color, sizeof(GLfloat) * 4);
    state.list.active->mode = mode;
}
Beispiel #2
0
Datei: gl.c Projekt: rzr/glshim
void glNewList(GLuint list, GLenum mode) {
    if (! glIsList(list))
        return;

    state.list.name = list;
    state.list.mode = mode;
    // TODO: if state.list.active is already defined, we probably need to clean up here
    state.list.active = state.list.first = alloc_renderlist();
    state.list.compiling = true;
}
Beispiel #3
0
Datei: gl.c Projekt: rzr/glshim
static renderlist_t *arrays_to_renderlist(renderlist_t *list, GLenum mode,
                                        GLsizei skip, GLsizei count) {
    if (! list)
        list = alloc_renderlist();

    list->mode = mode;
    list->len = count;
    list->cap = count;
    if (state.enable.vertex_array) {
        list->vert = copy_gl_pointer(&state.pointers.vertex, 3, skip, count);
    }
    if (state.enable.color_array) {
        list->color = copy_gl_pointer(&state.pointers.color, 4, skip, count);
    }
    if (state.enable.normal_array) {
        list->normal = copy_gl_pointer(&state.pointers.normal, 3, skip, count);
    }
    if (state.enable.tex_coord_array) {
        list->tex = copy_gl_pointer(&state.pointers.tex_coord, 2, skip, count);
    }

    end_renderlist(list);
    return list;
}
Beispiel #4
0
Datei: gl.c Projekt: rzr/glshim
void glBegin(GLenum mode) {
    if (! state.list.compiling) {
        state.list.active = alloc_renderlist();
    }
    state.list.active->mode = mode;
}