forked from AuroraMiddleware/gtk
Add an api to get the vertex data for a render pass
This commit is contained in:
parent
85e4e0672a
commit
cbf897ab22
@ -10,6 +10,9 @@ void gsk_ensure_resources (void);
|
||||
|
||||
int pango_glyph_string_num_glyphs (PangoGlyphString *glyphs);
|
||||
|
||||
typedef struct _GskVulkanRender GskVulkanRender;
|
||||
typedef struct _GskVulkanRenderPass GskVulkanRenderPass;
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GSK_PRIVATE_H__ */
|
||||
|
@ -1124,6 +1124,25 @@ gsk_vulkan_render_pass_collect_vertex_data (GskVulkanRenderPass *self,
|
||||
return n_bytes;
|
||||
}
|
||||
|
||||
GskVulkanBuffer *
|
||||
gsk_vulkan_render_pass_get_vertex_data (GskVulkanRenderPass *self,
|
||||
GskVulkanRender *render)
|
||||
{
|
||||
gsize n_bytes;
|
||||
GskVulkanBuffer *buffer;
|
||||
guchar *data;
|
||||
|
||||
n_bytes = gsk_vulkan_render_pass_count_vertex_data (self);
|
||||
buffer = gsk_vulkan_buffer_new (self->vulkan, n_bytes);
|
||||
data = gsk_vulkan_buffer_map (buffer);
|
||||
|
||||
gsk_vulkan_render_pass_collect_vertex_data (self, render, data, 0, n_bytes);
|
||||
|
||||
gsk_vulkan_buffer_unmap (buffer);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
void
|
||||
gsk_vulkan_render_pass_reserve_descriptor_sets (GskVulkanRenderPass *self,
|
||||
GskVulkanRender *render)
|
||||
|
@ -6,10 +6,10 @@
|
||||
|
||||
#include "gsk/gskvulkanbufferprivate.h"
|
||||
#include "gsk/gskvulkanrenderprivate.h"
|
||||
#include "gsk/gskprivate.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GskVulkanRenderPass GskVulkanRenderPass;
|
||||
|
||||
GskVulkanRenderPass * gsk_vulkan_render_pass_new (GdkVulkanContext *context);
|
||||
void gsk_vulkan_render_pass_free (GskVulkanRenderPass *self);
|
||||
@ -30,6 +30,8 @@ gsize gsk_vulkan_render_pass_collect_vertex_data (GskVulk
|
||||
guchar *data,
|
||||
gsize offset,
|
||||
gsize total);
|
||||
GskVulkanBuffer * gsk_vulkan_render_pass_get_vertex_data (GskVulkanRenderPass *self,
|
||||
GskVulkanRender *render);
|
||||
|
||||
void gsk_vulkan_render_pass_reserve_descriptor_sets (GskVulkanRenderPass *self,
|
||||
GskVulkanRender *render);
|
||||
|
@ -6,6 +6,8 @@
|
||||
|
||||
#include "gsk/gskvulkanimageprivate.h"
|
||||
#include "gsk/gskvulkanpipelineprivate.h"
|
||||
#include "gsk/gskvulkanrenderpassprivate.h"
|
||||
#include "gsk/gskprivate.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@ -50,8 +52,6 @@ typedef enum {
|
||||
GSK_VULKAN_N_PIPELINES
|
||||
} GskVulkanPipelineType;
|
||||
|
||||
typedef struct _GskVulkanRender GskVulkanRender;
|
||||
|
||||
GskVulkanRender * gsk_vulkan_render_new (GskRenderer *renderer,
|
||||
GdkVulkanContext *context);
|
||||
void gsk_vulkan_render_free (GskVulkanRender *self);
|
||||
|
Loading…
Reference in New Issue
Block a user