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: Dan Bartlett

Page 1 of 18 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    183

    Because you need to provide the number of...

    Because you need to provide the number of vertices to PlyBatch.Begin(), so 106466*3 rather than the number of triangles. Currently it is only drawing 1/3 of the mesh.
  2. Replies
    7
    Views
    295

    You probably want GL_LESS (default) or GL_LEQUAL...

    You probably want GL_LESS (default) or GL_LEQUAL for the glDepthFunc parameter rather than GL_ALWAYS, so that only fragments that are nearer than the current depth value are drawn.
  3. Replies
    3
    Views
    215

    I'd recommend using the OpenGL Mathematics...

    I'd recommend using the OpenGL Mathematics library rather than re-implementing everything, it's easy to get started with and you could just use:

    glm::mat4 Projection = glm::perspective(70.0f,...
  4. Because you've declared mVertex & mColor as local...

    Because you've declared mVertex & mColor as local variables, they will be assigned on the stack. IIRC the default maximum stack size is ~1MB so you will get a stack overflow as both variables are...
  5. glClearBuffer allows you to clear the color...

    glClearBuffer allows you to clear the color attachments to different colors, or to only clear certain attachments. glClear clears every color attachment to the color specified by glClearColor.

    ...
  6. Replies
    2
    Views
    258

    No, unfortunately when I last checked (a year or...

    No, unfortunately when I last checked (a year or 2 ago) it wasn't possible to have negative values. I also wanted to do what you are trying previously, but for streaming certain attributes and not...
  7. Replies
    14
    Views
    1,844

    You're right on the amount of data being used. ...

    You're right on the amount of data being used.

    If the vertex data is the same for each vertex that is shared between triangles, then using indexed drawing (glDrawElements) would help reduce the...
  8. If you're using a 32-bit application, then 32-bit...

    If you're using a 32-bit application, then 32-bit DLLs should be placed into Windows/SysWOW64 rather than Windows/System32 (see http://en.wikipedia.org/wiki/WoW64#Registry_and_file_system ).
  9. Replies
    2
    Views
    532

    This article by Fabian Giesen...

    This article by Fabian Giesen about write-combined memory explains the issue & some guidelines on getting the best performance. Write-combined & non-cacheable memory are explained in section 3.3.3...
  10. Is your line: glUniform1iARB(tex, SLOT); a...

    Is your line:

    glUniform1iARB(tex, SLOT); a forum post typo?
    If not, tex should instead be the uniform location, rather than the texture id.
  11. Replies
    8
    Views
    1,102

    For me glGetTexImage returns all 0's when using...

    For me glGetTexImage returns all 0's when using GL_RGBA32UI (Win8, AMD Catalyst drivers, probably a few months old). Perhaps some part of the spec says using integer textures with glGenerateMipmap...
  12. Replies
    8
    Views
    1,102

    3452816845 (0xCDCDCDCD) seems to be a magic...

    3452816845 (0xCDCDCDCD) seems to be a magic number used by Visual C/C++ to mark uninitialized heap memory.

    Are these values getting filled by the glGetTexImage call, or is glGetTexImage not...
  13. Replies
    3
    Views
    586

    You're passing in the same value for posX, posY &...

    You're passing in the same value for posX, posY & posZ each time you draw the sphere, so will be drawing on the same spot 4 times.
  14. Since you're setting a uniform location as well...

    Since you're setting a uniform location as well as attrib locations, you will need

    #extension GL_ARB_explicit_uniform_location : enable
    as well as

    #extension GL_ARB_explicit_attrib_location :...
  15. Should it be lights.Light[0].type instead of...

    Should it be lights.Light[0].type instead of LightProperties.Light[0].type?
  16. Replies
    5
    Views
    1,187

    You should probably be requesting double...

    You should probably be requesting double buffering and have some error checking in there too, there's an SDL example here that has both that might be of some help.
  17. If your meshes are 100 MB+ the overhead of...

    If your meshes are 100 MB+ the overhead of setting up will be relatively small compared to the draw time. Your wire-frame mode will be very slow as you're making a draw call per triangle, to do it...
  18. Replies
    4
    Views
    755

    Sorry, I meant putting glTexParameteri(target,...

    Sorry, I meant putting

    glTexParameteri(target, GL_GENERATE_MIPMAP_SGIS, GL_TRUE);
    before

    glTexImage2D(target, 0, internalformat, w, h, 0, format, GL_UNSIGNED_BYTE, data);
    but glGenerateMipmap...
  19. Replies
    4
    Views
    755

    Have you tried setting GL_GENERATE_MIPMAP_SGIS =...

    Have you tried setting GL_GENERATE_MIPMAP_SGIS = TRUE before uploading the texture image? I think it only generates the mipmaps once a new image is loaded to the base image after this flag is set. ...
  20. By default OpenGL uses mipmaps for most texture...

    By default OpenGL uses mipmaps for most texture types (except for rectangle textures), so it is expecting you to provide them & since you don't your texture isn't complete. One way to tell OpenGL...
  21. Replies
    7
    Views
    1,172

    GLScene (http://glscene.org) (an open source...

    GLScene (an open source OpenGL Scene Graph for Delphi) has CSG code for meshes and a sample project demonstrating it's use, as well as more basic intersection tests (do 2 objects intersect or not).
    ...
  22. You're passing the context handle in (which is of...

    You're passing the context handle in (which is of type HGLRC), use the same HDC you used to create the context.

    rc = wglCreateContext(dc);
    ...
    extensions = wglGetExtensionsStringARB(dc);
    ...
  23. The buffer bound to GL_ARRAY_BUFFER is used by...

    The buffer bound to GL_ARRAY_BUFFER is used by glVertexAttribPointer (+other gl***Pointer) functions, it isn't actually used by draw calls so has no effect. You need to make the gl***Pointer calls...
  24. Replies
    1
    Views
    602

    The only problem I can see is that NumVertices...

    The only problem I can see is that NumVertices doesn't match the correct number of vertices. You only have 12 vertices listed, but NumVertices = 36. This could cause problems when glDrawArrays...
  25. Replies
    1
    Views
    462

    Searching the web for "axis-angle to euler"...

    Searching the web for "axis-angle to euler" returns this result: http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToEuler/
Results 1 to 25 of 450
Page 1 of 18 1 2 3 4