delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/03/24/13:32:24

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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 <bleau AT igb DOT umontreal DOT ca>
Subject: Re: Segmentation fault using OpenGL
Mime-Version: 1.0
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
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019