Re: Simple Test Program issues

Ian Mallett <[email protected]>
Newsgroups gmane.comp.python.opengl.user
Message-ID <CAG4NV=sVEx4+_Yi0=s_H9R6c+YjHCa7NzxHGiSDSWLnR2Vs6UA@mail.gmail.com>
On Sat, Apr 28, 2012 at 10:40 AM, Gerald Escobar <[email protected]> wrote:

> Hello,
>
> I'm trying to learn to use pyopengl in a more modern context (not relying
> on fixed function/deprecated functionality INCLUDING built-in vertex shader
> attributes)
>
FYI the fixed function pipeline will continue to be supported for probably
decades.  It's not going away.


> Here is my source:
> http://pastebin.com/fd7KQthA
>
> When I run the program I simply get a black screen instead of a white
> triangle.
>
> I'm not entirely sure what I am doing wrong however there I encountered
> quite a few problems whilst writing this code snippet
> 1) When trying to bind the buffer to an attribute I kept getting some sort
> of type error. So instead I resorted to passing the matrix straight
> 2) I'm not entirely sure about whether I'm multiplying the matricies
> correctly.
>
> I apologize if this question seems very broad,
>
You should try debugging this.  There are two basic problems I anticipate:
one, the vertex arrays might not be working correctly; two, the vertex
shader might not be working correctly.  In cases like this where you just
don't know, you need to separate it until you reduce it to one or the other.

So, for example, do you see your triangle when not using a shader?  The
problem would then most likely be in the matrix multiplication or uniform
passing.  Did you still not see the triangle?  Then possibly the issue is
with your vertex arrays.

Ian

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
_______________________________________________
PyOpenGL-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyopengl-users
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.