Re: Segmentation fault using OpenGL

2003-03-24 Thread Andre Bleau
Tron Thomas wrote: Here is the code: ... ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, nWidth, nHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, pData); Here is the bug: From glTexImage2D doc: void glTexImage2D( GLenum target, GLint level, GLint components, GLsizei width, GLsizei height,

Re: Segmentation fault using OpenGL

2003-03-21 Thread Tron Thomas
Here is the code: #include #include #include #include #include void SetupOpenGL(); void SetupRenderingContext(); void SetupTexture(); void SetProjection(); LRESULT WINAPI WinProc(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam); void Render(); void FreeResources(); HWND g_hWnd = NULL; HGLRC

Re: Segmentation fault using OpenGL

2003-03-21 Thread Andre Bleau
Sorry, sent with wrong subject the first time. Tron Thomas wrote: I have written a Windows OpenGL program which I can successfully build and run using both the Borland and Microsoft compilers. When I try to run the same program after building it with the Cygwin GCC compiler, I get a segmentati

RE: Segmentation fault using OpenGL

2003-03-21 Thread Norman Vine
Tron Thomas > > I have written a Windows OpenGL program which I can successfully build > and run using both the Borland and Microsoft compilers. When I try to > run the same program after building it with the Cygwin GCC compiler, I > get a segmentation fault. I'm very puzzled by this as the p