I could see there being numerous examples based around textures. The
current "texture" examples are meant to be simple examples of how to
send texture data to the GPU and map it onto a quad. We should
probably have additional non-shader examples like "textureFromImage"
and "textureMapFromImage". Since modelShader.cpp is doing more than
loading/displaying a model perhaps it should be called
"textureMapModel" or something...
On Wed, Aug 1, 2012 at 2:12 AM, Matt Wright matt@create.ucsb.edu wrote:
Then I would question the naming of these examples. None of the three "texture" examples do what I think of as the most basic way of dealing with a texture (i.e., reading a texture image from a file and UV-mapping it onto a mesh). The one that does doesn't have "texture" in its name. Am I just being dense or is this confusing?
thanks,
-Matt
On Jul 31, 2012, at 1:34 PM, GrrrWaaa wrote:
examples/graphics/modelShader.cpp loads an image, creates a texture, and applies it to a duck.
We should make an FBO example to demonstrate Texture:quad(), if we haven't already.
On Jul 31, 2012, at 12:51 PM, Matt Wright wrote:
All of the examples I can see regarding textures involve procedurally generating the texture on the CPU and then applying them in a shader:
I'd like to see another example in which a texture is read from a file on disk (via the proper search paths mechanism?) into the appropriate CPU data structure (al::Image?) then submitted as a texture to the GPU, then "texture mapped" in the usual way (http://en.wikipedia.org/wiki/Texture_mapping) onto a simple 3D model.
It would also be nice to have an example showing the usage of Texture:quad().
On Aug 1, 2012, at 2:38 AM, Lance Putnam wrote:
I could see there being numerous examples based around textures. The current "texture" examples are meant to be simple examples of how to send texture data to the GPU and map it onto a quad. We should probably have additional non-shader examples like "textureFromImage" and "textureMapFromImage". Since modelShader.cpp is doing more than loading/displaying a model perhaps it should be called "textureMapModel" or something...
On Wed, Aug 1, 2012 at 2:12 AM, Matt Wright matt@create.ucsb.edu wrote: Then I would question the naming of these examples. None of the three "texture" examples do what I think of as the most basic way of dealing with a texture (i.e., reading a texture image from a file and UV-mapping it onto a mesh). The one that does doesn't have "texture" in its name. Am I just being dense or is this confusing?
thanks, -Matt
On Jul 31, 2012, at 1:34 PM, GrrrWaaa wrote:
examples/graphics/modelShader.cpp loads an image, creates a texture, and applies it to a duck.
We should make an FBO example to demonstrate Texture:quad(), if we haven't already.
On Jul 31, 2012, at 12:51 PM, Matt Wright wrote:
All of the examples I can see regarding textures involve procedurally generating the texture on the CPU and then applying them in a shader:
examples/graphics/shaderTexture.cpp examples/graphics/texture.cpp examples/graphics/texture3d.cpp
I'd like to see another example in which a texture is read from a file on disk (via the proper search paths mechanism?) into the appropriate CPU data structure (al::Image?) then submitted as a texture to the GPU, then "texture mapped" in the usual way (http://en.wikipedia.org/wiki/Texture_mapping) onto a simple 3D model.
It would also be nice to have an example showing the usage of Texture:quad().
Thanks! -Matt