Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Triangle performance problem



Hi

Here are my specs:

  Model Name: MacBook Pro
  Model Identifier: MacBookPro4,1
  Processor Name: Intel Core 2 Duo
  Processor Speed: 2.5 GHz
  Number Of Processors: 1
  Total Number Of Cores: 2
  L2 Cache: 6 MB
  Memory: 4 GB
  Bus Speed: 800 MHz

GeForce 8600M GT:
  Bus: PCIe
  PCIe Lane Width: x16
  VRAM (Total): 512 MB

I'm aiming for 60FPS. I'm drawing textured triangles. which are alpha blended:

glVertexPointer(3, GL_FLOAT, 0, &m_vertexArray[0]);
glEnableClientState(GL_VERTEX_ARRAY);


glTexCoordPointer(2, GL_FLOAT, 0, &m_texCoordArray[0]);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);


glColorPointer(4, GL_FLOAT, 0, &m_colorArray[0]);
glEnableClientState(GL_COLOR_ARRAY);


glDisable(GL_DEPTH_TEST);
glEnable(GL_COLOR_MATERIAL);


std::cout << "Drawing " << m_vertexArray.size() / 3 << " triangles." << std::endl;
glDrawArrays(GL_TRIANGLES, 0, m_vertexArray.size());


glDisable(GL_COLOR_MATERIAL);
glEnable(GL_DEPTH_TEST);


glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glDisableClientState(GL_COLOR_ARRAY);

I can't seem to render more than 2000 triangles without running into performance problems. This seems fairly small. Is this just something I'm doing incorrectly?

Kind regards,
Samuel

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.