Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fixing Win32 build with SCons
07-19-2007, 08:56 PM,
#37
 
thelusiv Wrote:*Using GLEW would make it almost unnecessary for us to maintain the CARDINFO class (or at least make the CARDINFO class much simpler).
This isn't true; the cardinfo class is necessary. There are 4 functions the cardinfo class provides. 1) The cardinfo class supplies an interface to the rest of the program to be able to get graphics card parameters. This allows all of the other classes to be dependent on CARDINFO rather than on GL or GLEW functions (this abstraction is nice, I think). 2) The cardinfo class has logic that will do things like, for example, check if all extensions are present (vertex programs, fragment programs, etc) to support shaders as we use them. The other classes can then just ask the cardinfo class if shaders are supported instead of having to manually check for all of the right extensions and settings each time. 3) The cardinfo also does more than track supported extensions; for example, it keeps track of how many texture units are supported, the maximum anisotropy level, etc. 4) The cardinfo class tells the user (currently gets printed on the console) what functionality the card does and does not support, out of the total list of functionality that VDrift cares about. Because of these reasons, getting rid of the CARDINFO class doesn't make sense.

Quote:Personally I think the best way to go would be to modify the CARDINFO class so that it uses GLEW to do all the work.
The CARDINFO class currently uses OpenGL to query what extensions are supported. GLEW has ways to query what extensions are supported, too. The end result is identical (there's no special logic in telling you whether or not an extension is supported or not -- it either is or it isn't, and it's determined by logic in the graphics card driver).

I'm totally baffled as to 1) what problem you think there is with the CARDINFO class and 2) what GLEW would bring to the table. I think you're vastly over-estimating the complexity of querying for extensions -- you just call a function, and the graphics card driver spits out a list of extensions it supports.

To really hammer all of this home, go open cardinfo.cpp. The ONLY call to OpenGL to check for extensions is line 8. I quote:
Code:
char * temp = (char *) glGetString(GL_EXTENSIONS);
Explain to me what the problem here is, and how using GLEW makes this better.
Reply


Messages In This Thread
Fixing Win32 build with SCons - by thelusiv - 07-08-2007, 04:56 AM
[No subject] - by joevenzon_phpbb2_import3 - 07-08-2007, 01:48 PM
[No subject] - by thelusiv - 07-08-2007, 03:25 PM
[No subject] - by thelusiv - 07-09-2007, 01:10 AM
[No subject] - by mak77 - 07-09-2007, 03:45 PM
[No subject] - by thelusiv - 07-09-2007, 05:09 PM
[No subject] - by mak77 - 07-09-2007, 05:15 PM
[No subject] - by thelusiv - 07-09-2007, 05:26 PM
[No subject] - by mak77 - 07-09-2007, 05:32 PM
[No subject] - by thelusiv - 07-09-2007, 05:44 PM
[No subject] - by mak77 - 07-09-2007, 05:48 PM
[No subject] - by thelusiv - 07-09-2007, 05:54 PM
[No subject] - by mak77 - 07-09-2007, 06:23 PM
[No subject] - by joevenzon_phpbb2_import3 - 07-09-2007, 11:03 PM
[No subject] - by thelusiv - 07-10-2007, 03:02 AM
[No subject] - by mak77 - 07-10-2007, 07:43 AM
[No subject] - by joevenzon_phpbb2_import3 - 07-10-2007, 10:13 AM
[No subject] - by thelusiv - 07-10-2007, 11:56 AM
[No subject] - by joevenzon_phpbb2_import3 - 07-10-2007, 09:01 PM
[No subject] - by mak77 - 07-11-2007, 04:20 PM
[No subject] - by mak77 - 07-12-2007, 05:38 AM
[No subject] - by thelusiv - 07-13-2007, 02:36 PM
[No subject] - by mak77 - 07-14-2007, 05:18 AM
[No subject] - by thelusiv - 07-16-2007, 01:46 AM
[No subject] - by mak77 - 07-16-2007, 06:22 AM
[No subject] - by joevenzon_phpbb2_import3 - 07-16-2007, 10:13 AM
[No subject] - by mak77 - 07-16-2007, 11:41 AM
[No subject] - by thelusiv - 07-16-2007, 12:50 PM
[No subject] - by rookie1 - 07-17-2007, 07:10 AM
[No subject] - by thelusiv - 07-17-2007, 11:33 PM
[No subject] - by joevenzon_phpbb2_import3 - 07-18-2007, 10:04 AM
[No subject] - by rookie1 - 07-19-2007, 08:28 AM
[No subject] - by joevenzon_phpbb2_import3 - 07-19-2007, 09:58 AM
[No subject] - by rookie1 - 07-19-2007, 11:23 AM
[No subject] - by abs1nth - 07-19-2007, 01:10 PM
[No subject] - by thelusiv - 07-19-2007, 01:17 PM
[No subject] - by joevenzon_phpbb2_import3 - 07-19-2007, 08:56 PM
[No subject] - by joevenzon_phpbb2_import3 - 07-19-2007, 09:07 PM
[No subject] - by rookie1 - 07-20-2007, 12:21 AM
[No subject] - by joevenzon_phpbb2_import3 - 07-20-2007, 10:00 AM
[No subject] - by thelusiv - 08-15-2007, 11:30 PM
[No subject] - by joevenzon_phpbb2_import3 - 08-16-2007, 12:43 PM
[No subject] - by mak77 - 08-24-2007, 05:06 AM
[No subject] - by thelusiv - 08-27-2007, 02:06 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)