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?
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 DOn Thu, Jan 26, 2017 at 2:22 PM, brianhj 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
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
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 (https://github.com/grimfang4/sdl-gpu)
Jonny D
On Thu, Jan 26, 2017 at 2:22 PM, brianhj <@brianhj (@brianhj)> 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
SDL at lists.libsdl.org (SDL at lists.libsdl.org)
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
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.
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
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
If i could buy you a beer i would, i added 255 in there and it worked fine. Thanks buddy
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,
DanielAny ideas??? It’s just a black screen. I used strange coords and colors
to make sure I was sane.
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
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
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,
DanielAny ideas??? It’s just a black screen. I used strange coords and colors
to make sure I was sane.
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
What numbers are you getting?
Jonny DOn Thu, Jan 26, 2017 at 10:17 PM, brianhj wrote:
If i could buy you a beer i would, i added 255 in there and it worked
fine. Thanks buddy [image: Very Happy]Unfortunately performance with line drawing isn’t any better than play ol’
SDL [image: Sad] [image: Sad] [image: Sad] Very disappointedDaniel 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,
DanielQuote:
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
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
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 <@brianhj (@brianhj)> wrote:
If i could buy you a beer i would, i added 255 in there and it worked fine. Thanks buddy [Image: http://forums.libsdl.org/images/smiles/icon_biggrin.gif ]
Unfortunately performance with line drawing isn’t any better than play ol’ SDL [Image: http://forums.libsdl.org/images/smiles/icon_sad.gif ] [Image: http://forums.libsdl.org/images/smiles/icon_sad.gif ] [Image: http://forums.libsdl.org/images/smiles/icon_sad.gif ] 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,
DanielQuote:
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 (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
SDL mailing list
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
SDL mailing list
SDL at lists.libsdl.org (SDL at lists.libsdl.org)
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
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 DOn Thu, Jan 26, 2017 at 10:40 PM, brianhj 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 thinkI just fucking hate programming in OpenGL. Every little think you need to
do is a fucking science project [image: 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 buddyUnfortunately performance with line drawing isn’t any better than play ol’
SDL Very disappointedDaniel 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,
DanielQuote:
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
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
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 <@brianhj (@brianhj)> 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 thinkI just fucking hate programming in OpenGL. Every little think you need to do is a fucking science project [Image: http://forums.libsdl.org/images/smiles/icon_evil.gif ]
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 [Image: http://forums.libsdl.org/images/smiles/icon_biggrin.gif ]
Unfortunately performance with line drawing isn’t any better than play ol’ SDL [Image: http://forums.libsdl.org/images/smiles/icon_sad.gif ] [Image: http://forums.libsdl.org/images/smiles/icon_sad.gif ] [Image: http://forums.libsdl.org/images/smiles/icon_sad.gif ] 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,
DanielQuote:
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 (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
SDL mailing list
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
SDL mailing list
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
SDL mailing list
SDL at lists.libsdl.org (SDL at lists.libsdl.org)
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
I just set up a simple test program. I looped through 50000 random lines and i’m only getting 33 fps
That could be a hardware bottleneck? I’ll follow up off-list and we can
report back when settled.
Jonny DOn Friday, January 27, 2017, brianhj wrote:
I just set up a simple test program. I looped through 50000 random lines
and i’m only getting 33 fps [image: Sad]
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,
EdOn Fri, 27 Jan 2017, Jonathan Dearborn wrote: