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

-3
votes
1answer
31 views

OpenGL directional light creating black spots

I probably ought to start by saying that I suspect the problem is that one of my vectors is not in the correct "space", but I don't know for sure. I am having a strange problem with a directional ...
-1
votes
0answers
46 views

Render To Texture Using OpenGL is not working but normal rendering works just fine [on hold]

DISCLAIMER: THERE IS A BIT OF CODE BECAUSE I ALREADY KNEW THE DIFFERENT QUESTIONS PEOPLE WOULD ASK example: "how did you make your shader attachments" "what was your order of rendering to the ...
0
votes
0answers
18 views

Should I use SDL_Surface or SDL_Window? [on hold]

I am making an OpenGL game basically. I have just started out on the territory. I have seen tutorials which use an SDL_Surface for rendering to while other tutorials use SDL_Window and obtain an ...
-1
votes
0answers
23 views

3D mobile game development [on hold]

I am not a developer or programmer and, I am planning an educative project that will involve having students to develop a cross-platform, 3D mobile game, similar to the SimCity concept. I need to ...
-2
votes
0answers
35 views

Drawing a line using openGL does not work [on hold]

I am a beginner in OpenGL and tried to write my first program to draw some points and a line. I can see that the window opens with white background but no line is drawn. I was expecting to see red ...
-1
votes
1answer
329 views

Using Shader causes triangle to disappear

The following is my rendering code. Private Sub GameRender() GL.Clear(ClearBufferMask.ColorBufferBit + ClearBufferMask.DepthBufferBit) GL.ClearColor(Color.SkyBlue) ...
1
vote
0answers
34 views

OpenGL - Cascaded shadow mapping - Texture lookup

I'm trying to implement cascaded shadow mapping in my engine, but I'm somewhat stuck at the last step. For testing purposes I've made sure all cascades encompass my entire scene. The result is ...
2
votes
1answer
140 views

Mouse Speed in GLUT and OpenGL?

I would like to simulate a point that moves in 2D. The input should be the speed of the mouse, so the new position will be computed as following new_position = old_position + ...
0
votes
1answer
92 views

Orthographic Projection Issue

I have a problem with my Ortho Matrix. The engine uses the perspective projection fine but for some reason the Ortho matrix is messed up. (See screenshots below). Can anyone understand what is ...
1
vote
2answers
144 views

How to detect graphics API at runtime with SDL2?

Using SDL2, is there a way to determine at runtime whether the application is using OpenGL, OpenGLES, or DirectX? EDIT: If there is a way to figure it out without using the SDL2 API, I'm willing to ...
0
votes
1answer
87 views

WebGL wrong scaling of rectangle

I'm working with this tutorial http://www.html5rocks.com/en/tutorials/webgl/webgl_transforms/ and my result is, that the rectangle moves in the direction of it's scaling values, and also scales at ...
3
votes
1answer
737 views

exporting bind and keyframe bone poses from blender to use in OpenGL

EDIT: I decided to reformulate the question in much simpler terms to see if someone can give me a hand with this. Basically, I'm exporting meshes, skeletons and actions from blender into an engine ...
5
votes
2answers
697 views

atmospheric scattering and sky geometry

I'm trying to implement an atmospheric scattering in my graphics (game) engine based on the gpu gems article: link. An example implementation from that article uses a skydome. My scene is different - ...
1
vote
0answers
390 views

How do I mix 3D skeletal animations?

I'm trying to create a 3D-model skeletal animation system for C++/Open GL. I would like to be able to mix animations by allowing animations to only affect specific bones. My game has ride-able ...
0
votes
0answers
548 views

How to export all animation to Milkshape 3D using WOW Model Viewer?

I downloaded the latest wow model viewer and the milkshape 3D viewer hoping to get some WoW models for prototyping. So far I managed to export a single character with texture and a single animation. ...
0
votes
1answer
38 views

Doing a turntable camera animation on a world matrix rather than view matrix

I have a camera class that contains a 4x4 view matrix as a member variable. Most of my camera controls work fine when doing them directly on the view matrix. In an attempt to unify all of my scene ...
1
vote
1answer
150 views

Random lines away from images in java2d opengl game

Working on a java game that uses some pngs images for icons/textures. A few images ( fewer than 5, out of dozens ) are showing some odd parallel "artifact" lines. They move with the image, are ...
7
votes
1answer
140 views

Slow uniform array in shader causing FPS drop

I'm trying to use an uniform array of matrices in my compute shader. However, it's really slow. I've narrowed it down to this lines of code: uniform mat4 someMatrixArray[64]; ... vec4 result = ...
3
votes
1answer
41 views

glDrawElements vs glDrawArrays for polygons that do not reuse vertices

Is it better to use glDrawElements or glDrawArrays when not reusing vertices? There must be some difference, otherwise people would always use glDrawElements? I suppose the question could be ...
1
vote
1answer
61 views

How to implement camera pan like in Maya?

I am trying to implement camera pan like the one in Maya. I've got it almost working. The problem is that the mouse cursor is moving faster than the 3d mesh (in fact I am moving the camera but I ...
-1
votes
1answer
389 views

LWJGL font not rendering, even with depth test and texture_2D

I'm running into an odd little problem here. I'm attempting to render a basic console over my LWJGL-based application, which should be easy enough through a decorator pattern of renderers (as in, one ...
1
vote
1answer
195 views

Calculating shadowmap coordinates for cubemap in shading pass?

I'm trying to implement shadow mapping with cube maps. I believe I've done the first stage by filling the cube map, but for the final shading pass I am unsure how to exactly calculate the cubemap ...
12
votes
1answer
914 views

OpenGL - white edges on cubes

In a minecraft-like game I'm making, I get white edges on my cubes: It is much more noticeable in darker textures. The textures are being setup like this: glTexParameteri(GL_TEXTURE_2D, ...
0
votes
1answer
52 views

NiftyGUI - Text isn't rendering

I am trying to create a gui with nifty on top of lwjgl. I've already had some problems during the Nifty setup, however now Nifty is set up and running correctly but for text rendering. Here is my xml ...
0
votes
2answers
145 views

How many normals are needed to have a smooth surface?

I'm trying to draw a smooth cloth surface and I have a per-pixel shader. I expect to have a smooth surface but it's not the case. I think the problem comes from my normals. The image show the surface ...
4
votes
2answers
91 views

Shader | Special Effect - Unit selection

I would like to know how the shaders used to show which unit is selected are made. Here is an image to illustrate. How the merge effect of the blue circles can be achieved ? I didn't found any ...
0
votes
1answer
34 views

How can I prevent the viewport from stretching/distorting?

Basically, I want to know how I can remove distortion or stretching of the rendered image when the viewport/window size changes. The following images exemplify the distortion/stretching I'm talking ...
2
votes
1answer
113 views

Use different values for Depth Test and Depth Write in OpenGL

Is there a way to use something similar to PolygonOffset to make a depth test more permissive (move fragment depth towards eye) but still write the original depth value to the depth buffer? The only ...
-5
votes
1answer
62 views

Slot machine effect on c++ [closed]

Am making some slot machine game in c++ and sfml for fun. Wanna have an idea to make the REEL effect wheen spin button is pressed.
0
votes
0answers
23 views

GLSL 150 (or upper) per pixel lighting base code

I'm looking for a working example of smooth per pixel shading for one directional light I've seen this example http://www.opengl.org/sdk/docs/tutorials/ClockworkCoders/lighting.php but its old GLSL ...
1
vote
1answer
65 views

Does scaling affect performance in OpenGL? [closed]

I've never been able to understand the best practice in this context. I usually want to ship my game with as minimum size as possible. So whereever possible, I try to use scaling of my graphics. Let's ...
1
vote
1answer
109 views

Game development for high-school with C++ and OpenGL [closed]

I've been teaching high-school students (12th grade) game programming in the last 2 years. The way I did this till now, was first to give them "half made" classes (for Point, Polygon, etc.) and ...
0
votes
0answers
40 views

how to feed and draw vbo [closed]

I got an error when I try to draw my vbo content. the error occurs on the draw command. error 1282 means Invalid operation. I try to update a vbo via data texture filled with positions. The ...
0
votes
1answer
144 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
109 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 ...
5
votes
1answer
174 views

How can glass breaking effect from Smash Hit be achieved? [duplicate]

I saw Smash Hit the other day and was amazed by the physics of the game, specially the shattered glass effect: I've read other posts about this subject but I still feel that they don't share enough ...
0
votes
1answer
22 views

Rendering a mesh in image viewport

I have a mesh made of nearly half to a one million vertices. I also have some 6-DoF camera poses around this mesh. At these poses I'd like to find out which of the 3D points of this mesh get projected ...
2
votes
2answers
102 views

Water silhouette shader using GLSL

I have this problem to solve using Cocos2d-x 3.x: In my game there is water represented by rectangle texture, modified by the code on the go. I also have a character moving around, rotating etc. I ...
2
votes
0answers
65 views

How to calculate directional light frustum from camera frustum

I'm playing around with OpenGL for a few weeks now. For the following screenshot I picked the glm::ortho values for my lightsource by trial and error. There are two directional light sources with ...
0
votes
0answers
15 views

FBX model load. Calculates the coordinates of the model, but the model itself is not drawn [closed]

There is a problem! Calculates the coordinates of the model, but the model itself is not drawn. Header and cpp code with the capability to load and rendering model. ...
5
votes
1answer
214 views

How to pass depth buffer from OGRE to CUDA?

I am using OGRE for rendering some objects. At every frame, I would like to pass the resulting depth buffer to CUDA for running some kernels on it and computing a result. How can I achieve this? How ...
0
votes
0answers
17 views

VBO Normal and UV dis-placement [closed]

I am having some problems with my Voxel-World. The Normals and UV coordinates are dis-placed. I use raycasting to make me able to modify the world. Each time I modify a block. It changes the texture ...
7
votes
2answers
139 views

How do games handle rendering Asian unicode text?

I'm currently in the process of implementing text rendering in my game engine, and I decided to utilize AngelCode's BMfont to generate font textures, and then have OpenGL render textured quads for ...
2
votes
2answers
453 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 ...
1
vote
2answers
179 views

How are red dot/reflex/holographic sights implemented?

In first-person-shooters like Call of Duty, the hologram only appears when it is behind the glass portion of the sight. In OpenGL, would it be implemented by rendering the glass to the stencil buffer ...
1
vote
1answer
44 views

Is texture 1D array a valid way to handle object coloring?

I would like to render game UI, and for that I need rectangles. However, since a button could be textured just as well as solid color or (multistop)gradient a problem arises. I would also like all ...
0
votes
1answer
61 views

C++ OpenGL / SDL2 VBO — Depth problem / Transparency

I got a problem with my VBO. When having textures. The far blocks overlay the near ones. I tried editing the alpha, depth buffer, the VBO byte allocation. Nothing works for me... The FAR plane is ...
0
votes
0answers
62 views

Drawing pathmap [Solved]

I am developing an editor for my game and I like to implement something like this (screenshot from wc3 editor): (I need the pathmap) I have one implementation already, I just store in chunk renderer ...
3
votes
2answers
1k 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 ...
1
vote
2answers
119 views

GLSL to Cg: why is the effect different?

With reference to this question, where I was trying to make the shader compile, I am now trying to make an effect appear. The effect can be shown here, through a GLSL shader: But when I use the ...