9/8/2023 0 Comments Opengl 4.3 capable gpuIn many cases yes, the core functions of ModernGL are written in C++, Vbo2 = ctx.buffer(reserve=1024, dynamic=True) Results: vbo1 = ctx.buffer(b'Hello World!') With ModernGL you need just one simple line per VBO to achieve the same GL.glBufferData(GL_ARRAY_BUFFER, b'\x00' * 1024, GL_DYNAMIC_DRAW) ![]() GL.glBufferData(GL_ARRAY_BUFFER, b'Hello World!', GL_STATIC_DRAW) With PyOpenGL, using the original OpenGL API, you have to write three lines toĪchieve a simple task like binding a VBO: vbo1 = glGenBuffers(1) > ctx.texture(img.size, 3, img.tobytes()) Easy to use with Pillow and Numpy > img = Image.open('texture.jpg') > buf = ctx.buffer(b'Hello World!') # allocated on the GPUįor complete examples please visit the Examples. > ctx = moderngl.create_standalone_context()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |