[of-dev] ofxShader addon

Kyle McDonald kyle at kylemcdonald.net
Sun Jul 11 11:18:17 PDT 2010


Great idea Memo, just added it:

http://code.google.com/p/kyle/source/browse/#svn/trunk/openframeworks/addons/ofxShader/src

void setup(string); // same name
void setup(string, string); // different names
void setupInline(string, string); // inline source

It uses this function right now:

string loadTextFile(string filename);

Which could be substituted for a simple function like "ofLoadTextFile" 
that wraps the ofBuffer Arturo just posted.

Kyle

arturo castro wrote:
> there's something like that already in github:
> 
> http://github.com/openframeworks/openFrameworks/blob/master/libs/openFrameworks/utils/ofTypes.h
> 
> look for ofBuffer
> 
> i want to move the readFile method to a function in ofUtils, something
> like:
> 
> ofReadFile(string path, ofBuffer & buffer)
> 
> so we can have other functions for reading from http for example. then
> you can pass the buffer to anything to load a file from the fs, memory,
> http...
> 
> it also read binary files so it can be used for images or other
> resources.
> 
> El dom, 11-07-2010 a las 18:53 +0100, Memo Akten escribió: 
>> Sorry I pressed send by mistake :) I meant to say:
>>
>>
>> And even when you call shader.loadshader(path) that should just be a
>> very simple wrapper for
>> Shader.loadFromSource(ofLoadTextFile(shaderFile));
>>
>>
>> Sent from my mobile.
>>    
>> Studio 107. 7 Westgate St. London E8 3RL
>> mob: +44 7958 783 832
>> tel: +44 20 8123 9986
>> fax: +44 20 8986 5496
>>
>>
>> work: www.msavisuals.com
>> play: www.memo.tv
>>
>> On 11 Jul 2010, at 18:50, Memo Akten <memo at memo.tv> wrote:
>>
>>
>>> And even when you call shader.loadshader(path) that should just be a
>>> very simple wrapper 
>>>
>> _______________________________________________
>> of-dev mailing list
>> of-dev at dev.openframeworks.cc
>> http://dev.openframeworks.cc/listinfo.cgi/of-dev-openframeworks.cc
> 
> 
> _______________________________________________
> of-dev mailing list
> of-dev at dev.openframeworks.cc
> http://dev.openframeworks.cc/listinfo.cgi/of-dev-openframeworks.cc



More information about the of-dev mailing list