|
|
#1 | |
|
Registered User
|
Hi,
i am currently trying to get a PBuffer class to work on my Linux OS (Suse 9.1 Personal), my GPU is a nVidia GeForce 6610 XL. The class is based upon the nvidia demo-class pbuffer.cpp (but just the linux part implemented). I need the following components for my PBufferConfig: Code:
int configAttributes[] = {
GLX_DRAWABLE_TYPE,GLX_PBUFFER_BIT,
GLX_RENDER_TYPE,GLX_RGBA_BIT,
GLX_RED_SIZE, 32,
GLX_GREEN_SIZE, 32,
GLX_BLUE_SIZE, 32,
GLX_ALPHA_SIZE, 1
GLX_DOUBLEBUFFER, true,
GLX_FLOAT_COMPONENTS_NV,true
None
}
I included following headers (as they are included in the examples): Code:
#include <X11/X.h> #include <GL/gl.h> #include <GL/glx.h> Also i am not able to use one of the "...SGIX" functions, too. eg: glXQueryGLXPbufferSGIX and others. I am using FreeGlut on my system. glxinfo tells me that a GLX_NV_float_buffer is available. Does any one have a clue? Maybe i just need other glx sources, then please tell me where to get those. Please help! thx, Roger ------------------------------------------------------------ edit: further info i am compiling with following links: -L/usr/X11/lib -L/usr/lib -lCg -lCgGL -lGLEW -lglut -lGL -lGLU maybe some are obsolete, but as far as i dont know where to find the right components, i better linked all that was found ![]() ------------------------------------------------------------ edit: another problem, same class Code:
Display *dpy = glXGetCurrentDisplay(); Code:
Display *dpy = XOpenDisplay(0);
__________________
{ rtfm | rm -rf / } Last edited by realmaxime; 01-29-05 at 11:31 AM. |
|
|
|
|
|
|
#2 | |
|
Registered User
Join Date: May 2004
Posts: 3
|
GLX_FLOAT_COMPONENTS_NV is a token defined by the GLX_NV_float_buffer extension. To access this token you need to include <GL/glxext.h> or better yet goto the OpenGL registry at SGI's website and get the latest revision of the file.
The reason glXGetCurrentDisplay() is returning NULL is because the pbuffer.cpp class is designed so that pbuffer creation can be shared with the current rendering context or it can be separate in it's own context. However you are trying to create a shared pbuffer without creating a regular rendering context to begin with! So modify your code so that it either creates another rendering context first, or creates the pbuffer in it's own context. |
|
|
|
|
|
|
#3 |
|
Registered User
|
Thank you! I now found out how to get it running under linux, but well, it wont work under windows.
I got the leatest header files from sgi - developer central, but i cant really use them in my compiler. i m using dev-c++ to compile my code, because some of the code needs a "windows.h" file, which is not included into normal version of ms vc++ toolkit 2003 (that i downloaded before i used pbuffers )i get these messages: Code:
PBuffer.cpp: In member function `bool PBuffer::create(PBufferSettings)': PBuffer.cpp:220: error: `wglChoosePixelFormatARB' undeclared (first use this function) PBuffer.cpp:220: error: (Each undeclared identifier is reported only once for each function it appears in.) PBuffer.cpp:228: error: `wglCreatePbufferARB' undeclared (first use this function) PBuffer.cpp:235: error: `wglGetPbufferDCARB' undeclared (first use this function) PBuffer.cpp: In member function `bool PBuffer::destroy()': PBuffer.cpp:298: error: `wglReleasePbufferDCARB' undeclared (first use this function) PBuffer.cpp:299: error: `wglDestroyPbufferARB' undeclared (first use this function) PBuffer.cpp: In member function `bool PBuffer::check()': PBuffer.cpp:448: error: `wglQueryPbufferARB' undeclared (first use this my includes: Code:
#include <GL/gl.h> #include <GL/glext.h> #include <GL/glut.h> #ifndef _WIN32 // unix includes #include <X11/X.h> #include <GL/glx.h> #include <GL/glxext.h> #else // windows includes #include <windows.h> #include <GL/wglext.h> #endif roger ![]() [edit] ... just checkin out the glSDK from sgi, maybe i find some more there... [/edit]
__________________
{ rtfm | rm -rf / } |
|
|
|
![]() |
| Thread Tools | |
|
|