I need vertex buffers

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

I need vertex buffers

brianhj
I need vertex buffer objects but I HATE opengl. Will SDL ever get this feature? Or is there some way to draw 15,000 lines per frame at 60fps with SDL?

_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: I need vertex buffers

Jonathan Dearborn-2
If you don't actually need VBO access, but just want the perf benefit, SDL_gpu can draw plenty of lines (because it does use VBOs to do batching).


Jonny D


On Thu, Jan 26, 2017 at 2:22 PM, brianhj <[hidden email]> wrote:
I need vertex buffer objects but I HATE opengl. Will SDL ever get this feature? Or is there some way to draw 15,000 lines per frame at 60fps with SDL?

_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org



_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: I need vertex buffers

brianhj
In reply to this post by brianhj
Does this work with SDL2? Does it match the performance of OpenGL VBO? If so then yes this is exactly what i need

Thanks!!!









Jonny D wrote:
If you don't actually need VBO access, but just want the perf benefit, SDL_gpu can draw plenty of lines (because it does use VBOs to do batching).

https://github.com/grimfang4/sdl-gpu



Jonny D




On Thu, Jan 26, 2017 at 2:22 PM, brianhj <> wrote:







Quote:
I need vertex buffer objects but I HATE opengl. Will SDL ever get this feature? Or is there some way to draw 15,000 lines per frame at 60fps with SDL?


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: I need vertex buffers

brianhj
In reply to this post by brianhj
Unfortunately I can't even get a simple program to work:








Code:
#include "SDL.h"
#include "SDL_gpu.h"

void main_loop(GPU_Target* screen) {
   while (true) {
      GPU_Clear(screen);
      GPU_Line(screen, 0.f, 0.f, 123.f, 123.f, SDL_Color({ 123,255,255 }));
      GPU_Flip(screen);
   }
}

int main(int argc, char* argv[])
{
   GPU_Target* screen;

   screen = GPU_Init(800, 600, GPU_DEFAULT_INIT_FLAGS);
   if (screen == NULL)
      return -1;

   main_loop(screen);

   GPU_Quit();

   return 0;
}



Any ideas??? It's just a black screen. I used strange coords and colors to make sure I was sane.

_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: I need vertex buffers

Daniel Gibson
Your color only has 3 components, the 4th (alpha) might be set to 0
because of this, making the line totally translucent (invisible)?
try something like SDL_Color c = {123, 255, 255, 255}; and use that in
the GPU_Line() call.

Cheers,
Daniel

>
>
> Any ideas??? It's just a black screen. I used strange coords and colors
> to make sure I was sane.
>
>
> _______________________________________________
> SDL mailing list
> [hidden email]
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>

_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: I need vertex buffers

brianhj
In reply to this post by brianhj
If i could buy you a beer i would, i added 255 in there and it worked fine. Thanks buddy Very Happy








Daniel Gibson wrote:
Your color only has 3 components, the 4th (alpha) might be set to 0
because of this, making the line totally translucent (invisible)?
try something like SDL_Color c = {123, 255, 255, 255}; and use that in
the GPU_Line() call.

Cheers,
Daniel








Quote:


Any ideas??? It's just a black screen. I used strange coords and colors
to make sure I was sane.


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: I need vertex buffers

Daniel Gibson
Cool, glad I could help (despite never having used SDL_GPU) :-)

On 27.01.2017 04:08, brianhj wrote:
> If i could buy you a beer i would, i added 255 in there and it worked
> fine. Thanks buddy Very Happy
>

_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: I need vertex buffers

brianhj
In reply to this post by brianhj
If i could buy you a beer i would, i added 255 in there and it worked fine. Thanks buddy Very Happy

Unfortunately performance with line drawing isn't any better than play ol' SDL Sad Sad Sad Very disappointed








Daniel Gibson wrote:
Your color only has 3 components, the 4th (alpha) might be set to 0
because of this, making the line totally translucent (invisible)?
try something like SDL_Color c = {123, 255, 255, 255}; and use that in
the GPU_Line() call.

Cheers,
Daniel








Quote:


Any ideas??? It's just a black screen. I used strange coords and colors
to make sure I was sane.


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: I need vertex buffers

Jonathan Dearborn-2
What numbers are you getting?

Jonny D

On Thu, Jan 26, 2017 at 10:17 PM, brianhj <[hidden email]> wrote:
If i could buy you a beer i would, i added 255 in there and it worked fine. Thanks buddy Very Happy

Unfortunately performance with line drawing isn't any better than play ol' SDL Sad Sad Sad Very disappointed




Daniel Gibson wrote:

Your color only has 3 components, the 4th (alpha) might be set to 0
because of this, making the line totally translucent (invisible)?
try something like SDL_Color c = {123, 255, 255, 255}; and use that in
the GPU_Line() call.

Cheers,
Daniel




Quote:



Any ideas??? It's just a black screen. I used strange coords and colors
to make sure I was sane.


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org




