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

Page 1 of 20 1 2 3 4

Search: Search took 0.06 seconds.

  1. OpenGL doesn't draw "images". It draws, points,...

    OpenGL doesn't draw "images". It draws, points, lines or triangles (quads and polygons are essentially just multiple triangles). Each of these has its own rasterisation algorithm, which is described...
  2. Replies
    1
    Views
    82

    It's impossible to say what's happening from the...

    It's impossible to say what's happening from the limited amount of code you posted, but a texture object exists from the point that its name is first bound with glBindTexture() until its deleted,...
  3. Replies
    4
    Views
    139

    1282 = 0x0502 = GL_INVALID_OPERATION. ...

    1282 = 0x0502 = GL_INVALID_OPERATION.

    glUseProgram() will generate that error if the program isn't valid (i.e. failed to or link).

    You should query the compilation and linking status with...
  4. Are you using a core profile context? Sourcing...

    Are you using a core profile context? Sourcing the control structures from client memory rather than GL_DRAW_INDIRECT_BUFFER is only allowed in the compatibility profile.
  5. Replies
    6
    Views
    171

    Yes, roughly. The above assumes that the buffer...

    Yes, roughly. The above assumes that the buffer holding the attribute data is already bound to GL_ARRAY_BUFFER. A slightly more thorough version might use...
  6. Replies
    6
    Views
    171

    It's probably the wrong function. To read data...

    It's probably the wrong function. To read data from a buffer, either use glGetBufferSubData() or map the buffer then read from the mapped region.


    vptr will only be a pointer if you're using a...
  7. Replies
    1
    Views
    104

    You need to set a suitable projection matrix...

    You need to set a suitable projection matrix based upon the window dimensions. Any introductory tutorial should explain this.
  8. You normally want to preserve the aspect ratio,...

    You normally want to preserve the aspect ratio, meaning that the resulting scale factor needs to be the same in both directions.

    But if you don't need to preserve the aspect ratio, then it's just...
  9. Something like this: float scale_w = 1.0f *...

    Something like this:


    float scale_w = 1.0f * window_w / target_w;
    float scale_h = 1.0f * window_h / target_h;
    float w, h;
    if (scale_w < scale_h)
    w = target_w, h = window_h / scale_w;...
  10. For an orthographic projection, you'd typically...

    For an orthographic projection, you'd typically have minimum bounds for each direction. For a given window size, you compute separate scale factors (window size divided by bounds) for each direction,...
  11. Rather than allocating a single hermiteCurve...

    Rather than allocating a single hermiteCurve structure, you'd allocate an array of them and keep track of how many were used (much like you currently keep track of how many vertices are used). Each...
  12. Replies
    3
    Views
    187

    It's not so much that it won't be parallelised,...

    It's not so much that it won't be parallelised, it's that it will have to be re-done for every TES invocation.

    The TCS allows parts of the computation which are per-patch to be performed only...
  13. Replies
    2
    Views
    195

    Can you clarify what "fails to load" means? ...

    Can you clarify what "fails to load" means?

    Also: probably not related to this, but:

    Unless you're using a rather old version of GLM, the above specifies a field-of-view angle of 70 radians...
  14. Replies
    3
    Views
    187

    The TCS is optional. You can use a TES without a...

    The TCS is optional. You can use a TES without a TCS.


    That would mean that the TES performs any per-patch calculations for every invocation. If a TCS is used, it can perform any per-patch...
  15. Replies
    12
    Views
    673

    You probably need ...

    You probably need


    glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP);

    (or GL_CLAMP_TO_EDGE or GL_CLAMP_TO_BORDER).

    The initial value is GL_REPEAT. If used with linear...
  16. Replies
    4
    Views
    226

    In the OpenGL 3+ core profile, the border...

    In the OpenGL 3+ core profile, the border parameter to glTexImage2D() etc must be zero, otherwise a GL_INVALID_VALUE error is generated. In theory, it should still work in a compatibility profile,...
  17. Replies
    12
    Views
    673

    It looks like, you're modulating the texture...

    It looks like, you're modulating the texture colour with green. GL_MODULATE multiplies each component independently, i.e. the red component of the texture is multiplied by the red component of the...
  18. Replies
    12
    Views
    673

    Have you tried lighting without texturing?...

    Have you tried lighting without texturing? GL_MODULATE simply multiplies the texture colour by the lighting colour, so if the lighting is too dark, the end result will also be too dark. The end...
  19. Replies
    4
    Views
    226

    The border doesn't have a width. The "border" is...

    The border doesn't have a width. The "border" is everything that's outside of the texture.
  20. The matrix-to-quaternion code which I have is...

    The matrix-to-quaternion code which I have is effectively identical to the code which you posted (albeit slightly simpler, as it doesn't try to handle the case where t<=0).

    About the only scope...
  21. The fixed-function lighting requires normals to...

    The fixed-function lighting requires normals to be normals (this can be achieved by enabling GL_RESCALE_NORMAL or GL_NORMALIZE if the normals aren't already normalized).

    If you're performing your...
  22. Did glTexImage2D() generate an error (use...

    Did glTexImage2D() generate an error (use glGetError() to check)? If the call failed, then the texture will still be in its initial state, which won't be valid as a framebuffer attachment.

    There...
  23. No. The mipmap level you attach the the...

    No.

    The mipmap level you attach the the framebuffer needs to exist. Other levels don't.


    Which function? glTexImage2D() (or whatever you use to allocate the storage)? The format and type...
  24. Line-polygon, line-sphere, line-cube, whatever...

    Line-polygon, line-sphere, line-cube, whatever suits the task.

    For intersecting against a set of objects, it's often simpler to transform the objects to NDC with transform-feedback mode and test...
  25. With these parameters, both the viewpoint and the...

    With these parameters, both the viewpoint and the vertex have Z=0, so you'll end up with clip W=0 and ndcCoord[...] == Infinity.


    If you're trying to find the coordinates on a plane perpendicular...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4