32-bit / 16-bit video settings - a bit OT

Hi,

I’m running an application which color depth is always 16bit. Though, when executed by root, I can get 32bit colors !

Does anyone know how to configure the GL so that 32bit is accessible to everyone (not just root). Maybe setup some permissions on files in /dev ?!

BTW, I’m using the latest drivers from the NVIDIA official website (posted the end of July, 2003).

Thanks in advance,

when you’re logged as non-root user, what is your xserver color depth ?

afaik, there is no “root only” restriction for color resolution when creating a visual. but you can’t get a resolution greater than the actual xserver color depth (you can’t have a 32 bit application when running a 16 bit xserver).

xdpyinfo will give you info for the current server resolution.

Thank you for the quick reply.

The “depth” is 24 (which corresponds to 32bpp) as defined in XF86Config-4, and as tested by xdpyinfo too.

The application is running from the same display.
I have two terminals : one logged as root, the other logged as user ‘vincoof’. And then I run the same application in each terminal.

I’ve also noticed that the application is able to change the screen resolution when executed by root. When executed by user, the screen resolution can’t be changed (at best the window is resized, but not the screen). How can I allow the user ‘vincoof’ to resize the screen ? Maybe that setting this authorization will solve the color depth issue.

[This message has been edited by vincoof (edited 08-07-2003).]

you said that you’re running an app which color depth is always 16bit. when you’re root, how do you make it running in 32bit mode ?

I’ve checked the XF86Config, .xserver, … files and there isn’t any option that restrict full color depth to root.

ok, I feel dumb now.
it works.
it was just an option that the root account did have and the user account did not. It was the ‘-opengl’ option ! Needless to say, I could have searched for a long time.

Thanks for the reply anyways. Things seem more clear now.

I still don’t know why the ‘-opengl’ option causes to lose the focus, but I don’t think it’s directly related to OpenGL, so my problem does not deserve to continue on the opengl.org forums.

Thanks again,

what is your -opengl option ?? I’ve never heard about that yet. Could you explain it please ?

It’s a command line argument that configures the graphics engine.
When you type :
“./myprogram -opengl”
it will execute the “myprogram” program and pass the “-opengl” argument. Then the program analyses the string and starts the OpenGL renderer instead of e.g. the software renderer. Well, I don’t think I really need to teach you how to use the command line argument in a program

So, why did you tell:
“it was just an option that the root account did have and the user account did not. It was the ‘-opengl’ option ! Needless to say, I could have searched for a long time.” ?

You mean your customer will need to be root to use opengl instead of software rendering ?

Needfull to say, we could have search for a long long time too :wink:

jide

You mean your customer will need to be root to use opengl instead of software rendering ?

As it was configured previously, yes if the program is executed with default arguments.
But now I’ve changed the behaviour so that both root and non-root users pass the same default arguments.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.