841
General discussions / New graphics API ready
« on: December 29, 2011, 02:07:01 pm »
Just noticed something else by accident. I haven't had time to further investigate, but it seems reasonable (but still missing any notes in the docs then?):
By accident I loaded a texture before my window is created (no existing context yet). Under Windows 7, the texture still worked fine (so I didn't notice), but under Ubuntu 11.10 (inside VirtualBox) the texture always appeared with the contents of the first texture loaded after creating the window. It still used the scaling/mapping of the original texture (the one I tried to load) but used the first OpenGL texture created after creating the window.
Essentially something like this:
Trying to draw the top left 10x10 pixels of tex1 would now result in drawing the (upscaled) top left 5x5 pixels of tex2 (due to different tex coord scaling).
By accident I loaded a texture before my window is created (no existing context yet). Under Windows 7, the texture still worked fine (so I didn't notice), but under Ubuntu 11.10 (inside VirtualBox) the texture always appeared with the contents of the first texture loaded after creating the window. It still used the scaling/mapping of the original texture (the one I tried to load) but used the first OpenGL texture created after creating the window.
Essentially something like this:
Code: [Select]
tex1.LoadFromFile(512x512px);
window.Create(...);
tex2.LoadFromFile(256x256px);
Trying to draw the top left 10x10 pixels of tex1 would now result in drawing the (upscaled) top left 5x5 pixels of tex2 (due to different tex coord scaling).