OpenGL with Python 2: Drawing a Triangle

preview_player
Показать описание


Рекомендации по теме
Комментарии
Автор

These tutorials are great, I like how you do the code so fast and then explain it line by line after really simply and concisely instead of droning on for forever

ANerdyCoder
Автор

Amazing videos man, so refreshing to find good and recent content!

FinFET
Автор

I've been attempting to learn OpenGL through other sources. Your explanations, unlike the others, make everything much clearer. Thanks a million!!! This isn't a complaint by any means, but I have color blindness that affects the way that I see reds and greens. I can read the code, but with this IDE color scheme, it's kind of difficult and I have to REALLY strain in order to do so. Again, great work. It really helps!!!!

GregoryWatkins-ne
Автор

For me the triangle didn't show up. :-(

oglothenerd
Автор

Been trying to follow this tutorial, and after following this and the previous video, I'm getting this error:

"Unable to load numpy_formathandler accelerator from OpenGL_accelerate"

It does create a window, but the triangle doesn't render. I'm running a 64-bit Windows 11 OS, is that the error or is it an entirely different beast?

DipperGames
Автор

Wouldn't it be better to use a different file extension for shader files for syntax highlighting? I see some people use .h, not sure what's the most appropriate

FinFET
Автор

from numpy import array
from ctypes import c_void_p

if you're worried about numpy and python conflicting on array, then just change it to "from numpy import array as narray", or something.
anyways example:
array(vertices, dtype="f4") <<< f4 = float32 (4 as in 4 bytes), uint32 = "u4".
However if you want to stick to writing float32, uint32, add them to the end of the import after array,

ProgrammingWithRook
Автор

Very good tutorial sir I am trying to make an app and I am 13 this is very helpful thankuuu😊

Pappy-rjfu
Автор

thanks for the tutorial, super helpful. I got the following error (pygame 2.1.2, python 3.9.7). Any idea by chance ? thx in advance " raise ShaderValidationError(
Validation failure (0): b'Validation Failed: No vertex array object bound.\n'"

jonathan
Автор

This is so cool!
Im interested in learning it since I have some python background.. please I have the following question..how would I be able to implement boat water interaction completely in python without any game engine but with the knowledge of what I'd learn from here?
Thanks in advance

austineadah
Автор

Thank you so much man, really well explained !!!!

aldosagun
Автор

Is it just me who think this is super hard.

perelium-x
Автор

I try in intel macos and got error version 330 not supported. How can i solve this?

immanuelmarc
Автор

All is good. Just try zooming the head hurting size of code.

ek_minute_
Автор

Common practice is to call the program a shader but I do think this brings some confusion. Because a shader program is more closer to what vulkan refers to as pipeline(although apparently there is a difference) .I suppose to the developers the past called the program a shader since that's the only part that you are allowed to program in openGL, but yeah...I think(personal opinion) it's better to name things for what they are. Anyway...I suppose this comment is there for the people who dabble in both openGL and Vulkan. And are trying to wrap their heads around Vulkan as compared to OpenGL.

NikolaNevenov
Автор

I'm running into a problem with this lesson. My code so far appears to be exactly how it should be up to video 2 (this one) But, when I hit compile I just get a blank Python window with out the triangle showing up. I was wondering if anyone could give me some advice on what I'm doing here that might be a roadblock I can't see.

JacobLince-zefs
Автор

Hello, when I try to draw the triangle I have this error:
error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00

amadeo
Автор

oh,these code cant run in opengl 3.1.6,I fell sad。why can run in opengl 3.1.5,but cant run in 3.1.6

王祖明-hp
Автор

i get the error "OpenGL.error.Error: Attempt to retrieve context when no valid context" some googleing around only resulted in the issue being ubuntu wm on windows 11 but nothing on fixing it. Any help would be appreciated

DD-uqsw
Автор

Great Video, thanks for all of your efforts..

I ran into this error though
Validation failure (0): b'Vertex shader(s) failed to link, fragment shader(s) failed to link.\nVertex link error: INVALID_OPERATION.\nERROR: error(#97) No program main found\nfragment link error: INVALID_OPERATION.\nERROR: error(#97) No program main found\n'

sherifhany
visit shbcf.ru