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. Hmm, never used the accumulation buffer and I...

    Hmm, never used the accumulation buffer and I don't think it gets much use and love these days. There should be examples on the net that show how it can be used for motion blur.
    Examples how motion...
  2. Did you change the type of xpos as well?...

    Did you change the type of xpos as well? Otherwise you add a float (that probably is < 1) to an integer and store as integer, so that looses all the decimal digits.
  3. If you want to do it 'properly', your animation...

    If you want to do it 'properly', your animation should be made independent of the rendering speed. Right now every time you render an image the object is moved by a fixed amount, instead move the...
  4. Please use around source code to preserve...

    Please use
    around source code to preserve formatting, thanks!

    You are drawing the point at a fixed position (0, 0) instead of at the location you compute.
  5. Actually, I forgot one other important aspect:...

    Actually, I forgot one other important aspect: you need to disable depth buffer writes when rendering the background (or clear the depth buffer afterwards), otherwise the background might obscure...
  6. You should be more careful to put projection...

    You should be more careful to put projection related matrices on the projection matrix stack, e.g. enable glMatrixMode(GL_PROJECTION) before calling glOrtho() - currently this all just works by...
  7. Look at it like this: there are some parts of...

    Look at it like this: there are some parts of your scene that you want to render using an ortho projection and some that you want rendered with perspective projection. You'll have to switch from one...
  8. Hmm, I think you should first try to determine...

    Hmm, I think you should first try to determine where the performance problem comes from; do you need a lot more CPU or GPU time, do you consume more memory bandwidth on the GPU than before? Why are...
  9. Please see the full Forum Posting Guidelines for...

    Please see the full Forum Posting Guidelines for details.
  10. You need to render your background with an...

    You need to render your background with an orthographic projection matrix instead of the perspective one you are currently using. glVertex2d has very little to do with 2 dimensional rendering, it...
  11. Replies
    5
    Views
    381

    You are specifying a directional light source...

    You are specifying a directional light source (because last component w==0 for the position). If you want a point light source you need to specify a position (i.e. w!=0) and possibly configure the...
  12. Err, it's a bit difficult to make a useful...

    Err, it's a bit difficult to make a useful suggestion, given that you don't say what the errors are ;)
    Please take a look at Forum Posting Guidelines for suggestions on what information to contain...
  13. Any tutorial on 'modern' OpenGL will cover how to...

    Any tutorial on 'modern' OpenGL will cover how to render using VBOs, you can pick any one from the wiki tutorials list. They'll probably just draw a single triangle or so, but the principle how to...
  14. If the vertices do not change position relative...

    If the vertices do not change position relative to each other every frame, i.e. they only move as a solid block, it is very inefficient to update all of them each frame. Applying a transformation in...
  15. Not sure what the issue with the uniform location...

    Not sure what the issue with the uniform location is, but a sampler2D variable is not an integer in disguise even though the application uses glUniform1i to assign a value. Inside the shader the...
  16. You do all changes to the projection matrix...

    You do all changes to the projection matrix instead of only those related to the camera projection and keeping placement of objects on the model matrix. Also, in matrix::updateMatrices() you never...
  17. Replies
    4
    Views
    312

    I think the program really wants to just draw a...

    I think the program really wants to just draw a point at the origin of clip space and since the vertex shader consumes no inputs it should also not read random memory. Hard to say for me what goes...
  18. Replies
    5
    Views
    381

    When using lighting the reflection properties of...

    When using lighting the reflection properties of surfaces are described with materials (see glMaterial) and vertex colors are ignored. You can specify that vertex colors be used as a material...
  19. glBufferData(GL_ARRAY_BUFFER, sizeof(data),...

    glBufferData(GL_ARRAY_BUFFER, sizeof(data), &data, GL_STATIC_DRAW);


    This uploads 3 * sizeof(void*), so 24 bytes on a typical 64 bit host, for a usual implementation of std::vector. You want 3 *...
  20. Your description sounds reasonable to me, you...

    Your description sounds reasonable to me, you gonna have to start the debugger and find the bug(s) ;)
    My guess would be that there is some mixup in which FBO is active for rendering or perhaps you...
  21. Maybe I'm not understanding the issue correctly,...

    Maybe I'm not understanding the issue correctly, but it seems to me that you want GL_SRC_ALPHA as source blend factor, i.e glBlendFunc(GL_SRC_ALPHA, GL_ONE); or perhaps make use of...
  22. Replies
    7
    Views
    523

    Well, I don't think there is an obviously correct...

    Well, I don't think there is an obviously correct answer (what's the surface of a line?), you'll have to make something up. Mathematically there is a plane that is orthogonal to a line, so any vector...
  23. Replies
    7
    Views
    523

    Admittedly I haven't quite understood what you...

    Admittedly I haven't quite understood what you want to achieve, but I notice all you are drawing are lines and points and you are not specifying any normals. For lighting to work you must have...
  24. Yes, for most cases it'll be the same, but using...

    Yes, for most cases it'll be the same, but using data() makes the intention clearer IMHO. When storing some very strange types that have an overloaded operator& in the vector the result could be...
  25. Your problem are the getter functions for e.g....

    Your problem are the getter functions for e.g. vertices:



    //other get... functions declared analogous
    std::vector<GLfloat> SolidObject::getVertices()
    {
    return this->vertices;
    }
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4