openglandroid中的可移动文本

openglandroid中的可移动文本,android,opengl-es,Android,Opengl Es,如何使用OpenGL在Android中显示可移动文本??或者是他们的任何其他方式,显示文字运动没有任何冲动。我尝试过Android动画和字幕,但并没有减少冲动。我需要在单行上移动文本,从右到左,就像在新闻标题中一样。在OpenGL中,我应该在渲染器中执行什么操作 public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); touchStart = new PointF(

如何使用OpenGL在Android中显示可移动文本??或者是他们的任何其他方式,显示文字运动没有任何冲动。我尝试过Android动画和字幕,但并没有减少冲动。我需要在单行上移动文本,从右到左,就像在新闻标题中一样。在OpenGL中,我应该在渲染器中执行什么操作

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    touchStart = new PointF();
    objs = new GLSurfaceView(this);
    sqobj = new  rendsquare();
    objs.setRenderer(sqobj);
    setContentView(objs);


    TextView editBox = new TextView(getApplicationContext());
    editBox.setTextColor(Color.BLUE);
    editBox.setEllipsize(TruncateAt.MARQUEE);
    editBox.setMarqueeRepeatLimit(-1);
    editBox.setHorizontallyScrolling(true);
    editBox.setFocusable(true);
    editBox.setFocusableInTouchMode(true);

    editBox.setText("Hello GL testing 123 hello hello h r u i am fine hello u there hello! hello !! !! !! !!");

    addContentView(editBox, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
}
//另一个

public class SquaropnglActivity extends Activity {

private rendsquare sqobj;
private PointF touchStart;
private GLSurfaceView objs;
Animation mAnimation = new TranslateAnimation(300f, -300f, 0.0f, 0.0f); 
/** Called when the activity is first created. */
@Override


public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    touchStart = new PointF();
    objs = new GLSurfaceView(this);
    sqobj = new  rendsquare();
    objs.setRenderer(sqobj);
    setContentView(objs);

    mAnimation.setRepeatMode(1);
    mAnimation.setInterpolator(new DecelerateInterpolator());
    mAnimation.setDuration(3000L);
    mAnimation.setRepeatCount(-1);
    TextView editBox = new TextView(getApplicationContext());
    editBox.setTextColor(Color.BLUE);

    editBox.setAnimation(mAnimation);
    editBox.setTextSize(40);
    editBox.setLines(1);
    editBox.setText("Hello GL testing 123 hello hello h r u i am fine hello u there hello! hello !! !! !! !!");

    addContentView(editBox, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
}

}

如果您希望以opengl方式进行文本渲染,请在
onDrawFrame(gl)
方法并更新每个帧上的文本位置,以更新字幕动画

对于文本呈现,请查看


我还没有测试过。它应该对你有用。最美好的祝愿。

您能给我们展示一下您迄今为止尝试过的东西(代码)吗?另一个正在使用android动画,但两个都在显示Jerks。我想在渲染器中添加文本,并且想要它movable@Salman你的解决方案mila是sawaal ka。。。我在搜索同一个问题,却找到了你的问题!!金,凯萨海??一切都好吗?那你呢??Android pay kab说kam karnay laga??你还记得karna paray ga bhaut时间吗