Disable glGetError() and keep validation and asserts

main
Phillip Trudeau-Tavara 9 months ago
parent 718a89a3af
commit d5cf3d9f90

@ -10,21 +10,10 @@ set FLAGS=-O0 -g -DDEVTOOLS
set OUTPUT_FOLDER=build_web
if "%1" == "NO_VALIDATION" (
echo Disabling graphics validation...
set FLAGS=%FLAGS% -DNDEBUG
)
call build_web_common.bat || goto :error
@echo off
if "%1" == "NO_VALIDATION" (
echo Validation turned off
) else (
echo If you want to turn graphics validation off to make web debug build faster, provide a command line argument called "NO_VALIDATION" to this build script
)
goto :success
:error

@ -60,6 +60,15 @@ __declspec(dllexport) uint32_t AmdPowerXpressRequestHighPerformance = 0x00000001
#include "sokol_app.h"
#pragma warning(push)
#pragma warning(disable : 4191) // unsafe function calling
#ifdef WEB
# ifndef GL_EXT_PROTOTYPES
# define GL_GLEXT_PROTOTYPES
# endif
# include <GLES2/gl2.h>
# include <GLES2/gl2ext.h>
# undef glGetError
# define glGetError() (GL_NO_ERROR)
#endif
#include "sokol_gfx.h"
#pragma warning(pop)
#include "sokol_time.h"

Loading…
Cancel
Save