Most voted "opengl" questions
This tag is used for issues related to the Opengl graphical API, used in computer graphics, for development of graphics applications, 3D environments, games, among others.
Learn more…66 questions
Sort by count of
-
8
votes1
answer67
views -
7
votes1
answer169
viewsHow to fix rigid "bodies" using Physx
How can I fix two rigid or dynamic "bodies" in a way that where one goes the other goes together as fixed as possible with Physx. I’m using the class PxFixedJoint but I didn’t like it. As you can…
-
7
votes1
answer522
viewsReflection in Opengl in C?
Hi, I’m with a college computer graphics project and I need help. I’m trying to create a rectangle that works like a mirror, for the objects of my scene in Opengl in C. I found some tutorials that…
openglasked 9 years ago Yuri Pires 579 -
5
votes1
answer445
viewsHow to apply/search for global/local transformations in Opengl
I am programming a simple Game Engine using the graphical API Opengl. But I have a problem that I can’t solve. The problem is that the transformations in world (world) do not work properly. The…
-
5
votes1
answer443
viewsPerformance comparison on Android: Canvas vs Opengl ES
Is there any comparative performance table, or some list with rules/guidelines, which tells me from which moment it pays to use Opengl ES on Android, instead of the Canvas + Activity pair configured…
-
5
votes0
answers417
viewsHow to move the object to where I click the mouse?
My problem is this: I have an Opengl program with Java. I made an animation for the drawing to move, increase and decrease in size, so far so good. When I went to create a function where the mouse…
-
4
votes2
answers5586
viewsHow to move, rotate or scale an Object on its local axis in Opengl?
Hello, I have a class HTransform which stores a matrix, position, orientation and scale of each object, this class is the base class of each Object or entity. I made one function to move the Object…
-
4
votes1
answer55032
viewsWhat is the difference and advantages of Opengl and Directx and when to use?
I have entered some sites and some speak well of Opengl for being cross-platform, others advocating the use of directx due to being microsoft and say it is easier to use, others talk to instead of…
-
4
votes1
answer306
viewsSend two triangles to a Vertex Shader. Opengl, C++, GLSL
I am learning in college graphic processing with Opengl at C++. We are using the GLFW and GLEW libraries. My program consists of creating two triangles in different parts of the window. I created an…
-
3
votes1
answer280
viewsDraw triangles with Opengl ES 2.0
I’m learning Opengl ES 2.0 for Android, and after some familiarization with the programming order I’m trying to draw 2 triangles on the screen, from 2 different objects. It’s something very simple,…
-
3
votes1
answer199
viewsError in transforming parametric equation. Opengl and glut. h
My question is this:: Let the parametric equations given below define a curve as a function of t R: x(t) = sin(t) + 1/2(half a) sin(5t) + 1/4(a quarter) cos(2,3t) y(t) = cos(t) + 1/2(half a) cos(5t)…
-
3
votes1
answer126
viewsTilting of an Opengl Crane
I implemented all the commands of a crane, only lacked the inclination of it around its axis on top, only that I can not reproduce this inclination, because it seems that I have to make…
openglasked 9 years ago Jonathas Moreira 43 -
2
votes1
answer608
viewsDifference between glFlush and glFinish
What is the practical difference between glFlush and glFinish commands in the context of Opengl ES 2.0? I have read the documentation of the two functions glFlush and glFinish, and I haven’t been…
openglasked 10 years ago carlosrafaelgn 4,769 -
2
votes0
answers149
viewsGame Development - Opengl, Directx
I am beginning to study Apis for graphic development and I have a pertinent question. When games are developed, Apis are necessarily used. My question is regarding the development of the same game…
-
2
votes0
answers121
viewsPerformance when drawing an image
Currently I use the Drawimage method of the Graphics class. However, the speed of drawing in the components is very slow. How can I optimize its use ? Libraries like Monogame or Opentk can perform…
-
2
votes1
answer849
viewsHow to find the vector corresponding to the angle in 3 dimensions?
Hello, I’m doing a 3-D game and I’m having trouble doing a 3-D raycasting. In this case, I want to do it for the camera, to see if there is no object between the camera and the player. For this I…
-
2
votes1
answer125
viewsWhy in Opengl do we need to transform all objects to render them?
I’m a beginner in Openggl and I’m having some difficulties to assimilate some concepts. I’m reading the book Mathematics for 3D Game Programming and Computer Graphics 3ª Ed., in the part where the…
openglasked 7 years, 8 months ago Michael Pacheco 1,657 -
2
votes1
answer95
viewsDepth Test is not working properly in Opengl
I’m having a problem with the Depth Test. I have a scene where it contains three objects. A plane a cube and a cylinder. In my Render I am doing for when rendering the cube it should disable the…
-
2
votes2
answers74
viewsHow do I know if a Shader is working?
Is my code right? I’m using Python and Pyglet, as I know if Shader is running, why did I get Shader’s code on the internet: import pyglet from pyglet.gl import * import pyshaders as ps t =…
-
1
votes3
answers474
viewsFscanf problem using code::Blocks and Opengl
Does anyone know if there are any restrictions on using fscanf in projects that use GLUT (Opengl)? I’m trying to do something simple... read a cloud of dots (x, y, z) from a text file, but the…
-
1
votes1
answer535
viewsAble to see through cubes - opengl - pyopengl
Context: I’m using pyopengl 3.0.2 and python 2.7 to make 3ds drawings in opengl, Ubuntu 14.04 as OS and intel hd 3000 as video board. Problem: When executing any cube in opengl the cube becomes…
-
1
votes1
answer690
viewsHow to draw a cube using openGL?
How to draw a cube using Opengl on Android?
-
1
votes1
answer1893
views -
1
votes0
answers234
viewsHow to integrate Opengl into Netbeans and start development?
I want to integrate the Opengl "library" into Netbeans IDE 8.0.2(current version). So, import it into a Netbeans class (command import or otherwise) and start development.…
openglasked 9 years, 5 months ago Allen Corradi 11 -
1
votes1
answer322
viewsOpengl: what is the basic "package" of shaders to create elements of a 3D scene
At the moment, I am beginning to work with the Shaders concept of the most current versions of Opengl. My basic reference are the tutorials of the open.Gl site. After having seen all the texts, and…
-
1
votes1
answer860
viewsHow to solve the problem of accentuation in the terminal?
I’m writing some strings on screen using the Opengl library and some of the words saved are accentuated words, example: república checa, where the exit ends up being: repblica checa has how to solve…
-
1
votes1
answer112
viewsKeyboard function does not work Pyopengl
Guys I have the following code, I wanted to make a simple event to close the application but my function Keyboard does not work, I searched elsewhere and found similar versions. If you can help me,…
-
1
votes0
answers176
viewsOpengl code encapsulation in C++ classes
I am currently starting a SDL / Opengl-based project, using the code as a basis of that Article. At the moment, I’m trying to find the best way to encapsulate the example’s Opengl code. My main…
-
1
votes2
answers106
viewsCapture a 3D click in openGL
I am doing a job in openGL. I wanted to click on a window and a drawing appear where it was clicked. As the scenario is in 3D wanted to know how I do to get the value of the coordinate in Z. Could…
-
1
votes0
answers172
viewsopenGL - Save Complex Rendering in Memory for Future Restore
I am developing a c++ application using opengl, but my knowledge in c++ and opengl is limited, especially in the latter. I need to create a board similar to the chess board, however for each…
-
1
votes0
answers112
viewsHelps port part of the Java code to C++
I am in a project and my 'responsibility' is to port the Java code to C++ that uses Opengl. I’ve done almost everything, but it doesn’t work. I think the problem is in this class that I could not…
-
1
votes2
answers494
viewsHow to calculate the Xmin,Xmax,Ymin,Ymax of an object?
I’m playing a simple game like "space Invaders" in Opengl and in the part of the collisions need to calculate the minimum and maximum X and Y values, but I still can’t figure out how to do this.…
-
1
votes0
answers65
viewsHow to use glVertexAttribPointer() function correctly for repeated attributes
Hello! I’m trying to render a cube all red, but did not want to specify the color for all vertices in order to save space. For example, we would do so in the traditional way: GLfloat vertices[] = {…
-
1
votes1
answer96
viewsError using Opengl GTX GLM library
I’m trying to compile in linux Ubuntu a project that uses the quaternions for rotation of 3D objects of the glui library, when I compile the code the system accuses the following error : Code says…
-
1
votes0
answers171
views3D cylinder with 2D lines in Opengl
How to calculate a matrix of 3D points that form a 3D cylinder and draw the cylinder using 2D lines (connecting the points of the Matrix and forming a mesh of the representation of the 3D object)?…
-
1
votes1
answer124
viewsHow to change the color of each rendered object in opengl C++ with shaders?
I’m learning now Vbos and Vaos, and I can’t draw objects of different colors, they are rendered with the same color. I tried to use Uniform but I couldn’t make it work, how can I do it? Fragment…
-
1
votes1
answer44
viewsProblem rendering multiple objects in Opengl Legacy (GLFW)
I am trying to render a circle and a rectangle, and both will have independent motion (Remake of Pong), but the problem is that the glTranslatef() of one is influencing the other, if one goes to the…
-
0
votes1
answer3045
viewsHow to develop a basic game using opengl that accepts keyboard commands
I tried to follow the source of a tutorial Metar Gearn Nanna, because I was interested in creating a game in opengl and c++, it could be something simple, with precarious validations, just to…
-
0
votes1
answer218
viewsMost suitable API - Opengl ES 2.0 x Canvas x Drawable
Good morning, I would like to make an application for Android to do the following: display the plan of a home on mobile, and the user touch a room on the screen, the color of the room change. I’m…
-
0
votes0
answers564
views -
0
votes1
answer258
viewsI’m using openGL on android, time to emulate error
I am testing an example found on the internet and at the time of execution gives me the following error on Logcat 03-23 09:43:22.286: E/androidruntime(1036): FATAL EXCEPTION: Glthread 72 03-23…
-
0
votes1
answer221
viewsHow to use two Opengl viewports using QT?
I’m trying to make two viewports in Qt but I’m not succeeding, below follows the code: 1. Method of drawing on canvas: void GLWidget::paintGL() { //Limpa buffer //glClear(GL_COLOR_BUFFER_BIT |…
-
0
votes1
answer50
viewsGlobal variables in GLSL?
Is there any way to declare variables so that they can be used in other files, with the same value as the original? I have tried using varying but it only works for the file .vsh and .fsh of the…
openglasked 8 years, 5 months ago CypherPotato 9,292 -
0
votes1
answer86
viewsTexture error in opengl
I’m trying to do some things in C using SDL and opengl, and at the time of drawing textures I can easily if you want only 1 object with texture but when trying to put a texture in the background and…
-
0
votes0
answers110
viewsVector in Opengl
Hello, I’m venturing into Opengl and so far I know the basics of creating figures. I need to create a bar number that goes from 1 to 64, the problem is I need to do this with a FOR. When the first…
-
0
votes1
answer21
viewsI can’t find the Glew graphical library
The GLEW library website is off the air, http://glew.sourceforge.net/ Does anyone know a site where I can download. I even found some but don’t have the files I want, which is bin, include and lib.…
-
0
votes1
answer790
viewsC++ - Movement on the X-axis (animation) - Opengl
I have been trying to make a simple animation on the x-axis, where I have a chair and I have it drawn by several cubes, and in all these cubes I intend to move the x-variable of them, so that they…
-
0
votes0
answers45
viewsconvert pixel to cm openGL
I need to change an object to where the mouse is clicked, I’m trying to do with a point to start. I already managed to capture the mouse position but it comes in pixel and I need this value in…
-
0
votes1
answer114
viewsglBindTexture does not apply texture in GL_QUADS
Problem: glBindTexture does not apply texture in "GL_QUADS" when using OPENGL in C++. My experience in c++, and mainly in OPENGL is limited, however, I based in this code. I made some few…
-
0
votes0
answers117
viewsI am using c++ with the openGL library
I’m using c++ with the openGL library, I’m having a little trouble creating a method. I need to create some buildings randomly, but to not create one inside the other I need to compare the 4 points…