mirror of https://github.com/axmolengine/axmol.git
Fix ci
This commit is contained in:
parent
19e2a77bb4
commit
fbb40dd47f
|
@ -489,7 +489,7 @@ bool GLViewImpl::initWithRect(std::string_view viewName, Rect rect, float frameZ
|
|||
}
|
||||
|
||||
// Will cause OpenGL error 0x0500 when use ANGLE-GLES on desktop
|
||||
#if defined(AX_USE_GL)
|
||||
#if !defined(AX_USE_GLES)
|
||||
// Enable point size by default.
|
||||
# if defined(GL_VERSION_2_0)
|
||||
glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
|
||||
|
@ -1198,7 +1198,7 @@ bool GLViewImpl::loadGL()
|
|||
|
||||
// glad: load all OpenGL function pointers
|
||||
// ---------------------------------------
|
||||
# if defined(AX_USE_GL)
|
||||
# if !defined(AX_USE_GLES)
|
||||
if (!gladLoadGL(glfwGetProcAddress))
|
||||
{
|
||||
log("glad: Failed to Load GL");
|
||||
|
|
|
@ -214,13 +214,13 @@ void CommandBufferGL::setProgramState(ProgramState* programState)
|
|||
void CommandBufferGL::drawArrays(PrimitiveType primitiveType, std::size_t start, std::size_t count, bool wireframe)
|
||||
{
|
||||
prepareDrawing();
|
||||
#ifdef AX_USE_GL // glPolygonMode is only supported in Desktop OpenGL
|
||||
#ifndef AX_USE_GLES // glPolygonMode is only supported in Desktop OpenGL
|
||||
if (wireframe) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
||||
#else
|
||||
if (wireframe) primitiveType = PrimitiveType::LINE;
|
||||
#endif
|
||||
glDrawArrays(UtilsGL::toGLPrimitiveType(primitiveType), start, count);
|
||||
#ifdef AX_USE_GL // glPolygonMode is only supported in Desktop OpenGL
|
||||
#ifndef AX_USE_GLES // glPolygonMode is only supported in Desktop OpenGL
|
||||
if (wireframe) glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
||||
#endif
|
||||
cleanResources();
|
||||
|
@ -233,7 +233,7 @@ void CommandBufferGL::drawElements(PrimitiveType primitiveType,
|
|||
bool wireframe)
|
||||
{
|
||||
prepareDrawing();
|
||||
#ifdef AX_USE_GL // glPolygonMode is only supported in Desktop OpenGL
|
||||
#ifndef AX_USE_GLES // glPolygonMode is only supported in Desktop OpenGL
|
||||
if (wireframe) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
||||
#else
|
||||
if (wireframe) primitiveType = PrimitiveType::LINE;
|
||||
|
@ -242,7 +242,7 @@ void CommandBufferGL::drawElements(PrimitiveType primitiveType,
|
|||
glDrawElements(UtilsGL::toGLPrimitiveType(primitiveType), count, UtilsGL::toGLIndexType(indexType),
|
||||
(GLvoid*)offset);
|
||||
CHECK_GL_ERROR_DEBUG();
|
||||
#ifdef AX_USE_GL // glPolygonMode is only supported in Desktop OpenGL
|
||||
#ifndef AX_USE_GLES // glPolygonMode is only supported in Desktop OpenGL
|
||||
if (wireframe) glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
||||
#endif
|
||||
cleanResources();
|
||||
|
|
|
@ -68,7 +68,7 @@ static bool checkReallySupportsASTC()
|
|||
astctexels);
|
||||
|
||||
auto error = glGetError();
|
||||
#if defined(AX_USE_GL)
|
||||
#if !defined(AX_USE_GLES)
|
||||
if (!error && glGetTexImage)
|
||||
{
|
||||
// read pixel RGB: should be: 255, 128, 0
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "imgui_internal.h"
|
||||
|
||||
// TODO: mac metal
|
||||
#if (defined(AX_USE_GL) || defined(AX_USE_GLES))
|
||||
#if defined(AX_USE_GL)
|
||||
# define AX_IMGUI_ENABLE_MULTI_VIEWPORT 1
|
||||
#else
|
||||
# define AX_IMGUI_ENABLE_MULTI_VIEWPORT 0
|
||||
|
|
Loading…
Reference in New Issue