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

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. cannot figure out opengl viewport, orthographic projection, aspect ratio issues.

    I'm still having a real difficult time sorting out opengl's glViewport, orthographic projection matrix and aspect ratio getting them to work together to get the effect that I want.

    I understand...
  2. I've used this tool with great results:...

    I've used this tool with great results: http://developer.amd.com/tools-and-sdks/graphics-development/gpu-perfstudio/

    It allows everything that you might need although it won't do gpu timing for...
  3. Replies
    5
    Views
    2,284

    looking at this code and taking a shot. The line...

    looking at this code and taking a shot. The line

    if(scale_w < scale_h)
    w = target_w;
    h = window-h / scale_w;


    so that's basically saying that if the screen is in a vertical layout...
  4. Replies
    5
    Views
    2,284

    I forgot to mention that I was talking about only...

    I forgot to mention that I was talking about only orthographic projection. With that being said, is there any sample code that I can see?
  5. Replies
    5
    Views
    2,284

    viewport scaling, letterbox and pillowboxing

    I have a question, let's say that I design an opengl application around a viewport of 320x480. When you resize the window size your design size doesn't change but the actual window will get larger,...
  6. Replies
    10
    Views
    3,356

    I just did a quick test with this and it works...

    I just did a quick test with this and it works pretty well but there was one glaring thing. In the screenshots that I posted earlier there was always one image that has transparency < 1 and > 0
    ...
  7. Replies
    10
    Views
    3,356

    that's a lot of good advise. The reason that I am...

    that's a lot of good advise. The reason that I am sorting these sprites back to front is because it's all 2d rendering at the moment. That means I am just rendering alpha cutout quads. Is there a...
  8. Replies
    10
    Views
    3,356

    that's why I am doing those transformations on...

    that's why I am doing those transformations on the cpu and trying to set up a batching system for the quads. hence the original post in this thread.
  9. Replies
    10
    Views
    3,356

    I might be misunderstanding something here but...

    I might be misunderstanding something here but i'll take it a bit at a time.

    I'd like to create a floor, say OpenGLES 2.0 and OpenGL 330 as the base, and add additional features but to avoid...
  10. Replies
    10
    Views
    3,356

    lowering draw calls

    I am not trying to batch my sprites together to reduce draw calls. I wrote these functions to sort my sprites from back to front based on z index then by the texture id.



    static void...
  11. Replies
    5
    Views
    1,197

    thank you, that sorted things out for me....

    thank you, that sorted things out for me. Interleaved vbo and I moved my ibo to a static buffer since it didn't change at all.
  12. Replies
    1
    Views
    777

    sorting transparent sprites

    I know to draw sprites correctly you have to sort them from back to front and use alpha blending.

    I wrote some algorithms to sort my sprites but I am having a little trouble wrapping my head...
  13. Replies
    5
    Views
    1,197

    Trying to do some more debugging. I can render...

    Trying to do some more debugging.

    I can render 1 quad just fine 2 or more things get wonky. Here is a screenshot of rendering 1 quad and some gpu state.
    http://i.imgur.com/XFXkJRH.png

    Here is...
  14. Replies
    5
    Views
    1,197

    I made the changes that you suggested but that...

    I made the changes that you suggested but that doesn't work. I simplified the scene to only render 1 sprite and that works but if I up things to 2 then it doesn't work properly.

    init the vbo

    ...
  15. Replies
    5
    Views
    1,197

    interleaving vertex data, help

    moving from 3 separate vbo and 1 ibo to 1 vbo and 1 ibo i am having some difficulties. I though this would be more straight forward but it's not so.

    I use this code to initialize my vao/vbo/ibo,...
  16. Replies
    2
    Views
    1,043

    rendering 16385 - 9 quads you are right, the...

    rendering 16385 - 9 quads you are right, the first ones disappear and the additional ones drawn at the end. I stopped checking at 16388, although if I jump up to 17,000 draws it just draws a blank...
  17. Replies
    2
    Views
    1,043

    opengl batch size memory limit?

    according this this opengl documentation an optimal batch size can be anywhere from 1-4 mb.

    I currently have 3 vbo one for vertex, one for color and one for indices.

    I can make one draw call...
  18. Replies
    11
    Views
    2,030

    actually I my vertex is arranged like this: ...

    actually I my vertex is arranged like this:


    0,1,2,0,2,3
    but they are packed like this
    -0.5, -0.5, 0,
    -0.5 0.5, 0,
    0.5, 0.5, 0,
    0.5, -0.5, 0
  19. Replies
    11
    Views
    2,030

    you were absolutely right, removing those i * 4...

    you were absolutely right, removing those i * 4 and only placing them on the indices buffer worked. That's awesome but the question still remains. Why does that work?
    For example I used the offset...
  20. Replies
    11
    Views
    2,030

    okay so adding that offset works for my vertex...

    okay so adding that offset works for my vertex buffers, since the indices are all the same I can avoid adding them and see nothing really wrong. This works but I have two questions.


    for (int i =...
  21. Replies
    11
    Views
    2,030

    I think right now I am trying to do version...

    I think right now I am trying to do version number 2:

    here's creating the vbo with a null pointer

    //setting up the buffers to hold concat vertex and color data
    v_buff = (float*)calloc(
    1,...
  22. Replies
    11
    Views
    2,030

    I wrote this function to try to debug my output....

    I wrote this function to try to debug my output. After I transform the vertices on the cpu I print them out like this:



    void print_vec3(vec4* a, vec4* b, vec4* c, vec4* d, char* tag) {
    ...
  23. Replies
    11
    Views
    2,030

    Are you saying when I setup my vbo initially it...

    Are you saying when I setup my vbo initially it should point to the v_buff memory? I do overwrite the position of sprite[0]->quad->vertices because the actual memory location will be in v_buff. It's...
  24. Replies
    11
    Views
    2,030

    building a geometry buffer

    I am having some trouble building a buffer and sending the data over to the gpu in a single draw call instead of multiple draw calls.

    I might be having issues in multiple places but the place that...
  25. Replies
    0
    Views
    537

    opengl mesh getting clipped.

    I am having issues with my rendering, I am drawing a quad and if it rotates around the x or y axis it get's clipped by what seems like the far clipping plane.

    this is the quad data structure
    ...
Results 1 to 25 of 48
Page 1 of 2 1 2