Well, i am beginning to make an 3D engine in dehpli (i didn 't have the choice) and i have a big problem:
When i call SwapBuffers(h_DC) in my rendering loop, my app crash!!
Let’s see some informations:
Dumping PIXELFORMATDESCRIPTOR
…nSize = 40
…nVersion = 1
…dwFlags = PFD_DRAW_TO_WINDOW PFD_SUPPORT_OPENGL PFD_DOUBLEBUFFER
…iPixelType = PFD_TYPE_RGBA
…cColorBits = 32
…cRedBits = 8
…cRedShift = 16
…cGreenBits = 8
…cGreenShift = 8
…cBlueBits = 8
…cBlueShift = 0
…cAlphaBits = 0
…cAlphaShift = 0
…cAccumBits = 64
…cAccumRedBits = 16
…cAccumGreenBits = 16
…cAccumBlueBits = 16
…cAccumAlphaBits = 16
…cDepthBits = 24
…cStencilBits = 0
…cAuxBuffers = 0
…iLayerType = PFD_MAIN_PLANE
…bReserved = 0
…dwLayerMask = 0
…dwVisibleMask = 0
…dwDamageMask = 0
Done
NVIDIA Corporation
GeForce2 GTS/AGP/3DNOW!
1.2.1
And the main loop of my thread:
///////////////////////////
function MsgLoop():Integer;
var
bResult : BOOL;
begin
// Entry point of the thread
// Core
while (TRUE) do
begin
// End thread?
if (bMustTerminate = TRUE) then
break;
// Intern authorization
if (bCanRender <> TRUE) then
continue;
// Render 3D Game
// Clear The Screen And The Depth Buffer
glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
// Reset The View
//glLoadIdentity();
// Draw Menu
//T_P_PROCEDURE(HookData.pfnUI_DrawMenu);
// ++DEBUG++
glColor3f(1.0, 1.0, 1.0);
glBegin(GL_QUADS);
glVertex3f(-1.0, -1.0, 10);
glVertex3f(-1.0, 1.0, 10);
glVertex3f( 1.0, 1.0, 10);
glVertex3f( 1.0, -1.0, 10);
glEnd();
//SwapBuffer
bResult := SwapBuffers(OpenGlRenderingContext.h_DC);
end;
Result := 0;
end;
My card is a Geforce 2 GTS (see log upper).
I use Delphi 5 on a thunderbird 750 with 128Mo.
I really don’t understand the problem, so if somebody could help me, please!!! I have to show the state of myprject in a couple of days!!!
thanks by advance.
NB : excuse me for my english, but i’m french…