Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualphil_t

Posted 24 June 2013 - 12:10 AM


Per second. The variable I'm using to count how many there are is in my first class in the draw method, so each time it's called I'm increasing the variable. But if I coded this correctly, shouldn't I only have the initial 320,000 calls without the number growing?

 

If you're drawing 40,000 cubes with 40,000 draw calls, and you have 320,000 draw calls per second, all that tells me is that you're only getting 8 frames per second! (Which is not surprising).

 

 

 


I only need one draw call to draw my map, but it keeps getting redrawn for some reason.

 

Are you drawing them to a render target and then using that in subsequent frames or something? What are you doing to stop the cubes from being rendered after the first frame?

 

Do you understand how a game loop works? The screen is erased and everything is redrawn every frame.


#1phil_t

Posted 24 June 2013 - 12:09 AM


Per second. The variable I'm using to count how many there are is in my first class in the draw method, so each time it's called I'm increasing the variable. But if I coded this correctly, shouldn't I only have the initial 320,000 calls without the number growing?

 

If you're drawing 40,000 cubes with 40,000 draw calls, and you have 320,000 draw calls per second, that tells me you're only getting 8 frames per second! (Which is not surprising).

 


I only need one draw call to draw my map, but it keeps getting redrawn for some reason.

 

Are you drawing them to a render target and then using that in subsequent frames or something? What are you doing to stop the cubes from being rendered after the first frame?

 

Do you understand how a game loop works? The screen is erased and everything is redrawn every frame.


PARTNERS