Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


#Actualnkarasch

Posted 01 May 2013 - 03:39 AM

Now that I'm working out how to keep track of the locations of my objects outside of OGL, another question has popped into my head. Would reloading a fresh set of  pre-transformed vertices into OpenGL every frame be significantly slower than using glTranslate, glScale etc?

 

I'm dealing with 2D here, usually arrays of 12 values.


something like:

draw(){
  vertices = somewhereElse.getVertices();
  vertexBuffer.put(vertices);

  //blah blah blah
   
  gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBuffer);
  //draw stuff

  //blah blah blah
}

 

Also, thanks for the SAT advice. I might use something like it.


#3nkarasch

Posted 01 May 2013 - 03:36 AM

Now that I'm working out how to keep track of the locations of my objects outside of OGL, another question has popped into my head. Would reloading a fresh set of  pre-transformed vertices into OpenGL every frame be significantly slower than using glTranslate, glScale etc?

 

I'm dealing with 2D here, usually arrays of 12 values.


something like:

draw(){

vertices = somewhereElse.getVertices();
vertexBuffer.put(vertices);

//blah blah blah
gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBuffer);
/draw stuff
//blah blah blaha
}

 

Also, thanks for the SAT advice. I might use something like it.


#2nkarasch

Posted 01 May 2013 - 03:29 AM

Now that I'm working out how to keep track of the locations of my objects outside of OGL, another question has popped into my head. Would reloading a fresh set of  pre-transformed vertices into OpenGL every frame be significantly slower than using glTranslate, glScale etc?

 

I'm dealing with 2D here, usually arrays of 12 values.

 

Also, thanks for the SAT advice. I might use something like it.


#1nkarasch

Posted 01 May 2013 - 03:27 AM

Now that I'm working out how to keep track of the locations of my objects outside of OGL, another question has popped into my head. Would reloading a fresh set of  pre-transformed vertices into OpenGL every frame be significantly slower than using glTranslate, glScale etc?

 

Also, thanks for the SAT advice. I might use something like it.


PARTNERS