Skip to main content

All Questions

Tagged with
8 votes
1 answer
4k views

How do you remove a draw handler after it's been added?

I'm making an attempt to use batFINGER's method from this answer for drawing some text on screen without a modal operator, but I'm finding I can't get the text to go away once it's been drawn. ...
andyV's user avatar
  • 623
10 votes
2 answers
2k views

Copy framebuffer of 3D View into custom frame buffer

General question: Is there a reliable way to directly access the OpenGL framebuffer of a View3D for copying? (Please see the end of the post for more detailed questions) I need a very fast way to copy ...
reg.cs's user avatar
  • 488
3 votes
2 answers
3k views

How to draw shapes in the node editor with python bgl

I want to draw a diagram using shapes such as triangles and squares in the node editor. How can I do this?
John Roper's user avatar
8 votes
1 answer
2k views

Render specific frames with opengl via python

When I run the following script, current_frame is set AFTER the render.opengl(): ...
Erik Bongers's user avatar
7 votes
1 answer
3k views

Draw geometry on screen using BGL module

I am trying to use the bgl module to draw triangles on top of the Blender interface. My understanding is that glBegin/glEnd are deprecated, and vertex array or display list or VBO should be used ...
Mike Pan's user avatar
  • 11.9k
3 votes
3 answers
1k views

How to make rounded corners for 2d rectangle with a custom shader?

Does anyone know how to make rounded corners for a 2d rectangle with a custom shader? ...
Karan's user avatar
  • 2,381
8 votes
2 answers
3k views

How to get screen color under mouse cursor?

I'm trying to figure out how to get the color of the screen pixel under the mouse with python like in this video: Python-scripted color picker I tried importing bgl and adding bgl.glReadPixels in to ...
andyV's user avatar
  • 623
3 votes
1 answer
1k views

How can I add a new object on mouse click?

I am looking for a code, that adds an uv sphere on a mesh when a mouse click happens. I saw the topic: Adding new object on mouse click? but there are no answers ...
Ilian Zapryanov's user avatar
1 vote
3 answers
2k views

Draw a 2d box using Bgl in viewport

I have been trying read up a lot on opengl drawing using python and have been trying to create a script which display a text and a 2d shape on the viewport (a rectangle or square). From reading the ...
Retrax's user avatar
  • 1,520
1 vote
2 answers
821 views

How to align modal draw to the middle of the 3d viewport?

I have a question about the opengl modal draw : How to align text from a modal draw to the middle of the viewport and and keep it automatic between Tool Shelf and Property Shelf, when i changing them?...
MKB's user avatar
  • 78
9 votes
3 answers
11k views

Get indices of vertices of triangulated faces in python

I'm writing a python script to export triangulated meshes from Blender to an openGL application I am working on. I'm using text files, and I want to export my geometry data in the form of vertices, ...
darius's user avatar
  • 327
6 votes
1 answer
507 views

How to make voronoi move like living ants?

In Twitter link below, I saw this work by Joe Gatling a few days ago. His voronoi moves like live bugs. How do you create that in Blender? Moving ants with voronoi. Edit. I'm back. I've just ...
Rita Geraghty's user avatar
4 votes
1 answer
1k views

Is there a way to render depth buffer into a texture with GPU/bgl python modules?

I need to render depth buffer of Blender's scene into a texture to further use it my shaders. I tried using the common OpenGL recipes for doing that, but none of them worked as it seems there is ...
D. Skarn's user avatar
  • 695
4 votes
2 answers
2k views

Fastest way copying from bgl.Buffer() to numpy array

I have some rendered or processed pixel data in a bgl.Buffer() object and need it in a numpy array but that proccess seems to take very long. Here is what I have tried so far: ...
Gottfried Hofmann's user avatar
3 votes
1 answer
637 views

Using the z-depth buffer when drawing from bgl draw callbacks?

I'm investigating making some simple widgets using bgl and finding it difficult to use the depth buffer without making a mess of the area I'm drawing in. Enable depth testing: ...
batFINGER's user avatar
  • 84.6k

15 30 50 per page