root/OpenSceneGraph/trunk/src/osgPlugins/osg/Texture.cpp @ 10934

Revision 10934, 17.8 kB (checked in by robert, 5 years ago)

From Rob Radtke, "I recently ran into some issues trying to save/load a scene graph as a .ive file. The problems came about because the scene graph contained depth textures in it. I have attached a patch (against the current revision: 10919) that fixes the issues that I encountered. Both attachments contain the same patch--one is a .zip file that contains the modified files and the other is a text patch file. Here is a summary of the changes I made:

1) Add getShadowComparison() accessor function to osg::Texture class
2) Modify ReaderWriterTiff::writeTifStream() and _readColor() (in Image.cpp) to handle pixelFormat==GL_DEPTH_COMPONENT as if it were GL_LUMINANCE
3) Modify the Texture classes of the ive and osg plug-ins so that they save/load the following Texture members: _use_shadow_comparison, _shadow_compare_func and _shadow_texture_mode
"

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1#include <osg/Texture>
2#include <osg/Notify>
3#include <osg/io_utils>
4
5#include <osgDB/Registry>
6#include <osgDB/Input>
7#include <osgDB/Output>
8
9#include <stdlib.h>
10#include <string.h>
11
12using namespace osg;
13using namespace osgDB;
14
15// forward declare functions to use later.
16bool Texture_readLocalData(Object& obj, Input& fr);
17bool Texture_writeLocalData(const Object& obj, Output& fw);
18
19bool Texture_matchWrapStr(const char* str,Texture::WrapMode& wrap);
20const char* Texture_getWrapStr(Texture::WrapMode wrap);
21bool Texture_matchFilterStr(const char* str,Texture::FilterMode& filter);
22const char* Texture_getFilterStr(Texture::FilterMode filter);
23bool Texture_matchInternalFormatModeStr(const char* str,Texture::InternalFormatMode& mode);
24const char* Texture_getInternalFormatModeStr(Texture::InternalFormatMode mode);
25bool Texture_matchInternalFormatStr(const char* str,int& value);
26const char* Texture_getInternalFormatStr(int value);
27bool Texture_matchSourceTypeStr(const char* str,int& value);
28const char* Texture_getSourceTypeStr(int value);
29bool Texture_matchShadowCompareFuncStr(const char* str,Texture::ShadowCompareFunc& value);
30const char* Texture_getShadowCompareFuncStr(Texture::ShadowCompareFunc value);
31bool Texture_matchShadowTextureModeStr(const char* str,Texture::ShadowTextureMode& value);
32const char* Texture_getShadowTextureModeStr(Texture::ShadowTextureMode value);
33
34// register the read and write functions with the osgDB::Registry.
35REGISTER_DOTOSGWRAPPER(Texture)
36(
37    0,
38    "TextureBase",
39    "Object StateAttribute TextureBase",
40    &Texture_readLocalData,
41    &Texture_writeLocalData
42);
43
44
45bool Texture_readLocalData(Object& obj, Input& fr)
46{
47    bool iteratorAdvanced = false;
48
49    Texture& texture = static_cast<Texture&>(obj);
50
51    Texture::WrapMode wrap;
52    if (fr[0].matchWord("wrap_s") && Texture_matchWrapStr(fr[1].getStr(),wrap))
53    {
54        texture.setWrap(Texture::WRAP_S,wrap);
55        fr+=2;
56        iteratorAdvanced = true;
57    }
58
59    if (fr[0].matchWord("wrap_t") && Texture_matchWrapStr(fr[1].getStr(),wrap))
60    {
61        texture.setWrap(Texture::WRAP_T,wrap);
62        fr+=2;
63        iteratorAdvanced = true;
64    }
65
66    if (fr[0].matchWord("wrap_r") && Texture_matchWrapStr(fr[1].getStr(),wrap))
67    {
68        texture.setWrap(Texture::WRAP_R,wrap);
69        fr+=2;
70        iteratorAdvanced = true;
71    }
72
73    Texture::FilterMode filter;
74    if (fr[0].matchWord("min_filter") && Texture_matchFilterStr(fr[1].getStr(),filter))
75    {
76        texture.setFilter(Texture::MIN_FILTER,filter);
77        fr+=2;
78        iteratorAdvanced = true;
79    }
80
81    if (fr[0].matchWord("mag_filter") && Texture_matchFilterStr(fr[1].getStr(),filter))
82    {
83        texture.setFilter(Texture::MAG_FILTER,filter);
84        fr+=2;
85        iteratorAdvanced = true;
86    }
87
88    if (fr.matchSequence("maxAnisotropy %f"))
89    {
90        float anis=1.0f;
91        fr[1].getFloat(anis);
92        texture.setMaxAnisotropy(anis);
93        fr +=2 ;
94        iteratorAdvanced = true;
95    }
96
97    if (fr.matchSequence("borderColor %f %f %f %f"))
98    {
99        Vec4 color;
100        fr[1].getFloat(color[0]);
101        fr[2].getFloat(color[1]);
102        fr[3].getFloat(color[2]);
103        fr[4].getFloat(color[3]);
104        texture.setBorderColor(color);
105        fr +=5 ;
106        iteratorAdvanced = true;
107    }
108
109    if (fr.matchSequence("borderWidth %i"))
110    {
111        int width=0;
112        fr[1].getInt(width);
113        texture.setBorderWidth(width);
114        fr +=2 ;
115        iteratorAdvanced = true;
116    }
117
118    if (fr[0].matchWord("useHardwareMipMapGeneration"))
119    {
120        if (fr[1].matchWord("TRUE"))
121        {
122            texture.setUseHardwareMipMapGeneration(true);
123            fr +=2 ;
124            iteratorAdvanced = true;
125        }
126        else if (fr[1].matchWord("FALSE"))
127        {
128            texture.setUseHardwareMipMapGeneration(false);
129            fr +=2 ;
130            iteratorAdvanced = true;
131        }
132    }
133
134    if (fr[0].matchWord("unRefImageDataAfterApply"))
135    {
136        if (fr[1].matchWord("TRUE"))
137        {
138            texture.setUnRefImageDataAfterApply(true);
139            fr +=2 ;
140            iteratorAdvanced = true;
141        }
142        else if (fr[1].matchWord("FALSE"))
143        {
144            texture.setUnRefImageDataAfterApply(false);
145            fr +=2 ;
146            iteratorAdvanced = true;
147        }
148    }
149
150
151    Texture::InternalFormatMode mode;
152    if (fr[0].matchWord("internalFormatMode") && Texture_matchInternalFormatModeStr(fr[1].getStr(),mode))
153    {
154        texture.setInternalFormatMode(mode);
155        fr+=2;
156        iteratorAdvanced = true;
157    }
158
159    if (fr[0].matchWord("internalFormat"))
160    {
161        int value;
162        if (Texture_matchInternalFormatStr(fr[1].getStr(),value) || fr[1].getInt(value))
163        {
164            texture.setInternalFormat(value);
165            fr+=2;
166            iteratorAdvanced = true;
167        }
168    }
169
170    if (fr[0].matchWord("sourceFormat"))
171    {
172        int value;
173        if (Texture_matchInternalFormatStr(fr[1].getStr(),value) || fr[1].getInt(value))
174        {
175            texture.setSourceFormat(value);
176            fr+=2;
177            iteratorAdvanced = true;
178        }
179    }
180
181    if (fr[0].matchWord("sourceType"))
182    {
183        int value;
184        if (Texture_matchInternalFormatStr(fr[1].getStr(),value) || fr[1].getInt(value))
185        {
186            texture.setSourceType(value);
187            fr+=2;
188            iteratorAdvanced = true;
189        }
190    }
191
192    if (fr[0].matchWord("resizeNonPowerOfTwo"))
193    {
194        if (fr[1].matchWord("TRUE"))
195        {
196            texture.setResizeNonPowerOfTwoHint(true);
197            fr +=2 ;
198            iteratorAdvanced = true;
199        }
200        else if (fr[1].matchWord("FALSE"))
201        {
202            texture.setResizeNonPowerOfTwoHint(false);
203            fr +=2 ;
204            iteratorAdvanced = true;
205        }
206    }
207
208    if (fr[0].matchWord("shadowComparison"))
209    {
210        if (fr[1].matchWord("TRUE"))
211        {
212            texture.setShadowComparison(true);
213            fr +=2 ;
214            iteratorAdvanced = true;
215        }
216        else if (fr[1].matchWord("FALSE"))
217        {
218            texture.setShadowComparison(false);
219            fr +=2 ;
220            iteratorAdvanced = true;
221        }
222    }
223
224    if (fr[0].matchWord("shadowCompareFunc"))
225    {
226        Texture::ShadowCompareFunc value;
227        if (Texture_matchShadowCompareFuncStr(fr[1].getStr(),value))
228        {
229            texture.setShadowCompareFunc(value);
230            fr+=2;
231            iteratorAdvanced = true;
232        }
233    }
234
235    if (fr[0].matchWord("shadowTextureMode"))
236    {
237        Texture::ShadowTextureMode value;
238        if (Texture_matchShadowTextureModeStr(fr[1].getStr(),value))
239        {
240            texture.setShadowTextureMode(value);
241            fr+=2;
242            iteratorAdvanced = true;
243        }
244    }
245
246    return iteratorAdvanced;
247}
248
249
250bool Texture_writeLocalData(const Object& obj, Output& fw)
251{
252    const Texture& texture = static_cast<const Texture&>(obj);
253
254    fw.indent() << "wrap_s " << Texture_getWrapStr(texture.getWrap(Texture::WRAP_S)) << std::endl;
255    fw.indent() << "wrap_t " << Texture_getWrapStr(texture.getWrap(Texture::WRAP_T)) << std::endl;
256    fw.indent() << "wrap_r " << Texture_getWrapStr(texture.getWrap(Texture::WRAP_R)) << std::endl;
257
258    fw.indent() << "min_filter " << Texture_getFilterStr(texture.getFilter(Texture::MIN_FILTER)) << std::endl;
259    fw.indent() << "mag_filter " << Texture_getFilterStr(texture.getFilter(Texture::MAG_FILTER)) << std::endl;
260    fw.indent() << "maxAnisotropy " << texture.getMaxAnisotropy() << std::endl;
261   
262    fw.indent() << "borderColor " << texture.getBorderColor() << std::endl;
263    fw.indent() << "borderWidth " << texture.getBorderWidth() << std::endl;
264
265    fw.indent() << "useHardwareMipMapGeneration "<< (texture.getUseHardwareMipMapGeneration()?"TRUE":"FALSE") << std::endl;
266    fw.indent() << "unRefImageDataAfterApply "<< (texture.getUnRefImageDataAfterApply()?"TRUE":"FALSE") << std::endl;
267           
268    fw.indent() << "internalFormatMode " << Texture_getInternalFormatModeStr(texture.getInternalFormatMode()) << std::endl;
269    if (texture.getInternalFormatMode()==Texture::USE_USER_DEFINED_FORMAT)
270    {
271
272        const char* str = Texture_getInternalFormatStr(texture.getInternalFormat());
273
274        if (str) fw.indent() << "internalFormat " << str << std::endl;
275        else fw.indent() << "internalFormat " << texture.getInternalFormat() << std::endl;
276
277    }
278   
279    if (texture.getSourceFormat())
280    {
281        const char* str = Texture_getInternalFormatStr(texture.getSourceFormat());
282
283        if (str) fw.indent() << "sourceFormat " << str << std::endl;
284        else fw.indent() << "sourceFormat " << texture.getSourceFormat() << std::endl;
285       
286    }
287
288    if (texture.getSourceType())
289    {
290        const char* str = Texture_getSourceTypeStr(texture.getSourceType());
291
292        if (str) fw.indent() << "sourceType " << str << std::endl;
293        else fw.indent() << "sourceType " << texture.getSourceType() << std::endl;
294       
295    }
296
297    fw.indent() << "resizeNonPowerOfTwo "<< (texture.getResizeNonPowerOfTwoHint()?"TRUE":"FALSE") << std::endl;
298
299    fw.indent() << "shadowComparison "<< (texture.getShadowComparison()?"TRUE":"FALSE") << std::endl;
300
301    fw.indent() << "shadowCompareFunc " << Texture_getShadowCompareFuncStr(texture.getShadowCompareFunc()) << std::endl;
302
303    fw.indent() << "shadowTextureMode " << Texture_getShadowTextureModeStr(texture.getShadowTextureMode()) << std::endl;
304
305    return true;
306}
307
308
309bool Texture_matchWrapStr(const char* str,Texture::WrapMode& wrap)
310{
311    if (strcmp(str,"CLAMP")==0) wrap = Texture::CLAMP;
312    else if (strcmp(str,"CLAMP_TO_EDGE")==0) wrap = Texture::CLAMP_TO_EDGE;
313    else if (strcmp(str,"CLAMP_TO_BORDER")==0) wrap = Texture::CLAMP_TO_BORDER;
314    else if (strcmp(str,"REPEAT")==0) wrap = Texture::REPEAT;
315    else if (strcmp(str,"MIRROR")==0) wrap = Texture::MIRROR;
316    else return false;
317    return true;
318}
319
320
321const char* Texture_getWrapStr(Texture::WrapMode wrap)
322{
323    switch(wrap)
324    {
325        case(Texture::CLAMP): return "CLAMP";
326        case(Texture::CLAMP_TO_EDGE): return "CLAMP_TO_EDGE";
327        case(Texture::CLAMP_TO_BORDER): return "CLAMP_TO_BORDER";
328        case(Texture::REPEAT): return "REPEAT";
329        case(Texture::MIRROR): return "MIRROR";
330    }
331    return "";
332}
333
334
335bool Texture_matchFilterStr(const char* str,Texture::FilterMode& filter)
336{
337    if (strcmp(str,"NEAREST")==0) filter = Texture::NEAREST;
338    else if (strcmp(str,"LINEAR")==0) filter = Texture::LINEAR;
339    else if (strcmp(str,"NEAREST_MIPMAP_NEAREST")==0) filter = Texture::NEAREST_MIPMAP_NEAREST;
340    else if (strcmp(str,"LINEAR_MIPMAP_NEAREST")==0) filter = Texture::LINEAR_MIPMAP_NEAREST;
341    else if (strcmp(str,"NEAREST_MIPMAP_LINEAR")==0) filter = Texture::NEAREST_MIPMAP_LINEAR;
342    else if (strcmp(str,"LINEAR_MIPMAP_LINEAR")==0) filter = Texture::LINEAR_MIPMAP_LINEAR;
343    else if (strcmp(str,"ANISOTROPIC")==0) filter = Texture::LINEAR;
344    else return false;
345    return true;
346}
347
348
349const char* Texture_getFilterStr(Texture::FilterMode filter)
350{
351    switch(filter)
352    {
353        case(Texture::NEAREST): return "NEAREST";
354        case(Texture::LINEAR): return "LINEAR";
355        case(Texture::NEAREST_MIPMAP_NEAREST): return "NEAREST_MIPMAP_NEAREST";
356        case(Texture::LINEAR_MIPMAP_NEAREST): return "LINEAR_MIPMAP_NEAREST";
357        case(Texture::NEAREST_MIPMAP_LINEAR): return "NEAREST_MIPMAP_LINEAR";
358        case(Texture::LINEAR_MIPMAP_LINEAR): return "LINEAR_MIPMAP_LINEAR";
359    }
360    return "";
361}
362
363bool Texture_matchInternalFormatModeStr(const char* str,Texture::InternalFormatMode& mode)
364{
365    if (strcmp(str,"USE_IMAGE_DATA_FORMAT")==0)          mode = Texture::USE_IMAGE_DATA_FORMAT;
366    else if (strcmp(str,"USE_USER_DEFINED_FORMAT")==0)   mode = Texture::USE_USER_DEFINED_FORMAT;
367    else if (strcmp(str,"USE_ARB_COMPRESSION")==0)       mode = Texture::USE_ARB_COMPRESSION;
368    else if (strcmp(str,"USE_S3TC_DXT1_COMPRESSION")==0) mode = Texture::USE_S3TC_DXT1_COMPRESSION;
369    else if (strcmp(str,"USE_S3TC_DXT3_COMPRESSION")==0) mode = Texture::USE_S3TC_DXT3_COMPRESSION;
370    else if (strcmp(str,"USE_S3TC_DXT5_COMPRESSION")==0) mode = Texture::USE_S3TC_DXT5_COMPRESSION;
371    else return false;
372    return true;
373}
374
375
376const char* Texture_getInternalFormatModeStr(Texture::InternalFormatMode mode)
377{
378    switch(mode)
379    {
380        case(Texture::USE_IMAGE_DATA_FORMAT):        return "USE_IMAGE_DATA_FORMAT";
381        case(Texture::USE_USER_DEFINED_FORMAT):      return "USE_USER_DEFINED_FORMAT";
382        case(Texture::USE_ARB_COMPRESSION):          return "USE_ARB_COMPRESSION";
383        case(Texture::USE_S3TC_DXT1_COMPRESSION):    return "USE_S3TC_DXT1_COMPRESSION";
384        case(Texture::USE_S3TC_DXT3_COMPRESSION):    return "USE_S3TC_DXT3_COMPRESSION";
385        case(Texture::USE_S3TC_DXT5_COMPRESSION):    return "USE_S3TC_DXT5_COMPRESSION";
386    }
387    return "";
388}
389
390
391bool Texture_matchInternalFormatStr(const char* str,int& value)
392{
393    if (     strcmp(str,"GL_INTENSITY")==0) value = GL_INTENSITY;
394    else if (strcmp(str,"GL_LUMINANCE")==0) value = GL_LUMINANCE;
395    else if (strcmp(str,"GL_ALPHA")==0) value = GL_ALPHA;
396    else if (strcmp(str,"GL_LUMINANCE_ALPHA")==0) value = GL_LUMINANCE_ALPHA;
397    else if (strcmp(str,"GL_RGB")==0) value = GL_RGB;
398    else if (strcmp(str,"GL_RGBA")==0) value = GL_RGBA;
399    else if (strcmp(str,"GL_COMPRESSED_ALPHA_ARB")==0) value = GL_COMPRESSED_ALPHA_ARB;
400    else if (strcmp(str,"GL_COMPRESSED_LUMINANCE_ARB")==0) value = GL_COMPRESSED_LUMINANCE_ARB;
401    else if (strcmp(str,"GL_COMPRESSED_INTENSITY_ARB")==0) value = GL_COMPRESSED_INTENSITY_ARB;
402    else if (strcmp(str,"GL_COMPRESSED_LUMINANCE_ALPHA_ARB")==0) value = GL_COMPRESSED_LUMINANCE_ALPHA_ARB;
403    else if (strcmp(str,"GL_COMPRESSED_RGB_ARB")==0) value = GL_COMPRESSED_RGB_ARB;
404    else if (strcmp(str,"GL_COMPRESSED_RGBA_ARB")==0) value = GL_COMPRESSED_RGBA_ARB;
405    else if (strcmp(str,"GL_COMPRESSED_RGB_S3TC_DXT1_EXT")==0) value = GL_COMPRESSED_RGB_S3TC_DXT1_EXT;
406    else if (strcmp(str,"GL_COMPRESSED_RGBA_S3TC_DXT1_EXT")==0) value = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
407    else if (strcmp(str,"GL_COMPRESSED_RGBA_S3TC_DXT3_EXT")==0) value = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT;
408    else if (strcmp(str,"GL_COMPRESSED_RGBA_S3TC_DXT5_EXT")==0) value = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
409    else
410    {
411        osgDB::Field::FieldType type = osgDB::Field::calculateFieldType(str);
412        if (type==osgDB::Field::INTEGER)
413        {
414            value = atoi(str);
415            return true;
416        }
417        else
418        {
419            return false;
420        }
421    }
422
423    return true;
424}
425
426
427const char* Texture_getInternalFormatStr(int value)
428{
429    switch(value)
430    {
431        case(GL_INTENSITY): return "GL_INTENSITY";
432        case(GL_LUMINANCE): return "GL_LUMINANCE";
433        case(GL_ALPHA): return "GL_ALPHA";
434        case(GL_LUMINANCE_ALPHA): return "GL_LUMINANCE_ALPHA";
435        case(GL_RGB): return "GL_RGB";
436        case(GL_RGBA): return "GL_RGBA";
437        case(GL_COMPRESSED_ALPHA_ARB): return "GL_COMPRESSED_ALPHA_ARB";
438        case(GL_COMPRESSED_LUMINANCE_ARB): return "GL_COMPRESSED_LUMINANCE_ARB";
439        case(GL_COMPRESSED_INTENSITY_ARB): return "GL_COMPRESSED_INTENSITY_ARB";
440        case(GL_COMPRESSED_LUMINANCE_ALPHA_ARB): return "GL_COMPRESSED_LUMINANCE_ALPHA_ARB";
441        case(GL_COMPRESSED_RGB_ARB): return "GL_COMPRESSED_RGB_ARB";
442        case(GL_COMPRESSED_RGBA_ARB): return "GL_COMPRESSED_RGBA_ARB";
443        case(GL_COMPRESSED_RGB_S3TC_DXT1_EXT): return "GL_COMPRESSED_RGB_S3TC_DXT1_EXT";
444        case(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT): return "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT";
445        case(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT): return "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT";
446        case(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT): return "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT";
447    }
448    return NULL;
449}
450
451bool Texture_matchSourceTypeStr(const char* str,int& value)
452{
453    if (     strcmp(str,"GL_BYTE")==0) value = GL_BYTE;
454    else if (strcmp(str,"GL_SHORT")==0) value = GL_SHORT;
455    else if (strcmp(str,"GL_INT")==0) value = GL_INT;
456    else if (strcmp(str,"GL_UNSIGNED_BYTE")==0) value = GL_UNSIGNED_BYTE;
457    else if (strcmp(str,"GL_UNSIGNED_SHORT")==0) value = GL_UNSIGNED_SHORT;
458    else if (strcmp(str,"GL_UNSIGNED_INT")==0) value = GL_UNSIGNED_INT;
459    else if (strcmp(str,"GL_FLOAT")==0) value = GL_FLOAT;
460    else
461    {
462        osgDB::Field::FieldType type = osgDB::Field::calculateFieldType(str);
463        if (type==osgDB::Field::INTEGER)
464        {
465            value = atoi(str);
466            return true;
467        }
468        else
469        {
470            return false;
471        }
472    }
473
474    return true;
475}
476
477const char* Texture_getSourceTypeStr(int value)
478{
479    switch(value)
480    {
481        case(GL_BYTE): return "GL_BYTE";
482        case(GL_SHORT): return "GL_SHORT";
483        case(GL_INT): return "GL_INT";
484        case(GL_FLOAT): return "GL_FLOAT";
485        case(GL_UNSIGNED_BYTE): return "GL_UNSIGNED_BYTE";
486        case(GL_UNSIGNED_SHORT): return "GL_UNSIGNED_SHORT";
487        case(GL_UNSIGNED_INT): return "GL_UNSIGNED_INT";
488    }
489    return NULL;
490}
491
492bool Texture_matchShadowCompareFuncStr(const char* str, Texture::ShadowCompareFunc& value)
493{
494    if (     strcmp(str,"GL_LEQUAL")==0) value = Texture::LEQUAL;
495    else if (strcmp(str,"GL_GEQUAL")==0) value = Texture::GEQUAL;
496    else return false;
497
498    return true;
499}
500
501const char* Texture_getShadowCompareFuncStr(Texture::ShadowCompareFunc value)
502{
503    switch(value)
504    {
505    case( Texture::LEQUAL ): return "GL_LEQUAL";
506    case( Texture::GEQUAL ): return "GL_GEQUAL";
507    }
508    return NULL;
509}
510
511bool Texture_matchShadowTextureModeStr(const char* str,Texture::ShadowTextureMode& value)
512{
513    if (     strcmp(str,"GL_LUMINANCE")==0) value = Texture::LUMINANCE;
514    else if (strcmp(str,"GL_INTENSITY")==0) value = Texture::INTENSITY;
515    else if (strcmp(str,"GL_ALPHA")==0) value = Texture::ALPHA;
516    else return false;
517
518    return true;
519}
520
521const char* Texture_getShadowTextureModeStr(Texture::ShadowTextureMode value)
522{
523    switch(value)
524    {
525        case( Texture::LUMINANCE ): return "GL_LUMINANCE";
526        case( Texture::INTENSITY ): return "GL_INTENSITY";
527        case( Texture::ALPHA ): return "GL_ALPHA";
528    }
529    return NULL;
530}
Note: See TracBrowser for help on using the browser.