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: Stuart McDonald

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    3,906

    I've been trying to learn this stuff too. One...

    I've been trying to learn this stuff too. One useful way to learn different techniques is http://glsl.heroku.com/ It has loads of shaders for generating full screen effects with no textures, just...
  2. Replies
    1
    Views
    617

    Solved. Like an idiot I'd put the call to turn...

    Solved. Like an idiot I'd put the call to turn off the stencil test in the wrong place. What I don't understand though is why it worked at all.
  3. Replies
    1
    Views
    617

    Stencil buffer problem

    Just trying to use the stencil buffer for the first and and my first test worked straight away. To write to the stencil I used


    // Clear the stencil to 0
    glEnable(GL_STENCIL_TEST);
    ...
  4. Replies
    4
    Views
    1,308

    Thanks for that. I was planning on using it for...

    Thanks for that. I was planning on using it for effects. I'm working in 2D and can render an image using a tri-strip grid with a vertex for each pixel. I modify the grid to get wierd effects, but on...
  5. Replies
    4
    Views
    1,308

    GPU vertex modification - R2VB?

    I'm a bit confused about R2VB and googling only added to my confusion. If I want to modify the vertices of a mesh on the GPU is R2VB the way to go? The "easy" way seems VTF, but that appears to only...
  6. Aha yes. I hadn't thought of using a shader. I'd...

    Aha yes. I hadn't thought of using a shader. I'd just assumed that since my maths is so bad that there was way to do is just with a glFrustum. Cheers.
  7. 2D view with Z scaling, but no perspective

    I'll probably use wrong terms but hopefully I can explain this to make some kind of sense...

    I'd like to set the projection so that objects are scaled based on their Z value, but their X,Y screen...
  8. Replies
    4
    Views
    1,125

    If you don't get an answer here you could try the...

    If you don't get an answer here you could try the FTGL mailing list. https://lists.sourceforge.net/lists/listinfo/ftgl-devel they are very helpful.
  9. Replies
    11
    Views
    1,460

    The simple brute force way to do collision...

    The simple brute force way to do collision detection in a light cycle game is to have a large 2D grid of your world which you set the X,Y points of where there are walls/trails/anything you can hit....
  10. Replies
    11
    Views
    1,460

    Do you have to/want to do the collisions that...

    Do you have to/want to do the collisions that way? Depending on memory/size of world/collision resolution you could just store a large 2D 1bit array of which locations have a trail and which don't....
  11. Re: glfwSwapInterval() and glfwSwapBuffer() Questions

    The swap interval is to do with v-sync i.e. so you can wait until the current frame has been drawn before you start drawing the next one.

    With v-sync off you can get what's called 'tearing' where...
  12. Re: Texture Sprite giving Depth Test Artifacts

    Have you enabled blending? Otherwise the heart won't being drawn transparent. Try something like


    glEnable(GL_BLEND);
    glEnable(GL_ALPHA_TEST);
    glBlendFunc(GL_SRC_ALPHA,...
  13. Re: Is this how to calculate texture atlas coordinates

    To answer my own question. There is both a bug in the Mali driver and in my calculation. To sample the center of the texel 0.5 needs added to the X,Y (since 0,0 is the bottom left corner of the first...
  14. Is this how to calculate texture atlas coordinates

    If I have a texture atlas, TexSize x TexSize square, and I want to access a Width x Height image at X,Y then are the texture coordinates

    bottom left = X/TexSize, Y/TexSize
    top right =...
  15. Replies
    12
    Views
    2,062

    Re: glTexImage2D vs glTexImage1D

    You could use gDEBugger (http://www.gremedy.com/) to inspect the texture (doesn't do anything you can't do yourself, just makes it nice and easy and with a GUI). Lets you inspect the texture values,...
  16. Replies
    15
    Views
    3,636

    Re: GLFW window opening extremely slow?

    The point was to see if this is something specific to GLFW.

    You could build a debug version with a static GLFW and step through it's code to see exactly what's going on. Also, you could use...
  17. Replies
    15
    Views
    3,636

    Re: GLFW window opening extremely slow?

    I'm using GLFW on Windows 7 with ATI card compiling with minGW and I've not seen this, but I did have a problem with fullscreen taking over a minute to start up. A couple of driver updates later and...
  18. Re: undefined reference to 'glutInitJoystick'

    You also might want to consider GLFW. I prefer it to GLUT, it has joystick support and is still being updated. It's a very easy switch from GLUT to GLFW.
  19. Replies
    8
    Views
    2,030

    Re: Colisions

    Maybe not of use (2D), but there is also this idea
    pixel-perfect collsions using occulsion query
  20. Replies
    1
    Views
    1,142

    Re: Must be a simple trig problem

    Never mind. My maths was correct. I had assumed the problem was with the amount I was moving the Texture Matrix to scroll a ground texture, but in fact I had a getY() call instead of getZ() for the...
  21. Replies
    1
    Views
    1,142

    Must be a simple trig problem

    Ok, it's too late and I just can't get my head round this.

    I have a perspective projection onto a texture which is parallel to the screen. The camera is straight onto the texture and moves...
  22. Re: GLFW windowContext quit nvoglv32.dll persisting

    Only thing I can suggest would be to get the GLUT and GLFW sources, knock up a stripped down test program to init/terminate and proceed from there.
  23. Re: how to pin mouse in center of screen?

    I used to use GLUT and switched to GLFW since I find it to be a nice interface, but you can do what you want in either. I solved a similar problem. I wanted the cursor to be clamped within a circle...
  24. Re: Any obvious improvements to my particle system?

    Thanks for the replys. Want to keep running on older cards, so Geom Shader is out, but I'll try the vertex shader approach and do some benchmarking. I've only just got it to the "it seems to run" and...
  25. Re: Real-time "Free Hand" shader edge effect?

    First off, thanks again Zbuffer for your invaluable help!

    To make this topic more useful for anyone coming across it I thought I'd share what I came up with.
    First, I render the scene to a 4x...
Results 1 to 25 of 146
Page 1 of 6 1 2 3 4