mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-06-01 11:06:30 +03:00
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:
@@ -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
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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 ) );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user