OpenGL in python e01 - installing the dependencies and creating a glfw window

preview_player
Показать описание
In this video we are going to install all the dependencies, and then we are going to take a look on how to create a glfw window.

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

The best tutorial series on youtube! South American Kratos explains opengl like a pro

thegreatconjecture
Автор

Thats a really nice project! I like python, i like opengl - best series :D

MultiCraftTube
Автор

the fact that you added the oo way of doing it is so cool ! good job my man !

marx
Автор

Thank you very much! We were told to make a game with python, and opengl provides a wide variety of possibilities to do some cool effects

quadroninja
Автор

I tried to use GLFW with Python (with your early tutorials), with C++ and with Java (LWJGL3) as you said in your video. It is very good solution because your lesson are more universal in this case. A lot of people started with Python in school and they can to go in C++ or in Java using GLFW.

ivan.enzhaev
Автор

Thank you for going through what each glfw method did, very helpful 👍

bjsnbd
Автор

Consider a circle (x − 40)

2 + (y − 40)

2 = 400. Rotate it along X- axis counter clockwise 30 degree and translate it
along Z- axis for +20 units. Write a OpenGL code for this operation. Now write code for following operations in openGL.
1 - Take orthographic projection of this circle on xy plane.
2- Consider 3 axes (100, 0, 0), (0, 100, 0), (0, 0, 100), up vector as Z- axis (of original circle) and position of camera at
origin. Look at point is at centre of the rotated translated circle. Take perceptive projection of translated circle points on
the plane made by these axes. Also write code to get perceptive projection if camera rotates along Z-axis.

sambodhisengupta
Автор

I'm very familiar with Anaconda 3 and just set up an environment for OpenGL :D I use Spyder 4.2.5 as my default interpreter. It works like a charm, thanks to your tutorial!

vinhnamhuynh
Автор

If some beginners want to share their executable file you can install PyInstaller using pip:
pip install pyinstaller
Next you need to type this command:
pyinstaller --onefile --windowed --noupx main.py
P.S. Currently PyInstaller works with Python 3.7 (not with Python 3.8)

ivan.enzhaev
Автор

where is the link for the script example, bro?

akartanitechtani
Автор

For everyone. Use this piece of code to center your window:

window = glfw.create_window(400, 300, "My Centered Window", None, None)
monitor = glfw.get_primary_monitor()
pos =
size = glfw.get_window_size(window)
mode = glfw.get_video_mode(monitor)
print(int((mode.size.height - size[1]) / 2))
glfw.set_window_pos(
window,
int(pos[0] + (mode.size.width - size[0]) / 2),
int(pos[1] + (mode.size.height - size[1]) / 2))

ivan.enzhaev
Автор

I want to move location 3d object with lots of data at the same screen.Which functions should I use?

ramazankazikoglu
Автор

I'm getting this error:
GLFWError: (65542) b'WGL: The driver does not appear to support OpenGL' warnings.warn(message, GLFWError)
GLFWError: (65537) b'The GLFW library is not initialized' warnings.warn(message, GLFWError)

But mine support opengl 2.1
(btw i have intel G41 express chipset)

ahmedfathey
Автор

When I type 'pip list' I do not see 'six' among the listed packages. Is that a problem?

davidbarnwell
Автор

So, can you create a virtual environment and move about it using pygame, or any python ? How would games, for example, be made doing both of these?

dylankawalec
Автор

where is the window_class.py in your repository?

muhammadsarimmehdi
Автор

Can we do it without using glfw window? What about if we just want to show it at some specific portion of a screen?

maisum
Автор

When i run your code i am getting this error


Traceback (most recent call last):
File "C:/Users/World/Desktop/glfw.py", line 1, in <module>
import glfw
File "C:/Users/World/Desktop\glfw.py", line 5, in <module>
if not glfw.init():
AttributeError: module 'glfw' has no attribute 'init'


Any Suggestions Would be Helpful

rehansiddique
Автор

i keep getting the error
GLFWError: (65542) b'WGL: The driver does not appear to support OpenGL'
warnings.warn(message, GLFWError)
i have intel hd graphics with pentium in my machine. I use glfw with c++ on my machine, but i dont provide window hints in my code. asking any kind soul to help me out..

sujalgvs
Автор

Great series!
I learned a lot about shaders, thanks!

Can you help me?
it's clear to me how place cube in space, but not how to scale them ( different size & different place)
also... how can i create a hierarchy of objects? (something like glPushMatrix | glPopMatrix)
do you have some simple examples?

aleale