Jump to content

  • Log In with Google      Sign In   
  • Create Account


#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