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

  1. There's the "Getting Started" page on the wiki...

    There's the "Getting Started" page on the wiki that also has links to tutorials; some but probably not all will have some material on setting up the development environment as well.
    Having...
  2. I don't know GLFW and I've not tried this, but...

    I don't know GLFW and I've not tried this, but can you not create your contexts before launching the threads, pass the GLFWwindow* to them and only make the context current inside the thread function?
  3. The 'direct' approach if you will would be to...

    The 'direct' approach if you will would be to apply the modelview matrix to get a position in eye space. There the camera is at the origin looking along the negative z axis, the near plane is located...
  4. Replies
    5
    Views
    382

    Your cube has 24 vertices, independent of how...

    Your cube has 24 vertices, independent of how many components the vectors to specify the positions have. Using a number larger than 24 means you are reading off the end of your arrays and just happen...
  5. I assume it is intentional that you are reading...

    I assume it is intentional that you are reading from layer 1 (you are passing in vec3(coord, 1)) and that your array texture has at least two layers filled with real data? Other than that I don't...
  6. Replies
    5
    Views
    382

    #faces * #vertices per face * #floats per vertex...

    #faces * #vertices per face * #floats per vertex = 6 * 4 * 4 = 96
    In other words: your loop bounds are too small and you are not transforming all positions.
  7. The first 6 arguments to gluLookAt specify...

    The first 6 arguments to gluLookAt specify positions (eye and center respectively) and as such should be affected by translations, the last three arguments are the up direction and should not be...
  8. Shouldn't the samplers be of type sampler2DArray...

    Shouldn't the samplers be of type sampler2DArray if you want to use them with array textures (you'll need vec3 texcoords in that case as well).
  9. You apply the same transformations as OpenGL does...

    You apply the same transformations as OpenGL does for rendering:



    vec4 v_world = model_matrix * v_object
    vec4 v_eye_space = view_matrix * v_world
    vec4 v_clip_space = projection_matrix...
  10. Replies
    1
    Views
    206

    glVertexAttribPointer(m_distLocation, 0,...

    glVertexAttribPointer(m_distLocation, 0, GL_FLOAT, GL_FALSE, 0, 0);


    Looks like you are giving OpenGL a null pointer to read attribute data from.

    Generally the first thing I often do when...
  11. Replies
    2
    Views
    256

    The GLSL spec says you need to use (member-)...

    The GLSL spec says you need to use (member-) function syntax (note the parentheses after length):



    if(index > array.length()) {}


    Also, be sure to declare which version of GLSL your shader...
  12. Replies
    10
    Views
    702

    Are you rendering this with glDrawArrays, i.e....

    Are you rendering this with glDrawArrays, i.e. without index? Why is model.vertex_data not filled linearly, i.e. why not:



    for(int i = 0; i < numVertices; ++i)
    {
    model.vertex_data[i * 8 +...
  13. Replies
    10
    Views
    702

    If this problem is really present in the OBJ I'd...

    If this problem is really present in the OBJ I'd call this a modelling mistake (or perhaps the exporter is flaky) and for me the preferred way would be to fix this in the model. Are you positive your...
  14. Replies
    10
    Views
    702

    You need to duplicate the vertices along the...

    You need to duplicate the vertices along the "seam", one set has s texture coordinate 0, the other has s texture coordinate 1.

    Right now for a triangle that touches the seam on the left the s tex...
  15. There is, you can use the modelview matrix to...

    There is, you can use the modelview matrix to place objects and your camera in the scene and the projection matrix to specify how things get mapped into screen space. Take a look at the list of...
  16. Replies
    5
    Views
    297

    Placing objects in the scene is normally done by...

    Placing objects in the scene is normally done by specifying a (different) modelview matrix for each object. That, combined with the depth buffer, takes care of visibility.
  17. The normal vectors are used in lighting...

    The normal vectors are used in lighting calculations. In order to decide what is the front/back of a triangle the winding of the vertices is used. This is (at least conceptually) determined by...
  18. Replies
    5
    Views
    297

    To have one object rendered on top of everything...

    To have one object rendered on top of everything (independent of the objects actual position in the scene), you can first render everything else, clear the depth buffer, then render your 'special'...
  19. You are looking at an old version of the...

    You are looking at an old version of the reference pages (in particular I suspect at one for a version of OpenGL that had no support for array textures) ;)
    The most recent page for...
  20. Replies
    6
    Views
    548

    I do not know the answer, driver implementors...

    I do not know the answer, driver implementors should know, but they may not want to say ;) There may not even be a simple answer, the implementation might move them around based on observing usage...
  21. I think you are missing a...

    I think you are missing a glReadBuffer(GL_COLOR_ATTACHMENT0) after binding the fbo. Also, why not use GL_TEXTURE_2D_ARRAY as the target for the glCopyTexSubImage3D call?
  22. Replies
    2
    Views
    302

    If you want a texture access to return the exact...

    If you want a texture access to return the exact value stored at a voxel despite using GL_LINEAR you can make sure that your texture coordinates fall at the center of a voxel. For example to sample...
  23. It has to look like this: #version 330 ...

    It has to look like this:



    #version 330


    Note, the '#' before version (and possibly has to be at the beginning of the line) not before the number. Sorry if that's what you are already...
  24. You probably have to declare the GLSL version you...

    You probably have to declare the GLSL version you want to use, i.e. put a #version 330 on the first line of the shader, otherwise you only get GLSL 1.10 and IIRC that did not have support for...
  25. Putting around source code should do the...

    Putting
    around source code should do the trick.
    I think you should just pick one kind of units (normalized or texels), do all calculations in those units, and at the end use the appropriate type...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4