19 if ( volume !=
nullptr && volume->
isDense() ) {
21 m_mesh.loadGeometry( Core::Geometry::makeSharpBox( aabb ) );
23 Core::Vector3Array tex_coords;
24 tex_coords.resize( 24 );
25 tex_coords.getMap() <<
28 Scalar( 1 ), Scalar( 0 ), Scalar( 0 ),
29 Scalar( 1 ), Scalar( 0 ), Scalar( 0 ), Scalar( 1 ),
30 Scalar( 1 ), Scalar( 1 ), Scalar( 1 ), Scalar( 1 ),
31 Scalar( 0 ), Scalar( 0 ), Scalar( 0 ), Scalar( 0 ),
32 Scalar( 1 ), Scalar( 0 ), Scalar( 0 ), Scalar( 1 ),
33 Scalar( 1 ), Scalar( 1 ), Scalar( 0 ), Scalar( 0 ),
35 Scalar( 0 ), Scalar( 1 ), Scalar( 1 ), Scalar( 0 ),
36 Scalar( 0 ), Scalar( 0 ), Scalar( 1 ), Scalar( 1 ),
37 Scalar( 1 ), Scalar( 0 ), Scalar( 0 ), Scalar( 1 ),
38 Scalar( 0 ), Scalar( 1 ), Scalar( 1 ), Scalar( 0 ),
39 Scalar( 0 ), Scalar( 0 ), Scalar( 0 ), Scalar( 0 ),
40 Scalar( 1 ), Scalar( 1 ), Scalar( 1 ), Scalar( 1 ),
42 Scalar( 0 ), Scalar( 0 ), Scalar( 0 ), Scalar( 0 ),
43 Scalar( 1 ), Scalar( 1 ), Scalar( 1 ), Scalar( 1 ),
44 Scalar( 0 ), Scalar( 0 ), Scalar( 1 ), Scalar( 1 ),
45 Scalar( 0 ), Scalar( 0 ), Scalar( 1 ), Scalar( 1 ),
46 Scalar( 0 ), Scalar( 0 ), Scalar( 1 ), Scalar( 1 ),
47 Scalar( 0 ), Scalar( 1 ), Scalar( 1 ), Scalar( 0 );
48 m_mesh.addAttrib( Ra::Core::Geometry::getAttribName( Ra::Core::Geometry::VERTEX_TEXCOORD ),
54 auto dim = grid->
size();
59 auto itr = data.
get();
60 for (
const auto& v : grid->
data() ) {
65 { GL_CLAMP_TO_BORDER, GL_CLAMP_TO_BORDER, GL_CLAMP_TO_BORDER, GL_LINEAR, GL_LINEAR },
75 m_tex.setParameters( texparam );
99 GLboolean cullEnable = glIsEnabled( GL_CULL_FACE );
101 glGetIntegerv( GL_CULL_FACE_MODE, &culledFaces );
103 glGetIntegerv( GL_FRONT_FACE, &frontFaces );
104 glCullFace( GL_BACK );
105 glEnable( GL_CULL_FACE );
107 m_mesh.render( prog );
109 glCullFace( gl::GLenum( culledFaces ) );
110 glFrontFace( gl::GLenum( frontFaces ) );
111 if ( !cullEnable ) glDisable( GL_CULL_FACE );
Describes the sampler and image of a texture.