Search
lxdream.org :: lxdream :: r1164:01b45ca393c6
lxdream 0.9.1
released Jun 29
Download Now
changeset1164:01b45ca393c6
parent1163:034252e0689d
child1165:13406c35849b
authornkeynes
dateSat Jan 22 06:07:17 2011 +1000 (8 years ago)
Mark the NV vertex range functions as weak (to keep things working on
drivers that don't provide the entry points)
Set the fence at the start (really just to prevent an error the first time
around)
src/drivers/gl_vbo.c
1.1 --- a/src/drivers/gl_vbo.c Fri Jan 21 06:41:34 2011 +1000
1.2 +++ b/src/drivers/gl_vbo.c Sat Jan 22 06:07:17 2011 +1000
1.3 @@ -132,6 +132,7 @@
1.4 {
1.5 vertex_buffer_t buf = vertex_buffer_new( &apple_vtable );
1.6 glGenFencesAPPLE(1, &buf->fence);
1.7 + glSetFenceAPPLE(buf->fence);
1.8 return buf;
1.9 }
1.10
1.11 @@ -139,6 +140,13 @@
1.12
1.13 #ifdef GL_VERTEX_ARRAY_RANGE_NV
1.14
1.15 +#pragma weak glVertexArrayRangeNV
1.16 +#pragma weak glFlushVertexArrayRangeNV
1.17 +#pragma weak glFinishFenceNV
1.18 +#pragma weak glSetFenceNV
1.19 +#pragma weak glGenFencesNV
1.20 +#pragma weak glDeleteFencesNV
1.21 +
1.22 static void *nv_map( vertex_buffer_t buf, uint32_t size )
1.23 {
1.24 glFinishFenceNV(buf->fence);
1.25 @@ -172,6 +180,7 @@
1.26 {
1.27 vertex_buffer_t buf = vertex_buffer_new( &nv_vtable );
1.28 glGenFencesNV(1, &buf->fence);
1.29 + glSetFenceNV(buf->fence, GL_ALL_COMPLETED_NV);
1.30 return buf;
1.31 }
1.32
.