mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
on second thought, checking for function pointers is more optimal
This commit is contained in:
@@ -1123,7 +1123,7 @@ opengl_texture::alloc_rendertarget( GLint format, GLint components, int width, i
|
|||||||
wrap_mode_s = wrap;
|
wrap_mode_s = wrap;
|
||||||
wrap_mode_t = wrap;
|
wrap_mode_t = wrap;
|
||||||
samples = s;
|
samples = s;
|
||||||
if( Global.gfx_usegles && !GLAD_GL_ES_VERSION_3_1 ) {
|
if( Global.gfx_usegles && !glTexStorage2DMultisample ) {
|
||||||
samples = 1;
|
samples = 1;
|
||||||
}
|
}
|
||||||
layers = l;
|
layers = l;
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ opengl33_vaogeometrybank::draw_( gfx::geometry_handle const &Geometry, gfx::stre
|
|||||||
}
|
}
|
||||||
// render
|
// render
|
||||||
if( chunkrecord.index_count > 0 ) {
|
if( chunkrecord.index_count > 0 ) {
|
||||||
if (GLAD_GL_VERSION_3_3 || GLAD_GL_ES_VERSION_3_2) {
|
if (glDrawRangeElementsBaseVertex) {
|
||||||
m_vao->bind();
|
m_vao->bind();
|
||||||
::glDrawRangeElementsBaseVertex(
|
::glDrawRangeElementsBaseVertex(
|
||||||
chunk.type,
|
chunk.type,
|
||||||
@@ -141,7 +141,7 @@ opengl33_vaogeometrybank::draw_( gfx::geometry_handle const &Geometry, gfx::stre
|
|||||||
chunkrecord.index_count, GL_UNSIGNED_INT, reinterpret_cast<void const *>( chunkrecord.index_offset * sizeof( gfx::basic_index ) ),
|
chunkrecord.index_count, GL_UNSIGNED_INT, reinterpret_cast<void const *>( chunkrecord.index_offset * sizeof( gfx::basic_index ) ),
|
||||||
chunkrecord.vertex_offset );
|
chunkrecord.vertex_offset );
|
||||||
}
|
}
|
||||||
else if (GLAD_GL_OES_draw_elements_base_vertex) {
|
else if (glDrawElementsBaseVertexOES) {
|
||||||
m_vao->bind();
|
m_vao->bind();
|
||||||
::glDrawElementsBaseVertexOES(
|
::glDrawElementsBaseVertexOES(
|
||||||
chunk.type,
|
chunk.type,
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ opengl_vbogeometrybank::draw_( gfx::geometry_handle const &Geometry, gfx::stream
|
|||||||
chunkrecord.index_count, GL_UNSIGNED_INT, reinterpret_cast<void const *>( chunkrecord.index_offset * sizeof( gfx::basic_index ) ),
|
chunkrecord.index_count, GL_UNSIGNED_INT, reinterpret_cast<void const *>( chunkrecord.index_offset * sizeof( gfx::basic_index ) ),
|
||||||
chunkrecord.vertex_offset );
|
chunkrecord.vertex_offset );
|
||||||
*/
|
*/
|
||||||
if (GLAD_GL_VERSION_3_2 || GLAD_GL_ARB_draw_elements_base_vertex) {
|
if (glDrawRangeElementsBaseVertex) {
|
||||||
if( m_activestreams != Streams ) {
|
if( m_activestreams != Streams ) {
|
||||||
bind_streams( Units, Streams );
|
bind_streams( Units, Streams );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user