[ pyopengl-Bugs-1579715 ] Probable int/int32 problem with version 3.0.0a4

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.python.opengl.devel
Message-ID <[email protected]>
Bugs item #1579715, was opened at 2006-10-18 09:57
Message generated for change (Comment added) made by mcfletch
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=1579715&group_id=5988

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: GL
Group: v3.0.0
>Status: Closed
>Resolution: Duplicate
Priority: 7
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Mike C. Fletcher (mcfletch)
Summary: Probable int/int32 problem with version 3.0.0a4

Initial Comment:
With version 3.0.0a4, compiled on Linux 64 bits,
lesson18 in Demo/NeHe dies with:

Traceback (most recent call last):
  File "lesson18.py", line 302, in ?
    main()
  File "lesson18.py", line 294, in main
    InitGL(640, 480)
  File "lesson18.py", line 106, in InitGL
    LoadTextures()
  File "lesson18.py", line 76, in LoadTextures
    glBindTexture(GL_TEXTURE_2D, textures[0])   # 2d
texture (x and y size)
ctypes.ArgumentError: argument 2: exceptions.TypeError:
int expected instead of numpy.int32 instance


This may suggest that an explicit signature with int32
is needed (at least to accommodate 64 bits architectures,
since 32 bits architectures will find both int and int32
equivalent).

A fix can possibly made in several places, but
I would think that changing the signature of
glBindTexture for its secnd argument to int32 is 
what is needed.
 




----------------------------------------------------------------------

>Comment By: Mike C. Fletcher (mcfletch)
Date: 2008-01-19 20:44

Message:
Logged In: YES 
user_id=34901
Originator: NO

This is being addressed (though not yet satisfactorily) under bug
#1827190, closing this ticket in favour of that.

----------------------------------------------------------------------

Comment By: Mike C. Fletcher (mcfletch)
Date: 2006-11-07 13:37

Message:
Logged In: YES 
user_id=34901

This is a numpy migration issue.  I need to teach ctypes how
to handle numpy's "scalar" types (e.g. int32, int16), these
are now returned instead of regular Python integers when you
pull a value out of a numpy array.

----------------------------------------------------------------------

Comment By: lgautier (lgautier)
Date: 2006-10-18 09:59

Message:
Logged In: YES 
user_id=1623918

The entry above should have been logged under this account.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=1579715&group_id=5988

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.