revision 2
[carveJwlIkooP6JGAAIwe30JlM.git] / font.h
diff --git a/font.h b/font.h
index a83b73cea7ad82808b8406d7e4d879209fc892d3..a7836139ffc574b06a082c35362b499d5f71a245 100644 (file)
--- a/font.h
+++ b/font.h
@@ -1,9 +1,7 @@
-#ifndef FONT_H
-#define FONT_H
-
+#pragma once
 #include "model.h"
 #include "entity.h"
-#include "camera.h"
+#include "vg/vg_camera.h"
 #include "shaders/model_font.h"
 #include "shaders/scene_font.h"
 #include "world_render.h"
@@ -105,11 +103,6 @@ static void font3d_load( font3d *font, const char *mdl_path, void *alloc ){
    mdl_close( &font->mdl );
 }
 
-static void font3d_init(void){
-   shader_model_font_register();
-   shader_scene_font_register();
-}
-
 static u32 font3d_find_variant( font3d *font, const char *name ){
    for( u32 i=0; i<mdl_arrcount( &font->font_variants ); i ++ ){
       ent_font_variant *variant = mdl_arritm( &font->font_variants, i );
@@ -140,7 +133,7 @@ static gui_font3d;
  */
 static void font3d_bind( font3d *font, enum font_shader shader, 
                          int depth_compare, world_instance *world,
-                         camera *cam ){
+                         vg_camera *cam ){
    gui_font3d.shader = shader;
    gui_font3d.font = font;
    glActiveTexture( GL_TEXTURE1 );
@@ -188,7 +181,7 @@ static ent_glyph *font3d_glyph( font3d *font, u32 variant_id, u32 utf32 ){
 }
 
 static void font3d_set_transform( const char *text,
-                                  camera *cam, m4x3f transform ){
+                                  vg_camera *cam, m4x3f transform ){
    v4_copy( (v4f){0.0f,0.0f,0.0f,1.0f}, gui_font3d.offset );
 
    m4x4f prev_mtx;
@@ -296,7 +289,7 @@ static void font3d_draw( const char *text ){
 }
 
 static f32 font3d_simple_draw( u32 variant_id, const char *text, 
-                               camera *cam, m4x3f transform ){
+                               vg_camera *cam, m4x3f transform ){
    if( !text ) return 0.0f;
 
    gui_font3d.variant_id = variant_id;
@@ -322,5 +315,3 @@ static f32 font3d_string_width( u32 variant_id, const char *text ){
 
    return width;
 }
-
-#endif /* FONT_H */