Skip to content
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

Seeking for helps :) I want to customize the tool to show RGB information #45

Open
chenzeh opened this issue Jun 29, 2021 · 1 comment

Comments

@chenzeh
Copy link

chenzeh commented Jun 29, 2021

Hi @jbehley , thanks you for your great work. Thank you for providing me suggestions on another issue post, and I understand you are currently verrrrrry busy.
I am working on customize your finest work to visualize the RGB information on viewer, and I have the new data with RGB. I start to make some code change but faced a lot of problem, hope you and anyone who also see this post can give me some hints.
I start with change the code in KittiReader.cpp and store RGB info, and I also follow the similar way that how vertex information(x,y,z) transport to Shader, main change in Viewport.cpp, I put data into memory "bufTempRGBs_.assign(points_[t]->RGBs);" such as you did to points: "bufTempPoints_.assign(points_[t]->points);", and follow the similar path to send RGB info to draw_points.vert. but it seems not working, I checked the data before it assigned to GlBuffer(data exist and all correct at this step), so I assume it has something wrong with transport the data into buffer or get the data from buffer to the shader, but cannot figure out what exactly the issue is.
Do anyone else face the similar issue before, or do anyone also tried to add RGB info to this tool. I am looking forward to see your great ideas, thank you.

@jbehley
Copy link
Owner

jbehley commented Jun 29, 2021

Since I don't know what your code does, here some things to check:

  • colors in the shader must be in the range [0,1].
  • have you specified the binding point and layout? E.g.
    vao_points_.setVertexAttribute(0, bufPoints_, 4, AttributeType::FLOAT, false, sizeof(glow::vec4), nullptr);
  • Does the data type of the buffer and the binding match? Does it also have the same stride?

As I said, I can only give general advice here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants