PDA

View Full Version : 2d sprites and opengl



phil67rpg
12-18-2010, 10:29 PM
which .lib or .h file or .dll do I use to get the following command line to compile properly.
glh_extension_supported

Dark Photon
12-19-2010, 01:52 PM
I'd guess the GLH library:

* http://www.oocities.com/vmelkon/glhlibrary.html

phil67rpg
12-19-2010, 07:16 PM
well I tried glhlib.h and glhlib.lib.no luck.

Dark Photon
12-19-2010, 08:10 PM
Point folks to where you're getting this source and perhaps someone can provide a better suggestion.

phil67rpg
12-19-2010, 08:33 PM
well I am following a articles called "Rendering efficient 2d sprites in opengl using texture rectangles" I got this on the gamedev.net web site.

Dark Photon
12-20-2010, 05:48 PM
well I am following a articles called "Rendering efficient 2d sprites in opengl using texture rectangles" I got this on the gamedev.net web site.
From the tutorial text:


The function glh_extension_supported() is coming from the NVIDIA SDK v9.5 (see glh_extensions.h). I was too lazy to write my own, plus I'm assuming you all should know how to check extensions anyway :)
But you can check for this extension any one of a number of ways, including an extension loader lib (such as GLEW), or just check yourself (see the last two sections on this wiki page:

http://www.opengl.org/wiki/GlGetString#glGetString.28GL_EXTENSIONS.29

It's easy. Nowadays you probably want to use GL_ARB_texture_rectangle instead of GL_NV_texture_rectangle anyway.