| OpenGL Texture problems |
|
brada
|
why dont you use SDL_Texture?
there are better ways to convers a surface pixel format then creating a new surface and blitting to it. there is also no way to tell from your code what the actual pixel format of your surface is since i cant see where your masks are defined. i want to say there is a better test for pixel format then what you have too. sorry I cant be more use. i dont know opengl since I let SDL handle all my drawing. |
|||||||||||
|
|
||||||||||||
|
justin123
|
I found the problem using a program that I found called gDEBugger. The problem was that I had double buffering enabled. From my observations, SDL created a total of 4 contexts, with my textures existing in the second context. It then created two more and destroying the first two and the third it had recently created, leaving only the fourth context active. Since my textures only existed in the second context, they were also destroyed (or leaked). To fix the problem, I just simply initialized without double buffering, but in the event that I want to enable double buffering, how do I handle this problem effectively?
|
|||||||||||
|
|
||||||||||||

