Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Search:

Type: Posts; User: fiodis

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    423

    I apologize for how slow I am to pick this up,...

    I apologize for how slow I am to pick this up, but doesn't calling glBindBuffer right after glBindVertexArray change which vbo is associated with that vao? So wouldn't the vertex positions and...
  2. Replies
    10
    Views
    423

    So I could replace ...

    So I could replace

    glBindBuffer(GL_ARRAY_BUFFER, this->vboId);
    glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, this->iboId);
    glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(Vert), (GLvoid*)0);...
  3. Replies
    10
    Views
    423

    What if you do want to change the vertices stored...

    What if you do want to change the vertices stored in a VBO between render calls? If the VAO locks things in place, what's the point of flags like GL_STATIC_DRAW or GL_DYNAMIC_DRAW?
  4. Replies
    10
    Views
    423

    I am using a VAO; I create it and bind it just...

    I am using a VAO; I create it and bind it just after I initialize GLEW in the beginning. But I don't need to bind the VBO and IBO? What if I have multiple VBOs and IBOs? If I don't bind them, how...
  5. Replies
    10
    Views
    423

    glDrawElements trouble

    I've used glDrawElements (in OpenGL 3.1) before without problems. Now, however, it doesn't want to draw anything, and I can't figure out why. My render code looks like this:

    void renderFunc(){...
  6. Replies
    3
    Views
    306

    So it's okay to detach the shaders (and then, I...

    So it's okay to detach the shaders (and then, I presume, delete them) before the program itself is ever used? The program will still function correctly, even though its shaders have been detached? ...
  7. Replies
    3
    Views
    306

    Correct way to delete shader programs

    I have a function createShader inside a Shader class that takes the filepaths of two vertex and fragment shaders as arguments, loads and compiles them, and uses glCreateProgram to create a shader...
  8. There isn't, as far as I know. Most people do...

    There isn't, as far as I know. Most people do this.
  9. Storing multiple textures in an array/vector

    A model I'm loading might or might not use multiple textures (in tga format) for different segments. I don't know in advance how many it will use. So what I do is I count the number of textures at...
  10. Replies
    1
    Views
    374

    GLSL matrix uniforms acting wierd

    I have a very simple vertex shader that takes in vertex position and normals and a MVP matrix:

    #version 130

    in vec3 in_Position;
    in vec3 in_Normal;
    out vec4 ex_Color;
    //wierd stuff - works...
  11. Replies
    4
    Views
    999

    Ah, you're right, I can just check to see if it's...

    Ah, you're right, I can just check to see if it's within the size range. I wrote up some GLSL code to do this:

    float minX;
    float maxX;
    float minZ;
    float maxZ;

    vec2 brushPos;
    if...
  12. Replies
    4
    Views
    999

    I realize the vertex shader operates for each...

    I realize the vertex shader operates for each vertex. It's comparing the vertex against the brush I'm having trouble with. On the CPU I would construct a vector of X and Z coordinates that lie...
  13. Do you mean in an application running on the .NET...

    Do you mean in an application running on the .NET framework, or the older Win API? If it's the former, you can't have OpenGL and CLR (common language runtime) code running at the same time, so...
  14. Replies
    4
    Views
    999

    std::vector in GLSL?

    I have a 3D terrain, and I edit it with a rectangular brush defined by a position, width, and length. I'm trying to get this brush to show up as a green rectangle under the mouse. I do this by...
  15. Replies
    12
    Views
    2,050

    It turns out the gl calls in the destructor were,...

    It turns out the gl calls in the destructor were, actually, the problem. Once I moved all the appropriate glDelete calls inside their own Cleanup() function, and called that at the right time, the...
  16. Replies
    12
    Views
    2,050

    It didn't seem to cause problems when I was only...

    It didn't seem to cause problems when I was only passing vertex position data, though. As soon as I pass vertex color data, either in the same VBO or in a seperate one, I get issues.
  17. Replies
    12
    Views
    2,050

    Here's the vertex shader: #version 130 in...

    Here's the vertex shader:

    #version 130

    in vec4 in_Position;
    in vec4 in_Color;
    out vec4 ex_Color;

    uniform mat4 MVPMatrix;
  18. Replies
    12
    Views
    2,050

    I've run a few more tests, and I've found this:...

    I've run a few more tests, and I've found this:
    I get a heap corruption error on application closing even when I don't use a custom struct or class to represent a single vertex.

    The problem only...
  19. Replies
    12
    Views
    2,050

    I scrutinized my updateVertices code more closely...

    I scrutinized my updateVertices code more closely but couldn't see anything that would be a problem - I reserve memory and resize the vectors properly, and the loop never iterates beyond the vector's...
  20. Replies
    5
    Views
    1,038

    Thanks for the code sample, but I've since...

    Thanks for the code sample, but I've since figured out how to use glmUnProject and it's giving me the right results. On thing that tripped me up initially, though, was that even when you're...
  21. Replies
    12
    Views
    2,050

    OpenGL 3.1 stack overflow

    I recently made my own vertex class, vertexColored, to hold position and color data. I changed from passing a std::vector of glm::vec3 to my VBO, to passing a std::vector of vectorColored. The...
  22. Replies
    5
    Views
    1,038

    Mouse coordinates into World coordinates

    I'm trying to draw a quad on a 3D terrain under the mouse. To do this, I need to convert the mouse's window coordinates to world coordinates somehow. I Google'd the subject and found a bunch of...
  23. Replies
    1
    Views
    609

    OpenGL 3.1 and freeGLUT alongside .NET

    I know you can't have an OpenGL context inside a Windows Form control without some kind of wrapper, like SharpGL or OpenTK. But I've been trying to make a project that includes a Windows Form and,...
  24. Why one MVP matrix rather than seperate M, V, P?

    Most OpenGL 3.0+ tutorials I look at multiply the model and view matrices together before sending them to the shader. Sometimes they even multiply the projection matrix together with the other two...
  25. Replies
    3
    Views
    979

    Sorry for the double post, but I can't seem to...

    Sorry for the double post, but I can't seem to edit my prior one. Here's a couple pictures to illustrate what's happening. This is a wireframe of my cube, from some distance away:...
Results 1 to 25 of 52
Page 1 of 3 1 2 3