Skip to content

Commit 8dda3c1

Browse files
authored
Bump Rive to v0.1.62 (#90)
1 parent 4968725 commit 8dda3c1

2,116 files changed

Lines changed: 425560 additions & 157774 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
*.exe
3131
*.out
3232
*.app
33+
*.pyc
3334

3435
# Cruft
3536
.DS_Store
@@ -40,6 +41,8 @@ cmake-build*
4041
out/*
4142

4243
# Ides/Agents
44+
__pycache__/
45+
.gitnexus/
4346
.vscode/
4447
.idea/
4548
.vs/

justfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,6 @@ python_uninstall:
9797
[working-directory: 'python']
9898
python_test *TEST_OPTS:
9999
python -m pytest -s {{TEST_OPTS}}
100+
101+
rive_update REF="runtime-v0.1.62":
102+
uv run python tools/rive_update.py --rive-ref {{REF}} --allow-dirty --keep-work-dir

modules/yup_graphics/imaging/yup_Image.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ bool Image::createTextureIfNotPresent (GraphicsContext& context) const
173173
width,
174174
height,
175175
rive::math::msb (width | height),
176+
rive::GPUTextureFormat::rgba32,
176177
getRawData().data());
177178

178179
return true;

modules/yup_graphics/native/yup_GraphicsContext_gl.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ static void GLAPIENTRY err_msg_callback (GLenum source,
3838
const GLchar* message,
3939
const void* userParam)
4040
{
41-
if (type == GL_DEBUG_TYPE_ERROR)
41+
if (type == GL_DEBUG_TYPE_ERROR_KHR)
4242
{
4343
printf ("GL ERROR: %s\n", message);
4444
fflush (stdout);
4545

4646
assert (false);
4747
}
48-
else if (type == GL_DEBUG_TYPE_PERFORMANCE)
48+
else if (type == GL_DEBUG_TYPE_PERFORMANCE_KHR)
4949
{
5050
if (strcmp (message,
5151
"API_ID_REDUNDANT_FBO performance warning has been generated. Redundant state "
@@ -73,7 +73,7 @@ class LowLevelRenderContextGL : public GraphicsContext
7373
{
7474
#if RIVE_DESKTOP_GL
7575
// Load the OpenGL API using glad.
76-
if (! gladLoadCustomLoader ((GLADloadproc) options.loaderFunction))
76+
if (! gladLoadCustomLoader ((GLADloadfunc) options.loaderFunction))
7777
{
7878
fprintf (stderr, "Failed to initialize glad.\n");
7979
exit (-1);
@@ -105,7 +105,7 @@ class LowLevelRenderContextGL : public GraphicsContext
105105
#if RIVE_DESKTOP_GL && DEBUG
106106
if (GLAD_GL_KHR_debug)
107107
{
108-
glEnable (GL_DEBUG_OUTPUT);
108+
glEnable (GL_DEBUG_OUTPUT_KHR);
109109
glDebugMessageControlKHR (GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, nullptr, GL_TRUE);
110110
glDebugMessageCallbackKHR (&err_msg_callback, nullptr);
111111
}

modules/yup_graphics/native/yup_GraphicsContext_headless.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class NoOpRenderPath : public rive::RenderPath
7979

8080
void addPath (rive::CommandPath*, const rive::Mat2D&) override {}
8181

82-
void addRenderPath (rive::RenderPath*, const rive::Mat2D&) override {}
82+
void addRenderPath (const rive::RenderPath*, const rive::Mat2D&) override {}
8383

8484
void moveTo (float, float) override {}
8585

@@ -179,6 +179,8 @@ class NoOpRenderer : public rive::Renderer
179179
uint32_t indexCount,
180180
rive::BlendMode,
181181
float) override {}
182+
183+
void modulateOpacity (float) override {}
182184
};
183185

184186
//==============================================================================

modules/yup_graphics/native/yup_GraphicsContext_metal.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class LowLevelRenderContextMetal : public GraphicsContext
8282
rive::gpu::RenderContextMetalImpl::ContextOptions metalOptions;
8383

8484
if (m_fiddleOptions.synchronousShaderCompilations)
85-
metalOptions.synchronousShaderCompilations = true;
85+
metalOptions.shaderCompilationMode = rive::gpu::ShaderCompilationMode::alwaysSynchronous;
8686

8787
if (m_fiddleOptions.disableRasterOrdering)
8888
metalOptions.disableFramebufferReads = true;
@@ -192,8 +192,12 @@ class LowLevelRenderContextMetal : public GraphicsContext
192192
if (m_currentTexture != nil)
193193
{
194194
[m_currentTexture setPurgeableState:MTLPurgeableStateEmpty];
195+
#if defined(__has_feature) && __has_feature(objc_arc)
196+
m_currentTexture = nil;
197+
#else
195198
[m_currentTexture release];
196199
m_currentTexture = nil;
200+
#endif
197201
}
198202

199203
MTLTextureDescriptor* descriptor = [MTLTextureDescriptor texture2DDescriptorWithPixelFormat:(MTLPixelFormatBGRA8Unorm)

modules/yup_graphics/native/yup_GraphicsContext_opengl.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ static void GLAPIENTRY err_msg_callback (GLenum source,
4040
const GLchar* message,
4141
const void* userParam)
4242
{
43-
if (type == GL_DEBUG_TYPE_ERROR)
43+
if (type == GL_DEBUG_TYPE_ERROR_KHR)
4444
{
4545
printf ("GL ERROR: %s\n", message);
4646
fflush (stdout);
4747

4848
assert (false);
4949
}
50-
else if (type == GL_DEBUG_TYPE_PERFORMANCE)
50+
else if (type == GL_DEBUG_TYPE_PERFORMANCE_KHR)
5151
{
5252
if (strcmp (message,
5353
"API_ID_REDUNDANT_FBO performance warning has been generated. Redundant state "
@@ -84,7 +84,7 @@ class LowLevelRenderContextGL : public GraphicsContext
8484
{
8585
#if RIVE_DESKTOP_GL
8686
// Load the OpenGL API using glad.
87-
if (! gladLoadCustomLoader ((GLADloadproc) options.loaderFunction))
87+
if (! gladLoadCustomLoader ((GLADloadfunc) options.loaderFunction))
8888
{
8989
fprintf (stderr, "Failed to initialize glad.\n");
9090
return;
@@ -108,7 +108,7 @@ class LowLevelRenderContextGL : public GraphicsContext
108108
#if DEBUG
109109
if (GLAD_GL_KHR_debug)
110110
{
111-
glEnable (GL_DEBUG_OUTPUT);
111+
glEnable (GL_DEBUG_OUTPUT_KHR);
112112
glDebugMessageControlKHR (GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, nullptr, GL_TRUE);
113113
glDebugMessageCallbackKHR (&err_msg_callback, nullptr);
114114
}
@@ -278,4 +278,4 @@ std::unique_ptr<GraphicsContext> yup_constructOpenGLGraphicsContext (GraphicsCon
278278
}
279279

280280
} // namespace yup
281-
#endif
281+
#endif

modules/yup_gui/artboard/yup_ArtboardFile.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class LambdaAssetLoader : public rive::FileAssetLoader
5757

5858
//==============================================================================
5959

60-
ArtboardFile::ArtboardFile (std::unique_ptr<rive::File> rivFile)
60+
ArtboardFile::ArtboardFile (rive::rcp<rive::File> rivFile)
6161
: rivFile (std::move (rivFile))
6262
{
6363
}
@@ -106,7 +106,7 @@ ArtboardFile::LoadResult ArtboardFile::load (InputStream& is, rive::Factory& fac
106106
is.readIntoMemoryBlock (mb);
107107

108108
rive::ImportResult result;
109-
std::unique_ptr<rive::File> rivFile;
109+
rive::rcp<rive::File> rivFile;
110110

111111
if (assetCallback != nullptr)
112112
{

modules/yup_gui/artboard/yup_ArtboardFile.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ class YUP_API ArtboardFile
9494

9595
private:
9696
ArtboardFile() = default;
97-
ArtboardFile (std::unique_ptr<rive::File> rivFile);
97+
ArtboardFile (rive::rcp<rive::File> rivFile);
9898

99-
std::unique_ptr<rive::File> rivFile;
99+
rive::rcp<rive::File> rivFile;
100100
};
101101

102102
} // namespace yup

thirdparty/glad/glad.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@
2121

2222
#include "glad.h"
2323

24-
#include "source/glad.c"
24+
#include "source/egl.c"
25+
#include "source/gles2.c"
2526
#include "source/glad_custom.c"

0 commit comments

Comments
 (0)