Questions tagged [OpenGL] (305)

2
answers

How is it possible to set parameters, namely, the texture separately to each triangle?

I have a model in which separately stored the coordinates of the vertices and the index buffer with ID textures, the model is not divided into separate parts according to the texture. And the question is how to map a texture on each triangle ? Using texture Atlas will not work, because the texture of different sizes. Code...
alysson_Bartoletti asked April 18th 20 at 12:59
1
answer

PyOpenGL GLUT does not install, why?

PyOpenGL installed via the terminal, libraries are visible, the import of modules takes place without problems, but the following code from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * import sys glutInit() glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB) glutInitWindowSize(300, 300) glutInitWindowPosit...
faye83 asked April 16th 20 at 09:56
0
answer

Why frame translucent around the edges?

I do not understand how to play with an alpha channel, translucent frame on the top and bottom code: void Scene1::ShowRam() { glEnable(GL_ALPHA_TEST); glEnable(GL_BLEND); glAlphaFunc(GL_GEQUAL, 0.0); /* glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glBlendFunc(GL_SRC_ALPHA, GL_ONE); glAlphaFunc(GL_GREATER, 0.0 f);...
eleanora_Halvorson70 asked April 8th 20 at 17:21
1
answer

SwapBuffers/ glXSwapBuffers consumes exactly 50% of the time of the application work(load unimportant),what could be the reason?

here's the output of strace and ltrace strace % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 47.21 0.193640 21 9088 ioctl 15.72 0.064488 11 5500 3806 recvmsg 9.47 0.038823 14 2654 poll 8.50 0.034849 18 1891 writev 7.95 0.032610 13 2412 write 6.98 0.02...
Adam_Lynch asked April 8th 20 at 10:08
0
answer

How to make libGLESv2 with GLFW or SDL2?

I use GLFW and SDL2 (tried two options, I thought a joint in them) to draw the Windows and trying to get libGLESv2 to work with the gl* functions (shaders and other tinsel). All libs porubay in the form of libraries. The code the following Angle: glClearColor(0.0, 1.0, 0.0, 1.0); // green 1 glClear(0x00000100 | 0x00004000)...
houston.Glover65 asked April 7th 20 at 16:44
2
answers

How to draw a star openGL?

You need to draw just such a star: As I understand it, you first need to count the cycles at points on a generating circle (since the peaks at 10, n=10), and then somehow to unite them. float x = R * cos(2 * 3.14*i / n); float y = R * sin(2 * 3.14*i / n); But so far the maximum that I could draw is: Connect the dots has n...
Cassidy50 asked April 7th 20 at 11:00
4
answers

C++ OpenGL implementation of physics where to start?

My knowledge in this area is extremely small, and yet the only conflict to which I thought, this collision of balls, but somehow not interested, I want to do on OpenGL some mini games, simulation, etc., but can't figure out how to work with physics ( I was on collision ), and I can't even imagine how to make it, and even so...
Asia.Lowe asked April 7th 20 at 09:13
2
answers

OpenGL and C++. How to sort the polygons?

I have a hobby, I write the engine for the game in C++ and OpenGL. There are several hundred polygons in the scene. I learned how to determine the collision with the polygons. Could also sort the polygons in groups, to check the collision first with the group, and then with each polygon. But it's not the best option. If BSP...
Maymie.Roberts97 asked April 4th 20 at 14:13
3
answers

Is it possible in linux server to use OpenGL to draw on screen directly?

Welcome! For experiments installed ubuntu server 19.10 (and any other distro) want no of X to use OpenGL directly (in principle) that would be displayed. Tell me, what do I need? glxinfo gives"unable to open display" Prompt, please, where to dig at least... Yet in complete confusion.
Bryana_West78 asked April 4th 20 at 00:45
1
answer

How to learn OpenGL?

The issue arose because of differences between versions, I read that the new OpenGL is too different from the old. I don't know what the distinction is well understood that you can write your own code for some stages of the graphics pipeline. So it is better to the beginner, just look for information on the new OpenGL, or...
treva47 asked April 4th 20 at 00:04