OpenGL is a graphics standard and API which targets the desktop and workstation markets. It is designed to be easy to accelerate with dedicated computer hardware, and hence most implementations give greatly improved performance over traditional software rendering. Currently, OpenGL is used for ...

learn more… | top users | synonyms

0
votes
2answers
39 views

Why would you use software rendering over hardware rendering, today?

As opposed to CPU or software rendering I assume? Wouldn't generally all current rendering be GPU based, seeing as you would be using OpenGL or Direct X? Could someone give me some info here, can't ...
0
votes
1answer
61 views

OpenGL - How can I make the edges of this textured circle smoother?

I'm building a game and I've applied a certain texture (RAW file) to a circle (GL_POLYGON) in OpenGL. It loads correctly, with the right size and all, but the edges seem a bit jagged and I would ...
-1
votes
1answer
58 views

C++ SDL2 OpenGL Rendering Problems [on hold]

I just started with SDL2 and OpenGL in C++ and I am having some trouble rendering a triangle. The triangle I want to draw renders on the screen, but it is black. I tried added some shaders, but they ...
0
votes
3answers
86 views

OpenGL: glRotatef cause performance drop while rotating -x and -y

I have made a rotating cube and I got some performance drops while using two glRotatef calls. So basically this code is giving me 80FPS: //code 1 GLrotate_x += 0.4f; GLrotate_y += 0.4f; ...
1
vote
1answer
169 views

How can I implement beam effects like these?

I am interested in the techniques I could use to create the following effects: Can I accomplish this with a particle system or a series of texture quads, or what? You can see this effects in ...
0
votes
1answer
74 views

translate-scroll repeated 2d texture using opengl shader

I managed to implement an infinite 2d texture scrolling using the following shader. btw I'm using cocos2d-x 2.2.1. The vertex shader: attribute vec4 a_position; attribute vec2 a_texCoord; #ifdef ...
1
vote
1answer
43 views

glOrtho setting view

I am duplicating this thread from stackoverflow, please remove it if that is not allowed. I'm completely new in OpenGL. I have this problem: I have quite a complicated scene, and I am looking at it ...
0
votes
1answer
81 views

Render scene twice in OpenGL, overlay second render with tranparency

Is it possible to render two scenes (same scene with different setups) without any alpha, and after that is done just overlay the result from the second render on top of the first layer with a static ...
0
votes
2answers
128 views

Do Java and Actionscript use OpenGL?

As far as I know there are only 3 base graphics libraries on Windows, the GDI, OpenGL and DirectX, is that correct, so that means that Java, Actionscript and all language use one of these 3 libraries ...
1
vote
1answer
69 views

Workaround the flip queue (AKA pre-rendered frames) in OpenGL?

It appears that some drivers implement a "flip queue" such that, even with vsync enabled, the first few calls to swap buffers return immediately (queuing those frames for later use). It is only after ...
2
votes
1answer
101 views

glDeleteTextures - release data, but keep the texture ID?

In OpenGL, is it possible to release texture data, but keep the same texture id? I want to unload textures when they aren't needed, but load them again later when they are. There are a lot of objects ...
0
votes
3answers
167 views

OpenGL - How to draw a transition of two textures on one quad?

I know when drawing a rectangle, if we select red and draw two vertices, and then select yellow and draw the other two vertices, the entire rectangle will show a nice transition of color between those ...
0
votes
0answers
26 views

Using multiple uniform blocks in OpenGL

I'm using OpenGL with JOGL and want to use two unfirorm blocks in my vertex and pixel shaders. The following GLSL-Code shows the definitions:- uniform perObject { Material uMaterial; mat4 ...
0
votes
0answers
41 views

Why do I get different performance in different build modes of Visual Studio? [on hold]

I am currently diving into OpenGL 3 using SharpGL ( WPF Version ). There is something kinda interesting anomaly. When I run my game in "Release mode" I get 200 frames per second. However, when I am ...
3
votes
0answers
77 views

OpenGL Shadow Mapping from directional light

I have read this tutorial: http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-16-shadow-mapping/ I wonder, is this the current best technique for generating shadows in an arbitrary 3D ...
1
vote
1answer
387 views

How do I apply 2 rotations about different points to a single primitive using OpenGL

