Home
Name Modified Size InfoDownloads / Week
Readme.txt 2017-03-06 3.5 kB
glhlib_2_1_win.zip 2011-03-11 938.6 kB
glhlib_2_0_win.zip 2010-11-23 858.1 kB
Totals: 3 Items   1.8 MB 2
NOTE:	This readme is in plain text format, which is ugly.
	I recommend that you download the project and open the RTF version instead.




Graphics Library Helper aka glh
Copyright (C) 2001-2011 Vrej Melkonian All Rights Reserved.

Be sure to read copyright.txt before using this library.

**** This Readme has been updated on Tuesday, Oct 26, 2010 ****


Where is the DOCUMENTATION?
I will explain how to use glhlib right here.
Header file (glhlib.h) contains comments and usage above each function therefore it is easy to use.

All Functions.rtf was recently added for new people to scan and see all the functions available.

As you might have guessed, glhlib has been written using VC++ version 6.0 but at some point I might move it to VC++ Express 2005 or 2008 or 2010 or whatever future version Microsoft comes up with.
If you want to compile with another compiler, go ahead. If you want me to upload it, let me know.
If you want to make a Linux or OSX version, go ahead. If you want me to upload it, let me know.

glhlib assumes 32 bit.
Probably some parts need to be corrected for 64 bit.

As for glhScaleImage_asm386, for sure, this would be too much work to port to 64 bit so it is probably best to comment it out or put an ifdef.

Most of the rest of the code is just C++ so it will compile for 64 bit and any other OS.

To Get Started
- Copy the .h file to the GL folder of your dev program.
   If you are using VC++, then I'm sure you know where to find it.
- Copy the .lib file to the lib folder of your dev program
   If you are using VC++, then I'm sure you know where to find it.
- Copy the .dll file temporarily to your system folder.
	(Normally, you should keep the glhlib.dll in your program's folder
	when you distribute your program to others)



#include <GL/glhlib.h>  //<-- in your program


Before using this library, call
glhInitLibrary()

and check the version and other info with

int params[2];	//32 bit values
glhGetIntegerv(GLH_GLHLIB_VERSION, params);
if((params[0] == 1) && (params[1] == 65))
	MESSAGE("ALL IS GOOD :) ");
else
	MESSAGE("ALL IS BAD :( ");

glhGetIntegerv(GLH_OPENGL_HARDWAREACCELERATION, params);
if(params[0] == 1)
	MESSAGE("ALL IS GOOD :) ");
else
	MESSAGE("ALL IS BAD :( ");
	
glhGetIntegerv(GLH_OPENGL_VERSION, params);
if((params[0] == 2) && (params[1] == 1))
	MESSAGE("GL 2.1 is supported. ALL IS GOOD :) ");
else
	MESSAGE("ALL IS BAD :( ");

glhGetIntegerv(GLH_GLSL_VERSION, params);
if((params[0] == 1) && (params[1] == 1))
	MESSAGE("GLSL 1.1 is supported. ALL IS GOOD :) ");
else
	MESSAGE("ALL IS BAD :( ");

glhGetIntegerv(GLH_GPU_SHADERMODEL, params);
if((params[0] == 4) && (params[1] == 0))
	MESSAGE("SM 4.0. ALL IS GOOD :) ");
else
	MESSAGE("ALL IS BAD :( ");

glhGetIntegerv(GLH_VENDOR, params);
if(params[0] == VENDOR_NVIDIA)
	MESSAGE("nVidia");
else
	MESSAGE("Not nVidia");





and for shutting down, call
glhShutDownLibrary()

These 2 functions are defined in Block 0.
glhInitLibrary() and glhShutDownLibrary().

Version 1.53 and above require this, although not every glh function has a dependency on
these 2 functions. Neverthless, it's nicer to call them.

IMPORTANT :
The DLL should not be installed system wide for release version of your software. Do not put it in Windows\System32.

It's better to keep it in your program's directory since some functions may be removed/renamed.


Source: Readme.txt, updated 2017-03-06