Bladeren bron

test: fix logic bugs in two tutorials.

legacy
Sam Hocevar sam 13 jaren geleden
bovenliggende
commit
40be36ec2c
2 gewijzigde bestanden met toevoegingen van 7 en 1 verwijderingen
  1. +2
    -0
      test/tutorial/tut02.cpp
  2. +5
    -1
      test/tutorial/tut03.cpp

+ 2
- 0
test/tutorial/tut02.cpp Bestand weergeven

@@ -66,6 +66,8 @@ public:
m_indices[9] = i16vec3(1, 0, 4); m_indices[9] = i16vec3(1, 0, 4);
m_indices[10] = i16vec3(3, 2, 6); m_indices[10] = i16vec3(3, 2, 6);
m_indices[11] = i16vec3(6, 7, 3); m_indices[11] = i16vec3(6, 7, 3);

m_ready = false;
} }


virtual void TickGame(float deltams) virtual void TickGame(float deltams)


+ 5
- 1
test/tutorial/tut03.cpp Bestand weergeven

@@ -159,9 +159,12 @@ public:


~Fractal() ~Fractal()
{ {
/* Signal worker threads for completion. */ /* Signal worker threads for completion and wait for
* them to quit. */
for (int i = 0; i < MAX_THREADS; i++) for (int i = 0; i < MAX_THREADS; i++)
m_jobqueue.Push(-1); m_jobqueue.Push(-1);
for (int i = 0; i < MAX_THREADS; i++)
m_donequeue.Pop();


Input::UntrackMouse(this); Input::UntrackMouse(this);
#if !defined __native_client__ #if !defined __native_client__
@@ -337,6 +340,7 @@ public:
that->DoWork(line); that->DoWork(line);
that->m_donequeue.Push(0); that->m_donequeue.Push(0);
} }
that->m_donequeue.Push(0);
return NULL; return NULL;
}; };




||||||
x
 
000:0
Laden…
Annuleren
Opslaan