opengl

Display 3D point using opengl

余生长醉 提交于 2021-01-28 01:14:18
问题 Simply, I am just trying to show a 3d point but nothing show on! How to show it? what is wrong in the code below, anybody can help? init: void init(void) { glClearColor(0.0, 0.0, 0.0, 0.0); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glOrtho(-200, 0.0, -50, 100, 70, 300); } display: void display(void) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glColor3f(1.0, 1.0, 1.0); glPointSize(2); glBegin(GL_POINTS); glVertex3f(-120.0, 25.0, 0.0)

C# Font display OpenGL

浪尽此生 提交于 2021-01-27 17:13:36
问题 I am developing a 2D CAD application by using Tao framework in windows. I would like to use the fonts from windows libraries to display the drawing information. In addition to that I would like to rotate scale my text. With Bitmap fonts I could not do this. I went through OpenGL font survey [http://www.opengl.org/archives/resources/features/fontsurvey/] but most of them are C++ based APIs. Could you guide me what are the available solutions in C#? 回答1: For 3D I have followed the examples I

How to flip only one axis of transformation matrix?

≡放荡痞女 提交于 2021-01-27 08:40:14
问题 I have a 4x4 transformation matrix. However, after trying out the transformation I noticed that movement and rotation of the Y axis is going the opposite way. The rest is correct. I got this matrix from some other API so probably it is the difference of coordinate system. So, how can I flip an axis of transformation matrix? If only translation I can add minus sign on the Y translation, but I have no idea about opposite rotation of only one axis since all the rotation is being represented in

How to flip only one axis of transformation matrix?

烂漫一生 提交于 2021-01-27 08:40:06
问题 I have a 4x4 transformation matrix. However, after trying out the transformation I noticed that movement and rotation of the Y axis is going the opposite way. The rest is correct. I got this matrix from some other API so probably it is the difference of coordinate system. So, how can I flip an axis of transformation matrix? If only translation I can add minus sign on the Y translation, but I have no idea about opposite rotation of only one axis since all the rotation is being represented in

How do I add a virtual GPU into Qemu?

馋奶兔 提交于 2021-01-27 07:23:48
问题 I was wondering how to go about adding a virtual GPU into Qemu? I have been told it involves adding a new graphics output module that uses OpenGL? 回答1: You probably refer to Create virtual hardware, kernel, qemu for Android Emulator in order to produce OpenGL graphics The very first thing I suggest you do is reading the source code how commands to the virtual graphics adaptors already implemented are turned into graphical output. Then you should rewrite this, to use OpenGL commands instead.

OpenGl blurring

倖福魔咒の 提交于 2021-01-27 07:15:03
问题 I'm using libgdx and want to make a common Gaussian blur post-processing effect. Following this guide I faced some issues with texture filtering. Here the images: actual image: blurred with radius = 1: blurred with radius = 5: In the simplest case, I just have a transparent frame buffer object with some objects rendered to it. Then I need to apply some shader effects to this, basically only blur and then render the result to the screen. I also want to adjust the blur radius, but if I set the

OpenGl blurring

亡梦爱人 提交于 2021-01-27 07:14:08
问题 I'm using libgdx and want to make a common Gaussian blur post-processing effect. Following this guide I faced some issues with texture filtering. Here the images: actual image: blurred with radius = 1: blurred with radius = 5: In the simplest case, I just have a transparent frame buffer object with some objects rendered to it. Then I need to apply some shader effects to this, basically only blur and then render the result to the screen. I also want to adjust the blur radius, but if I set the

How to use different indices for tex coords array and vertex array using glDrawElements

删除回忆录丶 提交于 2021-01-27 07:10:00
问题 I've been trying to use glDrawElements in my tile-based 2D OpenGL game. However when I draw the tiles, the tex coords may be different for different faces at the same vertex: For example, here the texcoords will be different for the 2 quads at the common vertex: ___| ___|___ |___ |___ The problem is that glDrawElements takes only one index array and so it appears that I can only use one tex coord per vertex. Is there any way to overcome this limitation? 回答1: Short answer: You don't. You

How to use different indices for tex coords array and vertex array using glDrawElements

荒凉一梦 提交于 2021-01-27 07:09:43
问题 I've been trying to use glDrawElements in my tile-based 2D OpenGL game. However when I draw the tiles, the tex coords may be different for different faces at the same vertex: For example, here the texcoords will be different for the 2 quads at the common vertex: ___| ___|___ |___ |___ The problem is that glDrawElements takes only one index array and so it appears that I can only use one tex coord per vertex. Is there any way to overcome this limitation? 回答1: Short answer: You don't. You

freeglut (./light): ERROR: Internal error <FBConfig with necessary capabilities not found> in function fgOpenWindow

江枫思渺然 提交于 2021-01-27 05:36:48
问题 I installed the OpenGL in Linux server (Ubuntu16.04) without a graphical interface, install command below: apt-get install build-essential libgl1-mesa-dev libglu1-mesa-dev apt-get install freeglut3-dev libglew1.10 libglew-dev libgl1-mesa-glx libxmu-dev apt-get install libglew-dev libsdl2-dev libsdl2-image-dev libglm-dev libfreetype6-dev apt-get install mesa-utils now, I compile light.c by gcc light.c -o light -lGL -lglut . I want to display it in my Windows mechine by XMing server. code: