简体   繁体   English

VRAM SDL_Texture?

[英]VRAM SDL_Texture?

I got my game using IMG_Load into a SDL_Surfase variable called buffer and the 我使用IMG_Load将游戏放入一个名为bufferSDL_Surfase变量中,

SDL_Texture *data_in_vram = SDL_CreateTextureFromSurface(render, bufer);

then SDL_Fre . 然后是SDL_Fre

But I saw the memory usage in windows that SDL_Texture is allocating all the data in to my ram memory. 但是我看到了Windows中SDL_Texture将所有数据分配到内存中的内存使用情况。

I have heard that SDL_Surface uses the ram and the SDL_Texture should use Vram. 我听说SDL_Surface使用ram,而SDL_Texture应该使用Vram。

How can I track my memory vram, and why do I see that SDL_Texture is using ram memory allocations? 如何跟踪内存vram,为什么我看到SDL_Texture在使用ram内存分配?

Also I hope you could help me with some faster mode to load my scene images. 我也希望您能以一些更快的模式来帮助我加载场景图像。

确保您没有使用软件渲染器,并确保从中创建纹理后释放了该表面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM