-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Qt-OpenGL draws ray with wrong color #132
Comments
jtrautmann
changed the title
Qt-OpenGL draw arrow with wrong colors
Qt-OpenGL draws arrow with wrong colors
Mar 4, 2020
jtrautmann
changed the title
Qt-OpenGL draws arrow with wrong colors
Qt-OpenGL draws ray with wrong color
Mar 4, 2020
Do you have a code snippet I can try? |
Okay I have a minimal example here: /* test_user_functions.h */
#ifndef TEST_USER_FUNCTIONS_H
#define TEST_USER_FUNCTIONS_H
#include <argos3/plugins/simulator/visualizations/qt-opengl/qtopengl_user_functions.h>
#include <argos3/plugins/robots/foot-bot/simulator/footbot_entity.h>
using namespace argos;
class TestUserFunctions : public CQTOpenGLUserFunctions {
public:
TestUserFunctions();
void Draw(CFootBotEntity& c_entity);
};
#endif
/* test_user_functions.cpp */
#include "test_user_functions.h"
TestUserFunctions::TestUserFunctions() {
RegisterUserFunction<TestUserFunctions,CFootBotEntity>(
&TestUserFunctions::Draw);
}
void TestUserFunctions::Draw(CFootBotEntity& c_entity) {
CRay3 ray(CVector3(0,0,0.01), CVector3(1,0,0));
CColor color = CColor::BLUE;
DrawRay(ray, color);
}
REGISTER_QTOPENGL_USER_FUNCTIONS(TestUserFunctions, "test") |
OK, will have a look today and report my findings. |
I tested the code but I couldn't reproduce the issue. On what platform are you working? My test was on OSX 10.15.4. |
OK, interesting... I'm working on Ubuntu 18.04. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I call
CQTOpenGLUserFunctions::DrawRay
, the displayed ray is not in the color I choose. For example, if I chooseCColor::BLUE
as parameter, the ray is displayed in red, and if I chooseCColor::RED
, it gets displayed in yellow.I built argos using the commit from January 13.
OS: Ubuntu 18.04
The text was updated successfully, but these errors were encountered: