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

1
vote
4answers
153 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
72 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
62 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 ...
1
vote
1answer
175 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
84 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
3answers
89 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; ...
0
votes
0answers
29 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
42 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 ...
0
votes
2answers
132 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 ...
3
votes
0answers
78 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 ...
0
votes
1answer
91 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 ...
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 ...
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 ...
0
votes
0answers
61 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 ...
0
votes
1answer
77 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 ...
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. ...
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); ...
2
votes
1answer
52 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 ...
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
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
2answers
64 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
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 ...
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
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), ...
0
votes
1answer
61 views

Transparency in opengl - texture with alpha, color from background [duplicate]

I have to draw texture with transparent areas on square. But I don't want this transparencies to take color from this polygon, but from the background. Do you have any good tutorial to achieve it? ...
0
votes
1answer
69 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 ...
2
votes
1answer
80 views

How to make OpenGL rendering resolution independent from its window context resolution?

Can the rendering resolution of OpenGL and the window size (at least for the Windows OS) be separated? For example, I may only want to render at 400x300 resolution, but I want my window size to be ...
0
votes
1answer
66 views

Correct GL settings to mix 2D and 3D rendering

I'm programming a 3D game engine with 2D GUI. The GUI objects have partially transparent textures and the transparency works more or less. The sky color is rendered in transparent areas of the ...
1
vote
0answers
43 views

Alternative to z-fail

This question is less technical but maybe someone had similar thoughts. I am wondering if the following algorithm still harms the stencil shadow patent? It is concerned with the invention of a "new ...
1
vote
1answer
66 views

How to use LWJGL Vertex Buffer Objects?

I have been learning how to make a game with LWJGL for a while now by following YouTube tutorials online but I've recently been having a problem understanding Vertex Buffer Objects. I've looked at ...
1
vote
1answer
53 views

DirectX Bullet Tracer Effect

I'm wondering if anyone knows some common and efficient ways to do a fast tracer for an instant bullet. I've seen people speak on forums of using primitive lines with DirectX, but I doubt this ...
2
votes
1answer
126 views

3D Camera Rotation

Please, forgive me, but I need help and I've been stuck on this for a few weeks now, I'm making no progress and everywhere I go and I see a different answer, everything I try doesn't work. I've had ...
0
votes
1answer
57 views

OpenGL drawing, breaking down triangles

if I want to use no textures in a game (i.e png's), would I just break down my drawing into triangles and combine them the way I want? I found this in Google Images.
1
vote
0answers
269 views

Cascaded shadowmapping problem with split distances

I'm doing cascaded shadow mapping and I have problem. From the cameras position, the splits are [camPos, 6], [camPos+6, 12], [camPos+12, 18] and [camPos+18, 100]. The "mSplitDistance" variable is the ...
3
votes
2answers
191 views

Why does my machine render OpenGL using my onboard chipset instead of my graphics card?

I'm following an OpenGL tutorial series at opengl-tutorial.org, but have run into a problem: The following lines: glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); ...
1
vote
0answers
53 views

3D Camera Y-Axis wrong angle

I am trying to build a camera class, though I am running into a problem. When I move the camera above/below, and try to move towards the ground, I am moved off in what seems to be about 45 degrees in ...
1
vote
1answer
57 views

How to create more vertexes from within a shader in OpenGL?

when rendering voxels in octrees, the only information necessary is the current octree-level, -position and colour/texture. But one has to send eight vertices to the rendering pipeline in order to ...
1
vote
1answer
45 views

Is there a way to use other fonts, besides the default ones in OpenGLUT?

I'm using OpenGLUT functions like glutBitmapString to render sentences and words in a game. However, there is a limited set of fonts to use and I need some bigger size fonts. Is there a way to add new ...
1
vote
1answer
70 views

OpenGL - Disable Anti Alias

I can't find anything on how to hint to the driver to disable any antialias. I'm using a very minimal passthrough setup yet I notice my driver is still doing what looks like MSAA. I want to disable ...
0
votes
1answer
55 views

OpenGL 3.3: render to framebuffer w/o depth attachment

I want to render my scene to a framebuffer and store the RGBA values in a texture. For this, I attach a texture to GL_COLOR_ATTACHMENT0. When I define a GL_DEPTH_ATTACHMENT texture as well, everything ...
0
votes
1answer
45 views

Imageeffects: No need for Framebuffer? Just use Textures and Shaders?

I am doing simple Image Effects, and always i see in examples, that people are binding textures to framebuffers. Why can't i just use textures? So the process would be. 1) Input Texture 2) Shader: ...
1
vote
1answer
77 views

Why is the light following my camera around?

I have implemented a simple Phong shader without specular highlights for now (just ambient + diffuse components) The problem however, is that the calculations seem to be done in camera space; as I ...
0
votes
0answers
33 views

Why isn't my texture changing after calling display list?

I can't bind another texture after calling glCallList. It does nothing. However if I change texture inside the list, it works.
0
votes
1answer
59 views

Distorted LookAt When Looking Up or Down?

I have a weird problem and I have no idea what's going on with it. Recently started doing some OpenGL programming, going pretty well, hit some rough spots but worked my way through them and otherwise ...
1
vote
0answers
109 views

opengl volumetric billboard implementation: general idea + geometry shader

A while ago I decided to implement the volumetric billboards technique in my university project (C++ & OpenGL 4.3). I passed the subject but failed to implement the mentioned technique. I'd like ...
0
votes
1answer
62 views

How do I follow this glsl1.2 + lights + shadows tutorial?

I am following this great tutorial but I have many questions. Let's see if I understand the basic idea. 1. I must create the same number of FBOs that lights (maximum 8). 2. I must create the same ...
3
votes
2answers
67 views

GLSL: sampler2D fallback to constant color?

So I have the following situation: I'm sharing a blinn shader accross many meshes. Some meshes have specular & normal maps, others do not. I'd like to, without making the shader code too ...