Skip to content

Commit

Permalink
replace SOKOL_GLCORE33 with SOKOL_GLCORE
Browse files Browse the repository at this point in the history
  • Loading branch information
floooh committed Mar 10, 2024
1 parent 4ae2a9a commit e268530
Show file tree
Hide file tree
Showing 20 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ elseif (SOKOL_USE_EGL_GLES3)
set(sokol_backend SOKOL_GLES3)
set(slang "glsl300es")
elseif (SOKOL_USE_EGL_GL)
set(sokol_backend SOKOL_GLCORE33)
set(sokol_backend SOKOL_GLCORE)
set(slang "glsl330")
else()
if (FIPS_IOS)
set(sokol_backend SOKOL_GLES3)
set(slang "glsl300es")
else()
set(sokol_backend SOKOL_GLCORE33)
set(sokol_backend SOKOL_GLCORE)
set(slang "glsl330")
endif()
endif()
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ To build one of the sokol-app samples for GL on macOS:
```sh
> cd sokol-samples/sapp
> ../../sokol-tools-bin/bin/osx/sokol-shdc -i cube-sapp.glsl -o cube-sapp.glsl.h -l glsl330
> cc cube-sapp.c ../libs/sokol/sokol.m -o cube-sapp -fobjc-arc -DSOKOL_GLCORE33 -I../../sokol -I../libs -framework OpenGL -framework Cocoa -framework AudioToolbox
> cc cube-sapp.c ../libs/sokol/sokol.m -o cube-sapp -fobjc-arc -DSOKOL_GLCORE -I../../sokol -I../libs -framework OpenGL -framework Cocoa -framework AudioToolbox
```

### Building manually on Windows with MSVC
Expand Down Expand Up @@ -348,7 +348,7 @@ To build one of the sokol-app samples for GL on Windows:
```sh
> cd sokol-samples\sapp
> ..\..\sokol-tools-bin\bin\win32\sokol-shdc -i cube-sapp.glsl -o cube-sapp.glsl.h -l glsl330
> cl cube-sapp.c ..\libs\sokol\sokol.c /DSOKOL_GLCORE33 /I..\..\sokol /I..\libs kernel32.lib user32.lib gdi32.lib
> cl cube-sapp.c ..\libs\sokol\sokol.c /DSOKOL_GLCORE /I..\..\sokol /I..\libs kernel32.lib user32.lib gdi32.lib
```

### Building manually on Windows with MSYS2/mingw gcc:
Expand All @@ -365,7 +365,7 @@ From the MSYS2 shell:
> gcc cube-sapp.c ../libs/sokol/sokol.c -o cube-sapp-d3d11 -mwin32 -O2 -DSOKOL_D3D11 -I../../sokol -I ../libs -lkernel32 -luser32 -lshell32 -ldxgi -ld3d11 -lole32 -lgdi32
> ./cube-sapp-d3d11
# build and run with GL backend:
> gcc cube-sapp.c ../libs/sokol/sokol.c -o cube-sapp-gl -mwin32 -O2 -DSOKOL_GLCORE33 -I../../sokol -I ../libs -lkernel32 -luser32 -lshell32 -lgdi32 -lole32
> gcc cube-sapp.c ../libs/sokol/sokol.c -o cube-sapp-gl -mwin32 -O2 -DSOKOL_GLCORE -I../../sokol -I ../libs -lkernel32 -luser32 -lshell32 -lgdi32 -lole32
> ./cube-sapp-gl
```

Expand All @@ -384,7 +384,7 @@ need to specify the link libraries manually.
> clang cube-sapp.c ../libs/sokol/sokol.c -o cube-sapp-d3d11.exe -O2 -DSOKOL_D3D11 -I ../../sokol -I ../libs
> cube-sapp-d3d11
# build and run with GL backend:
> clang cube-sapp.c ../libs/sokol/sokol.c -o cube-sapp-gl.exe -O2 -DSOKOL_GLCORE33 -I ../../sokol -I ../libs
> clang cube-sapp.c ../libs/sokol/sokol.c -o cube-sapp-gl.exe -O2 -DSOKOL_GLCORE -I ../../sokol -I ../libs
> cube-sapp-gl
```

