hello all,
All my surfaces are created in system memory even though SDL_GetVideoInfo()
tells me that hardware acceleration is possible on my video card and even
though i create my surfaces with the HW_SURFACE flag.
I’m coding under win32 (winXP) and using a nvidia geforce3 card with the
latest drivers (28.32) and the SDL 1.2.4 precompiled library and runtime.
Any ideas ?
thanks in advance,
@Yannis_Deliyannis
Yannis Deliyannis wrote:
hello all,
All my surfaces are created in system memory even though SDL_GetVideoInfo()
tells me that hardware acceleration is possible on my video card and even
though i create my surfaces with the HW_SURFACE flag.
I’m coding under win32 (winXP) and using a nvidia geforce3 card with the
latest drivers (28.32) and the SDL 1.2.4 precompiled library and runtime.
Any ideas ?
try adding |SDL_FULLSCREEN also in the SDL_SetVideoMode call flags parameter
AKAIK, HW surfaces are not available in windowed mode on windows at this time in SDL.–
-==-
Jon Atkins
http://jcatki.2y.net/
hello all,
All my surfaces are created in system memory even though
SDL_GetVideoInfo()
tells me that hardware acceleration is possible on my video card and
even
though i create my surfaces with the HW_SURFACE flag.
I’m coding under win32 (winXP) and using a nvidia geforce3 card with the
latest drivers (28.32) and the SDL 1.2.4 precompiled library and
runtime.
Any ideas ?
try adding |SDL_FULLSCREEN also in the SDL_SetVideoMode call flags
parameter
AKAIK, HW surfaces are not available in windowed mode on windows at this
time in SDL.
I’ve tried launching my app in fullscreen and it only works with software
surfaces : when i try to create hardware surfaces, the app launches then
exit abruptly without displaying anything. By tracing the initialisation
process, i see that it happens just after setting the video mode and
creating the first surface, both of which are indeed created in video
memory. It crashes when trying to create the second hardware surface. More
surprising, the video memory available after creating the screen surface and
the first offscreen surface is bigger than what it is initially.
I’ve copied and pasted the stdout.txt log my app is creating when launched :
SDL initialized.
Hardware surfaces are available (127360K video memory).
SDL video mode set to 800x600x32.
Screen is in video memory (128304K video memory).
Screen has double-buffering enabled.
SDL loaded bitmap : data\tileset_normal.bmp on new surface (326 x 62 x 4).
Screen is in video memory (128304K video memory).
After loading the bitmap on the new surface, the app exits. Shouldn’t the
video memory be less than the initial value after creating the screen
surface and the bitmap surface ?
What i’m also wondering is if my code was bad, why does my app works
perfectly in software mode and not in hardware (fullscreen in software works
ok).
any more ideas
?
@Yannis_Deliyannis
SDL initialized.
Hardware surfaces are available (127360K video memory).
SDL video mode set to 800x600x32.
Screen is in video memory (128304K video memory).
Screen has double-buffering enabled.
SDL loaded bitmap : data\tileset_normal.bmp on new surface (326 x 62 x 4).
Screen is in video memory (128304K video memory).
After loading the bitmap on the new surface, the app exits. Shouldn’t the
video memory be less than the initial value after creating the screen
surface and the bitmap surface ?
What resolution is your desktop set at? Maybe the desktop uses more video
memory than the mode you set.
What i’m also wondering is if my code was bad, why does my app works
perfectly in software mode and not in hardware (fullscreen in software
works ok).
Maybe you’re trying to access surface memory directly without locking?
cu,
NicolaiAm Sonntag, 2. Juni 2002 20:30 schrieb Yannis Deliyannis:
After loading the bitmap on the new surface, the app exits. Shouldn’t
the
video memory be less than the initial value after creating the screen
surface and the bitmap surface ?
What resolution is your desktop set at? Maybe the desktop uses more video
memory than the mode you set.
You’re right. My desktop was at 1024x768 and my app was running in 800x600.
That makes for the difference.
But when i launch the app in the same resolution as my desktop, the amount
of video memory now stays the same. Odd ?
What i’m also wondering is if my code was bad, why does my app works
perfectly in software mode and not in hardware (fullscreen in software
works ok).
Maybe you’re trying to access surface memory directly without locking?
Once again, i think you’re right. I’ve managed to trace down the problem to
my GetPixel() function. I wasn’t locking the surface before accessing it.
I’m locking it and unlocking it now but it still doesn’t work. Can someone
post an example of a getpixel() function ?
Thanks for the reply,
@Yannis_Deliyannis
http://sdldoc.csn.ul.ie/guidevideo.php#AEN115 - don’t you just love the FM? ;p
The most likely mistake is that you didn’t use the surface pitch in your
calculations.
cu,
NicolaiAm Sonntag, 2. Juni 2002 21:14 schrieb Yannis Deliyannis:
Once again, i think you’re right. I’ve managed to trace down the problem to
my GetPixel() function. I wasn’t locking the surface before accessing it.
I’m locking it and unlocking it now but it still doesn’t work. Can someone
post an example of a getpixel() function ?