16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 11:19:19 +02:00

minor bug fixes, minor diagnostics tweaks

This commit is contained in:
tmj-fstate
2019-12-17 14:50:04 +01:00
parent 57b88ec64a
commit 0ebc7e282f
10 changed files with 57 additions and 48 deletions

View File

@@ -129,7 +129,7 @@ opengl_particles::update( opengl_camera const &Camera ) {
}
std::size_t
opengl_particles::render( int const Textureunit ) {
opengl_particles::render( GLint const Textureunit ) {
if( false == Global.Smoke ) { return 0; }
if( m_buffercapacity == 0 ) { return 0; }
@@ -143,7 +143,7 @@ opengl_particles::render( int const Textureunit ) {
::glEnableClientState( GL_VERTEX_ARRAY );
::glColorPointer( 4, GL_UNSIGNED_BYTE, sizeof( particle_vertex ), reinterpret_cast<void const *>( sizeof( float ) * 3 ) );
::glEnableClientState( GL_COLOR_ARRAY );
::glClientActiveTexture( Textureunit );
::glClientActiveTexture( GL_TEXTURE0 + Textureunit );
::glTexCoordPointer( 2, GL_FLOAT, sizeof( particle_vertex ), reinterpret_cast<void const *>( sizeof( float ) * 3 + sizeof( std::uint8_t ) * 4 ) );
::glEnableClientState( GL_TEXTURE_COORD_ARRAY );
// ...draw...