View Single Post
Old 09-04-04, 11:06 PM   #1
Registered User
Join Date: Sep 2004
Posts: 1
Default GL_NV_pixel_data_range extension on Linux AMD64

Hi, I don't know if this forum is appropriate, but I couldn't find any better forum. If there's a better place to ask stuff like this please point out.

I'm a newbie openGL programmer and trying to get GL_NV_pixel_data_range extension work on Linux AMD64 (FX5900XT OpenGL 1.5.1 NVIDIA 61.11). glxinfo does report GL_NV_pixel_data_range availability and the header and library contains needed enums, functions and symbols but when excuted it behaves like the feature isn't implemented.

The following is relevant code snippet (I'm using gltest.c program from mplayer distribution as base).

size_t size = texture_width * texture_height * image_bytes;
ImageData=glXAllocateMemoryNV(size, 0.0, 1.0, 1.0);
if (!ImageData) {
fprintf(stderr, "allocation failed: %s, falling back to malloc\n",
if (!ImageData) {
fprintf(stderr, "what???\n");
return 1;
memset(ImageData, 128, texture_width * texture_height * image_bytes);

glPixelDataRangeNV(GL_WRITE_PIXEL_DATA_RANGE_NV, size, ImageData);
fprintf(stderr, "glPixelDataRangeNV: %s\n", gluErrorString(glGetError()));

fprintf(stderr, "glEnableClientState: %s\n", gluErrorString(glGetError()));

GLboolean enable;
GLint len;
void *p;
glGetBooleanv(GL_WRITE_PIXEL_DATA_RANGE_NV, &enable);
fprintf(stderr, "enable=%d len=%d p=%p\n", enable, len, p);
GLenum err;
while ((err = glGetError()) != GL_NO_ERROR)
fprintf(stderr, "errors: %s\n", gluErrorString(err));

And the result is

Xlib: extension "XFree86-DRI" missing on display ":0.0".
allocation failed: no error, falling back to malloc
glPixelDataRangeNV: no error
glEnableClientState: invalid enumerant
enable=149 len=0 p=(nil)
errors: invalid enumerant

Anybody has any idea about what's going on? What I wanna do is to modify mplayer gl2 vo driver such that cpu cycles aren't wasted bitblitting frames from main memory into texture memory.
tejun is offline   Reply With Quote