| Line | |
|---|
| 1 | #include "zgl.h" |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | void glopClearColor(GLContext *c,GLParam *p) |
|---|
| 5 | { |
|---|
| 6 | c->clear_color.v[0]=p[1].f; |
|---|
| 7 | c->clear_color.v[1]=p[2].f; |
|---|
| 8 | c->clear_color.v[2]=p[3].f; |
|---|
| 9 | c->clear_color.v[3]=p[4].f; |
|---|
| 10 | } |
|---|
| 11 | void glopClearDepth(GLContext *c,GLParam *p) |
|---|
| 12 | { |
|---|
| 13 | c->clear_depth=p[1].f; |
|---|
| 14 | } |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | void glopClear(GLContext *c,GLParam *p) |
|---|
| 18 | { |
|---|
| 19 | int mask=p[1].i; |
|---|
| 20 | int z=0; |
|---|
| 21 | int r=(int)(c->clear_color.v[0]*65535); |
|---|
| 22 | int g=(int)(c->clear_color.v[1]*65535); |
|---|
| 23 | int b=(int)(c->clear_color.v[2]*65535); |
|---|
| 24 | |
|---|
| 25 | /* TODO : correct value of Z */ |
|---|
| 26 | |
|---|
| 27 | ZB_clear(c->zb,mask & GL_DEPTH_BUFFER_BIT,z, |
|---|
| 28 | mask & GL_COLOR_BUFFER_BIT,r,g,b); |
|---|
| 29 | } |
|---|
| 30 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.