View Full Version : How to determine a version number?
akuda
03-28-2006, 08:40 AM
I googled, and found something like this:
char *p;
p = (char *)glGetString(GL_VERSION);
if (p == NULL) {
printf("none");
return;
};
printf(".%3c.\n", p);
Unfortunatley, p is always NULL. Any idea why?
You need a valid and working context for this to work.
EDIT: didn't noticed it: %s should be best in your printf.
sansan
04-26-2006, 05: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!
create a context from a temporary window.
mikael_aronsson
04-27-2006, 02: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.
Mikael
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.