English 中文(简体)
G openGL将文字坐标与世界相协调,而不是面对。
原标题:GopenGL align texture coordinates to world, not to face

我目前拥有的是:鉴于 rec铁矿石的宽度和高度,加上案文的比额表系数,形成正文坐标。 罚款:

vertices = new float[] {
                    0,          0,              0, this.height / (this.texture.height * this.texScaleHeight),
                    this.width, 0,              this.width / (this.texture.width * this.texScaleWidth), height / (this.texture.height * this.texScaleHeight),
                    this.width, this.height,    this.width / (this.texture.width * this.texScaleWidth), 0,
                    0,          this.height,    0, 0 };

我现在要做的是,有些立场不同(彼此相邻)的 rec子 seamless然地毕业于案文。 我尝试如下,但没有取得良好结果。

vertices = new float[] {
                    0,          0,              -this.getPosition().x * this.texScaleWidth, this.height / (this.texture.height * this.texScaleHeight) -this.getPosition().y * this.texScaleHeight,
                    this.width, 0,              this.width / (this.texture.width * this.texScaleWidth) -this.getPosition().x * this.texScaleWidth, height / (this.texture.height * this.texScaleHeight)-this.getPosition().y * this.texScaleHeight,
                    this.width, this.height,    this.width / (this.texture.width * this.texScaleWidth) -this.getPosition().x * this.texScaleWidth, -this.getPosition().y * this.texScaleHeight,
                    0,          this.height,    -this.getPosition().x * this.texScaleWidth, -this.getPosition().y * this.texScaleHeight };

如何实现这种案文是“与世界一致”的,而不是它们所坐的 rec?

最佳回答

This technique is potentially way too general, but here it goes: You could project the texture coordinates onto the geometry.

总体工作流程与处理地貌本身相同,但在此,所有世界点都指定了文本坐标。 通过另一个微型、小型和中型企业矩阵(代表投标人)对地表的每一点进行扫描,并采用<条码>(x, y)结果,使案文能协调这个要点(假设或地形预测);观点要求此后按<条码>w进行区分。

我希望你们能够这样做。 在搜寻过程中,我找不到decent的描述或辅导。 <>Shadowmap使用同一技术,但其目标在于确定某一点是否为影子;在此,目标是为一般项目设计一个文本坐标。

问题回答

暂无回答




相关问题
OpenGL ES iPhone - drawing anti aliased lines

Normally, you d use something like: glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); glEnable(GL_LINE_SMOOTH); glLineWidth(2.0f); glVertexPointer(2, GL_FLOAT, 0, points); ...

iPhone: Quartz2d vs. OpenGL ES

OK, I m still brand new to iPhone development. I have a free game on the app store, Winner Pong, but it s just a Pong clone (who would ve guessed) that uses the standard UIImageViews for the sprites. ...

GLPaint with white background

I m trying draw on a white background by reverse engineering GLPaint. I ve gone through every combination of kSaturation, kLuminosity and glBlendFunc, AND just about every combination I can think of ...

OpenGL ES - how to keep some object at a fixed size?

I m working on a little game in OpenGL ES. In the background, there is a world/map. The map is just a large texture. Zoom/pinch/pan is used to move around. And I m using glOrthof (left, right, bottom,...

Any free polygon library for the iPhone?

I need a library that can manage polygon modeling and basic transformation like rotating and translating. I d rather not redevelop everything from scratch Thanks

热门标签