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: mhagain

Page 1 of 20 1 2 3 4

Search: Search took 0.02 seconds.

  1. At this stage I'd be single-stepping the...

    At this stage I'd be single-stepping the offending function and inspecting variable values to determine what's going wrong.
  2. This is probably an uninitialized variable. ...

    This is probably an uninitialized variable.

    I'm not aware of how gdb handles this, but in general a debug build will initialize local variables whereas a release build will just leave them with...
  3. Replies
    1
    Views
    132

    Not everybody must rewrite their application...

    Not everybody must rewrite their application right away.

    This is the same fallacy that we occasionally see relating to OpenGL 3.x+. Many people using older OpenGL code (immediate mode, glTexEnv...
  4. Not related to your problem, but is there any...

    Not related to your problem, but is there any reason you're doing this in shader code rather than in your application code? Let's say you're drawing 100,000 vertices. Do this in shader code and you...
  5. Replies
    11
    Views
    627

    OK, I think I understand the part that's...

    OK, I think I understand the part that's confusing you.

    Right now you're seeing yourself as having two options. One is to add the 12 bytes to your vertex format that you define using...
  6. Replies
    11
    Views
    627

    It's a tradeoff. Let's assume that you're...

    It's a tradeoff.

    Let's assume that you're correct and that having a large vertex size is the root cause. Calculating them in a geometry shader will enable you to shave 3 floats (12 bytes) off the...
  7. Replies
    11
    Views
    627

    If you've got so much data that you run out of...

    If you've got so much data that you run out of video memory, there are other ways of dealing with the situation.

    From the mention of blocks it looks like you're writing a Minecraft clone/voxel...
  8. Replies
    11
    Views
    627

    OK, from reading your second post I surmise that...

    OK, from reading your second post I surmise that you're trying to save memory on duplicated data by fetching attributes from storage other than the main vertex buffer. Is this correct? If so I'd...
  9. Replies
    11
    Views
    627

    Any reason to not just use a vertex buffer for...

    Any reason to not just use a vertex buffer for this?

    If you actually look at what you want to achieve, you've got:

    - An array of structures, where,
    - You can't declare the size of it up-front,...
  10. Replies
    5
    Views
    447

    Stride 0 has always been valid in OpenGL for...

    Stride 0 has always been valid in OpenGL for specifying tightly-packed data.
  11. Replies
    6
    Views
    462

    To be more specific, linking shaders to a single...

    To be more specific, linking shaders to a single "program object" is a GLSL only "feature": there's nothing in OpenGL itself that requires it.

    The old ARB assembly programs didn't require it....
  12. If you want to convert the screen image to a...

    If you want to convert the screen image to a texture, then glCopyTexImage and glCopyTexSubImage are the preferred ways. The copy will be carried out by the GPU and shouldn't involve any...
  13. Replies
    9
    Views
    550

    In most of these cases I wouldn't be surprised if...

    In most of these cases I wouldn't be surprised if the shader compiler translated them to the same instructions.

    Specifically, you shouldn't assume that the high-level GLSL you write has any direct...
  14. The vertex shader is run once per-vertex. ...

    The vertex shader is run once per-vertex.

    Based on that it should be obvious that for, say, a 200 triangle model you're now computing your transforms 600 times.

    Compare that to once-only for...
  15. Replies
    9
    Views
    784

    In a compatibility context you can pretend VAOs...

    In a compatibility context you can pretend VAOs never existed.

    It's worth noting that glEnableVertexAttribArray, glBindBuffer, glVertexAttribPointer and friends existed in OpenGL before VAOs did...
  16. Try to do something that's not supported in a...

    Try to do something that's not supported in a core context. Depending on your driver this may be as simple as a glBegin/glEnd call, followed by a glGetError. Or you might try a draw call with VAO 0...
  17. The OpenGL development libraries are not the same...

    The OpenGL development libraries are not the same thing as the OpenGL driver, and need to be installed separately.

    Having said that, most development tools do come with them as standard (even...
  18. Question 1: The spec gives the answer to this:...

    Question 1:
    The spec gives the answer to this: http://www.opengl.org/registry/specs/ARB/vertex_buffer_object.txt


    Question 2:
    The target parameter is part of the GLX protocol for MapBuffer. ...
  19. Replies
    1
    Views
    336

    http://www.opengl.org/wiki/Common_Mistakes#Texture...

    http://www.opengl.org/wiki/Common_Mistakes#Texture_upload_and_pixel_reads

    Check your glPixelStorei
  20. Replies
    7
    Views
    664

    First thing I'd advise is to get it working with...

    First thing I'd advise is to get it working with static buffers (don't worry about the dial animation yet). You say you're new to VBOs so this is important: it's a sanity-check to make sure that...
  21. Replies
    5
    Views
    690

    No, I said your glVertexAttribPointer call. ...

    No, I said your glVertexAttribPointer call.

    The correct setup is:
    glEnableVertexAttribArray (0);
    glBindBuffer(GL_ARRAY_BUFFER, vboID);
    glVertexAttribPointer (0, 4, GL_FLOAT, GL_FALSE, 0, 0);...
  22. Most modern games use Direct3D, not OpenGL, so...

    Most modern games use Direct3D, not OpenGL, so you're not really comparing like-with-like.
  23. Replies
    5
    Views
    690

    Unless you're using VAOs (which it doesn't look...

    Unless you're using VAOs (which it doesn't look like you are) you should move your glVertexAttribPointer call to before your glDrawElements (but after the preceding glBindBuffer).
  24. Replies
    9
    Views
    772

    You can do it with a single glDrawElements using...

    You can do it with a single glDrawElements using primitive restart. You specify an index to be the restart index (typically -1 is chosen, which is equivalent to 0xffff if using unsigned short or...
  25. I honestly think you're just being paranoid...

    I honestly think you're just being paranoid counting handles like this. On a test app, using Windows 8.1, I get ~20,000 handles in use during normal operation with just Firefox, Visual Studio and a...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4