Jump to content
  • Advertisement

snoutmate

Member
  • Content Count

    173
  • Joined

  • Last visited

Community Reputation

362 Neutral

About snoutmate

  • Rank
    Member
  1. I'm using GL_TIMESTAMP before and after the section i want to query.   Nope, no syncing at all. Nothing fancy, for each query i keep ring buffer of query objects for 3 frames, on each frame i query for frame N, then check the availability of query result for frame N-2 with glGetQueryObject(...GL_QUERY_RESULT_AVAILABLE...) and then retrieve it with GL_GET_QUERY_RESULT.
  2. If it's any help, i didn't encounter that. On my GTX750Ti, executing two timestamps after each other give ~1us difference, which seems to be the precision of the NV driver (the raw difference values from glGetQueryObject fluctuate between 0, 992, 1024, 1057 in nanoseconds). For comparison, timing glClear(depth) on 1920x1080 framebuffer gives me ~10us (0.01ms). All my draw call timings correspond to what NV nSight is showing me without any noticable differences.
  3. snoutmate

    64 bit random number stuff

    Quote:int roll_die() { shouldn't that be Quote:int64_t roll_die() { ?
  4. snoutmate

    glGetUniform Problems

    std::string CGLShaderProgram::GetInfoLog ( void ) { std::string StatusString; int Size; glGetShaderiv ( ShaderProgram, GL_INFO_LOG_LENGTH, &Size ); glCheckError(); if ( Size <= 0 ) return ""; StatusString.resize ( Size + 1 ); glGetShaderInfoLog ( ShaderProgram, Size, &Size, &StatusString[0] ); The program info log is separate, you have to use glGetProgramiv and glGetProgramInfoLog here (this may be where the invalid operation is coming from). To answer your previous question, info logs are being written after compile (for shaders) and after link/validate (for program).
  5. snoutmate

    Triangle Rasterization

    Quote:Original post by Sethcran glVertex2f( x, y ); // this call outputs pixel with color state set previously by glColor glColor3f( r, g, b ); // this merely updates the color state Is this intended ? If not, try switching the calls around.
  6. snoutmate

    Water shader - need help

    To reverse transformations done by particular matrix, you have to multiply by inverted matrix, not transposed.
  7. snoutmate

    libgd Mac OS X

    "-lgd" ?
  8. Quote:Original post by cmc5788 I've also tried creating high-res textures and then scaling them down with mipmap filtering, but that "blurs" the entire texture and seems to reduce overall quality, so I don't really like it. Mipmaping quality can be improved by using trilinear filtering (GL_LINEAR_MIPMAP_LINEAR), anisotropic filtering, and setting mipmap LOD depending on your needs. Quote:As I understand it, FSAA isn't really useful for a 2d isometric thing unless I want to trace out the edges of all my irregular-shaped artwork with OpenGL lines/points, and that seems too tedious to be viable (though correct me if I'm wrong here; I am new to OpenGL). Newer cards support transparency AA, although i never get around to try it so i can't comment on the viability.
  9. 1) You don't need additional headers unless you use the functions in them directly in your code. The windows.h on windows is exception. Note that on Mac, gl.h etc. are under OpenGL/ directory instead of GL/ like on win and linux. 2) Yes, you can use GLEW or GLEE to simplify the process of extension checking and loading. If you do not want to use them for some reason, on linux or X11 systems the extension loading is the same as on windows, except instead of wglGetProcAddress you use glxGetProcAddress. Mac(carbon) doesn't have equivalent function, but you can still load the extensions using standard DL functions - there's an example on apple site.
  10. snoutmate

    Drawing Cube Segmentation Fault

    You never call your BuildLists function.
  11. That code posted is correct. The bug is with 99.9% probability in the Intel's OpenGL implementation. Intel has been always struggling with OpenGL support, even for newer cards (GMA 9xx, GMA Xxxx), 82815 chipset is some 9 years old, so don't expect any fix. Updating drivers *may* help, assuming there are still any. glScale/Translate etc. just manipulate the matrix, so you may try to workaround this problem by doing your own matrix calculations (and then loading the matrix with glLoadMatrix*), or using library like GLM that does it for you. Whether this will help remains to be seen :)
  12. snoutmate

    [SOLVED]GLSL help with erosion

    This should be handled automatically by linear interpolation magnification filter (setting GL_MAG_FILTER to GL_LINEAR for your texture), you may also want to use gaussian blur filter on your texture to better smooth the edges. If that doesn't work, post the shader code (or at least relevant section).
  13. Unitialized variable. In your ScreenManager you're using bool isDrawable to check if there is anything to draw, but you are not setting it to anything anywhere so it content is undefined. I'd say it's pure luck it works on Windows.
  14. snoutmate

    Stipple with drawpixels

    glDrawPixels is not polygon op, it's basically just a dumb copy of pixels. The only way is to make that data/picture into texture and then render that as a polygon (textured quad).
  15. snoutmate

    blending textures

    Quote:Original post by EternityZA vec4 texColour1 = texture2D(tex,gl_TexCoord[0].st); vec4 texColour2 = texture2D(tex,gl_TexCoord[1].st); colour = lerp(texColour1,texColour2,blendFactor); That is correct. Quote:But if this is the way to do it my question would be how do i bind two sets of texture coords? the glTexCoordPointer method doesnt seem to allow you to bind more than one texture coord VBO. TexCoordPointer specifies the texcoords for active texture unit, so just switch it with glClientActiveTexture: glClientActiveTexture(GL_TEXTURE0); glTexCoordPointer(...); // texcoords 0 glClientActiveTexture(GL_TEXTURE1); glTexCoordPointer(...); // texcoords 1 ...
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!