[Bf-committers] BLF_draw_default not working

Kent Mein mein at cs.umn.edu
Thu Sep 9 16:47:25 CEST 2010


In reply to Andrew Green (greeniekin at gmail.com):

Hi Andew,

I commented your forum link on this but just incase you didn't see it,
I'm including it here.

Your trying to insert it way to low in the code. 
GHOST is the window manager, it doesn't know anything about 
the BLI stuff.  If you look closely at the code I think you'll see that you 
don't have the proper context in the GHOST code for the BLI stuff. 

Do a search through the code for BLF_draw_default 
and look for where it shows up. You probably want to put it 
in the 3D window where other stuff is drawn anyway, maybe where it 
draws the labels for X,Y,Z etc...  Try first inserting it next to
another call to BLF_draw_default and then go from there.

Thanks,

Kent

> Date: Wed, 8 Sep 2010 19:17:32 +1000
> From: Andrew Green <greeniekin at gmail.com>
> To: bf-committers at blender.org
> Subject: [Bf-committers] BLF_draw_default not working
> Reply-To: bf-blender developers <bf-committers at blender.org>
> 
> I have never programmed in blender before. so I am unfamiliar with how
> blender works.
> Anyway I was playing with screencast and noticed you could not see
> users cursor. I decided to fix this by adding a cursor drawn in
> opengl(which would get saved in the video file) and add a display of
> key's being pressed
> 
> I just wanted to do a quick job by doing it just before the buffer was flipped.
> so in wm_window.c
> in void wm_window_swap_buffers(wmWindow *win)
> i made a triangle at cursor position. all well and good and it worked.
> I then added a linked list adding an element every time a key was
> pressed removing it when it was lifted which worked all good.
> 
> Then i tried to print text to the screen. someone told me
> BLF_draw_default was the way to go
> 
> And no matter how i call it. it will not work
> even something like BLF_draw_default(2, 2, 0.0f, "x");
> does not work
> 
> I've been going crazy trying to get it works for hours and hours.
> 
> If anyone can tell me how to get it to work or why it wont work when
> being called in
> void wm_window_swap_buffers(wmWindow *win)
> 
> I will be extremely grateful.
> 
> here is a quick look of what i have so far
> http://www.youtube.com/watch?v=U5eyYMmZA4s
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
> 

-- 
mein at cs.umn.edu
http://www.cs.umn.edu/~mein


More information about the Bf-committers mailing list