_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org



_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org



_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: I need vertex buffers

brianhj
In reply to this post by brianhj
Well I have 25 sets of lines, each with 466 lines. That's 11650 lines per frame or 699000 lines per second at 60fps.

SDL + SDL_gpu using GPU_line i get 17 FPS
SDL + OpenGL + VBO i get 60 FPS, capped by monitor i think

I just fucking hate programming in OpenGL. Every little think you need to do is a fucking science project Evil or Very Mad









Jonny D wrote:
What numbers are you getting?

Jonny D


On Thu, Jan 26, 2017 at 10:17 PM, brianhj <> wrote:







Quote:
If i could buy you a beer i would, i added 255 in there and it worked fine. Thanks buddy

Unfortunately performance with line drawing isn't any better than play ol' SDL Very disappointed




Daniel Gibson wrote:

Your color only has 3 components, the 4th (alpha) might be set to 0
because of this, making the line totally translucent (invisible)?
try something like SDL_Color c = {123, 255, 255, 255}; and use that in
the GPU_Line() call.

Cheers,
Daniel




Quote:



Any ideas??? It's just a black screen. I used strange coords and colors
to make sure I was sane.


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: I need vertex buffers

Jonathan Dearborn-2
If you want to troubleshoot this, we can take it off-list.  On a Macbook Pro, I'm getting 30fps rendering 10x that number of lines (>100,000) each frame.

Jonny D


On Thu, Jan 26, 2017 at 10:40 PM, brianhj <[hidden email]> wrote:
Well I have 25 sets of lines, each with 466 lines. That's 11650 lines per frame or 699000 lines per second at 60fps.

SDL + SDL_gpu using GPU_line i get 17 FPS
SDL + OpenGL + VBO i get 60 FPS, capped by monitor i think

I just fucking hate programming in OpenGL. Every little think you need to do is a fucking science project Evil or Very Mad





Jonny D wrote:

What numbers are you getting?

Jonny D


On Thu, Jan 26, 2017 at 10:17 PM, brianhj <> wrote:



Quote:

If i could buy you a beer i would, i added 255 in there and it worked fine. Thanks buddy

Unfortunately performance with line drawing isn't any better than play ol' SDL Very disappointed




Daniel Gibson wrote:

Your color only has 3 components, the 4th (alpha) might be set to 0
because of this, making the line totally translucent (invisible)?
try something like SDL_Color c = {123, 255, 255, 255}; and use that in
the GPU_Line() call.

Cheers,
Daniel




Quote:



Any ideas??? It's just a black screen. I used strange coords and colors
to make sure I was sane.


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org






_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org



_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: I need vertex buffers

brianhj
In reply to this post by brianhj
Ok that would be great!!!








Jonny D wrote:
If you want to troubleshoot this, we can take it off-list.  On a Macbook Pro, I'm getting 30fps rendering 10x that number of lines (>100,000) each frame.

Jonny D




On Thu, Jan 26, 2017 at 10:40 PM, brianhj <> wrote:







Quote:
Well I have 25 sets of lines, each with 466 lines. That's 11650 lines per frame or 699000 lines per second at 60fps.

SDL + SDL_gpu using GPU_line i get 17 FPS
SDL + OpenGL + VBO i get 60 FPS, capped by monitor i think

I just fucking hate programming in OpenGL. Every little think you need to do is a fucking science project





Jonny D wrote:

What numbers are you getting?

Jonny D


On Thu, Jan 26, 2017 at 10:17 PM, brianhj <> wrote:



Quote:

If i could buy you a beer i would, i added 255 in there and it worked fine. Thanks buddy

Unfortunately performance with line drawing isn't any better than play ol' SDL Very disappointed




Daniel Gibson wrote:

Your color only has 3 components, the 4th (alpha) might be set to 0
because of this, making the line totally translucent (invisible)?
try something like SDL_Color c = {123, 255, 255, 255}; and use that in
the GPU_Line() call.

Cheers,
Daniel




Quote:



Any ideas??? It's just a black screen. I used strange coords and colors
to make sure I was sane.


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org










_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: I need vertex buffers

brianhj
In reply to this post by brianhj
I just set up a simple test program. I looped through 50000 random lines and i'm only getting 33 fps Sad

_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: I need vertex buffers

Jonathan Dearborn-2
That could be a hardware bottleneck?  I'll follow up off-list and we can report back when settled.

Jonny D


On Friday, January 27, 2017, brianhj <[hidden email]> wrote:
I just set up a simple test program. I looped through 50000 random lines and i'm only getting 33 fps Sad

_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: I need vertex buffers

Ed Phillips
On Fri, 27 Jan 2017, Jonathan Dearborn wrote:

> That could be a hardware bottleneck?  I'll follow up off-list and we can report back when settled.
> Jonny D

That would be great... these kinds of performance cases are interesting to
me.

Thanks,

  Ed
_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Loading...