History

got particles sending from server to client and rendering

ZappoMan committed 12 years ago

Commit 27837701 parent 2ca628f7 files · +78 −22Browse files

Showing the changes to interface/src/ParticleTreeRenderer.cpp (1 of 7 files). Show all

Unified · Split

interface/src/ParticleTreeRenderer.cpp+6−1
@@ -27,11 +27,16 @@ void ParticleTreeRenderer::renderElement(OctreeElement* element) { · 26 unmodified lines
2727
2828 uint16_t numberOfParticles = particles.size();
2929
30+ glPointSize(20.0f);
3031 glBegin(GL_POINTS);
3132 for (uint16_t i = 0; i < numberOfParticles; i++) {
3233 const Particle& particle = particles[i];
3334 // render particle aspoints
34− glVertex3f(particle.getPosition().x, particle.getPosition().y, particle.getPosition().z);
35+ glm::vec3 position = particle.getPosition() * (float)TREE_SCALE;
36+
37+ printf("glVertex3f(%f, %f, %f)\n", position.x, position.y, position.z);
38+
39+ glVertex3f(position.x, position.y, position.z);
3540 }
3641 glEnd();
3742 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t