The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Get pixel data, which is faster.. texture or surface?
Neil White
Guest

if i am getting pixel data from a largeish image (1000x1000) which will be higher performance for getting pixel data, getting pixel from a surface or a texture?
Get pixel data, which is faster.. texture or surface?
Iván Vodopiviz
Guest

A surface stored in RAM will be faster. Retrieving pixel data from GPU memory where textures are stored is extremely slow.


On Tue, Mar 17, 2015 at 1:05 PM, Neil White wrote:
Quote:
if i am getting pixel data from a largeish image (1000x1000) which will be higher performance for getting pixel data, getting pixel from a surface or a texture?


_______________________________________________
SDL mailing list

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




--
Get pixel data, which is faster.. texture or surface?
Neil White
Guest

i am struggling how to draw into a surface, sdl_gfx draws to a render / texture , cant find code that allows primitives in a surface, or to make a texture into a surface, or even save texture as png, whatever;) any help, stuck behind internet cant irc.

On Tue, Mar 17, 2015 at 9:19 AM, Iván Vodopiviz wrote:
Quote:
A surface stored in RAM will be faster. Retrieving pixel data from GPU memory where textures are stored is extremely slow.


On Tue, Mar 17, 2015 at 1:05 PM, Neil White wrote:
Quote:
if i am getting pixel data from a largeish image (1000x1000) which will be higher performance for getting pixel data, getting pixel from a surface or a texture?


_______________________________________________
SDL mailing list

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




--





_______________________________________________
SDL mailing list

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

Get pixel data, which is faster.. texture or surface?
Neil White
Guest

irc is on freenode servers kids #sdl it's the real facebook

On Tue, Mar 17, 2015 at 12:12 PM, Neil White wrote:
Quote:
i am struggling how to draw into a surface, sdl_gfx draws to a render / texture , cant find code that allows primitives in a surface, or to make a texture into a surface, or even save texture as png, whatever;) any help, stuck behind internet cant irc.

On Tue, Mar 17, 2015 at 9:19 AM, Iván Vodopiviz wrote:
Quote:
A surface stored in RAM will be faster. Retrieving pixel data from GPU memory where textures are stored is extremely slow.


On Tue, Mar 17, 2015 at 1:05 PM, Neil White wrote:
Quote:
if i am getting pixel data from a largeish image (1000x1000) which will be higher performance for getting pixel data, getting pixel from a surface or a texture?


_______________________________________________
SDL mailing list

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




--





_______________________________________________
SDL mailing list

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






Get pixel data, which is faster.. texture or surface?
Pallav Nawani


Joined: 19 May 2011
Posts: 122
Location: Dehradun, India
Create a software renderer. Software renderer draws to & from a surface. Check the sdl api docs at libsdl.org on how to create & use a software renderer.

Pallav Nawani
IronCode Gaming Private Limited
Website: http://www.ironcode.com
Twitter:  http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming
Mobile: 9997478768



On Wed, Mar 18, 2015 at 12:43 AM, Neil White wrote:
Quote:
irc is on freenode servers kids #sdl it's the real facebook

On Tue, Mar 17, 2015 at 12:12 PM, Neil White wrote:
Quote:
i am struggling how to draw into a surface, sdl_gfx draws to a render / texture , cant find code that allows primitives in a surface, or to make a texture into a surface, or even save texture as png, whatever;) any help, stuck behind internet cant irc.

On Tue, Mar 17, 2015 at 9:19 AM, Iván Vodopiviz wrote:
Quote:
A surface stored in RAM will be faster. Retrieving pixel data from GPU memory where textures are stored is extremely slow.


On Tue, Mar 17, 2015 at 1:05 PM, Neil White wrote:
Quote:
if i am getting pixel data from a largeish image (1000x1000) which will be higher performance for getting pixel data, getting pixel from a surface or a texture?


_______________________________________________
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

Get pixel data, which is faster.. texture or surface?
Neil White
Guest

thanks i figured i was being an idiot Wink

On Wed, Mar 18, 2015 at 3:39 AM, Pallav Nawani wrote:
Quote:
Create a software renderer. Software renderer draws to & from a surface. Check the sdl api docs at libsdl.org on how to create & use a software renderer.

Pallav Nawani
IronCode Gaming Private Limited
Website: http://www.ironcode.com
Twitter:  http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming
Mobile: 9997478768



On Wed, Mar 18, 2015 at 12:43 AM, Neil White wrote:
Quote:
irc is on freenode servers kids #sdl it's the real facebook

On Tue, Mar 17, 2015 at 12:12 PM, Neil White wrote:
Quote:
i am struggling how to draw into a surface, sdl_gfx draws to a render / texture , cant find code that allows primitives in a surface, or to make a texture into a surface, or even save texture as png, whatever;) any help, stuck behind internet cant irc.

On Tue, Mar 17, 2015 at 9:19 AM, Iván Vodopiviz wrote:
Quote:
A surface stored in RAM will be faster. Retrieving pixel data from GPU memory where textures are stored is extremely slow.


On Tue, Mar 17, 2015 at 1:05 PM, Neil White wrote:
Quote:
if i am getting pixel data from a largeish image (1000x1000) which will be higher performance for getting pixel data, getting pixel from a surface or a texture?


_______________________________________________
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