Hi,
thanks for the response.
ive made the changes you suggested and still doesnt get HW acceleration. Ive also modified the "bpp" bits per pixel parameter and set it to 0 and get the same result i get by default 8 bpp.
So nothing changed. You want me to try anything else?
hmm, this is a perplexing problem, looking at sdl's source, it does a few things differently then my engine for creating a window/video context, but i don't see why this should cause you not to receive a hardware context.
i'm going to assume you are capable of compiling SDL, if not respond here and i'll see if i can't compile a binary for you with the changes.
note that i'm working with SDL-1.2.15(which a quick look at libsdl.org appears to be still the current version.)
so, my suspicion is that wglChoosePixelFormatARB is the culprit(or at least a parameter to it is causing the problem).
so let's comment out wglChoosePixelFormatARB, and use the default pixel format.
in SDL_wingl.c (src/video/wincommon/), comment lines 147-157.
this should be sufficient since it only uses the arb method if it's available for use(and i'm assuming it is available on most modern hardware), and defaults back to the regular PFD method instead.
so compile sdl, and run the test again, if this creates a hardware context, then it would appear this is the problem(or at least one of the parameter's it recieves creates a bad context). if not, i'm not really certain what the problem is, i'm no guru for sdl's internals, but by the look of things it should be similar to how i do things in my engine.
it defiantly would be a good point to post in nvidia forums, i'm finding it difficult to successfully follow SDL's init pathways(so many IFDef's for different OS's/config flags =-/) from what i can tell, it's doing pretty much a 1:1(or very near anyways) with my own engine's window creation code, this is assuming that i'm following the correct config flags.
anyway, i'm going to post my window creation code(cleaned up to work as a stand-alone function):
As stupid as it may sound (and I may have skipped something in this thread)... did you try setting the color buffer to 32-bit instead of 24-bit? Also a 24-bit depth buffer only makes sense with an 8-bit stencil buffer if I recall correctly (both are shared making up a 32-bit buffer together).
Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.
Also a 24-bit depth buffer only makes sense with an 8-bit stencil buffer if I recall correctly (both are shared making up a 32-bit buffer together).
Context creation should automatically give you 32 bit with 24 bits for depth and the remaining 8 either unused or for stencil (it's important to check this after creation as if it gives you stencil - even if you don't explicitly request it - you will want to clear stencil at the same time as depth in order to get fast clears, but that's a separate matter). Rarely it will give you 16 bit or 32 bit depth but it can happen too.
Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.