Skip to main content

Questions tagged [opengl]

Questions about OpenGL (Open Graphics Library) OpenGL is an API used to render real-time 2D and 3D graphics. Blender uses OpenGL for drawing the user interface, 3D view, and the game engine.

103 questions with no upvoted or accepted answers
17 votes
0 answers
2k views

Per-Vertex lighting in GLSL?

How can I achieve per-vertex lighting (like in single/multi-texture shading) in GLSL with all of the other GLSL features (like buffer shadows, texture layers, etc.)? Bonus points if it can be done in ...
Nero1024's user avatar
  • 643
5 votes
0 answers
322 views

Custom shader script in compositor (de-linearize depth buffer)

Some months ago I wrote a minimal opengl 2.5d game engine with pre-rendered backgrounds (such old Resident evil, Alone in the dark and Final fantasy games). Depth is managed through a grayscale image ...
NickRay1184's user avatar
5 votes
0 answers
652 views

PyOpenGL and VBO Indexes

Long story short, I'm trying to do a modal handler that draws using OpenGL into the viewport. Immediate mode through BGL works fine, but is dog slow. I tried using VBOs through BGL but there seems to ...
Kiki W.'s user avatar
  • 606
4 votes
0 answers
609 views

How to use bgl?

I want to render simple lines on the 3D viewport through a modal operator but not using glBegin/End because those commands are deprecated in opengl 3.3 and will not be avaliable on 2.8 leaving me ...
StackOverflowToxicityVictim's user avatar
4 votes
0 answers
695 views

Viewport widgets with draw handler

Is it possible to create viewport widgets with draw handler? I have an operator which produces simple mesh geometry, I use operator redo properties panel to edit the result as shown in animation ...
Mikhail Rachinskiy's user avatar
3 votes
0 answers
115 views

blg module not being detected

i just started using bgl with blender scripting and it's giving this error "AttributeError: module 'bgl' has no attribute 'GL_MODELVIEW_MATRIX" i just checked on API documentation and it's supposed to ...
XIWEI ZHOU's user avatar
3 votes
0 answers
345 views

Rendering with OpenGL in Blender does not show the intended rendered image or animation

I am trying to render animations and images fast using the OpenGL feature in Blender but even though I want it to render a fully rendered image or animation, it only renders the solid image, or the ...
Yiuliana's user avatar
3 votes
0 answers
140 views

How do I use Bgl?

So my question is: I understand nothing about openGl api, that's super confuse to me, Where do I start? I did get that I need to append a callback to a draw handler and remove it to enable/disable my ...
StackOverflowToxicityVictim's user avatar
3 votes
1 answer
490 views

How to apply two different materials in Blender Internal on front faces and back faces, *while involving transparency*

Basically, I want to see through the transparent front faces to the opaque back faces. This isn't the same as flipping all normals and executing backface culling because I want the front faces to be ...
Dragoonstorm1's user avatar
3 votes
1 answer
94 views

Is possible to keyframe a mask textures as a factor for two other textures in realtime?

Is possible to keyframe a mask textures as a factor for two other textures in realtime? I have set up a blender internal materials node setup, basically two distinct materials mixed with a Mix RGB ...
Colm O Fathaigh's user avatar
3 votes
0 answers
3k views

How to correctly export from blender to opengl with a texture?

I am learning opengl from here and we are given an obj file for blender of crysis nanosuit. When I load this with opengl, it just loads fine. But then I imported the file to blender and added some ...
Tamim Addari's user avatar
3 votes
1 answer
2k views

Can I use Blender on Intel HD 530 dedicating an Nvidia GPU to Cycles?

I'm trying to specify the build for a new PC, my current one is 5 years old and starting to show its age. It's going to be a multi-use machine for Gaming, Virtualisation, Coding, Blender and possibly ...
Snospar's user avatar
  • 31
3 votes
0 answers
175 views

Could not Render Loaded Texture in 3D View by bgl module

I wrote below scripts to render texture already loaded by blender. However, no images are rendered on 3D View. This code works correctly when I run this script on blender 2.70. But, this script ...
nutti's user avatar
  • 459
3 votes
0 answers
405 views

.blend file size much larger after OpenGL Render

I am working on a detailed dialogue scene that is 600 mb. It is a very complex scene, with each part in single layers. I know that is a very big file size, but what my machine can handle it. What ...
user9626's user avatar
2 votes
0 answers
597 views

