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. Replies
    10
    Views
    1,629

    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.
  2. Replies
    10
    Views
    1,629

    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...
  3. Replies
    10
    Views
    1,629

    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...
  4. Replies
    10
    Views
    1,629

    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...
  5. Replies
    10
    Views
    1,629

    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...
  6. Replies
    4
    Views
    580

    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?
  7. Replies
    4
    Views
    580

    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...
  8. Replies
    10
    Views
    952

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

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

    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....
  10. Replies
    3
    Views
    622

    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.
  11. Replies
    10
    Views
    952

    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>...
  12. Replies
    10
    Views
    1,413

    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...
  13. Replies
    10
    Views
    1,413

    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);...
  14. Replies
    10
    Views
    1,413

    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?
  15. Replies
    10
    Views
    1,413

    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...
  16. Replies
    10
    Views
    1,413

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

    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? ...
  18. Replies
    3
    Views
    1,272

    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...
  19. Replies
    6
    Views
    1,197

    There isn't, as far as I know. Most people do...

    There isn't, as far as I know. Most people do this.
  20. Replies
    6
    Views
    1,197

    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...
  21. Replies
    1
    Views
    995

    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...
  22. Replies
    4
    Views
    1,607

    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...
  23. Replies
    4
    Views
    1,607

    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...
  24. 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...
  25. Replies
    4
    Views
    1,607

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