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

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    1
    Views
    488

    Err, nevermind. I just realized you can set the...

    Err, nevermind. I just realized you can set the data type parameter for the indices from GL_UNSIGNED_BYTE to GL_UNSIGNED_SHORT.
  2. Replies
    1
    Views
    488

    glDrawElements over 255 indices ?

    I'm currently using glDrawElements to draw objects on the screen (2d) and have an array of vertices for all objects. I show/hide objects by changing the indices array.

    I've ran into a problem...
  3. Ahh yea, that might work. I haven't tested it...

    Ahh yea, that might work. I haven't tested it yet (need my friends computer) but I believe it is taking the last color instead of the entire array as every object after is the same tint even though...
  4. Problem using GL_COLOR_ARRAY to send information to shader

    I have an array of particles that I'd like to draw at once using glDrawArrays, however I would also like to dynamically set the alpha of some particles while using a shader. I came up with a method...
  5. Thanks for the help. I'll probably just go with...

    Thanks for the help. I'll probably just go with all glFrustum then as it's easier and I might be able to just squish everything into the same array for one draw call.
  6. Performance of glOrtho VS glFrustum (and switching cost)

    I never know whether I should post in "beginners" or "advanced". Anyway...

    I'm working on a 2d(ish) game and for some visual effects I position 2d objects in glFrustum with varying depth. They...
  7. Re: glUniform1f need to be called every time?

    Ok thanks for the help. I have a uniform that needs to be set at the beginning of the loop however I need to turn it on and off a few times during rendering for objects that don't need it and are in...
  8. glUniform1f need to be called every time?

    On my current hardware if I set variables with glUniform1f once, then disable the shader and re-enable it elsewhere in the drawing loop the settings are still there. My question is if this is...
  9. Replies
    3
    Views
    5,015

    Re: how to draw text on the screen

    I've found drawing text in a graphics environment can be kind of a pain when you start. Once you create an openGL context the OS pretty much gives up and says your own your own here.

    A common way...
  10. Re: Listener for when opengl context is visible.

    Thanks that worked!

    Funny thing is I run this on an older Windows XP machine and it boots up instantly and runs smooth, however in a much more powerful Vista machine there is jerky lag when the...
  11. Listener for when opengl context is visible.

    Hello all. I'm trying to have a quick menu animation the first time my game is booted up, however I'm running into some timing problems.
    What I am doing (in windows) is creating a window with...
  12. Replies
    3
    Views
    660

    Re: Sending texture to a shader

    I suppose not much wrong with it. Just wasn't sure if that's the only way to do it. Would be a little less code to only send the textureID instead of doing the setup for multi-texture.
  13. Replies
    3
    Views
    660

    Sending texture to a shader

    I would like to use a noise texture as a reference to modify the colors of an existing texture with a fragment shader.

    Is the only way to send the noise texture to the shader is by creating a...
  14. Replies
    10
    Views
    3,554

    Re: Test for support for glCreateShader ?

    I don't really have a huge test bed of computers here. I have a modern Geforce, a mid range ATI, and a box of old computer parts from years ago. The Geforce 3 was found in the box.
    What I'm aiming...
  15. Replies
    10
    Views
    3,554

    Re: Test for support for glCreateShader ?

    @Alfonse Reinheart
    Thanks for the information, this is very helpful stuff!

    Yea, I know I should be using an extension loading library, but right now I'm learning and would like to see how this...
  16. Replies
    10
    Views
    3,554

    Test for support for glCreateShader ?

    I've wrote a small program and have been testing it on older machines to see where it breaks to try to increase the compatibility.
    Currently I'm running into a problem with a Geforce 3 card and...
  17. Replies
    2
    Views
    1,264

    Re: Understanding Texture coordinates

    You are right! I had actually tried testing this but I was setting the wrong texture. It works now. Thanks!
  18. Replies
    2
    Views
    1,264

    Understanding Texture coordinates

    I'm trying to draw a simple quad with only one part of a texture used to see how texture mapping works. It's a 32 by 32 texture and I'm currently just trying to get the left strip of pixels shown....
  19. Replies
    2
    Views
    1,170

    Re: Find edge of window given a Z

    I found a calculation that works. Here it is:



    float fovCalc=1.0471976;
    float aspectCalc=(GLfloat)(currentWidth)/(GLfloat)(currentHeight);
    float zCalc=-3;
    float maxYPos = ...
  20. Replies
    2
    Views
    1,170

    Find edge of window given a Z

    Hello. I'd like to show some particles on the screen that are a random distance and x/y position from the user. The problem I'm running into is determining what the edges of the screen are for...
  21. Replies
    2
    Views
    1,634

    Re: Fullscreen Texture Align with Frame Buffer

    Just another note here for anyone finding this post. If you need to render a scene to a frame buffer that is not the same size as the scene make sure to set glViewport to the size of the buffer...
  22. Replies
    2
    Views
    1,634

    Re: Fullscreen Texture Align with Frame Buffer

    Ok, I figured it out. Here's what was going on.
    The currentWidth/currentHeight variables are set to a default size when the window is created. A windows window is then created with these and...
  23. Replies
    2
    Views
    1,634

    Fullscreen Texture Align with Frame Buffer

    I'm working on some fullscreen effects with a framebuffer, however I've ran into a snag where drawing to the framebuffer does not fill the texture completely. There is a blank border to the right...
  24. Replies
    15
    Views
    5,380

    Re: how to render to texture?

    Here is some code I use for framebuffer. Perhaps it will help understand.




    LRESULT CALLBACK MainWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {
    //standard windows...
  25. Replies
    5
    Views
    1,344

    Re: Return/Output variables from shader

    Ahh ok. Thanks!
Results 1 to 25 of 36
Page 1 of 2 1 2