mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
sokol: update to floooh/sokol from 27-Dec-2021 (4ff3ed7) (#13044)
This commit is contained in:
@@ -768,7 +768,6 @@ pub fn (ctx &Context) draw_slice_empty(x f32, y f32, r f32, start_angle f32, arc
|
||||
pub fn (mut ctx Context) resize(width int, height int) {
|
||||
ctx.width = width
|
||||
ctx.height = height
|
||||
// C.sapp_resize_window(width, height)
|
||||
}
|
||||
|
||||
// Draws a line between the points provided
|
||||
|
||||
@@ -53,6 +53,8 @@ fn C.saudio_buffer_frames() int
|
||||
|
||||
fn C.saudio_channels() int
|
||||
|
||||
fn C.saudio_suspended() bool
|
||||
|
||||
fn C.saudio_expect() int
|
||||
|
||||
fn C.saudio_push(frames &f32, num_frames int) int
|
||||
@@ -97,6 +99,12 @@ pub fn channels() int {
|
||||
return C.saudio_channels()
|
||||
}
|
||||
|
||||
// suspended returns true if audio context is currently suspended
|
||||
// (only in WebAudio backend, all other backends return false)
|
||||
pub fn suspended() bool {
|
||||
return C.saudio_suspended()
|
||||
}
|
||||
|
||||
// audio.expect - get current number of frames to fill packet queue; use in combination with audio.push/2
|
||||
pub fn expect() int {
|
||||
return C.saudio_expect()
|
||||
|
||||
@@ -136,6 +136,12 @@ pub fn frame_count() u64 {
|
||||
return C.sapp_frame_count()
|
||||
}
|
||||
|
||||
// get an averaged/smoothed frame duration in seconds
|
||||
[inline]
|
||||
pub fn frame_duration() f64 {
|
||||
return C.sapp_frame_duration()
|
||||
}
|
||||
|
||||
// write string into clipboard
|
||||
[inline]
|
||||
pub fn set_clipboard_string(str &char) {
|
||||
|
||||
@@ -56,6 +56,9 @@ fn C.sapp_consume_event()
|
||||
// get the current frame counter (for comparison with sapp_event.frame_count)
|
||||
fn C.sapp_frame_count() u64
|
||||
|
||||
// get an averaged/smoothed frame duration in seconds
|
||||
fn C.sapp_frame_duration() f64
|
||||
|
||||
// write string into clipboard
|
||||
fn C.sapp_set_clipboard_string(str &byte)
|
||||
|
||||
@@ -115,5 +118,3 @@ fn C.sapp_get_num_dropped_files() int
|
||||
|
||||
// Get the file path of the droped file
|
||||
fn C.sapp_get_dropped_file_path(int) &byte
|
||||
|
||||
fn C.sapp_resize_window(int, int)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sgl
|
||||
|
||||
// Error is C.sgl_error_t
|
||||
// SglError is C.sgl_error_t
|
||||
pub enum SglError {
|
||||
no_error = C.SGL_NO_ERROR // 0
|
||||
vertices_full = C.SGL_ERROR_VERTICES_FULL
|
||||
|
||||
@@ -254,6 +254,11 @@ pub fn c1i(rgba u32) {
|
||||
C.sgl_c1i(rgba)
|
||||
}
|
||||
|
||||
[inline]
|
||||
pub fn point_size(s f32) {
|
||||
C.sgl_point_size(s)
|
||||
}
|
||||
|
||||
// define primitives, each begin/end is one draw command
|
||||
[inline]
|
||||
pub fn begin_points() {
|
||||
|
||||
@@ -62,6 +62,7 @@ fn C.sgl_c4f(r f32, g f32, b f32, a f32)
|
||||
fn C.sgl_c3b(r byte, g byte, b byte)
|
||||
fn C.sgl_c4b(r byte, g byte, b byte, a byte)
|
||||
fn C.sgl_c1i(rgba u32)
|
||||
fn C.sgl_point_size(s f32)
|
||||
|
||||
// define primitives, each begin/end is one draw command
|
||||
fn C.sgl_begin_points()
|
||||
|
||||
Reference in New Issue
Block a user