Dashed Lines GLSL Even Sizing

I'm working on a dashed line shader in a Blender add-on and my aim is to get all lines, regardless of length, to have the same sized dashes and dash spacing. GPU shaders are relatively new to me so I ...
Dan's user avatar
  • 83
2 votes
0 answers
205 views

Rendering depth buffer to texture using BGL fails on FBO drawing

I am writing a custom render engine for a level editor addon with GPU / bgl modules. I need to render a depth buffer to texture to later use in my shaders. I tried the way it is usually done with ...
D. Skarn's user avatar
  • 695
2 votes
0 answers
363 views

blender 2.8 glRectf() not there

I'm trying to convert a 2.79 add-on to 2.80. I'm running into a problem with openGL function glRectf(). The code that's currently in the add-on draws the menu as follows ...
Eternity Tomorrow's user avatar
2 votes
0 answers
454 views

How to draw custom, complicated ui element

Is it possible to add custom drawn elements to UI? e.g. access OpenGL and draw shapes from code, create some "canvas" in UI and draw on it. e.g. I'd like to create a complicated interface, something ...
Kowalski Paweł's user avatar
2 votes
0 answers
406 views

How do I set output video file name using python script?

I'm using a python script to render my scene using the OpenGL render to get more speed, as the quality I'm getting is enough for my purposes. I'm using this script: ...
valter's user avatar
  • 121
2 votes
0 answers
2k views

Custom Render Engine with bgl

I need to code my own Render Engine to do specific rendering passes. I don't want to build my own Blender app by coding in c/c++, so i try to make it work in Python. But i need OpenGL functions. ...
minitoine's user avatar
2 votes
0 answers
275 views

Limit selection to visible doesn't work properly

I made a realistic aborygen bust portrait and wanted to make an OpenGL viewport render of it. But when I zoom out from the object the wireframe of the eyeball is getting more and more visible. I want ...
Paul Gonet's user avatar
  • 33.4k
2 votes
0 answers
196 views

How to activate smoothing in bgl (opengl)?

All is in the title. I'm not able to make smoothing work, when drawing on a texture. Here is the code before the drawing: ...
lemon's user avatar
  • 60.5k
2 votes
0 answers
687 views

Display Images with bgl

I'm trying to display an image external to blender in the 3d view with python and bgl. Is it possible not to load an image in data.images and display it? The following code display an image from the ...
christopheS's user avatar
2 votes
0 answers
227 views

Modal operator to highlight

Ok. I'm a bit stuck on this. I accept defeat and am asking for advice. Here is a portion of the larger addon. The purpose of this snippet is to show the area user is working on. Basically, user inputs ...
kakts's user avatar
  • 21
2 votes
0 answers
152 views

Combining OpenGL and Blender Render (For Lightsabers)

I'm working on another lightsaber video. For the clashes this time, I've decided to utilize a lens flare pack by cfirwin3 here and it's super awesome. However, it appears that they only render ...
Anson Savage's user avatar
  • 3,412
2 votes
0 answers
272 views

opengl flat shading in blender

i'm trying to render my scene from a script. i've got some objects with materials that are Shadeless, and when rendering with the blender renderer in my script, they show up as expected: no shading. ...
shaheen's user avatar
  • 121
1 vote
0 answers
25 views

Blender and Active Stereo Display (3D Vision or similar)

I am new to Blender. I am drawn to it because of 1) its drawing capability and 2) its supposed support of stereoscopic display. I have an "Nvidia 3D Vision" system that works under either ...
oldnewbie's user avatar
1 vote
0 answers
219 views

Custom render engine - creating material previews with OpenGL?

I'm working on a custom render engine through a Python addon that uses the bgl module for most of its rendering. bl_use_preview ...
hayden0729's user avatar
1 vote
0 answers
617 views

Blender 3.4 won't run citing unsupported graphics card but 3.3 works

I have 3 computers I primarily run Blender on, 2 of which are giving me this error: ...
kodiakcreativity's user avatar
1 vote
0 answers
172 views

How can I make objects created with the GPU Module visible in the final render?

I used the code example for creating a triangle with custom shader from the official docs: ...
Squis's user avatar
  • 111

15 30 50 per page