From f6ab63f3a03b7e561a00fd2cb580ce481a699523 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sun, 5 Jul 2020 19:28:28 +0200 Subject: [PATCH] stbi: remove opengl call --- vlib/gg/ft/ft.v | 14 ++++++++++++++ vlib/stbi/stbi.v | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/vlib/gg/ft/ft.v b/vlib/gg/ft/ft.v index a90f1821d1..f78ac189f4 100644 --- a/vlib/gg/ft/ft.v +++ b/vlib/gg/ft/ft.v @@ -86,3 +86,17 @@ pub fn (mut gg FT) init_font() { pub fn (ft &FT) flush(){ sfons.flush(ft.fons) } + +pub fn (ft &FT) text_width(s string) int { + return 0 +} + +pub fn (ft &FT) text_height(s string) int { + return 0 + +} + +pub fn (ft &FT) text_size(s string) (int, int) { + return 0,0 +} + diff --git a/vlib/stbi/stbi.v b/vlib/stbi/stbi.v index 898cc58cc1..6649de54d2 100644 --- a/vlib/stbi/stbi.v +++ b/vlib/stbi/stbi.v @@ -4,8 +4,6 @@ module stbi -// note we might need special case for this -// import gl #flag -I @VROOT/thirdparty/stb_image #include "stb_image.h" @@ -62,6 +60,7 @@ pub fn (img Image) free() { C.stbi_image_free(img.data) } +/* pub fn (img Image) tex_image_2d() { mut rgb_flag := C.GL_RGB if img.ext == 'png' { @@ -70,6 +69,7 @@ pub fn (img Image) tex_image_2d() { C.glTexImage2D(C.GL_TEXTURE_2D, 0, rgb_flag, img.width, img.height, 0, rgb_flag, C.GL_UNSIGNED_BYTE, img.data) } +*/ pub fn set_flip_vertically_on_load(val bool) { C.stbi_set_flip_vertically_on_load(val)