imgui user interface implementation

This commit is contained in:
tmj-fstate
2018-08-30 20:41:14 +02:00
parent 8b285834b0
commit 0c062e9041
25 changed files with 1563 additions and 1118 deletions

View File

@@ -118,6 +118,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 );
@@ -146,8 +149,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 ) {