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: carsten neumann

Page 1 of 20 1 2 3 4

Search: Search took 0.02 seconds.

  1. A shader program either contains a geometry stage...

    A shader program either contains a geometry stage or it does not. If it does contain a geometry stage you cannot disable that stage (without re-linking the program). You could either make two...
  2. What exactly is not working? Do you exit early...

    What exactly is not working? Do you exit early after printing "GLEW Failed to init"?
    The GL error after glewInit is expected, you just ignore it (it is not a problem in practice). That way you can...
  3. Last time I checked GLEW was using...

    Last time I checked GLEW was using glGetString(GL_EXTENSIONS) to obtain the supported extensions. That is not supported on core profile contexts (and causes an OpenGL error), where you must use...
  4. Yes, render two triangles that form a rectangle...

    Yes, render two triangles that form a rectangle covering the window's area.
  5. Replies
    4
    Views
    709

    Your shaders should declare the GLSL version they...

    Your shaders should declare the GLSL version they are written in by specifying #version XYZ on the first non-whitespace line.
    The varyings in the vertex and fragment shader do not have the same...
  6. Replies
    2
    Views
    377

    If the object is off-screen no rasterization has...

    If the object is off-screen no rasterization has to be performed by the GPU, so it never has to execute the fragment shader or touch the framebuffer memory. This is performed by the fixed function...
  7. Replies
    3
    Views
    480

    Perhaps I'm missing it between all the error...

    Perhaps I'm missing it between all the error handling code, but do you actually create an OpenGL context anywhere (SDL_GL_CreateContext). Without it SDL_GL_GetAttribute is bound to not work. Also,...
  8. You cannot change the usage hint of a buffer...

    You cannot change the usage hint of a buffer object. That being said, since these are just hints the implementations tend to ignore them and instead look at how your code actually uses the buffer...
  9. OpenGL is a low level rendering API, it does not...

    OpenGL is a low level rendering API, it does not have functionality to compute geometric properties like curvature and only handles simple primitives: triangles, lines, and points - not more complex...
  10. Yes, the basic idea for constant speed animations...

    Yes, the basic idea for constant speed animations is that you take the amount of time that has elapsed since the last time you rendered a frame and use that to scale the amount you rotate (or...
  11. Hmm, you've made a couple of posts that all...

    Hmm, you've made a couple of posts that all follow the same pattern: you state that something is not working and then post a large amount of code. While you may get lucky and somebody feels motivated...
  12. That is not what is supposed to happen when using...

    That is not what is supposed to happen when using glutMainLoopEvent(). Are you perhaps calling exit()/abort() from any of your GLUT callbacks, throw an uncaught exception, or simply crash? Because...
  13. Replies
    2
    Views
    619

    Have you checked if the error is perhaps already...

    Have you checked if the error is perhaps already generated before the glBindVertexArray call? If not, is it possible that the rendering code runs (once) before the initialization code does and the...
  14. Replies
    6
    Views
    720

    Please consider that in general it is better to...

    Please consider that in general it is better to describe which aspect of your question was not answered by a post or what you need more details on.

    Take a look at gluLookAt for how the matrix is...
  15. Replies
    6
    Views
    1,012

    I think kzanol means that the translation from...

    I think kzanol means that the translation from the previous frame is added to the vertex positions. If that is indeed the problem, you'll have to keep an unmodified copy of the data around.
  16. Replies
    6
    Views
    1,012

    Perhaps I'm misunderstanding what you want to do,...

    Perhaps I'm misunderstanding what you want to do, but modifying the vertex data (moving the vertices to translated position) does not seem the way to improve performance - after all you would move...
  17. Some general remarks: - It looks like you are...

    Some general remarks:
    - It looks like you are loading the texture(s) from a file each time you draw. Do not do that. Instead load the textures once (as part of your application/subsystem/class...
  18. In general creating the texture coordinates is...

    In general creating the texture coordinates is part of an artists work when creating the model, so for many objects the texture coordinates are created in a 3d model editor (Blender, 3ds Max, Maya,...
  19. You can use a single VAO and use...

    You can use a single VAO and use glVertexAttribPointer (or glBindVertexBuffer on sufficiently new versions) calls before drawing to change which buffer provides the actual vertex data.
    Since use of...
  20. I think you still need to set glewExperimental =...

    I think you still need to set glewExperimental = GL_TRUE before calling glewInit on core profile contexts - unless that has been fixed recently in GLEW.
    The underlying issue is that GLEW uses...
  21. Replies
    4
    Views
    631

    In theory you should now them, because your...

    In theory you should now them, because your application has to set them at some point. To query them from OpenGL you can use glGetLight. Lighting normally operates on the colors specified by the...
  22. Short answer: you cannot. Longer answer: you...

    Short answer: you cannot.

    Longer answer: you still cannot, because the vec4 tmp only stores the (RGBA) values sampled from the texture, but not any information about which texture or where on the...
  23. Replies
    9
    Views
    1,988

    Ah, I thought that vertex shader was active when...

    Ah, I thought that vertex shader was active when you render the quad? I guess you are saying it isn't? Sorry, no idea then.
  24. Replies
    9
    Views
    1,988

    If I'm reading it correctly your vertex shader...

    If I'm reading it correctly your vertex shader hard codes the z coordinate to 0.9.
  25. Replies
    2
    Views
    582

    You'll need to pass in the transformation from...

    You'll need to pass in the transformation from model space to world space (in addition to the model view projection matrix). Use an additional output from your vertex shader to pass the world...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4