Python Forum
type error and access violation error pyopengl
Thread Rating:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
type error and access violation error pyopengl
#1

GL.glDrawArrays(GL.GL_TRIANGLES,0,model1.vertexcou nt)
gives me an error saying:
ctypes.ArgumentError:argument 3:<class 'TypeError'>: wrong type
which i interpret as:
the 3rd argument given to this function/method is in the wrong type
so,i search on the internet for what type they want for the third argument ,it says:
it wants GLsizei type,which is a non-negative binary integer.
After that,i checked the model1.vertexcount's type by doing print(type(model1.vertexcount)) using python,it prints <class 'float'>
I tried to change it to integer by doing int(model1.vertexcount),but it gives me an error:
OSError:exception:access violation reading 0x0A56BAA8
I also tried to input the value 6 myself,instead of letting the raw model class do the job,but it still output an Error:
OSError:exception:access violation reading 0x0CD5DD98

Notes:
1)The hexadecimal number at the back part of the error differ in every run.
2)i am learning opengl from Thin Matrix.
3)i am using numpy to create the arrays
4)If more information is needed,ask below in the reply....

Hope anyone can help me
Thanks.....[Image: smile.png]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  GroupBy - Sum = Error [datetime64 type does not support sum operations] BSDevo 4 2,546 Oct-27-2023, 07:22 PM
Last Post: BSDevo
  Type error in Cross_val_score Vicral 0 1,808 Jul-20-2021, 12:18 PM
Last Post: Vicral
  type error array BrianPA 2 2,350 Jan-17-2021, 01:48 PM
Last Post: BrianPA
  Error binding parameter 0 - probably unsupported type. illmattic 7 10,230 Jul-18-2020, 09:32 PM
Last Post: illmattic
  Error Message: TypeError: unhashable type: 'set' twinpiques 4 18,757 May-22-2019, 02:31 PM
Last Post: twinpiques
  Error:unsupported operand type(s) for ** or pow(): 'list' and 'int' mcgrim 3 18,183 Mar-22-2019, 01:29 PM
Last Post: buran
  Regarding index out of bounds error and implementing Loop error in backpropagation al geevaprasa 6 8,502 Apr-20-2018, 09:35 AM
Last Post: Larz60+
  Type Error Confusion Oliver 4 14,380 Dec-06-2017, 03:20 PM
Last Post: Oliver
  AUCPR of individual features using Random Forest (Error: unhashable Type) melissa 1 3,280 Jul-10-2017, 12:48 PM
Last Post: sparkz_alot
  Why am I getting a type error? WagmoreBarkless 7 7,460 Jan-19-2017, 10:29 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020