Skip to content

Commit

Permalink
Updated libraries for android and web
Browse files Browse the repository at this point in the history
  • Loading branch information
Jhonnyg committed Oct 28, 2024
1 parent 1aa70ff commit 0d5f0e0
Show file tree
Hide file tree
Showing 42 changed files with 294 additions and 186 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Thumbs.db
.project
.cproject
builtins
/utils/build
/utils/rive-cpp/build
/utils/rive-cpp/rive-cpp*
/utils/rive-cpp/earcut*
Expand All @@ -16,3 +17,4 @@ builtins
/bundle*
bob.jar
/defold-rive/lib/**/ext.settings
/.editor_settings
2 changes: 1 addition & 1 deletion assets/test.rivescene
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
scene: "/assets/rive/off_road_car.riv"
scene: "/main/car/car.riv"
atlas: "/defold-rive/assets/empty.atlas"
25 changes: 1 addition & 24 deletions defold-rive/include/private/defold_graphics.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ namespace dmGraphics

HRenderTarget NewRenderTarget(HContext context, uint32_t buffer_type_flags, const RenderTargetCreationParams params);
void DeleteRenderTarget(HRenderTarget render_target);
void SetRenderTarget(HContext context, HRenderTarget render_target, uint32_t transient_buffer_types);
void SetRenderTargetSize(HRenderTarget render_target, uint32_t width, uint32_t height);

HUniformLocation GetUniformLocation(HProgram prog, const char* name);
uint32_t GetUniformName(HProgram prog, uint32_t index, char* buffer, uint32_t buffer_size, Type* type, int32_t* size);
Expand All @@ -222,35 +222,12 @@ namespace dmGraphics
uint32_t GetHeight(HContext context);

void SetCullFace(HContext context, FaceType face_type);

void EnableState(HContext context, State state);
void DisableState(HContext context, State state);

void SetBlendFunc(HContext context, BlendFactor source_factor, BlendFactor destinaton_factor);

void SetViewport(HContext context, int32_t x, int32_t y, int32_t width, int32_t height);

void EnableVertexBuffer(HContext context, HVertexBuffer vertex_buffer, uint32_t binding_index);
void DisableVertexBuffer(HContext context, HVertexBuffer vertex_buffer);

void EnableVertexDeclaration(HContext context, HVertexDeclaration vertex_declaration, uint32_t binding_index, HProgram program);
void DisableVertexDeclaration(HContext context, HVertexDeclaration vertex_declaration);

void EnableTexture(HContext context, uint32_t unit, uint8_t id_index, HTexture texture);
void SetSampler(HContext context, HUniformLocation location, int32_t unit);
void DisableTexture(HContext context, uint32_t unit, HTexture texture);

void DrawElements(HContext context, PrimitiveType prim_type, uint32_t first, uint32_t count, Type type, HIndexBuffer index_buffer);
void Draw(HContext context, PrimitiveType prim_type, uint32_t first, uint32_t count);

void EnableProgram(HContext context, HProgram program);
void DisableProgram(HContext context);

void SetColorMask(HContext context, bool red, bool green, bool blue, bool alpha);

PipelineState GetPipelineState(HContext context);

void SetTextureParams(HTexture texture, TextureFilter minfilter, TextureFilter magfilter, TextureWrap uwrap, TextureWrap vwrap, float max_anisotropy);
}

#endif
Expand Down
Loading

0 comments on commit 0d5f0e0

Please sign in to comment.