mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 03:09:18 +02:00
Merge branch 'tmj-dev' into milek-dev
This commit is contained in:
@@ -117,6 +117,9 @@ void CSkyDome::Update( glm::vec3 const &Sun ) {
|
||||
// render skydome to screen
|
||||
void CSkyDome::Render() {
|
||||
|
||||
// cache entry state
|
||||
::glPushClientAttrib( GL_CLIENT_VERTEX_ARRAY_BIT );
|
||||
|
||||
if( m_vertexbuffer == -1 ) {
|
||||
// build the buffers
|
||||
::glGenBuffers( 1, &m_vertexbuffer );
|
||||
@@ -145,8 +148,7 @@ void CSkyDome::Render() {
|
||||
::glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, m_indexbuffer );
|
||||
::glDrawElements( GL_TRIANGLES, static_cast<GLsizei>( m_indices.size() ), GL_UNSIGNED_SHORT, reinterpret_cast<void const*>( 0 ) );
|
||||
// cleanup
|
||||
::glDisableClientState( GL_COLOR_ARRAY );
|
||||
::glDisableClientState( GL_VERTEX_ARRAY );
|
||||
::glPopClientAttrib();
|
||||
}
|
||||
|
||||
bool CSkyDome::SetSunPosition( glm::vec3 const &Direction ) {
|
||||
|
||||
Reference in New Issue
Block a user