Expand All @@ -406,7 +406,7 @@ To build one of the sokol-app samples on Linux:
```sh
> cd sokol-samples/sapp
> ../../sokol-tools-bin/bin/linux/sokol-shdc -i cube-sapp.glsl -o cube-sapp.glsl.h -l glsl330
> cc cube-sapp.c ../libs/sokol/sokol.c -o cube-sapp -DSOKOL_GLCORE33 -pthread -I../../sokol -I../libs -lGL -ldl -lm -lX11 -lasound -lXi -lXcursor
> cc cube-sapp.c ../libs/sokol/sokol.c -o cube-sapp -DSOKOL_GLCORE -pthread -I../../sokol -I../libs -lGL -ldl -lm -lX11 -lasound -lXi -lXcursor
```

### Building for WASM / WebGL2
Expand Down
2 changes: 1 addition & 1 deletion glfw/arraytex-glfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#define HANDMADE_MATH_NO_SSE
#include "HandmadeMath.h"
#define SOKOL_IMPL
#define SOKOL_GLCORE33
#define SOKOL_GLCORE
#include "sokol_gfx.h"
#include "sokol_log.h"
#include "glfw_glue.h"
Expand Down
2 changes: 1 addition & 1 deletion glfw/blend-glfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define HANDMADE_MATH_NO_SSE
#include "HandmadeMath.h"
#define SOKOL_IMPL
#define SOKOL_GLCORE33
#define SOKOL_GLCORE
#include "sokol_gfx.h"
#include "sokol_log.h"
#include "glfw_glue.h"
Expand Down
2 changes: 1 addition & 1 deletion glfw/bufferoffsets-glfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// buffer offsets.
//------------------------------------------------------------------------------
#define SOKOL_IMPL
#define SOKOL_GLCORE33
#define SOKOL_GLCORE
#include "sokol_gfx.h"
#include "sokol_log.h"
#include "glfw_glue.h"
Expand Down
2 changes: 1 addition & 1 deletion glfw/clear-glfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Simple draw loop, clear default framebuffer.
//------------------------------------------------------------------------------
#define SOKOL_IMPL
#define SOKOL_GLCORE33
#define SOKOL_GLCORE
#include "sokol_gfx.h"
#include "sokol_log.h"
#include "glfw_glue.h"
Expand Down
2 changes: 1 addition & 1 deletion glfw/cube-glfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define HANDMADE_MATH_NO_SSE
#include "HandmadeMath.h"
#define SOKOL_IMPL
#define SOKOL_GLCORE33
#define SOKOL_GLCORE
#include "sokol_gfx.h"
#include "sokol_log.h"
#include "glfw_glue.h"
Expand Down
2 changes: 1 addition & 1 deletion glfw/dyntex-glfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define HANDMADE_MATH_NO_SSE
#include "HandmadeMath.h"
#define SOKOL_IMPL
#define SOKOL_GLCORE33
#define SOKOL_GLCORE
#include "sokol_gfx.h"
#include "sokol_log.h"
#include "glfw_glue.h"
Expand Down
2 changes: 1 addition & 1 deletion glfw/imgui-glfw.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//------------------------------------------------------------------------------
#include "imgui.h"
#define SOKOL_IMPL
#define SOKOL_GLCORE33
#define SOKOL_GLCORE
#include "sokol_gfx.h"
#include "sokol_time.h"
#include "sokol_log.h"
Expand Down
2 changes: 1 addition & 1 deletion glfw/inject-glfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define HANDMADE_MATH_NO_SSE
#include "HandmadeMath.h"
#define SOKOL_IMPL
#define SOKOL_GLCORE33
#define SOKOL_GLCORE
#include "sokol_gfx.h"
#include "sokol_log.h"
#include "glfw_glue.h"
Expand Down
2 changes: 1 addition & 1 deletion glfw/instancing-glfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#define HANDMADE_MATH_NO_SSE
#include "HandmadeMath.h"
#define SOKOL_IMPL
#define SOKOL_GLCORE33
#define SOKOL_GLCORE
#include "sokol_gfx.h"
#include "sokol_log.h"
#include "glfw_glue.h"
Expand Down
2 changes: 1 addition & 1 deletion glfw/mipmap-glfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define HANDMADE_MATH_NO_SSE
#include "HandmadeMath.h"
#define SOKOL_IMPL
#define SOKOL_GLCORE33
#define SOKOL_GLCORE
#include "sokol_gfx.h"
#include "sokol_log.h"
#include "glfw_glue.h"
Expand Down
2 changes: 1 addition & 1 deletion glfw/mrt-glfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define HANDMADE_MATH_NO_SSE
#include "HandmadeMath.h"
#define SOKOL_IMPL
#define SOKOL_GLCORE33
#define SOKOL_GLCORE
#include "sokol_gfx.h"
#include "sokol_log.h"
#include "glfw_glue.h"
Expand Down
2 changes: 1 addition & 1 deletion glfw/multiwindow-glfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "HandmadeMath.h"
#include "flextgl33/flextGL.h"
#define SOKOL_IMPL
#define SOKOL_GLCORE33
#define SOKOL_GLCORE
#define SOKOL_EXTERNAL_GL_LOADER
#include "sokol_gfx.h"
#include "sokol_log.h"
Expand Down
2 changes: 1 addition & 1 deletion glfw/noninterleaved-glfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define HANDMADE_MATH_NO_SSE
#include "HandmadeMath.h"
#define SOKOL_IMPL
#define SOKOL_GLCORE33
#define SOKOL_GLCORE
#include "sokol_gfx.h"
#include "sokol_log.h"
#include "glfw_glue.h"
Expand Down
2 changes: 1 addition & 1 deletion glfw/offscreen-glfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define HANDMADE_MATH_NO_SSE
#include "HandmadeMath.h"
#define SOKOL_IMPL
#define SOKOL_GLCORE33
#define SOKOL_GLCORE
#include "sokol_gfx.h"
#include "sokol_log.h"
#include "glfw_glue.h"
Expand Down
2 changes: 1 addition & 1 deletion glfw/quad-glfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Indexed drawing, explicit vertex attr locations.
//------------------------------------------------------------------------------
#define SOKOL_IMPL
#define SOKOL_GLCORE33
#define SOKOL_GLCORE
#include "sokol_gfx.h"
#include "sokol_log.h"
#include "glfw_glue.h"
Expand Down
2 changes: 1 addition & 1 deletion glfw/texcube-glfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#define HANDMADE_MATH_NO_SSE
#include "HandmadeMath.h"
#define SOKOL_IMPL
#define SOKOL_GLCORE33
#define SOKOL_GLCORE
#include "sokol_gfx.h"
#include "sokol_log.h"
#include "glfw_glue.h"
Expand Down
2 changes: 1 addition & 1 deletion glfw/triangle-glfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Vertex buffer, simple shader, pipeline state object.
//------------------------------------------------------------------------------
#define SOKOL_IMPL
#define SOKOL_GLCORE33
#define SOKOL_GLCORE
#include "sokol_gfx.h"
#include "sokol_log.h"
#include "glfw_glue.h"
Expand Down
2 changes: 1 addition & 1 deletion glfw/uniformarrays-glfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Tests 'native layout' uniform array handling in the sokol_gfx.h GL backend
//-----------------------------------------------------------------------------
#define SOKOL_IMPL
#define SOKOL_GLCORE33
#define SOKOL_GLCORE
#include "sokol_gfx.h"
#include "sokol_log.h"
#include "sokol_debugtext.h"
Expand Down

0 comments on commit e268530

Please sign in to comment.