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 19 1 2 3 4

Search: Search took 0.01 seconds.

  1. Your quad is off the edge of the screen, try...

    Your quad is off the edge of the screen, try drawing closer to the origin, eg. (0,0,0) - (1,1,0) rather than (1,1,0) - (3,3,0).
  2. Use glGetIntegerv(GL_CONTEXT_PROFILE_MASK,...) in...

    Use glGetIntegerv(GL_CONTEXT_PROFILE_MASK,...) in OpenGL 3.2 or above to query this. GL_CONTEXT_FLAGS might also be useful too if you want to check whether debug/forward-compatible/robust/... flags...
  3. Replies
    4
    Views
    519

    Unfortunately #version (and other preprocessor...

    Unfortunately #version (and other preprocessor directives) are terminated by line endings, so you need to include it for those lines. Most (or all?) other statements are okay to include on the same...
  4. Replies
    2
    Views
    453

    Your 3 axes that you should be rotating around...

    Your 3 axes that you should be rotating around are DirectionOfWhereCameraIsFacing (roll), DirectionOfUpForPerson (yaw) & CameraAxis (pitch),so you need to change CameraAxis to...
  5. Replies
    2
    Views
    300

    What does your glVertexAttribPointer call look...

    What does your glVertexAttribPointer call look like for vertexColor? If you are passing in unsigned bytes are you setting the normalized argument to GL_TRUE to get [0.0 to 1.0] rather than [0.0 to...
  6. Replies
    2
    Views
    343

    One potential problem is that you're passing...

    One potential problem is that you're passing positionBufferObject by value to initializeVertexBuffers, but then you take the address of the passed argument and try to change the value. If your code...
  7. Replies
    2
    Views
    380

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

    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.
  9. Replies
    3
    Views
    418

    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,...
  10. 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...
  11. 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.

    ...
  12. Replies
    2
    Views
    502

    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...
  13. Replies
    14
    Views
    2,462

    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...
  14. 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 ).
  15. Replies
    2
    Views
    604

    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...
  16. 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.
  17. Replies
    8
    Views
    1,313

    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...
  18. Replies
    8
    Views
    1,313

    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...
  19. Replies
    3
    Views
    686

    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.
  20. 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 :...
  21. Should it be lights.Light[0].type instead of...

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

    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.
  23. 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...
  24. Replies
    4
    Views
    876

    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...
  25. Replies
    4
    Views
    876

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