medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 6a46c9ea561babebe40083af64f25f8ec2282d3d
parent 1ea7d06e5b00db8ff8a87db9867ba0fe97751ace
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sun Nov 20 13:16:16 +0200

Comment out all the font code

Diffstat:
hm.cc | 50+++++++++++++++++++++++++-------------------------
1 file changed, 25 insertions(+), 25 deletions(-)
diff --git a/hm.cc b/hm.cc @@ -165,31 +165,31 @@ extern "C" GAME_INIT( game_init ) { glClearColor( 0, 0.5, 0.7, 1 ); // TODO - u8 * arial = file_get_contents( "Arial.ttf" ); - - u8 * font_memory = memarena_push_size( &mem->persistent_arena, 512 * 256 ); - const int offset = stbtt_GetFontOffsetForIndex( arial, 0 ); - const int ok = stbtt_BakeFontBitmap( arial, offset, 48, font_memory, 512, 512, ' ', 127 - ' ', game->test_chars ); - assert( ok > 0 ); - - free( arial ); - - BitmapData font_bitmap = { }; - font_bitmap.width = 512; - font_bitmap.height = 256; - font_bitmap.data = font_memory; - - Asset font_asset = { }; - font_asset.type = AT_BITMAP; - font_asset.bitmap = font_bitmap; - - glGenTextures( 1, &font_asset.texture ); - glBindTexture( GL_TEXTURE_2D, font_asset.texture ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); - glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, font_bitmap.width, font_bitmap.height, 0, GL_RED, GL_UNSIGNED_BYTE, font_memory ); - - game->assets[ ASSET_FONT ] = font_asset; + // u8 * arial = file_get_contents( "Arial.ttf" ); + // + // u8 * font_memory = memarena_push_size( &mem->persistent_arena, 512 * 256 ); + // const int offset = stbtt_GetFontOffsetForIndex( arial, 0 ); + // const int ok = stbtt_BakeFontBitmap( arial, offset, 48, font_memory, 512, 512, ' ', 127 - ' ', game->test_chars ); + // assert( ok > 0 ); + // + // free( arial ); + + // BitmapData font_bitmap = { }; + // font_bitmap.width = 512; + // font_bitmap.height = 256; + // font_bitmap.data = font_memory; + // + // Asset font_asset = { }; + // font_asset.type = AT_BITMAP; + // font_asset.bitmap = font_bitmap; + // + // glGenTextures( 1, &font_asset.texture ); + // glBindTexture( GL_TEXTURE_2D, font_asset.texture ); + // glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); + // glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); + // glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, font_bitmap.width, font_bitmap.height, 0, GL_RED, GL_UNSIGNED_BYTE, font_memory ); + // + // game->assets[ ASSET_FONT ] = font_asset; game->test_tex_shader = compile_shader( textured_vert_src, textured_frag_src, "screen_colour" ); game->test_tex_at_pos = glGetAttribLocation( game->test_tex_shader, "position" );