Fix OpenGL 3 Core Profile vertex buffers on macOS (fixes ecode console rendering when using 3 CP). Disable OpenGL 3 renderer on macOS.

This commit is contained in:
Martín Lucas Golini
2025-03-05 22:04:04 -03:00
parent 5923fd5831
commit 48dbedafef
3 changed files with 4 additions and 2 deletions

View File

@@ -118,7 +118,9 @@ std::vector<GraphicsLibraryVersion> Renderer::getAvailableGraphicsLibraryVersion
vers.emplace_back( GLv_2 );
#endif
#ifdef EE_GL3_ENABLED
#if EE_PLATFORM != EE_PLATFORM_MACOS
vers.emplace_back( GLv_3 );
#endif
vers.emplace_back( GLv_3CP );
vers.emplace_back( GLv_ES2 );
#endif

View File

@@ -443,7 +443,7 @@ void RendererGL3CP::texCoordPointer( int size, unsigned int type, int stride, co
}
int RendererGL3CP::getStateIndex( const Uint32& State ) {
eeASSERT( State < EEGL_ARRAY_STATES_COUNT );
eeASSERT( State < EEGL_ARRAY_STATES_COUNT || State == EEGL_TEXTURE_COORD_ARRAY );
if ( EEGL_TEXTURE_COORD_ARRAY == State )
return mTextureUnits[mCurActiveTex];

View File

@@ -10,7 +10,7 @@ namespace EE { namespace Graphics {
VertexBuffer* VertexBuffer::New( const Uint32& vertexFlags, PrimitiveType drawType,
const Int32& reserveVertexSize, const Int32& reserveIndexSize,
VertexBufferUsageType usageType ) {
if ( GLi->isExtension( EEGL_ARB_vertex_buffer_object ) )
if ( GLi->isExtension( EEGL_ARB_vertex_buffer_object ) || GLi->version() == GLv_3CP )
return eeNew( VertexBufferVBO,
( vertexFlags, drawType, reserveVertexSize, reserveIndexSize, usageType ) );