nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   GL_NV_pixel_data_range extension on Linux AMD64 (http://www.nvnews.net/vbulletin/showthread.php?t=36210)

tejun 09-04-04 11:06 PM

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",
gluErrorString(glGetError()));
ImageData=malloc(size);
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()));

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

GLboolean enable;
GLint len;
void *p;
glGetBooleanv(GL_WRITE_PIXEL_DATA_RANGE_NV, &enable);
glGetIntegerv(GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV, &len);
glGetPointerv(GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV , &p);
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.


All times are GMT -5. The time now is 08:45 AM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.