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.00 seconds.

  1. I'm not sure which tutorial you're using, but if...

    I'm not sure which tutorial you're using, but if you're using this one then it looks like the bottom half has negative texture coordinates. Normally texture coordinates range from 0 to 1. To go...
  2. As far as image loading goes, you could read up...

    As far as image loading goes, you could read up on each file format and make your own loader, or you could use a image loading library. A good lightweight, easy to use, cross platform one is SOIL,...
  3. Using glPolygonOffset did help make the wireframe...

    Using glPolygonOffset did help make the wireframe stand out better and got rid of the wireframe z-fighting, thanks!

    I was pretty sure the grid was correct, I'm using primitive restarting to make...
  4. Here's a top view of a corner of the 257x257...

    Here's a top view of a corner of the 257x257 heightmap, with a generic texture and wireframe enabled. The wireframe is done by calling glPolygonMode() with the appropriate flags and rendering the...
  5. Most simple FPS cameras have a fixed up vector. ...

    Most simple FPS cameras have a fixed up vector. When you turn up with your camera, the up and view direction vectors are tilted back somewhat. When you then turn right, you turn about the new up...
  6. Rendering large terrain heightmap (GL_MAX_ELEMENTS_VERTICES?)

    I've been working on rendering a square terrain heightmap that I can manipulate in realtime, and my current setup works for anything around 129*129 vertices. But when I try 257*257 vertices, I see...
  7. Replies
    4
    Views
    836

    Should you have the VAO bound when you update the...

    Should you have the VAO bound when you update the VBO that's attached to it?

    Actually, I don't think that's necessary. But I can't find a way to delete this post. :doh:
  8. Replies
    1
    Views
    459

    If I'm understanding it right, you're asking how...

    If I'm understanding it right, you're asking how to render the axis and manipulate it by clicking and dragging? If so, then you can render the set of axes as GL_LINES primitives and multiply them by...
  9. Replies
    10
    Views
    2,691

    Thanks for the comprehensive explanation. :) I...

    Thanks for the comprehensive explanation. :) I wonder, though, why texture unit IDs are of type GLint and not GLuint.
  10. Replies
    10
    Views
    2,691

    I will look into using a static texture. I have...

    I will look into using a static texture. I have two sampler2D uniforms in the fragment shader. Sorry, I should have used "a" rather than "the". I'm multitexturing, that is using data from two...
  11. Replies
    10
    Views
    2,691

    The only sources I could find regarding...

    The only sources I could find regarding multitexturing with a 3.x+ context were this OGL 3.3 tutorial and this SO thread. Both use samplers, which I'd never used before, so I jumped to the incorrect...
  12. Replies
    10
    Views
    2,691

    Hmm. According to the OGL extensions viewer, my...

    Hmm. According to the OGL extensions viewer, my particular graphics card (Intel HD 3000) supports some OGL 3.3 features, including samplers. Is there a way I could get them to work in a 3.1...
  13. Replies
    10
    Views
    2,691

    Multitexturing in OpenGL 3.1

    I'm having trouble implementing multitexturing in OpenGL 3.1. I'm sure this is at least partly because I've never worked with samplers before (I learned how to use textures from this tutorial, which...
  14. Replies
    4
    Views
    966

    Ah, thanks, that appears to be want I was...

    Ah, thanks, that appears to be want I was missing.

    You mean delete the layout part in the shader? Or that I could omit that glBindFragDataLocation line entirely?
  15. Replies
    4
    Views
    966

    Render to Framebuffer with OpenGL 3.1

    Hello,
    I've been following this tutorial to try to get a simple mirror working. Since that tutorial series uses OpenGL 3.3 and I only have support up to 3.1, I had to change a few things, but not...
  16. Replies
    10
    Views
    1,265

    Using vector.data() instead of &vector[0] fixed...

    Using vector.data() instead of &vector[0] fixed the problem, thanks thokra! :)
  17. Replies
    10
    Views
    1,265

    But I do call push_back() in the snippet I...

    But I do call push_back() in the snippet I posted. What is more, when I add

    std::cout << "\nSize of vertices vector is: " << vertices.size();
    the code tells me vertices.size() = 25, as expected....
  18. Replies
    3
    Views
    784

    Or try making the third parameter to...

    Or try making the third parameter to glm::perspective smaller, 0.001f or so. It could be when you rotate the scene some polygons pass outside the near plane of your viewing frustum.
  19. Replies
    10
    Views
    1,265

    Passing vboId into function?

    I'm trying to create a 4 by 4 square grid in the XZ-plane, with this bit of code:

    void Grid::init(GLuint& terVboId, std::vector<float>& offsetVec, unsigned int size){
    std::vector<glm::vec3>...
  20. Replies
    10
    Views
    2,009

    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...
  21. Replies
    10
    Views
    2,009

    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);...
  22. Replies
    10
    Views
    2,009

    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?
  23. Replies
    10
    Views
    2,009

    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...
  24. Replies
    10
    Views
    2,009

    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(){...
  25. Replies
    3
    Views
    1,542

    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? ...
Results 1 to 25 of 71
Page 1 of 3 1 2 3