stbi: remove opengl call

pull/5687/head
Alexander Medvednikov 2020-07-05 19:28:28 +02:00
parent 1416c70e73
commit f6ab63f3a0
2 changed files with 16 additions and 2 deletions

View File

@ -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
}

View File

@ -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)