[Lxdream-dev] [Lxdream-commit] 1160:219d05b638de in lxdream/src/drivers: Add gl_vbo.c

Harley Laue losinggeneration at gmail.com
Fri Jan 21 07:08:20 PST 2011


Nathan Keynes wrote:
> On Fri, Jan 21, 2011 at 9:13 AM, Harley Laue <losinggeneration at gmail.com>
wrote:
> > nkeynes at lxdream.org wrote:
> >> Commit in lxdream/src/drivers
> >>   gl_vbo.c  +265  added 219d05b638de
> >>   Add gl_vbo.c
> >>
> >> lxdream/src/drivers
> >>
> >> gl_vbo.c added at 219d05b638de
> >
> > <snip>
> >
> >> +#ifdef GL_VERTEX_ARRAY_RANGE_NV
> >
> > This doesn't seem to work on my machine with Mesa/open source 3D drivers
> > for ATI. It appears that glext.h always defines it. Perhaps a check in
> > configure.in will need to be made against libGL* for one of the
> > gl*Fence*NV functions to allow it to properly compile.
>
> Hi Harley,
>
>    Could you please try the patch below and let me know if this works
> correctly for you? My preference is for a single binary that works
> with all drivers where possible.
>
>    Do you know if there's any equivalent extension for ATI cards? If
> so it'd probably be worth adding, but unfortunately I don't have any
> ATI hardware handy to test with.
>
> Cheers,
> Nathan
>
> diff -r 034252e0689d src/drivers/gl_vbo.c
> --- a/src/drivers/gl_vbo.c	Fri Jan 21 06:41:34 2011 +1000
> +++ b/src/drivers/gl_vbo.c	Fri Jan 21 09:46:16 2011 +1000
> @@ -139,6 +139,13 @@
>
>  #ifdef GL_VERTEX_ARRAY_RANGE_NV
>
> +#pragma weak glVertexArrayRangeNV
> +#pragma weak glFlushVertexArrayRangeNV
> +#pragma weak glFinishFenceNV
> +#pragma weak glSetFenceNV
> +#pragma weak glGenFencesNV
> +#pragma weak glDeleteFencesNV
> +
>  static void *nv_map( vertex_buffer_t buf, uint32_t size )
>  {
>      glFinishFenceNV(buf->fence);

It does indeed compile, run, and is no worse off then it was before.
Just hope that I or others don't do anything crazy like trying to
compile it with Clang which doesn't, at least yet, support pragma weak
:)

Seriously, the open source ATI drivers could use a lot of work.
Luckily that's not your  problem. I more like to test it on the few
different hardware/card  configurations I have when I have a moment to
spare. I'll probably also be  trying it on my laptop which has an
Intel GPU (which again, I don't expect to  work great.)



More information about the Lxdream-dev mailing list