linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
Cc: linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH 1/4] kernel-shark: Add support for drawing text
Date: Wed, 9 Dec 2020 11:34:36 -0500	[thread overview]
Message-ID: <20201209113436.6782bf6a@gandalf.local.home> (raw)
In-Reply-To: <aebedfc4-1f00-11a0-7c20-61eb927d96e0@gmail.com>

On Wed, 9 Dec 2020 15:30:38 +0200
"Yordan Karadzhov (VMware)" <y.karadz@gmail.com> wrote:

> >> +		stbtt_GetBakedQuad(font->cdata,
> >> +				   KS_FONT_BITMAP_SIZE,
> >> +				   KS_FONT_BITMAP_SIZE,
> >> +				   *text - KS_SPACE_CHAR,
> >> +				   &x, &y,
> >> +				   &quad,
> >> +				   1);
> >> +
> >> +		glTexCoord2f(quad.s0, quad.t1);
> >> +		glVertex2f(quad.x0, quad.y1);
> >> +
> >> +		glTexCoord2f(quad.s1, quad.t1);
> >> +		glVertex2f(quad.x1, quad.y1);
> >> +
> >> +		glTexCoord2f(quad.s1, quad.t0);
> >> +		glVertex2f(quad.x1, quad.y0);
> >> +
> >> +		glTexCoord2f(quad.s0, quad.t0);
> >> +		glVertex2f(quad.x0, quad.y0);  
> > 
> > How is the x and y moved to the next location?  
> 
> Actually the "y" does not change at all here, because for the moment we 
> can't draw multi-line text. "x" gets incremented inside 
> stbtt_GetBakedQuad(). The horizontal advance of the character is used to 
> calculate the new position.

A comment next to that should be stated.

	/* x is incremented here to a new position */
	stbtt_GetBakedQuad(....)


-- Steve

  parent reply	other threads:[~2020-12-09 16:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-20  9:50 [PATCH 0/4] Upgrade the OpenGL wrapper for KernelShark v2.0 Yordan Karadzhov (VMware)
2020-11-20  9:50 ` [PATCH 1/4] kernel-shark: Add support for drawing text Yordan Karadzhov (VMware)
2020-12-04 23:31   ` Steven Rostedt
2020-12-09 13:30     ` Yordan Karadzhov (VMware)
2020-12-09 14:14       ` Yordan Karadzhov (VMware)
2020-12-09 16:34       ` Steven Rostedt [this message]
2020-11-20  9:50 ` [PATCH 2/4] kernel-shark: Make GLUT optional dependency Yordan Karadzhov (VMware)
2020-11-20  9:50 ` [PATCH 3/4] kernel-shark: Add ksplot_draw_polyline() Yordan Karadzhov (VMware)
2020-11-20  9:50 ` [PATCH 4/4] kernel-shark: Optimize ksplot_draw_polygon() Yordan Karadzhov (VMware)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201209113436.6782bf6a@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=y.karadz@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).