diff --git a/modules/ar/src/panda3d-simulator/vpPanda3DBaseRenderer.cpp b/modules/ar/src/panda3d-simulator/vpPanda3DBaseRenderer.cpp index 7758d6d8f3..fa9388d3f4 100644 --- a/modules/ar/src/panda3d-simulator/vpPanda3DBaseRenderer.cpp +++ b/modules/ar/src/panda3d-simulator/vpPanda3DBaseRenderer.cpp @@ -34,6 +34,7 @@ #if defined(VISP_HAVE_PANDA3D) #include "load_prc_file.h" +#include const vpHomogeneousMatrix vpPanda3DBaseRenderer::VISP_T_PANDA({ 1.0, 0.0, 0.0, 0.0, @@ -79,6 +80,7 @@ void vpPanda3DBaseRenderer::initFromParent(std::shared_ptr frame void vpPanda3DBaseRenderer::setupScene() { m_renderRoot = m_window->get_render().attach_new_node(m_name); + m_renderRoot.set_antialias(AntialiasAttrib::M_none); } void vpPanda3DBaseRenderer::setupCamera() diff --git a/modules/ar/src/panda3d-simulator/vpPanda3DGeometryRenderer.cpp b/modules/ar/src/panda3d-simulator/vpPanda3DGeometryRenderer.cpp index 3ecf5e769e..c48d43172f 100644 --- a/modules/ar/src/panda3d-simulator/vpPanda3DGeometryRenderer.cpp +++ b/modules/ar/src/panda3d-simulator/vpPanda3DGeometryRenderer.cpp @@ -82,12 +82,11 @@ void main() )shader"; const char *vpPanda3DGeometryRenderer::SHADER_FRAG_NORMAL_AND_DEPTH = R"shader( -#version 140 +#version 120 varying vec3 oNormal; varying float distToCamera; - void main() { vec3 n = normalize(oNormal); @@ -203,6 +202,7 @@ void vpPanda3DGeometryRenderer::getRender(vpImage &normals, vpImageget_component_type() == Texture::T_unsigned_byte) { unsigned char *data = (unsigned char *)(&(m_normalDepthTexture->get_ram_image().front())); + std::cout << "AAAAAAA" << std::endl; for (unsigned int i = 0; i < normals.getSize(); ++i) { normals.bitmap[i].B = (static_cast(data[i * 4]) / 127.5f - 1.0); normals.bitmap[i].G = (static_cast(data[i * 4 + 1]) / 127.5f - 1.0); diff --git a/tutorial/ar/tutorial-panda3d-renderer.cpp b/tutorial/ar/tutorial-panda3d-renderer.cpp index dd84a7408d..d922bfd05e 100644 --- a/tutorial/ar/tutorial-panda3d-renderer.cpp +++ b/tutorial/ar/tutorial-panda3d-renderer.cpp @@ -100,7 +100,7 @@ int main(int argc, const char **argv) } std::cout << "Initializing Panda3D rendering framework" << std::endl; - renderer.initFramework(false); + renderer.initFramework(true); std::cout << "Loading object " << modelPath << std::endl; NodePath object = renderer.loadObject(objectName, modelPath);