View Full Version : How to determine a version number?

03-28-2006, 09:40 AM
I googled, and found something like this:

char *p;

p = (char *)glGetString(GL_VERSION);
if (p == NULL) {

printf(".%3c.\n", p);

Unfortunatley, p is always NULL. Any idea why?

03-28-2006, 09:47 AM
You need a valid and working context for this to work.

EDIT: didn't noticed it: %s should be best in your printf.

04-26-2006, 06:41 AM
A bit off-topic: any ideas how I can get graphic driver version in run-time?

More exactly, a Linux application needs to determine the following two things:
1. It deals with a NVIDIA card
2. It deals with a particular NVIDIA driver version.

A minor detail :) - this should be done before a rendering context is created - thus I cannot rely on the all-mighty glGetString().

Thanks in advance!

04-27-2006, 03:05 AM
create a context from a temporary window.

04-27-2006, 03:23 AM
The problem is that there is no way to know what driver will be used until you have a context because the type of context requested might depend on a specific driver or might have to fall back on software rendering.