cg_explicit.cpp 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  1. /*
  2. ===========================================================================
  3. Doom 3 GPL Source Code
  4. Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
  5. This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
  6. Doom 3 Source Code is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation, either version 3 of the License, or
  9. (at your option) any later version.
  10. Doom 3 Source Code is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
  16. In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
  17. If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
  18. ===========================================================================
  19. */
  20. #include "../idlib/precompiled.h"
  21. #pragma hdrstop
  22. //#include <windows.h>
  23. //#include <GL/gl.h>
  24. #include "cg_explicit.h"
  25. PFNCGCREATECONTEXTPROC cgCreateContext;
  26. PFNCGDESTROYCONTEXTPROC cgDestroyContext;
  27. PFNCGISCONTEXTPROC cgIsContext;
  28. PFNCGGETLASTLISTINGPROC cgGetLastListing;
  29. PFNCGCREATEPROGRAMPROC cgCreateProgram;
  30. PFNCGCREATEPROGRAMFROMFILEPROC cgCreateProgramFromFile;
  31. PFNCGCOPYPROGRAMPROC cgCopyProgram;
  32. PFNCGDESTROYPROGRAMPROC cgDestroyProgram;
  33. PFNCGGETFIRSTPROGRAMPROC cgGetFirstProgram;
  34. PFNCGGETNEXTPROGRAMPROC cgGetNextProgram;
  35. PFNCGGETPROGRAMCONTEXTPROC cgGetProgramContext;
  36. PFNCGISPROGRAMPROC cgIsProgram;
  37. PFNCGCOMPILEPROGRAMPROC cgCompileProgram;
  38. PFNCGISPROGRAMCOMPILEDPROC cgIsProgramCompiled;
  39. PFNCGGETPROGRAMSTRINGPROC cgGetProgramString;
  40. PFNCGGETPROGRAMPROFILEPROC cgGetProgramProfile;
  41. PFNCGGETNAMEDPARAMETERPROC cgGetNamedParameter;
  42. PFNCGGETFIRSTPARAMETERPROC cgGetFirstParameter;
  43. PFNCGGETNEXTPARAMETERPROC cgGetNextParameter;
  44. PFNCGGETFIRSTLEAFPARAMETERPROC cgGetFirstLeafParameter;
  45. PFNCGGETNEXTLEAFPARAMETERPROC cgGetNextLeafParameter;
  46. PFNCGGETFIRSTSTRUCTPARAMETERPROC cgGetFirstStructParameter;
  47. PFNCGGETFIRSTDEPENDENTPARAMETERPROC cgGetFirstDependentParameter;
  48. PFNCGGETARRAYPARAMETERPROC cgGetArrayParameter;
  49. PFNCGGETARRAYDIMENSIONPROC cgGetArrayDimension;
  50. PFNCGGETARRAYSIZEPROC cgGetArraySize;
  51. PFNCGGETPARAMETERPROGRAMPROC cgGetParameterProgram;
  52. PFNCGISPARAMETERPROC cgIsParameter;
  53. PFNCGGETPARAMETERNAMEPROC cgGetParameterName;
  54. PFNCGGETPARAMETERTYPEPROC cgGetParameterType;
  55. PFNCGGETPARAMETERSEMANTICPROC cgGetParameterSemantic;
  56. PFNCGGETPARAMETERRESOURCEPROC cgGetParameterResource;
  57. PFNCGGETPARAMETERBASERESOURCEPROC cgGetParameterBaseResource;
  58. PFNCGGETPARAMETERRESOURCEINDEXPROC cgGetParameterResourceIndex;
  59. PFNCGGETPARAMETERVARIABILITYPROC cgGetParameterVariability;
  60. PFNCGGETPARAMETERDIRECTIONPROC cgGetParameterDirection;
  61. PFNCGISPARAMETERREFERENCEDPROC cgIsParameterReferenced;
  62. PFNCGGETPARAMETERVALUESPROC cgGetParameterValues;
  63. PFNCGGETTYPESTRINGPROC cgGetTypeString;
  64. PFNCGGETTYPEPROC cgGetType;
  65. PFNCGGETRESOURCESTRINGPROC cgGetResourceString;
  66. PFNCGGETRESOURCEPROC cgGetResource;
  67. PFNCGGETPROFILESTRINGPROC cgGetProfileString;
  68. PFNCGGETPROFILEPROC cgGetProfile;
  69. PFNCGGETERRORPROC cgGetError;
  70. PFNCGGETERRORSTRINGPROC cgGetErrorString;
  71. PFNCGSETERRORCALLBACKPROC cgSetErrorCallback;
  72. PFNCGGETERRORCALLBACKPROC cgGetErrorCallback;
  73. PFNCGGLISPROFILESUPPORTEDPROC cgGLIsProfileSupported;
  74. PFNCGGLENABLEPROFILEPROC cgGLEnableProfile;
  75. PFNCGGLDISABLEPROFILEPROC cgGLDisableProfile;
  76. PFNCGGLGETLATESTPROFILEPROC cgGLGetLatestProfile;
  77. PFNCGGLSETOPTIMALOPTIONSPROC cgGLSetOptimalOptions;
  78. PFNCGGLLOADPROGRAMPROC cgGLLoadProgram;
  79. PFNCGGLBINDPROGRAMPROC cgGLBindProgram;
  80. PFNCGGLSETPARAMETER1FPROC cgGLSetParameter1f;
  81. PFNCGGLSETPARAMETER2FPROC cgGLSetParameter2f;
  82. PFNCGGLSETPARAMETER3FPROC cgGLSetParameter3f;
  83. PFNCGGLSETPARAMETER4FPROC cgGLSetParameter4f;
  84. PFNCGGLSETPARAMETER1FVPROC cgGLSetParameter1fv;
  85. PFNCGGLSETPARAMETER2FVPROC cgGLSetParameter2fv;
  86. PFNCGGLSETPARAMETER3FVPROC cgGLSetParameter3fv;
  87. PFNCGGLSETPARAMETER4FVPROC cgGLSetParameter4fv;
  88. PFNCGGLSETPARAMETER1DPROC cgGLSetParameter1d;
  89. PFNCGGLSETPARAMETER2DPROC cgGLSetParameter2d;
  90. PFNCGGLSETPARAMETER3DPROC cgGLSetParameter3d;
  91. PFNCGGLSETPARAMETER4DPROC cgGLSetParameter4d;
  92. PFNCGGLSETPARAMETER1DVPROC cgGLSetParameter1dv;
  93. PFNCGGLSETPARAMETER2DVPROC cgGLSetParameter2dv;
  94. PFNCGGLSETPARAMETER3DVPROC cgGLSetParameter3dv;
  95. PFNCGGLSETPARAMETER4DVPROC cgGLSetParameter4dv;
  96. PFNCGGLGETPARAMETER1FPROC cgGLGetParameter1f;
  97. PFNCGGLGETPARAMETER2FPROC cgGLGetParameter2f;
  98. PFNCGGLGETPARAMETER3FPROC cgGLGetParameter3f;
  99. PFNCGGLGETPARAMETER4FPROC cgGLGetParameter4f;
  100. PFNCGGLGETPARAMETER1DPROC cgGLGetParameter1d;
  101. PFNCGGLGETPARAMETER2DPROC cgGLGetParameter2d;
  102. PFNCGGLGETPARAMETER3DPROC cgGLGetParameter3d;
  103. PFNCGGLGETPARAMETER4DPROC cgGLGetParameter4d;
  104. PFNCGGLSETPARAMETERARRAY1FPROC cgGLSetParameterArray1f;
  105. PFNCGGLSETPARAMETERARRAY2FPROC cgGLSetParameterArray2f;
  106. PFNCGGLSETPARAMETERARRAY3FPROC cgGLSetParameterArray3f;
  107. PFNCGGLSETPARAMETERARRAY4FPROC cgGLSetParameterArray4f;
  108. PFNCGGLSETPARAMETERARRAY1DPROC cgGLSetParameterArray1d;
  109. PFNCGGLSETPARAMETERARRAY2DPROC cgGLSetParameterArray2d;
  110. PFNCGGLSETPARAMETERARRAY3DPROC cgGLSetParameterArray3d;
  111. PFNCGGLSETPARAMETERARRAY4DPROC cgGLSetParameterArray4d;
  112. PFNCGGLGETPARAMETERARRAY1FPROC cgGLGetParameterArray1f;
  113. PFNCGGLGETPARAMETERARRAY2FPROC cgGLGetParameterArray2f;
  114. PFNCGGLGETPARAMETERARRAY3FPROC cgGLGetParameterArray3f;
  115. PFNCGGLGETPARAMETERARRAY4FPROC cgGLGetParameterArray4f;
  116. PFNCGGLGETPARAMETERARRAY1DPROC cgGLGetParameterArray1d;
  117. PFNCGGLGETPARAMETERARRAY2DPROC cgGLGetParameterArray2d;
  118. PFNCGGLGETPARAMETERARRAY3DPROC cgGLGetParameterArray3d;
  119. PFNCGGLGETPARAMETERARRAY4DPROC cgGLGetParameterArray4d;
  120. PFNCGGLSETPARAMETERPOINTERPROC cgGLSetParameterPointer;
  121. PFNCGGLENABLECLIENTSTATEPROC cgGLEnableClientState;
  122. PFNCGGLDISABLECLIENTSTATEPROC cgGLDisableClientState;
  123. PFNCGGLSETMATRIXPARAMETERDRPROC cgGLSetMatrixParameterdr;
  124. PFNCGGLSETMATRIXPARAMETERFRPROC cgGLSetMatrixParameterfr;
  125. PFNCGGLSETMATRIXPARAMETERDCPROC cgGLSetMatrixParameterdc;
  126. PFNCGGLSETMATRIXPARAMETERFCPROC cgGLSetMatrixParameterfc;
  127. PFNCGGLGETMATRIXPARAMETERDRPROC cgGLGetMatrixParameterdr;
  128. PFNCGGLGETMATRIXPARAMETERFRPROC cgGLGetMatrixParameterfr;
  129. PFNCGGLGETMATRIXPARAMETERDCPROC cgGLGetMatrixParameterdc;
  130. PFNCGGLGETMATRIXPARAMETERFCPROC cgGLGetMatrixParameterfc;
  131. PFNCGGLSETSTATEMATRIXPARAMETERPROC cgGLSetStateMatrixParameter;
  132. PFNCGGLSETMATRIXPARAMETERARRAYFCPROC cgGLSetMatrixParameterArrayfc;
  133. PFNCGGLSETMATRIXPARAMETERARRAYFRPROC cgGLSetMatrixParameterArrayfr;
  134. PFNCGGLSETMATRIXPARAMETERARRAYDCPROC cgGLSetMatrixParameterArraydc;
  135. PFNCGGLSETMATRIXPARAMETERARRAYDRPROC cgGLSetMatrixParameterArraydr;
  136. PFNCGGLGETMATRIXPARAMETERARRAYFCPROC cgGLGetMatrixParameterArrayfc;
  137. PFNCGGLGETMATRIXPARAMETERARRAYFRPROC cgGLGetMatrixParameterArrayfr;
  138. PFNCGGLGETMATRIXPARAMETERARRAYDCPROC cgGLGetMatrixParameterArraydc;
  139. PFNCGGLGETMATRIXPARAMETERARRAYDRPROC cgGLGetMatrixParameterArraydr;
  140. PFNCGGLSETTEXTUREPARAMETERPROC cgGLSetTextureParameter;
  141. PFNCGGLGETTEXTUREPARAMETERPROC cgGLGetTextureParameter;
  142. PFNCGGLENABLETEXTUREPARAMETERPROC cgGLEnableTextureParameter;
  143. PFNCGGLDISABLETEXTUREPARAMETERPROC cgGLDisableTextureParameter;
  144. PFNCGGLGETTEXTUREENUMPROC cgGLGetTextureEnum;
  145. #ifndef _WIN32
  146. bool init_explicit_Cg()
  147. {
  148. return false;
  149. }
  150. #else
  151. bool init_explicit_Cg()
  152. {
  153. HMODULE hmod;
  154. int failed = 0;
  155. hmod = LoadLibrary("cg.dll");
  156. if(0 == (cgCreateContext = (PFNCGCREATECONTEXTPROC)GetProcAddress( hmod, "cgCreateContext" )))
  157. failed++;
  158. if(0 == (cgDestroyContext = (PFNCGDESTROYCONTEXTPROC)GetProcAddress( hmod, "cgDestroyContext" )))
  159. failed++;
  160. if(0 == (cgIsContext = (PFNCGISCONTEXTPROC)GetProcAddress( hmod, "cgIsContext" )))
  161. failed++;
  162. if(0 == (cgGetLastListing = (PFNCGGETLASTLISTINGPROC)GetProcAddress( hmod, "cgGetLastListing" )))
  163. failed++;
  164. if(0 == (cgCreateProgram = (PFNCGCREATEPROGRAMPROC)GetProcAddress( hmod, "cgCreateProgram" )))
  165. failed++;
  166. if(0 == (cgCreateProgramFromFile = (PFNCGCREATEPROGRAMFROMFILEPROC)GetProcAddress( hmod, "cgCreateProgramFromFile" )))
  167. failed++;
  168. if(0 == (cgCopyProgram = (PFNCGCOPYPROGRAMPROC)GetProcAddress( hmod, "cgCopyProgram" )))
  169. failed++;
  170. if(0 == (cgDestroyProgram = (PFNCGDESTROYPROGRAMPROC)GetProcAddress( hmod, "cgDestroyProgram" )))
  171. failed++;
  172. if(0 == (cgGetFirstProgram = (PFNCGGETFIRSTPROGRAMPROC)GetProcAddress( hmod, "cgGetFirstProgram" )))
  173. failed++;
  174. if(0 == (cgGetNextProgram = (PFNCGGETNEXTPROGRAMPROC)GetProcAddress( hmod, "cgGetNextProgram" )))
  175. failed++;
  176. if(0 == (cgGetProgramContext = (PFNCGGETPROGRAMCONTEXTPROC)GetProcAddress( hmod, "cgGetProgramContext" )))
  177. failed++;
  178. if(0 == (cgIsProgram = (PFNCGISPROGRAMPROC)GetProcAddress( hmod, "cgIsProgram" )))
  179. failed++;
  180. if(0 == (cgCompileProgram = (PFNCGCOMPILEPROGRAMPROC)GetProcAddress( hmod, "cgCompileProgram" )))
  181. failed++;
  182. if(0 == (cgIsProgramCompiled = (PFNCGISPROGRAMCOMPILEDPROC)GetProcAddress( hmod, "cgIsProgramCompiled" )))
  183. failed++;
  184. if(0 == (cgGetProgramString = (PFNCGGETPROGRAMSTRINGPROC)GetProcAddress( hmod, "cgGetProgramString" )))
  185. failed++;
  186. if(0 == (cgGetProgramProfile = (PFNCGGETPROGRAMPROFILEPROC)GetProcAddress( hmod, "cgGetProgramProfile" )))
  187. failed++;
  188. if(0 == (cgGetNamedParameter = (PFNCGGETNAMEDPARAMETERPROC)GetProcAddress( hmod, "cgGetNamedParameter" )))
  189. failed++;
  190. if(0 == (cgGetFirstParameter = (PFNCGGETFIRSTPARAMETERPROC)GetProcAddress( hmod, "cgGetFirstParameter" )))
  191. failed++;
  192. if(0 == (cgGetNextParameter = (PFNCGGETNEXTPARAMETERPROC)GetProcAddress( hmod, "cgGetNextParameter" )))
  193. failed++;
  194. if(0 == (cgGetFirstLeafParameter = (PFNCGGETFIRSTLEAFPARAMETERPROC)GetProcAddress( hmod, "cgGetFirstLeafParameter" )))
  195. failed++;
  196. if(0 == (cgGetNextLeafParameter = (PFNCGGETNEXTLEAFPARAMETERPROC)GetProcAddress( hmod, "cgGetNextLeafParameter" )))
  197. failed++;
  198. if(0 == (cgGetFirstStructParameter = (PFNCGGETFIRSTSTRUCTPARAMETERPROC)GetProcAddress( hmod, "cgGetFirstStructParameter" )))
  199. failed++;
  200. if(0 == (cgGetFirstDependentParameter = (PFNCGGETFIRSTDEPENDENTPARAMETERPROC)GetProcAddress( hmod, "cgGetFirstDependentParameter" )))
  201. failed++;
  202. if(0 == (cgGetArrayParameter = (PFNCGGETARRAYPARAMETERPROC)GetProcAddress( hmod, "cgGetArrayParameter" )))
  203. failed++;
  204. if(0 == (cgGetArrayDimension = (PFNCGGETARRAYDIMENSIONPROC)GetProcAddress( hmod, "cgGetArrayDimension" )))
  205. failed++;
  206. if(0 == (cgGetArraySize = (PFNCGGETARRAYSIZEPROC)GetProcAddress( hmod, "cgGetArraySize" )))
  207. failed++;
  208. if(0 == (cgGetParameterProgram = (PFNCGGETPARAMETERPROGRAMPROC)GetProcAddress( hmod, "cgGetParameterProgram" )))
  209. failed++;
  210. if(0 == (cgIsParameter = (PFNCGISPARAMETERPROC)GetProcAddress( hmod, "cgIsParameter" )))
  211. failed++;
  212. if(0 == (cgGetParameterName = (PFNCGGETPARAMETERNAMEPROC)GetProcAddress( hmod, "cgGetParameterName" )))
  213. failed++;
  214. if(0 == (cgGetParameterType = (PFNCGGETPARAMETERTYPEPROC)GetProcAddress( hmod, "cgGetParameterType" )))
  215. failed++;
  216. if(0 == (cgGetParameterSemantic = (PFNCGGETPARAMETERSEMANTICPROC)GetProcAddress( hmod, "cgGetParameterSemantic" )))
  217. failed++;
  218. if(0 == (cgGetParameterResource = (PFNCGGETPARAMETERRESOURCEPROC)GetProcAddress( hmod, "cgGetParameterResource" )))
  219. failed++;
  220. if(0 == (cgGetParameterBaseResource = (PFNCGGETPARAMETERBASERESOURCEPROC)GetProcAddress( hmod, "cgGetParameterBaseResource" )))
  221. failed++;
  222. if(0 == (cgGetParameterResourceIndex = (PFNCGGETPARAMETERRESOURCEINDEXPROC)GetProcAddress( hmod, "cgGetParameterResourceIndex" )))
  223. failed++;
  224. if(0 == (cgGetParameterVariability = (PFNCGGETPARAMETERVARIABILITYPROC)GetProcAddress( hmod, "cgGetParameterVariability" )))
  225. failed++;
  226. if(0 == (cgGetParameterDirection = (PFNCGGETPARAMETERDIRECTIONPROC)GetProcAddress( hmod, "cgGetParameterDirection" )))
  227. failed++;
  228. if(0 == (cgIsParameterReferenced = (PFNCGISPARAMETERREFERENCEDPROC)GetProcAddress( hmod, "cgIsParameterReferenced" )))
  229. failed++;
  230. if(0 == (cgGetParameterValues = (PFNCGGETPARAMETERVALUESPROC)GetProcAddress( hmod, "cgGetParameterValues" )))
  231. failed++;
  232. if(0 == (cgGetTypeString = (PFNCGGETTYPESTRINGPROC)GetProcAddress( hmod, "cgGetTypeString" )))
  233. failed++;
  234. if(0 == (cgGetType = (PFNCGGETTYPEPROC)GetProcAddress( hmod, "cgGetType" )))
  235. failed++;
  236. if(0 == (cgGetResourceString = (PFNCGGETRESOURCESTRINGPROC)GetProcAddress( hmod, "cgGetResourceString" )))
  237. failed++;
  238. if(0 == (cgGetResource = (PFNCGGETRESOURCEPROC)GetProcAddress( hmod, "cgGetResource" )))
  239. failed++;
  240. if(0 == (cgGetProfileString = (PFNCGGETPROFILESTRINGPROC)GetProcAddress( hmod, "cgGetProfileString" )))
  241. failed++;
  242. if(0 == (cgGetProfile = (PFNCGGETPROFILEPROC)GetProcAddress( hmod, "cgGetProfile" )))
  243. failed++;
  244. if(0 == (cgGetError = (PFNCGGETERRORPROC)GetProcAddress( hmod, "cgGetError" )))
  245. failed++;
  246. if(0 == (cgGetErrorString = (PFNCGGETERRORSTRINGPROC)GetProcAddress( hmod, "cgGetErrorString" )))
  247. failed++;
  248. if(0 == (cgSetErrorCallback = (PFNCGSETERRORCALLBACKPROC)GetProcAddress( hmod, "cgSetErrorCallback" )))
  249. failed++;
  250. if(0 == (cgGetErrorCallback = (PFNCGGETERRORCALLBACKPROC)GetProcAddress( hmod, "cgGetErrorCallback" )))
  251. failed++;
  252. hmod = LoadLibrary("cgGL.dll");
  253. if(0 == (cgGLIsProfileSupported = (PFNCGGLISPROFILESUPPORTEDPROC)GetProcAddress( hmod, "cgGLIsProfileSupported" )))
  254. failed++;
  255. if(0 == (cgGLEnableProfile = (PFNCGGLENABLEPROFILEPROC)GetProcAddress( hmod, "cgGLEnableProfile" )))
  256. failed++;
  257. if(0 == (cgGLDisableProfile = (PFNCGGLDISABLEPROFILEPROC)GetProcAddress( hmod, "cgGLDisableProfile" )))
  258. failed++;
  259. if(0 == (cgGLGetLatestProfile = (PFNCGGLGETLATESTPROFILEPROC)GetProcAddress( hmod, "cgGLGetLatestProfile" )))
  260. failed++;
  261. if(0 == (cgGLSetOptimalOptions = (PFNCGGLSETOPTIMALOPTIONSPROC)GetProcAddress( hmod, "cgGLSetOptimalOptions" )))
  262. failed++;
  263. if(0 == (cgGLLoadProgram = (PFNCGGLLOADPROGRAMPROC)GetProcAddress( hmod, "cgGLLoadProgram" )))
  264. failed++;
  265. if(0 == (cgGLBindProgram = (PFNCGGLBINDPROGRAMPROC)GetProcAddress( hmod, "cgGLBindProgram" )))
  266. failed++;
  267. if(0 == (cgGLSetParameter1f = (PFNCGGLSETPARAMETER1FPROC)GetProcAddress( hmod, "cgGLSetParameter1f" )))
  268. failed++;
  269. if(0 == (cgGLSetParameter2f = (PFNCGGLSETPARAMETER2FPROC)GetProcAddress( hmod, "cgGLSetParameter2f" )))
  270. failed++;
  271. if(0 == (cgGLSetParameter3f = (PFNCGGLSETPARAMETER3FPROC)GetProcAddress( hmod, "cgGLSetParameter3f" )))
  272. failed++;
  273. if(0 == (cgGLSetParameter4f = (PFNCGGLSETPARAMETER4FPROC)GetProcAddress( hmod, "cgGLSetParameter4f" )))
  274. failed++;
  275. if(0 == (cgGLSetParameter1fv = (PFNCGGLSETPARAMETER1FVPROC)GetProcAddress( hmod, "cgGLSetParameter1fv" )))
  276. failed++;
  277. if(0 == (cgGLSetParameter2fv = (PFNCGGLSETPARAMETER2FVPROC)GetProcAddress( hmod, "cgGLSetParameter2fv" )))
  278. failed++;
  279. if(0 == (cgGLSetParameter3fv = (PFNCGGLSETPARAMETER3FVPROC)GetProcAddress( hmod, "cgGLSetParameter3fv" )))
  280. failed++;
  281. if(0 == (cgGLSetParameter4fv = (PFNCGGLSETPARAMETER4FVPROC)GetProcAddress( hmod, "cgGLSetParameter4fv" )))
  282. failed++;
  283. if(0 == (cgGLSetParameter1d = (PFNCGGLSETPARAMETER1DPROC)GetProcAddress( hmod, "cgGLSetParameter1d" )))
  284. failed++;
  285. if(0 == (cgGLSetParameter2d = (PFNCGGLSETPARAMETER2DPROC)GetProcAddress( hmod, "cgGLSetParameter2d" )))
  286. failed++;
  287. if(0 == (cgGLSetParameter3d = (PFNCGGLSETPARAMETER3DPROC)GetProcAddress( hmod, "cgGLSetParameter3d" )))
  288. failed++;
  289. if(0 == (cgGLSetParameter4d = (PFNCGGLSETPARAMETER4DPROC)GetProcAddress( hmod, "cgGLSetParameter4d" )))
  290. failed++;
  291. if(0 == (cgGLSetParameter1dv = (PFNCGGLSETPARAMETER1DVPROC)GetProcAddress( hmod, "cgGLSetParameter1dv" )))
  292. failed++;
  293. if(0 == (cgGLSetParameter2dv = (PFNCGGLSETPARAMETER2DVPROC)GetProcAddress( hmod, "cgGLSetParameter2dv" )))
  294. failed++;
  295. if(0 == (cgGLSetParameter3dv = (PFNCGGLSETPARAMETER3DVPROC)GetProcAddress( hmod, "cgGLSetParameter3dv" )))
  296. failed++;
  297. if(0 == (cgGLSetParameter4dv = (PFNCGGLSETPARAMETER4DVPROC)GetProcAddress( hmod, "cgGLSetParameter4dv" )))
  298. failed++;
  299. if(0 == (cgGLSetParameter4dv = (PFNCGGLSETPARAMETER4DVPROC)GetProcAddress( hmod, "cgGLSetParameter4dv" )))
  300. failed++;
  301. if(0 == (cgGLGetParameter1f = (PFNCGGLGETPARAMETER1FPROC)GetProcAddress( hmod, "cgGLGetParameter1f" )))
  302. failed++;
  303. if(0 == (cgGLGetParameter2f = (PFNCGGLGETPARAMETER2FPROC)GetProcAddress( hmod, "cgGLGetParameter2f" )))
  304. failed++;
  305. if(0 == (cgGLGetParameter3f = (PFNCGGLGETPARAMETER3FPROC)GetProcAddress( hmod, "cgGLGetParameter3f" )))
  306. failed++;
  307. if(0 == (cgGLGetParameter4f = (PFNCGGLGETPARAMETER4FPROC)GetProcAddress( hmod, "cgGLGetParameter4f" )))
  308. failed++;
  309. if(0 == (cgGLGetParameter1d = (PFNCGGLGETPARAMETER1DPROC)GetProcAddress( hmod, "cgGLGetParameter1d" )))
  310. failed++;
  311. if(0 == (cgGLGetParameter2d = (PFNCGGLGETPARAMETER2DPROC)GetProcAddress( hmod, "cgGLGetParameter2d" )))
  312. failed++;
  313. if(0 == (cgGLGetParameter3d = (PFNCGGLGETPARAMETER3DPROC)GetProcAddress( hmod, "cgGLGetParameter3d" )))
  314. failed++;
  315. if(0 == (cgGLGetParameter4d = (PFNCGGLGETPARAMETER4DPROC)GetProcAddress( hmod, "cgGLGetParameter4d" )))
  316. failed++;
  317. if(0 == (cgGLSetParameterArray1f = (PFNCGGLSETPARAMETERARRAY1FPROC)GetProcAddress( hmod, "cgGLSetParameterArray1f" )))
  318. failed++;
  319. if(0 == (cgGLSetParameterArray2f = (PFNCGGLSETPARAMETERARRAY2FPROC)GetProcAddress( hmod, "cgGLSetParameterArray2f" )))
  320. failed++;
  321. if(0 == (cgGLSetParameterArray3f = (PFNCGGLSETPARAMETERARRAY3FPROC)GetProcAddress( hmod, "cgGLSetParameterArray3f" )))
  322. failed++;
  323. if(0 == (cgGLSetParameterArray4f = (PFNCGGLSETPARAMETERARRAY4FPROC)GetProcAddress( hmod, "cgGLSetParameterArray4f" )))
  324. failed++;
  325. if(0 == (cgGLSetParameterArray1d = (PFNCGGLSETPARAMETERARRAY1DPROC)GetProcAddress( hmod, "cgGLSetParameterArray1d" )))
  326. failed++;
  327. if(0 == (cgGLSetParameterArray2d = (PFNCGGLSETPARAMETERARRAY2DPROC)GetProcAddress( hmod, "cgGLSetParameterArray2d" )))
  328. failed++;
  329. if(0 == (cgGLSetParameterArray3d = (PFNCGGLSETPARAMETERARRAY3DPROC)GetProcAddress( hmod, "cgGLSetParameterArray3d" )))
  330. failed++;
  331. if(0 == (cgGLSetParameterArray4d = (PFNCGGLSETPARAMETERARRAY4DPROC)GetProcAddress( hmod, "cgGLSetParameterArray4d" )))
  332. failed++;
  333. if(0 == (cgGLGetParameterArray1f = (PFNCGGLGETPARAMETERARRAY1FPROC)GetProcAddress( hmod, "cgGLGetParameterArray1f" )))
  334. failed++;
  335. if(0 == (cgGLGetParameterArray2f = (PFNCGGLGETPARAMETERARRAY2FPROC)GetProcAddress( hmod, "cgGLGetParameterArray2f" )))
  336. failed++;
  337. if(0 == (cgGLGetParameterArray3f = (PFNCGGLGETPARAMETERARRAY3FPROC)GetProcAddress( hmod, "cgGLGetParameterArray3f" )))
  338. failed++;
  339. if(0 == (cgGLGetParameterArray4f = (PFNCGGLGETPARAMETERARRAY4FPROC)GetProcAddress( hmod, "cgGLGetParameterArray4f" )))
  340. failed++;
  341. if(0 == (cgGLGetParameterArray1d = (PFNCGGLGETPARAMETERARRAY1DPROC)GetProcAddress( hmod, "cgGLGetParameterArray1d" )))
  342. failed++;
  343. if(0 == (cgGLGetParameterArray2d = (PFNCGGLGETPARAMETERARRAY2DPROC)GetProcAddress( hmod, "cgGLGetParameterArray2d" )))
  344. failed++;
  345. if(0 == (cgGLGetParameterArray3d = (PFNCGGLGETPARAMETERARRAY3DPROC)GetProcAddress( hmod, "cgGLGetParameterArray3d" )))
  346. failed++;
  347. if(0 == (cgGLGetParameterArray4d = (PFNCGGLGETPARAMETERARRAY4DPROC)GetProcAddress( hmod, "cgGLGetParameterArray4d" )))
  348. failed++;
  349. if(0 == (cgGLSetParameterPointer = (PFNCGGLSETPARAMETERPOINTERPROC)GetProcAddress( hmod, "cgGLSetParameterPointer" )))
  350. failed++;
  351. if(0 == (cgGLEnableClientState = (PFNCGGLENABLECLIENTSTATEPROC)GetProcAddress( hmod, "cgGLEnableClientState" )))
  352. failed++;
  353. if(0 == (cgGLDisableClientState = (PFNCGGLDISABLECLIENTSTATEPROC)GetProcAddress( hmod, "cgGLDisableClientState" )))
  354. failed++;
  355. if(0 == (cgGLSetMatrixParameterdr = (PFNCGGLSETMATRIXPARAMETERDRPROC)GetProcAddress( hmod, "cgGLSetMatrixParameterdr" )))
  356. failed++;
  357. if(0 == (cgGLSetMatrixParameterfr = (PFNCGGLSETMATRIXPARAMETERFRPROC)GetProcAddress( hmod, "cgGLSetMatrixParameterfr" )))
  358. failed++;
  359. if(0 == (cgGLSetMatrixParameterdc = (PFNCGGLSETMATRIXPARAMETERDCPROC)GetProcAddress( hmod, "cgGLSetMatrixParameterdc" )))
  360. failed++;
  361. if(0 == (cgGLSetMatrixParameterfc = (PFNCGGLSETMATRIXPARAMETERFCPROC)GetProcAddress( hmod, "cgGLSetMatrixParameterfc" )))
  362. failed++;
  363. if(0 == (cgGLGetMatrixParameterdr = (PFNCGGLGETMATRIXPARAMETERDRPROC)GetProcAddress( hmod, "cgGLGetMatrixParameterdr" )))
  364. failed++;
  365. if(0 == (cgGLGetMatrixParameterfr = (PFNCGGLGETMATRIXPARAMETERFRPROC)GetProcAddress( hmod, "cgGLGetMatrixParameterfr" )))
  366. failed++;
  367. if(0 == (cgGLGetMatrixParameterdc = (PFNCGGLGETMATRIXPARAMETERDCPROC)GetProcAddress( hmod, "cgGLGetMatrixParameterdc" )))
  368. failed++;
  369. if(0 == (cgGLGetMatrixParameterfc = (PFNCGGLGETMATRIXPARAMETERFCPROC)GetProcAddress( hmod, "cgGLGetMatrixParameterfc" )))
  370. failed++;
  371. if(0 == (cgGLSetStateMatrixParameter = (PFNCGGLSETSTATEMATRIXPARAMETERPROC)GetProcAddress( hmod, "cgGLSetStateMatrixParameter" )))
  372. failed++;
  373. //if(0 == (cgGLSetMatrixParameterArrayfc = (PFNCGGLSETMATRIXPARAMETERARRAYFCPROC)GetProcAddress( hmod, "cgGLSetMatrixParameterArrayfc" )))
  374. // failed++;
  375. //if(0 == (cgGLSetMatrixParameterArrayfr = (PFNCGGLSETMATRIXPARAMETERARRAYFRPROC)GetProcAddress( hmod, "cgGLSetMatrixParameterArrayfr" )))
  376. // failed++;
  377. //if(0 == (cgGLSetMatrixParameterArraydc = (PFNCGGLSETMATRIXPARAMETERARRAYDCPROC)GetProcAddress( hmod, "cgGLSetMatrixParameterArraydc" )))
  378. // failed++;
  379. //if(0 == (cgGLSetMatrixParameterArraydr = (PFNCGGLSETMATRIXPARAMETERARRAYDRPROC)GetProcAddress( hmod, "cgGLSetMatrixParameterArraydr" )))
  380. // failed++;
  381. //if(0 == (cgGLGetMatrixParameterArrayfc = (PFNCGGLGETMATRIXPARAMETERARRAYFCPROC)GetProcAddress( hmod, "cgGLGetMatrixParameterArrayfc" )))
  382. // failed++;
  383. //if(0 == (cgGLGetMatrixParameterArrayfr = (PFNCGGLGETMATRIXPARAMETERARRAYFRPROC)GetProcAddress( hmod, "cgGLGetMatrixParameterArrayfr" )))
  384. // failed++;
  385. //if(0 == (cgGLGetMatrixParameterArraydc = (PFNCGGLGETMATRIXPARAMETERARRAYDCPROC)GetProcAddress( hmod, "cgGLGetMatrixParameterArraydc" )))
  386. // failed++;
  387. //if(0 == (cgGLGetMatrixParameterArraydr = (PFNCGGLGETMATRIXPARAMETERARRAYDRPROC)GetProcAddress( hmod, "cgGLGetMatrixParameterArraydr" )))
  388. // failed++;
  389. if(0 == (cgGLSetTextureParameter = (PFNCGGLSETTEXTUREPARAMETERPROC)GetProcAddress( hmod, "cgGLSetTextureParameter" )))
  390. failed++;
  391. if(0 == (cgGLGetTextureParameter = (PFNCGGLGETTEXTUREPARAMETERPROC)GetProcAddress( hmod, "cgGLGetTextureParameter" )))
  392. failed++;
  393. if(0 == (cgGLEnableTextureParameter = (PFNCGGLENABLETEXTUREPARAMETERPROC)GetProcAddress( hmod, "cgGLEnableTextureParameter" )))
  394. failed++;
  395. if(0 == (cgGLDisableTextureParameter = (PFNCGGLDISABLETEXTUREPARAMETERPROC)GetProcAddress( hmod, "cgGLDisableTextureParameter" )))
  396. failed++;
  397. if(0 == (cgGLGetTextureEnum = (PFNCGGLGETTEXTUREENUMPROC)GetProcAddress( hmod, "cgGLGetTextureEnum" )))
  398. failed++;
  399. return failed == 0;
  400. }
  401. #endif