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
27 27
28 uint16_t numberOfParticles = particles.size();28 uint16_t numberOfParticles = particles.size();
29 29
30 glPointSize(20.0f);
30 glBegin(GL_POINTS);31 glBegin(GL_POINTS);
31 for (uint16_t i = 0; i < numberOfParticles; i++) {32 for (uint16_t i = 0; i < numberOfParticles; i++) {
32 const Particle& particle = particles[i];33 const Particle& particle = particles[i];
33 // render particle aspoints34 // 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);
35 }40 }
36 glEnd();41 glEnd();
37}42}

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