opengl-4

Fix for 3D camera to move in the direction it's facing?

末鹿安然 提交于 2019-11-29 09:21:08
The Short Version (TL;DR) I have a Camera attached to a SceneNode and movement works fine as long as the SceneNode 's rotation/axes are aligned with the world's. However, when an object rotates to "look" in a different direction and is told to move "forward" it does not move along the new "forward" direction. Instead, it continues to move in the same direction it was facing before the rotation was applied. Details and Example I have a scene graph to manage a 3D scene. The graph is a tree of SceneNode objects, which know about their transformations relative to their parent and the world. As per

OpenGL 4.1 and 3.1+, What are key differences? [closed]

﹥>﹥吖頭↗ 提交于 2019-11-28 19:36:35
I understand that OpenGL 4 and 3 are fairly similar, especially 3.1 and 4.1. With both being essentially released together, it can be difficult to understand the rationale for OpenGL 4.0/4.1. In previous releases of OpenGL, minor version increments upward until substantial changes accumulated into a new major version. OpenGL 3.x and 4.x introduced backwards-incompatible API changes and then OpenGL 3.2 and 3.3 are said to be specifically branches of the 3 series which are not forward compatible while 3.1 is compatible with 4.1+ What key differences does OpenGL 4.1 offer compared with OpenGL 3.1

Serious rendering issues with OpenGL 4.1 and Qt 5

冷暖自知 提交于 2019-11-28 10:00:51
问题 I've seen some promising references to being able to run Qt5 on modern OpenGL. I'm using the following code to set my QQuickView to OpenGL 4.1 Core (the latest supported on OSX 10.9 with my MacBook). QSurfaceFormat sf = g_mainView->format(); sf.setProfile(QSurfaceFormat::CoreProfile); sf.setVersion(4, 1); g_mainView->setFormat(sf); Major issues. First, the app crashes entirely when trying to render text. If I happen to only have images, rectangles, etc in my QML, I get a ton of fragment

Incorrect result when using 3D textures

三世轮回 提交于 2019-11-28 09:59:36
问题 I'm using modern OpenGL 4.3 core. I just realized that 1024p x 1024p tileset is too small for my needs. So, I replaced it with 1024p x 1024p x 4p 3D texture. (I know, it's not the best solution, and I better to use 2D texture array. I'm just wondering why my current solution doesn't work.) x and y texture coordinates work fine, same as before. z also work, but a bit incorrectly. I would expect the 1st layer to have z == 0.0 , 2nd layer - z == 0.3333333 , 3rd layer - z == 0.66666666 and 4rd

Are array textures related to sampler arrays?

二次信任 提交于 2019-11-28 07:28:09
问题 OpenGL has array textures, denoted in shaders by specific sampler types: sampler2DArray array_texture; But GLSL also allows samplers to be aggregated into arrays: sampler2D array_of_textures[10]; Are these two features related to each other? How are they different? 回答1: Let's understand the distinction by analogy. Samplers in GLSL are like pointers in C++; they reference some other object of a given type. So consider the following C++ code: int* pi; std::array<int, 5>* pai; std::array<int*, 5

Fix for 3D camera to move in the direction it's facing?

本小妞迷上赌 提交于 2019-11-28 02:49:29
问题 The Short Version (TL;DR) I have a Camera attached to a SceneNode and movement works fine as long as the SceneNode 's rotation/axes are aligned with the world's. However, when an object rotates to "look" in a different direction and is told to move "forward" it does not move along the new "forward" direction. Instead, it continues to move in the same direction it was facing before the rotation was applied. Details and Example I have a scene graph to manage a 3D scene. The graph is a tree of

Render large circular points in modern OpenGL

谁都会走 提交于 2019-11-27 21:42:41
I want to render filled circles of a dynamically varying radius around a set of points whose 2D coordinates are stored in a VBO. So far I was using GL_POINT_SMOOTH, but having now shifted to OpenGL 4.0, this option is no longer available. I have seen a similar question here but that doesn't quite suit my need because the centres of the circles in that example are hard-coded in the fragment shader. How would I do this? At the moment, my vertex shader looks like this: #version 400 layout(location=0) in vec2 in_Position; layout(location=1) in vec4 in_Color; out vec4 ex_Color; uniform vec4 bounds;

OpenGL 4.1 and 3.1+, What are key differences? [closed]

自作多情 提交于 2019-11-27 12:24:59
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I understand that OpenGL 4 and 3 are fairly similar, especially 3.1 and 4.1. With both being essentially released together, it can be

Render large circular points in modern OpenGL

半世苍凉 提交于 2019-11-26 23:05:48
问题 I want to render filled circles of a dynamically varying radius around a set of points whose 2D coordinates are stored in a VBO. So far I was using GL_POINT_SMOOTH, but having now shifted to OpenGL 4.0, this option is no longer available. I have seen a similar question here but that doesn't quite suit my need because the centres of the circles in that example are hard-coded in the fragment shader. How would I do this? At the moment, my vertex shader looks like this: #version 400 layout

glVertexAttribPointer and glVertexAttribFormat: What's the difference?

江枫思渺然 提交于 2019-11-26 22:53:46
OpenGL 4.3 and OpenGL ES 3.1 added several alternative functions for specifying vertex arrays: glVertexAttribFormat , glBindVertexBuffers , etc. But we already had functions for specifying vertex arrays. Namely glVertexAttribPointer . Why add new APIs that do the same thing as the old ones? How do the new APIs work? glVertexAttribPointer has two flaws, one of them semi-subjective, the other objective. The first flaw is its dependency on GL_ARRAY_BUFFER . This means that the behavior of glVertexAttribPointer is contingent on whatever was bound to GL_ARRAY_BUFFER at the time it was called. But