<html> <head> <title>OgreGLATIFSInit.cpp Source File - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link type="text/css" rel="stylesheet" href="style.css"> </head> <body> <!-- Generated by Doxygen 1.2.16 --> <center> <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="namespacemembers.html">Namespace Members</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> <a class="qindex" href="pages.html">Related Pages</a> </center> <hr><h1>OgreGLATIFSInit.cpp</h1><a href="OgreGLATIFSInit_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/*</font> 00002 <font class="comment"> ATI fragment shader Extension program file.</font> 00003 <font class="comment"> setup by NFZ</font> 00004 <font class="comment"> extracted from ATI 8500 SDK</font> 00005 <font class="comment"></font> 00006 <font class="comment">** GL_ATI_fragment_shader</font> 00007 <font class="comment">**</font> 00008 <font class="comment">** Support:</font> 00009 <font class="comment">** Rage 128 * based : Not Supported</font> 00010 <font class="comment">** Radeon * based : Not Supported</font> 00011 <font class="comment">** R200 * based : Supported</font> 00012 <font class="comment">** R200 : 8500, 9000, 9100, 9200</font> 00013 <font class="comment">** also works on R300 but pointless since ARBFP1.0 supported</font> 00014 <font class="comment">*/</font> 00015 00016 <font class="preprocessor">#include "<a class="code" href="OgreGLATIFSInit_8h.html">OgreGLATIFSInit.h</a>"</font> 00017 <font class="preprocessor">#include "<a class="code" href="OgreGLPrerequisites_8h.html">OgreGLPrerequisites.h</a>"</font> 00018 00019 <font class="comment">// ATI_fragment_program functions</font> <a name="l00020"></a><a class="code" href="OgreGLATIFSInit_8cpp.html#a0">00020</a> PFNGLGENFRAGMENTSHADERSATIPROC <a class="code" href="OgreGLATIFSInit_8cpp.html#a0">glGenFragmentShadersATI_ptr</a>=NULL; <a name="l00021"></a><a class="code" href="OgreGLATIFSInit_8cpp.html#a1">00021</a> PFNGLBINDFRAGMENTSHADERATIPROC <a class="code" href="OgreGLATIFSInit_8cpp.html#a1">glBindFragmentShaderATI_ptr</a>=NULL; <a name="l00022"></a><a class="code" href="OgreGLATIFSInit_8cpp.html#a2">00022</a> PFNGLDELETEFRAGMENTSHADERATIPROC <a class="code" href="OgreGLATIFSInit_8cpp.html#a2">glDeleteFragmentShaderATI_ptr</a>=NULL; <a name="l00023"></a><a class="code" href="OgreGLATIFSInit_8cpp.html#a3">00023</a> PFNGLBEGINFRAGMENTSHADERATIPROC <a class="code" href="OgreGLATIFSInit_8cpp.html#a3">glBeginFragmentShaderATI_ptr</a>=NULL; <a name="l00024"></a><a class="code" href="OgreGLATIFSInit_8cpp.html#a4">00024</a> PFNGLENDFRAGMENTSHADERATIPROC <a class="code" href="OgreGLATIFSInit_8cpp.html#a4">glEndFragmentShaderATI_ptr</a>=NULL; <a name="l00025"></a><a class="code" href="OgreGLATIFSInit_8cpp.html#a5">00025</a> PFNGLPASSTEXCOORDATIPROC <a class="code" href="OgreGLATIFSInit_8cpp.html#a5">glPassTexCoordATI_ptr</a>=NULL; <a name="l00026"></a><a class="code" href="OgreGLATIFSInit_8cpp.html#a6">00026</a> PFNGLSAMPLEMAPATIPROC <a class="code" href="OgreGLATIFSInit_8cpp.html#a6">glSampleMapATI_ptr</a>=NULL; <a name="l00027"></a><a class="code" href="OgreGLATIFSInit_8cpp.html#a7">00027</a> PFNGLCOLORFRAGMENTOP1ATIPROC <a class="code" href="OgreGLATIFSInit_8cpp.html#a7">glColorFragmentOp1ATI_ptr</a>=NULL; <a name="l00028"></a><a class="code" href="OgreGLATIFSInit_8cpp.html#a8">00028</a> PFNGLCOLORFRAGMENTOP2ATIPROC <a class="code" href="OgreGLATIFSInit_8cpp.html#a8">glColorFragmentOp2ATI_ptr</a>=NULL; <a name="l00029"></a><a class="code" href="OgreGLATIFSInit_8cpp.html#a9">00029</a> PFNGLCOLORFRAGMENTOP3ATIPROC <a class="code" href="OgreGLATIFSInit_8cpp.html#a9">glColorFragmentOp3ATI_ptr</a>=NULL; <a name="l00030"></a><a class="code" href="OgreGLATIFSInit_8cpp.html#a10">00030</a> PFNGLALPHAFRAGMENTOP1ATIPROC <a class="code" href="OgreGLATIFSInit_8cpp.html#a10">glAlphaFragmentOp1ATI_ptr</a>=NULL; <a name="l00031"></a><a class="code" href="OgreGLATIFSInit_8cpp.html#a11">00031</a> PFNGLALPHAFRAGMENTOP2ATIPROC <a class="code" href="OgreGLATIFSInit_8cpp.html#a11">glAlphaFragmentOp2ATI_ptr</a>=NULL; <a name="l00032"></a><a class="code" href="OgreGLATIFSInit_8cpp.html#a12">00032</a> PFNGLALPHAFRAGMENTOP3ATIPROC <a class="code" href="OgreGLATIFSInit_8cpp.html#a12">glAlphaFragmentOp3ATI_ptr</a>=NULL; <a name="l00033"></a><a class="code" href="OgreGLATIFSInit_8cpp.html#a13">00033</a> PFNGLSETFRAGMENTSHADERCONSTANTATIPROC <a class="code" href="OgreGLATIFSInit_8cpp.html#a13">glSetFragmentShaderConstantATI_ptr</a>=NULL; 00034 <a name="l00035"></a><a class="code" href="OgreGLATIFSInit_8cpp.html#a14">00035</a> <font class="keywordtype">bool</font> <a class="code" href="OgreGLATIFSInit_8cpp.html#a14">InitATIFragmentShaderExtensions</a>(<a class="code" href="classOgre_1_1GLSupport.html">Ogre::GLSupport</a>& glSupport) 00036 { 00037 <font class="keyword">static</font> <font class="keywordtype">bool</font> init = <font class="keyword">false</font>; 00038 <font class="comment">//char *extList;</font> 00039 00040 <font class="keywordflow">if</font>(init) <font class="keywordflow">return</font> init; 00041 00042 00043 <font class="comment">/* confirm that the version of OpenGL supports ATI fragment shader */</font> 00044 <font class="comment">/* done in GLRenderSystem</font> 00045 <font class="comment"> extList = (char *)glGetString(GL_EXTENSIONS);</font> 00046 <font class="comment"></font> 00047 <font class="comment"> if (strstr(extList, "GL_ATI_fragment_shader") == NULL) {</font> 00048 <font class="comment"> //MessageBox(NULL, "GL_ATI_fragment_shader extension not supported", "GL Extension error", MB_OK);</font> 00049 <font class="comment"> // ** should raise exception</font> 00050 <font class="comment"> init = false;</font> 00051 <font class="comment"> return false;</font> 00052 <font class="comment"> }</font> 00053 <font class="comment"></font> 00054 <font class="comment"> */</font> 00055 00056 00057 <a class="code" href="OgreGLATIFSInit_8cpp.html#a0">glGenFragmentShadersATI_ptr</a> = (PFNGLGENFRAGMENTSHADERSATIPROC) glSupport.<a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1GLSupporta16">getProcAddress</a>(<font class="stringliteral">"glGenFragmentShadersATI"</font>); 00058 <a class="code" href="OgreGLATIFSInit_8cpp.html#a1">glBindFragmentShaderATI_ptr</a> = (PFNGLBINDFRAGMENTSHADERATIPROC) glSupport.<a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1GLSupporta16">getProcAddress</a>(<font class="stringliteral">"glBindFragmentShaderATI"</font>); 00059 <a class="code" href="OgreGLATIFSInit_8cpp.html#a2">glDeleteFragmentShaderATI_ptr</a> = (PFNGLDELETEFRAGMENTSHADERATIPROC) glSupport.<a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1GLSupporta16">getProcAddress</a>(<font class="stringliteral">"glDeleteFragmentShaderATI"</font>); 00060 <a class="code" href="OgreGLATIFSInit_8cpp.html#a3">glBeginFragmentShaderATI_ptr</a> = (PFNGLBEGINFRAGMENTSHADERATIPROC) glSupport.<a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1GLSupporta16">getProcAddress</a>(<font class="stringliteral">"glBeginFragmentShaderATI"</font>); 00061 <a class="code" href="OgreGLATIFSInit_8cpp.html#a4">glEndFragmentShaderATI_ptr</a> = (PFNGLENDFRAGMENTSHADERATIPROC) glSupport.<a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1GLSupporta16">getProcAddress</a>(<font class="stringliteral">"glEndFragmentShaderATI"</font>); 00062 <a class="code" href="OgreGLATIFSInit_8cpp.html#a5">glPassTexCoordATI_ptr</a> = (PFNGLPASSTEXCOORDATIPROC) glSupport.<a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1GLSupporta16">getProcAddress</a>(<font class="stringliteral">"glPassTexCoordATI"</font>); 00063 <a class="code" href="OgreGLATIFSInit_8cpp.html#a6">glSampleMapATI_ptr</a> = (PFNGLSAMPLEMAPATIPROC) glSupport.<a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1GLSupporta16">getProcAddress</a>(<font class="stringliteral">"glSampleMapATI"</font>); 00064 <a class="code" href="OgreGLATIFSInit_8cpp.html#a7">glColorFragmentOp1ATI_ptr</a> = (PFNGLCOLORFRAGMENTOP1ATIPROC) glSupport.<a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1GLSupporta16">getProcAddress</a>(<font class="stringliteral">"glColorFragmentOp1ATI"</font>); 00065 <a class="code" href="OgreGLATIFSInit_8cpp.html#a8">glColorFragmentOp2ATI_ptr</a> = (PFNGLCOLORFRAGMENTOP2ATIPROC) glSupport.<a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1GLSupporta16">getProcAddress</a>(<font class="stringliteral">"glColorFragmentOp2ATI"</font>); 00066 <a class="code" href="OgreGLATIFSInit_8cpp.html#a9">glColorFragmentOp3ATI_ptr</a> = (PFNGLCOLORFRAGMENTOP3ATIPROC) glSupport.<a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1GLSupporta16">getProcAddress</a>(<font class="stringliteral">"glColorFragmentOp3ATI"</font>); 00067 <a class="code" href="OgreGLATIFSInit_8cpp.html#a10">glAlphaFragmentOp1ATI_ptr</a> = (PFNGLALPHAFRAGMENTOP1ATIPROC) glSupport.<a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1GLSupporta16">getProcAddress</a>(<font class="stringliteral">"glAlphaFragmentOp1ATI"</font>); 00068 <a class="code" href="OgreGLATIFSInit_8cpp.html#a11">glAlphaFragmentOp2ATI_ptr</a> = (PFNGLALPHAFRAGMENTOP2ATIPROC) glSupport.<a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1GLSupporta16">getProcAddress</a>(<font class="stringliteral">"glAlphaFragmentOp2ATI"</font>); 00069 <a class="code" href="OgreGLATIFSInit_8cpp.html#a12">glAlphaFragmentOp3ATI_ptr</a> = (PFNGLALPHAFRAGMENTOP3ATIPROC) glSupport.<a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1GLSupporta16">getProcAddress</a>(<font class="stringliteral">"glAlphaFragmentOp3ATI"</font>); 00070 <a class="code" href="OgreGLATIFSInit_8cpp.html#a13">glSetFragmentShaderConstantATI_ptr</a> = (PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) glSupport.<a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1GLSupporta16">getProcAddress</a>(<font class="stringliteral">"glSetFragmentShaderConstantATI"</font>); 00071 00072 <font class="keywordflow">if</font> (<a class="code" href="OgreGLATIFSInit_8cpp.html#a0">glGenFragmentShadersATI_ptr</a> == NULL) <font class="keywordflow">return</font> <font class="keyword">false</font>; 00073 00074 <font class="keywordflow">if</font> (<a class="code" href="OgreGLATIFSInit_8cpp.html#a1">glBindFragmentShaderATI_ptr</a> == NULL) <font class="keywordflow">return</font> <font class="keyword">false</font>; 00075 00076 <font class="keywordflow">if</font> (<a class="code" href="OgreGLATIFSInit_8cpp.html#a2">glDeleteFragmentShaderATI_ptr</a> == NULL) <font class="keywordflow">return</font> <font class="keyword">false</font>; 00077 00078 <font class="keywordflow">if</font> (<a class="code" href="OgreGLATIFSInit_8cpp.html#a3">glBeginFragmentShaderATI_ptr</a> == NULL) <font class="keywordflow">return</font> <font class="keyword">false</font>; 00079 00080 <font class="keywordflow">if</font> (<a class="code" href="OgreGLATIFSInit_8cpp.html#a4">glEndFragmentShaderATI_ptr</a> == NULL) <font class="keywordflow">return</font> <font class="keyword">false</font>; 00081 00082 <font class="keywordflow">if</font> (<a class="code" href="OgreGLATIFSInit_8cpp.html#a5">glPassTexCoordATI_ptr</a> == NULL) <font class="keywordflow">return</font> <font class="keyword">false</font>; 00083 00084 <font class="keywordflow">if</font> (<a class="code" href="OgreGLATIFSInit_8cpp.html#a7">glColorFragmentOp1ATI_ptr</a> == NULL) <font class="keywordflow">return</font> <font class="keyword">false</font>; 00085 00086 <font class="keywordflow">if</font> (<a class="code" href="OgreGLATIFSInit_8cpp.html#a8">glColorFragmentOp2ATI_ptr</a> == NULL) <font class="keywordflow">return</font> <font class="keyword">false</font>; 00087 00088 <font class="keywordflow">if</font> (<a class="code" href="OgreGLATIFSInit_8cpp.html#a9">glColorFragmentOp3ATI_ptr</a> == NULL) <font class="keywordflow">return</font> <font class="keyword">false</font>; 00089 00090 <font class="keywordflow">if</font> (<a class="code" href="OgreGLATIFSInit_8cpp.html#a10">glAlphaFragmentOp1ATI_ptr</a> == NULL) <font class="keywordflow">return</font> <font class="keyword">false</font>; 00091 00092 <font class="keywordflow">if</font> (<a class="code" href="OgreGLATIFSInit_8cpp.html#a11">glAlphaFragmentOp2ATI_ptr</a> == NULL) <font class="keywordflow">return</font> <font class="keyword">false</font>; 00093 00094 <font class="keywordflow">if</font> (<a class="code" href="OgreGLATIFSInit_8cpp.html#a11">glAlphaFragmentOp2ATI_ptr</a> == NULL) <font class="keywordflow">return</font> <font class="keyword">false</font>; 00095 00096 <font class="keywordflow">if</font> (<a class="code" href="OgreGLATIFSInit_8cpp.html#a12">glAlphaFragmentOp3ATI_ptr</a> == NULL) <font class="keywordflow">return</font> <font class="keyword">false</font>; 00097 00098 <font class="keywordflow">if</font> (<a class="code" href="OgreGLATIFSInit_8cpp.html#a13">glSetFragmentShaderConstantATI_ptr</a> == NULL) <font class="keywordflow">return</font> <font class="keyword">false</font>; 00099 00100 init = <font class="keyword">true</font>; 00101 00102 <font class="keywordflow">return</font> <font class="keyword">true</font>; 00103 } 00104 </pre></div><p> Copyright © 2002-2003 by The OGRE Team<br /> Last modified Wed Jan 21 00:10:11 2004 </p> </body> </html>