nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   x86_64-1.0-8774 GL.so loading problem (http://www.nvnews.net/vbulletin/showthread.php?t=76253)

sdima135 09-05-06 07:54 AM

x86_64-1.0-8774 GL.so loading problem
 
I have problem with 64 bit NV drivers.
I've compiled same simple program on 32 & 64 bit plathform & get crash with 64 bit in libGL.so
so it very simple program:

#include <iostream.h>
#include <iomanip.h>
#include <GL/gl.h>
using namespace std;
#define PRINT(x) cout<<""<<setw(15)<<(x)<<" " #x "\n"<<flush

void* test1(void*)
{
PRINT("Test1");
glGetError();
PRINT("Test2");
return (void*)NULL;
};

int main()
{
void *res;
pthread_t m_thread_handle;

PRINT(glGetError());

pthread_create(&m_thread_handle,NULL,&test1,(void* )NULL);
sleep(1);
pthread_join(m_thread_handle,&res);

PRINT(glGetError());
return 0;
}
// command time
//g++ test.cpp -lGL -lpthread -o gltest; ./gltest

AaronP 09-05-06 10:47 AM

Re: x86_64-1.0-8774 GL.so loading problem
 
You have to create a GLX context and make it current before you can use OpenGL functions.

sdima135 09-05-06 11:15 AM

Re: x86_64-1.0-8774 GL.so loading problem
 
Thanks, but
1.The code is working ok on 32 bit plathform
2.I've get the code after stripping full code with the same problem :(

AaronP 09-05-06 11:27 AM

Re: x86_64-1.0-8774 GL.so loading problem
 
1 Attachment(s)
You still need to make a context current before you can use OpenGL. Attached is your code with some modifications to make it work.

sdima135 09-05-06 11:30 AM

Re: x86_64-1.0-8774 GL.so loading problem
 
Thank You very much - I going to incorporate the code. :)


All times are GMT -5. The time now is 02:43 AM.

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