Re: [PyOpenGL-Users] Simple Test Program issues
Brought to you by:
mcfletch
From: Ian M. <geo...@gm...> - 2012-04-30 15:32:29
|
On Sat, Apr 28, 2012 at 10:40 AM, Gerald Escobar <n0d...@gm...> 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 |