问题标签 [vertex]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
149 浏览

c# - 指数未呈现 - XNA

好吧,我决定最终为我的 Minecraft 引擎添加索引支持,但问题是,一旦我添加了它们,什么都没有出现……我知道这不是很具描述性,但有人可以查看我的代码,看看我是否在做出了点问题;)谢谢。

当我只使用一个普通的顶点缓冲区时,它工作得很好,这里是它的代码:

有任何想法吗?

谢谢,问候, Darestium

0 投票
1 回答
529 浏览

xna - Stretching a texture over a rectangular area in xna

I have a problem with drawing a texture stretched over a rectangular area in XNA. For some background : it is a 3d project, where at some place I'm putting a big broadcast screen 'filming' some other area. This is done by renderstates and the texture is rendered perfectly well (I checked by rendering into a file). The problem is, when I set this as a texture of my defined area, the mapped texture consists of tiles as you can see on the picture I'm uploading. The area where the texture should be stretched is defined like this:

What worries me is that I tried playing with there texture coordinates and could not see any difference :/. I'm rendering with my own effect file, this might be a source of problems, you can get this file here: http://gamma.mini.pw.edu.pl/~zabak/random/PhongAlternative.fx

The rendered texture is passed as "xTexture" to the effect file.

Finally the screen showing my problem: http://gamma.mini.pw.edu.pl/~zabak/random/gk3d_2error.jpg As you can see I get a large number of tile in the broadcast screen, the goal is to get the texture stretched over. (For purpose of doing the screenshot I turned off lights by commenting the

line in my effect file.)

UPDATE: I changed declaration from the effect file from this one:

to this one:

And the broadcast screen works but the lights are messed up. Can someone tell me please what I'm doing wrong?

0 投票
1 回答
288 浏览

android - OpenGL,绘制一些 Rects(TriangleFan 和 LineLoop)最多需要 10ms

目前我想知道为什么 OpenGL 需要这么多时间来绘制一些带有 LineLoops 的简单 TriangleFans(用于平滑边缘)。

这个循环在每个 onDrawFrame() 调用上执行。

渲染 40 x 2(循环)次的对象是这样创建的:

执行此循环的持续时间在 2-10 毫秒之间的原因是什么?我该如何解决?

这个循环的结果是一些没有相互连接的矩形,但是有没有可能把这 40 个矩形放在一个对象中?

此方法绘制了我的背景的一部分,是否可以定义仅在屏幕上渲染一次的对象,例如“Rendermode Dirty”,但不能定义整个渲染器,我想避免创建重叠的 SurfaceView,但有动态和静态我的 onDrawFrame 中的对象。我只想渲染动态对象并通过仅渲染一次(在开始时)将静态对象保留在屏幕上。

0 投票
1 回答
892 浏览

opengl-es - OpenGL ES,在顶点数组中旋转矩形

我正在尝试将一个矩形旋转到位,我的意思是在将数组传递给 GL 进行渲染之前,旋转它在顶点数组中的坐标。

我有一个这样定义的矩形:

有什么方法可以旋转这些坐标,使得在渲染矩形时,它会在 x、y 或 z 轴上以任意角度旋转?

谢谢,保罗

0 投票
3 回答
16026 浏览

opengl-es - OpenGLES 2.0 用于顶点、颜色和纹理坐标的单独缓冲区

通过学习一些教程并编写自己的一些实验,我已经学习 OpenGL 几天了。但是有一件事我真的不明白是什么阻止了我继续。我已经在谷歌上搜索了几个小时,但还没有找到我的问题的答案。

我应该在哪里为每个单独的顶点指定每个单独的颜色值和纹理坐标?这些属性是否应该始终列在与顶点位置相同的数组(结构)中?像这样:

或者有没有办法将颜色值和纹理坐标放在单独的数组中?但随之而来的问题是:如何glDrawElements使用单独的数组调用?

如果您想知道我为什么要分离这些值:我目前正在 obj-c 中制作自己的 .obj 解析器,我想知道:如果您加载没有纹理的模型并且只想在目的?或者:如果你想加载一个只有纹理映射到它的模型,但每个顶点没有单独的颜色怎么办?并且:放置颜色值和纹理坐标不会使 Vertex 结构因过多数据而膨胀。

0 投票
2 回答
3008 浏览

ios - OpenGL ES 2.0,使用多个顶点缓冲区进行绘制

我找不到太多关于opengl es 2.0是否支持从多个顶点缓冲区绘制的信息(即,使用一个顶点缓冲区用于位置数据,另一个用于法线、颜色等)。此页面 http://developer.apple.com/library/ios/#documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/TechniquesforWorkingwithVertexData/TechniquesforWorkingwithVertexData.html特别是清单 9.4 意味着您应该能够,但我无法做到在我的程序上工作。违规draw call的代码:

此绘图调用将在模拟器上因 EXC_BAD_ACCESS 而停止或崩溃,并在设备上产生非常奇怪的行为(opengl 绘制随机三角形或呈现先前渲染的帧)。没有任何 opengl 调用会返回错误,我已经广泛检查了顶点缓冲区,并且确信它们具有正确的大小和数据。

有没有人使用多个顶点缓冲区成功渲染,并且可以分享他们为什么这可能不起作用的经验?任何有关从何处开始调试不返回任何错误代码的停滞/失败的绘图调用的信息将不胜感激。

0 投票
1 回答
82 浏览

graph - 实施不断增长的编号系统

我需要您对我应该如何为我的应用程序实施不断增加的编号系统提出建议。我的应用程序构建了一个图,其中它的顶点用整数唯一地枚举。我目前面临的问题是 int 或 long 可表示的最大数,这对图可以容纳的顶点数提出了上限。

这里欢迎所有的意见。

谢谢

0 投票
2 回答
3527 浏览

ios - OpenGL ES 2.0 顶点蒙皮最大骨骼数?

绘制顶点蒙皮模型时,不同 iOS 设备每次绘制调用/批处理的最大骨骼数是多少?

在 OpenGL ES 1.1 上,限制是由调色板矩阵的数量设置的,但是 OpenGL ES 2.0 怎么样,限制是什么?

0 投票
1 回答
1391 浏览

java - 如何聆听 Jung 2 中的顶点选择变化?

我怎样才能听到 Jung 2 中的顶点选择变化?我一直在尝试使用 PropertyChangeListener 和 ChangeListener。

0 投票
1 回答
880 浏览

connection - PowerBuilder 顶点连接

我正在尝试使用 PowerBuilder 11.1 连接到 Vertex 税务数据库,但遇到以下代码问题。

我想我连接正确,因为返回码ls_status_text = loo_xmlhttp.StatusText是 200 并且没问题ll_status_code = loo_xmlhttp.Status

当我从ls_response_text = loo_xmlhttp.ResponseText代码中获取返回值时,返回值就是 MOTW 消息。


我期待下面的代码发送 ls_get_url (其中包含要发送到顶点的 xml)并接收一个大的 xml 作为回报,并根据 ls_get_url xml 计算税率。我得到的是 ls_status_text = 'OK' 和 ll_Status_code = 200 (任何> 300都是一个问题)。

// 获取请求 loo_xmlhttp.open("GET",ls_get_url , false) loo_xmlhttp.send()

上述代码块成功运行后,将运行以下代码:

我收到“POST Request Succeeded”消息框,但 ls_response_text 包含 Mark Of The Web 语法。

你有什么想法可以帮助我吗?

谢谢!