#### Archived

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

# 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.

## 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};
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 on other sites
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 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 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 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...

Height Map Editor | Eternal Lands | Fast User Directory

##### Share on other sites
Source would be preferred but not necessary.

##### 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 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 on other sites
Yes, I destroy all the textures, then destroy the context, create a new full screen context, and reload all the textures.
I do everything by the book.
Anyway, I talked more with Jallen via e-mail, and he said he will submit the bug to the drivers guys, so they will fix it.

Height Map Editor | Eternal Lands | Fast User Directory

1. 1
2. 2
3. 3
Rutin
18
4. 4
JoeJ
14
5. 5

• 14
• 10
• 23
• 9
• 33
• ### Forum Statistics

• Total Topics
632631
• Total Posts
3007538
• ### Who's Online (See full list)

There are no registered users currently online

×