mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
sokol: update to floooh/sokol@c602d83 (#9607)
This commit is contained in:
@@ -10,7 +10,7 @@ module ttf
|
||||
*
|
||||
* Note:
|
||||
*
|
||||
* TODO:
|
||||
* TODO:
|
||||
**********************************************************************/
|
||||
import math
|
||||
import gg
|
||||
@@ -131,9 +131,9 @@ pub fn (mut tf_skl TTF_render_Sokol) create_texture() {
|
||||
d3d11_texture: 0
|
||||
}
|
||||
// comment for dynamic
|
||||
img_desc.content.subimage[0][0] = C.sg_subimage_content{
|
||||
img_desc.data.subimage[0][0] = C.sg_range{
|
||||
ptr: tf_skl.bmp.buf
|
||||
size: sz
|
||||
size: size_t(sz)
|
||||
}
|
||||
|
||||
simg := C.sg_make_image(&img_desc)
|
||||
@@ -148,10 +148,10 @@ pub fn (tf_skl TTF_render_Sokol) destroy_texture() {
|
||||
// Use only if usage: .dynamic
|
||||
pub fn (mut tf_skl TTF_render_Sokol) update_text_texture() {
|
||||
sz := tf_skl.bmp.width * tf_skl.bmp.height * tf_skl.bmp.bp
|
||||
mut tmp_sbc := C.sg_image_content{}
|
||||
tmp_sbc.subimage[0][0] = C.sg_subimage_content{
|
||||
mut tmp_sbc := C.sg_image_data{}
|
||||
tmp_sbc.subimage[0][0] = C.sg_range{
|
||||
ptr: tf_skl.bmp.buf
|
||||
size: sz
|
||||
size: size_t(sz)
|
||||
}
|
||||
C.sg_update_image(tf_skl.sg_img, &tmp_sbc)
|
||||
}
|
||||
|
Reference in New Issue
Block a user