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. Replies
    1
    Views
    70

    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,...
  2. Replies
    4
    Views
    122

    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...
  3. 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.
  4. Replies
    6
    Views
    162

    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...
  5. Replies
    6
    Views
    162

    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...
  6. Replies
    1
    Views
    93

    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.
  7. 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...
  8. 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;...
  9. 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,...
  10. 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...
  11. Replies
    3
    Views
    181

    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...
  12. Replies
    2
    Views
    189

    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...
  13. Replies
    3
    Views
    181

    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...
  14. Replies
    12
    Views
    653

    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...
  15. Replies
    4
    Views
    220

    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,...
  16. Replies
    12
    Views
    653

    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...
  17. Replies
    12
    Views
    653

    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...
  18. Replies
    4
    Views
    220

    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.
  19. 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...
  20. 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...
  21. 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...
  22. 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...
  23. 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...
  24. 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...
  25. Where are these numbers coming from? I think you...

    Where are these numbers coming from? I think you need to show more code.

    Also: if you want (2D or 3D) Euclidean coordinates, don't forget to divide by W.


    p = p[:3] / p[3]


    But if you were...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4