Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Raduprv

Problem with Nvidia cards under Linux

This topic is 5634 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In my game (Eternal Lands), I have a problem with the Nvidia drivers, on Linux. I use this function, to get the objects under the mouse:
  
int evaluate_colision()
{
	char pixels[16]={0};
	glReadBuffer(GL_BACK);
	glReadPixels(mouse_x, window_height-mouse_y, 1, 1, GL_LUMINANCE, GL_BYTE, &pixels);
	if(pixels[0])return 1;//there is something

	return 0;//no collision, sorry


}
  
Ok, now, it works fine under Windows, and also under Linux, except if the user has an Nvidia card. Furthermore, it works fine if it is in the windowed mode, but if it is in the fullscreen mode, it doesn''t work... So, I assume it is a problem with their drivers, but I am not 100% sure. Did someone experience similar behaviour? Thanks in advance. P.S. I am usign SDL, in case that matters, altho it shouldn''t... Height Map Editor | Eternal Lands | Fast User Directory

Share this post


Link to post
Share on other sites
Advertisement
You do know, that you are taking the address of a pointer in the glReadPixels() call, do you ? I don''t think this is what you want...
Why not totally drop the array, and use a simple char instead ?

Share this post


Link to post
Share on other sites
Yes, I am taking the address of a pointer, which happens to point right at the beginning of that array.
I used an array, and not a char because I had some problems, deciding what format to use, etc. Anyway, that shouldn''t matter, since at a time I read the entire array, just to be sure...

Anyway, I might be too tired, or something, so if you can explain me why my aproach is NOT good, please tell me.

Height Map Editor | Eternal Lands | Fast User Directory

Share this post


Link to post
Share on other sites
Can you post an app that reproduces the problem with the latest NVIDIA drivers? If so, I can file a bug so it will get fixed in the next driver releas.e

Share this post


Link to post
Share on other sites
Do you need the sources?
If not, just download Eternal Lands, and go to the full screen mode, then select the eye icon, and click on yourself. If you get no message, it means it doesn''t work. If you get a message like: "You see [your name]" it means it works...
And I downloaded the latest drivers only a few days ago...

Height Map Editor | Eternal Lands | Fast User Directory

Share this post


Link to post
Share on other sites
I can''t post the source, it is a closed source game. But the error occures in that specific function.
And BTW, it occured on all the Linux systems with a TNT or GF2 (don''t know about other Nvidia cards), not only mine.
And, since it works pretty well on other platforms, or other cards on Linux, I highly think it is an Nvidia problem, rather than a stupid mistake of mine...

Height Map Editor | Eternal Lands | Fast User Directory

Share this post


Link to post
Share on other sites
Strange, I hear the Nvidia cards/drivers are top notch for linux. Maybe you found a bug? You should try it with the latest drivers and see if it still happens.

"works fine if it is in the windowed mode, but if it is in the fullscreen mode.."

Do you let them switch display modes during the game, after you loaded textures and everything? I know if you do that it will mess you up. It could be some kind of fullscreen issue with the drivers. I''d maybe ask at opengl.org..

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!