Cocoa Design Patterns
Learning OpenGL ES for iOS
Presentations
Buy at Amazon Now
  • Cocoa Design Patterns
    Cocoa Design Patterns
    by Erik M. Buck, Donald A. Yacktman
  • Learning OpenGL ES for iOS: A Hands-on Guide to Modern 3D Graphics Programming
    Learning OpenGL ES for iOS: A Hands-on Guide to Modern 3D Graphics Programming
    by Erik M. Buck

Errata > Terrain Editor GL_TEXTURE_WRAP

When the terrain source is set to 256x256 and the texture is 256x256 the Terrain Editor binary does not display as expected in Chap. 10 examples 1 or 2.

If the texture is set to Max and Viewed in the terrain editor, it displays what I expect: stretch the texture to cover the entire terrain mesh, with no repeats. But the generated binary does not display that way in Ex 10_1 or 10_2. Instead it does a CLAMP_TO_EDGE, with the texture displayed miniscule at the origin and the edge pixels stretched to cover the remaining surface.

What am I missing?
January 19, 2013 | Unregistered CommenterPaul Mace
The Editor TextureScale slider correctly sets the scale to a fraction above 0...and the display displas the texture correctly stretched across the entire mesh. However the binary generated does not preserve that scale setting. The binary gets loaded by example Ch10_X with a scale of ~1.0, triggering tiling or clamping, depending upon the WRAP defaults.
January 29, 2013 | Unregistered CommenterPaul Mace