I'm working on a 2D top-down shooter game that has a rotation feature like Realm Of The Mad God such that if you press e the camera rotates around the character in a clockwise direction and q rotates ...
0
votes
2answers
132 views

Can I use multiple OpenGL version together

I want to use GLSL but keep my current OpenGL 1.1 setup. The thing is that can I use OpenGL 2.0 shaders on OpenGL 1.1 renders?
1
vote
1answer
195 views

Xbox Controller Not Connecting in Monogame Project

I have recently been playing around with the support of the wired XBox 360 controller in Windows development. I am developing in C# in Visual Studio 2012. I have created 2 projects. The first ...
1
vote
1answer
293 views

Fog shader camera problem

I have some difficulties with my vertex-fragment fog shader in Unity. I have a good visual result but the problem is that the gradient is based on the camera's position, it moves as the camera moves. ...
0
votes
1answer
88 views

OpenGL: How to improve the performance of rendering context

I have written a benchmark program that compares the performance of OpenGL and DirectX libraries. The problem is that OpenGL gets much lower performance than Direct3D. At the end the program generates ...
2
votes
2answers
770 views

FBX Importer - Texture Name

I have a problem with the FBX SDK. I read in the data for the vertex position and the uv coordinates. It works fine, but now I want to read for each polygon to which texture it belongs, so that I can ...
0
votes
0answers
27 views

Get closed ring around a mesh passing through given points

Suppose I've some points on a mesh (2+) that can be anywhere on the mesh, suppose for example these (ignore the small points, just consider the sphere): http://i.stack.imgur.com/nDzW3.png (sorry ...
3
votes
2answers
82 views

Blending semi-transparent images while not stacking their alphas

In libgdx/OpenGL ES I want to render multiple semitransparent textures while keeping the alpha still semi transparent. For example If I render a 0.5 alpha circle on top of another 0.5 alpha circle, ...
2
votes
1answer
62 views

Possible to create transparency shader which doesn't stack alpha values

The image above best demonstrates what I'm trying to achieve. It's a transparent shader for objects, but wherever the objects with this shader intersect they don't add together but simply merge with ...
6
votes
1answer
295 views

OpenGL ES object rotation around z axis

I have an object on my screen which is presented rotated and panned, But i have 2 problems regarding the z axis rotations. It's a bit tricky to explain so i uploaded 2 videos to describe each problem. ...
10
votes
1answer
7k views

Making a HUD/GUI with OpenGL (LWJGL)

I'm at the stage in my game development where I need to make a HUD or GUI. I've never gotten to this part, so I don't know how its done. I tried rendering a simple quad at a fixed position on the ...
4
votes
0answers
107 views

How can I implement real-time mutual object reflection?

So, given a scene like this (cubemap skybox with "real" spheres) Everything looks great, except for the fact that the spheres don't reflect each other. What's a good way to go about this? The ...
0
votes
2answers
52 views

Clamping large content to smaller area

I'm using OpenGL (with LWJGL) in Java, but the question is language independent. I have some region (a rectangle for simplicity), and, let's say, a big tiled map which I want to show in this area. ...
0
votes
0answers
57 views

Irrlicht - Camera rotation like FPS

I'm constructing a game in OpenGL and initially I started using GLUT for the general purposes. However, later on I bumped over the problem of 3D model import and, after so many time trying to import ...
2
votes
1answer
51 views

How to store an array into a texture and sampler the texture in vertex shader correctly?

I'm a new learner about OpenGL and GLSL. I'm coding a program in which i wanna store a group of datas in a texture and get the data by sampling the texture in vertex shader. Then i want to set the ...
0
votes
1answer
76 views

Why do I have to switch T(v) texture coordinates while importing OpenGL to Direct3D?

I am importing my code from OpenGL to Direct3D. My D3DTS_PROJECTION uses D3DXMatrixPerspectiveFovRH, and my D3DTS_VIEW uses D3DXMatrixLookAtRH to set a view equal to OpenGL's view. My question is why ...
2
votes
1answer
56 views

OpenGL: missing GL_SPECULAR light on the texture

I'am missing specular lighting on the texture. I have #include <GL/glext.h> in the project, so basically I used glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL_EXT, GL_SEPARATE_SPECULAR_COLOR_EXT); ...
3
votes
2answers
118 views

Efficient way to output/display debugging data in a window

I'm writing a program in Visual Studio, C++ with OpenGL and for the first time, I think it will be beneficial to see some live data on top of my display/render window. To give some scope, I'm ...
3
votes
1answer
523 views

Shadow mapping does not work correctly using GLSL shaders

I'm a beginner in shadow mapping. I have in my scene two meshes : a cube and a floor. The scene is lighted by a single point light. Here's for the following display the light properties : ...
0
votes
2answers
140 views

Z-order with Alpha blending in a 3D world

I'm working on a game in a 3D world with 2D sprites only (like Don't Starve game). (OpenGL ES2 with C++) Currently, I'm ordering elements back to front before drawing them without batch (so 1 element ...
1
vote
1answer
45 views

How to save am image of a screen using JOGL

Hope this is a better place to ask things like this. I have a 2D scene with some sprites drawn in Swing frame. I need them to be saved as an image. The problem is every tutorial I found seem to be ...
0
votes
0answers
27 views

vertices seem to render with the wrong shader program [closed]

currently, when rendering vertices there seems to be a bug in my application that results in these vertices not necessarily being sent through the pipeline of the active shader-program. Here is a ...
1
vote
1answer
114 views

making a cone roof look hollow

How can I make a cone roof look hollow when viewed from underneath? I am trying to create a cone shaped roof, but the cone does not look much like a roof, the edges of the roof seem to blend with ...
2
votes
2answers
112 views

How can I determine the pixels covered by a transformed triangle (without drawing it)?

I have three points that form a triangle in a 3D scene. I want to apply an arbitrary rotation/translation transformation to this polygon and later check in which pixels of an image they would be ...
1
vote
2answers
63 views

Loaded OBJ Model Will Not Display in OpenGL / C++ Project

I have been experimenting with new effects in game development. The programs I have written have been using generic shapes for the visuals. I wanted to test the effects on something a bit more ...
1
vote
2answers
3k views

FBO Depth Buffer not working

I'm trying to get the depth buffer for my 2D game working by offsetting the z value of the rectangles. For some reason, my depth buffer is coming back empty. The value is always 0. I'm assuiming there ...
0
votes
0answers
4 views

Code::Blocks undefined reference to “*” [migrated]

Like the title says, I'm getting multiple build errors using C::B, all are saying undefined reference to '*'. I'm trying to build a program using OpenGL, GLFW, and GLEW. The top three things that it ...
1
vote
1answer
64 views

OpenGL and atlas

I'm trying to draw element from a texture atlas with OpenGL ES 2. Currently, I'm drawing my elements using something like that in the shader: uniform mat4 uCamera; uniform mat4 uModel; attribute ...
1
vote
1answer
31 views

Correcting Lighting in Stencil Reflections

I'm just playing around with OpenGL seeing how different methods of making shadows and reflections work. I've been following this tutorial which describes using GLUT_STENCIL's and MASK's to create a ...
0
votes
1answer
68 views

Getting the Ray position from View and Projection Matrix

I'm having some trouble calculating the direction and position of the ray from my matrices. I have tried some things such as: private Vec3 getPick(Mat4 projection, Mat4 view) { Mat4 ...
1
vote
1answer
26 views

Having trouble setting color in fragment shader

For some reason, the color isn't applying to the object. Here's my fragment shader code. There's probably something obvious wrong with it that i'm not seeing. #version 330 core out vec3 Color; ...
0
votes
0answers
37 views

Render monkey error C0118 [closed]

i'm find Render monkey to work and practice in openGL es2.0 shader language. as i start the program i add a new default opengl es 2.0 in effect workspace but when it opens i see lots of error in ...
0
votes
0answers
69 views

Moving objects smoothly, bad perfomance

I just finished developing my mini-game on Android and I got some questions about perfomance and generally "how to": If I have 25+ objects on the creeen (just a polygon with 7-8 angles) its starts to ...
-1
votes
0answers
24 views

transparency in textures - color from background [duplicate]

I am making new thread as old one was closed. Transparency in opengl - texture with alpha, color from background As you see the problem wasn't solved as texture takes color from polygon that I am ...
0
votes
1answer
75 views

How does OpenGL determine different outputs with shaders?

Lets say I have this GLSL code: #version 330 out vec4 outputColor; void main() { float lerpValue = gl_FragCoord.y / 500.0f; outputColor = mix(vec4(1.0f, 1.0f, 1.0f, 1.0f), ...