Changeset 13041 for OpenSceneGraph/trunk/include/osg/FragmentProgram
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/include/osg/FragmentProgram (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osg/FragmentProgram
r11808 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 2 2 * 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 5 5 * (at your option) any later version. The full license is in LICENSE file 6 6 * included with this distribution, and on the openscenegraph.org website. 7 * 7 * 8 8 * This library is distributed in the hope that it will be useful, 9 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 11 * OpenSceneGraph Public License for more details. 12 12 */ … … 151 151 } 152 152 153 153 154 154 /** Set the fragment program using a C style string.*/ 155 inline void setFragmentProgram( const char* program ) 156 { 157 _fragmentProgram = program; 155 inline void setFragmentProgram( const char* program ) 156 { 157 _fragmentProgram = program; 158 158 dirtyFragmentProgramObject(); 159 159 } 160 160 161 161 /** Set the fragment program using C++ style string.*/ 162 162 inline void setFragmentProgram( const std::string& program ) … … 205 205 206 206 /** Force a recompile on next apply() of associated OpenGL vertex program objects.*/ 207 void dirtyFragmentProgramObject(); 207 void dirtyFragmentProgramObject(); 208 208 209 209 /** use deleteFragmentProgramObject instead of glDeletePrograms to allow … … 236 236 237 237 /** Extensions class which encapsulates the querying of extensions and 238 * associated function pointers, and provide convenience wrappers to 239 * check for the extensions or use the associated functions.*/ 238 * associated function pointers, and provide convenience wrappers to 239 * check for the extensions or use the associated functions.*/ 240 240 class OSG_EXPORT Extensions : public osg::Referenced 241 241 { … … 244 244 245 245 Extensions(const Extensions& rhs); 246 246 247 247 void lowestCommonDenominator(const Extensions& rhs); 248 248 249 249 void setupGLExtensions(unsigned int contextID); 250 250 … … 255 255 void glGenPrograms(GLsizei n, GLuint *programs) const; 256 256 void glDeletePrograms(GLsizei n, GLuint *programs) const; 257 void glProgramString(GLenum target, GLenum format, GLsizei len, const void *string) const; 257 void glProgramString(GLenum target, GLenum format, GLsizei len, const void *string) const; 258 258 void glProgramLocalParameter4fv(GLenum target, GLuint index, const GLfloat *params) const; 259 259 … … 261 261 262 262 ~Extensions() {} 263 263 264 264 bool _isFragmentProgramSupported; 265 265 266 266 typedef void (GL_APIENTRY * BindProgramProc) (GLenum target, GLuint id); 267 267 typedef void (GL_APIENTRY * GenProgramsProc) (GLsizei n, GLuint *programs); 268 268 typedef void (GL_APIENTRY * DeleteProgramsProc) (GLsizei n, GLuint *programs); 269 typedef void (GL_APIENTRY * ProgramStringProc) (GLenum target, GLenum format, GLsizei len, const void *string); 269 typedef void (GL_APIENTRY * ProgramStringProc) (GLenum target, GLenum format, GLsizei len, const void *string); 270 270 typedef void (GL_APIENTRY * ProgramLocalParameter4fvProc) (GLenum target, GLuint index, const GLfloat *params); 271 271 … … 276 276 ProgramLocalParameter4fvProc _glProgramLocalParameter4fv; 277 277 }; 278 278 279 279 /** Function to call to get the extension of a specified context. 280 * If the Extension object for that context has not yet been created and the 280 * If the Extension object for that context has not yet been created and the 281 281 * 'createIfNotInitalized' flag has been set to false then returns NULL. 282 * If 'createIfNotInitalized' is true then the Extensions object is 282 * If 'createIfNotInitalized' is true then the Extensions object is 283 283 * automatically created. However, in this case the extension object will 284 284 * only be created with the graphics context associated with ContextID..*/
