Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-Id: <5.2.0.9.0.20030324132101.02693b38@irispavp.igb.umontreal.ca> X-Sender: bleau2 AT irispavp DOT igb DOT umontreal DOT ca (Unverified) Date: Mon, 24 Mar 2003 13:32:59 -0500 To: cygwin AT cygwin DOT com From: Andre Bleau Subject: Re: Segmentation fault using OpenGL Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed X-MDRemoteIP: 10.52.50.2 X-Return-Path: bleau AT igb DOT umontreal DOT ca X-MDaemon-Deliver-To: cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id h2OIWOV04208 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, > GLint border, > GLenum format, > GLenum type, > const GLvoid *pixels >); > >Parameters > >target >The target texture. Must be GL_TEXTURE_2D. > >level >The level-of-detail number. Level 0 is the base image level. Level n is >the nth mipmap reduction image. > >components >The number of color components in the texture. Must be 1, 2, 3, or 4. So components cannot be GL_RGBA, because, from /usr/include/w32api/GL/gl.h: >#define GL_RGBA 0x1908 How such code could survive when compiled with Borland's or M$'s compiler (as you claimed) is beyond my understanding, but frankly, I doubt it does. André Bleau, Cygwin's OpenGL package maintainer. email: bleau at igb dot umontreal dot ca (Fight SPAM: encode your email-address) Please address all questions and problem reports about Cygwin's OpenGL package to cygwin AT cygwin DOT com . -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/