MCPcopy Create free account
hub / github.com/cinder/Cinder / genTexUpdate

Method genTexUpdate

test/_opengl/TextureUpload/src/TextureUploadApp.cpp:55–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53
54template<typename T>
55gl::TextureRef TextureUploadApp::genTexUpdate( bool color, bool alpha )
56{
57 if( color && alpha ) {
58 SurfaceT<T> s0( mImgAlpha );
59 gl::TextureRef result = gl::Texture::create( s0 );
60 result->update( SurfaceT<T>( mImg2Alpha ) );
61 return result;
62 }
63 else if( color ) {
64 SurfaceT<T> s0( mImg );
65 gl::TextureRef result = gl::Texture::create( s0 );
66 result->update( SurfaceT<T>( mImg2 ) );
67 return result;
68 }
69 else { // grayscale
70 ChannelT<T> s0( mImg );
71 gl::TextureRef result = gl::Texture::create( s0 );
72 result->update( ChannelT<T>( mImg2 ) );
73 return result;
74 }
75}
76
77template<typename T>
78void TextureUploadApp::setupTexConstructor()

Callers

nothing calls this directly

Calls 2

createFunction · 0.50
updateMethod · 0.45

Tested by

no test coverage detected