FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Font.draw drawing white blocks for a frame

 
Post new topic   Reply to topic     Forum Index -> ArcLib
View previous topic :: View next topic  
Author Message
JarrettBillingsley



Joined: 20 Jun 2006
Posts: 457
Location: Pennsylvania!

PostPosted: Sun Nov 18, 2007 9:45 am    Post subject: Font.draw drawing white blocks for a frame Reply with quote

When you use Font.draw to draw a string, if it draws a glyph for the first time (never been drawn with that font before), it shows that glyph as a white block for one frame, and then after that it draws correctly. I'm guessing this is just a caching issue?

Also I've been working on wrapping ArcLib and exposing it to MiniD. It's going quite well.

Code:
import arc.draw.color : Color;
import arc.font : Font;
import arc.input : key, mouse;
import arc.math.point : Point;
import arc.time;
import arc.window;

arc.window.open("Hello world", 800, 600, false);
arc.input.open();
arc.font.open();
arc.time.open();

local font = Font("arial.ttf", 12);
local font2 = Font("arial.ttf", 32);
local origin = Point(0.0, 0.0);
local white = Color(255, 255, 255);

while(!arc.input.keyDown(key.Quit) && !arc.input.keyDown(key.Esc))
{
   arc.input.process();
   arc.window.clear();
   arc.time.process();

   font.draw(toString(arc.time.fps()), origin, white);

   if(arc.input.mouseButtonDown(mouse.Left))
      font2.draw("Hi guys!", arc.input.mousePos(), white);

   arc.time.limitFPS(60);
   arc.window.swap();
}

arc.time.close();
arc.font.close();
arc.input.close();
arc.window.close();


I've also got arc.sound, arc.texture, arc.draw.*, and arc.math.{rect, size} bound. Smile
Back to top
View user's profile Send private message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Sun Nov 18, 2007 10:07 pm    Post subject: Reply with quote

Thanks for the bug report, I'll check it out later. http://www.dsource.org/projects/arclib/ticket/98

Yay it looks like you are already making progress towards the miniarc front. All those things look good so far.

Expect major changes in the scenegraph api for v.3, however.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> ArcLib All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group