Programming related to the visual representation of information on computer screens.

learn more… | top users | synonyms

0
votes
1answer
86 views

How to write a “Hello World” for N64 from pure scratch?

As an experiment I want to code a "Hello World" program for N64 using only assembly code, and using no headers, tools, helper files, etc. I just want to write the assembly code bare bones from ...
1
vote
2answers
152 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 ...
10
votes
1answer
422 views

Graphics programming replicating the transition from Chrono Trigger inside the gate

I started playing this game for the first time lately and this really peaked my interest You can see the transition in motion starting at ~12:08 There seems to be some interesting maths taking ...
2
votes
1answer
155 views

OpenGL - have object follow mouse

I want to have an object follow around my mouse on the screen in OpenGL. (I am also using GLEW, GLFW, and GLM). The best idea I've come up with is: Get the coordinates within the window with ...
1
vote
3answers
79 views

Rotation matrix for a 3D vector

I have a direction vector on which I have to apply some rotation to align it to positive z-axis. To use Matrix.CreateRotationX(angle) of XNA, I need the angle for which I'd have to compute cos or tan ...
2
votes
4answers
212 views

OpenGL setup on Windows

I have been trying to use OpenGL for two days now. First on Mac, then on Windows. The problem with Mac is that it doesn't support the newer versions of OpenGL. I ran a tutorial that actually did get ...
0
votes
1answer
67 views

OpenGL ES 1 Pixel Error?

I am developing a game on android using OpenGL ES 1.0 for Android OS. It is a 2d game using a simple Orthographic projection and textures for the sprites. One of these textures has a small line (it ...
0
votes
1answer
99 views

Create 2D sprites with libGdx using a shape and a texture separately

I am creating a 2D game with LibGdx that will have creatures that are generated from dozens of characteristics with potentially millions of unique combinations. For each segment of each creature, I ...
1
vote
1answer
53 views

Is there any way to change texture filtering globally in Direct3D 11?

One of the major changes I have encountered between Direct3D 9 and Direct3D 11 is the new API for setting up texture sampling. In D3D9, it was sufficient to simply set a given value of a given ...
1
vote
1answer
151 views

How to create a sun billboard with Ogre3d

I've been working with a few different engines alongside trying to code my own project. Rather than rewrite an entire renderer, etc I am using Ogre3d. To begin with I am trying to implement a very ...
1
vote
2answers
325 views

How can I render a texture to the screen in SDL2?

I've recently started upgrading my SDL version from 1.2 to 2.0.3, and while on the SDL Wiki, I've come across SDL_Renderer, SDL_Window, and SDL_Texture. I did some research and found a link at ...
1
vote
1answer
101 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 ...
1
vote
2answers
200 views

How to reduce/remove graphical artifacts?

Question I'm working on a side-scrolling game that has a 2D grid for rendering to the screen. I'm using OpenGL, and I've optimized my game so that nothing invisible is attempted to be drawn. As of ...
1
vote
1answer
171 views

Problem calculating normals for heightmaps

So far I have been using normal avering to calculate the normals for my vertices in my heightmap, with good graphical result (see picture), however it is terribly slow. With a incresing image size the ...
1
vote
1answer
106 views

How to draw or translate into world space?

I've been hacking around with OpenGL, but there's a few concepts which I can not find the answer on. I want to draw three GL_QUADS next to eachoter like so: 1[2][3] I know GL_QUADS are deprecated, ...
1
vote
1answer
74 views

Use of the xyY color space?

What's the use of the xyY colorspace in games? I'm not sure what's the advantage of using it in shader programming or elsewhere.
0
votes
1answer
64 views

x-inverted obj importer in BulletSharp - whats wrong?

See importer C# code at the repository. Screenshot: Left: bullet imported version, right: correct 3ds max version. It's somehow inverted. If you think that left part is just 180 degrees rotated you ...
0
votes
1answer
102 views

updating 2d array to contain chunk of larger 2d array - for 2d tile map

What i need help with is how can i get a chunk of a large 2d char array and update it so i am only drawing enough tiles to cover the screen? Currently, i load all the chars from a text file and store ...
2
votes
1answer
108 views

Invert Alpha on Image

I'm making a lighting system right now, and the last part I have to do is to invert the alpha channel on the final light map. My previous code that used to work was DataBufferByte buf = ...
9
votes
3answers
1k views

How can I draw outlines around 3D models?

How can I draw outlines around 3D models? I'm referring to something like the effects in a recent Pokemon game, which appear to have a single-pixel outline around them:
0
votes
1answer
194 views

3D rotation and movement of ball on a 2D plane

Here is a video of Amiga arcade pool game: https://www.youtube.com/watch?v=zTQIPFBUFIg I am making a similar game with C and Gtk+3.0 but I don't know how to show balls 3D movement on 2D plane! I ...
1
vote
2answers
122 views

Moai: Clipping an image to a polygon

I'm using Moai SDK. I have an image and some random convex 2D polygons. I want to show only the parts of the image inside these polygons. Here's an example image: The same, shown only where the ...
0
votes
1answer
93 views

Is it possible to display no white images/sprites when using the latest Android OS?

Was it okay to use Texture.setEnforcePotImages(false) in order to disable conditional width and height pixel size that requires power of 2? I'm planning to sell the game app at Google Play. I want to ...
5
votes
2answers
658 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 - ...
0
votes
1answer
121 views

How can I get my Android camera system working more like Google Earth's? [duplicate]

I'm implementing a touch screen interface whereby the user dragging their finger on the screen will rotate the camera in a sphere around the central point. My code works well for the horizontal swipe ...
2
votes
1answer
254 views

How does the fragment shader get data from the vertex shader?

How can any interactions between these two shaders work? I mean the vertex shader sends a vertex's color to the fragment shader, but that's only one fragment, what about all the other ones between the ...
1
vote
1answer
218 views

What is the difference between shader uniforms and attributes in OpenGL?

I don't fully understand the differences between uniforms and attributes. To be honest, I probably haven't even used attributes. Can uniforms change for each vertex? I mean to calculate the vertex's ...
1
vote
2answers
767 views

In GLSL is it possible to offset vertices based on height map colour?

I am attempting to generate some terrain based upon a heightmap. I have generated a 32 x 32 grid and a corresponding height map -> In my vertex shader I am trying to offset the position of the Y ...
4
votes
2answers
429 views

What Shading/Rendering techniques are being used in this image?

My previous question wasn't clear enough. From a rendering point of view what kind of techniques are used in this image as I would like to apply a similar style (I'm using OpenGL if that matters): ...
3
votes
1answer
63 views

Armature rest matrix - why does this exist?

I'm not sure I have a clear idea on what purpose the rest matrix/bindpose is supposed to serve in skeleton animation. If it is supposed to transform a bone into the rest pose and the mesh itself is ...
0
votes
0answers
30 views

Is there a transformation or set of transformations that can approximate a “radial scale”?

Is there a way to, with matrices, scale something as if someone were opening a Japanese fan? I'm at a loss of what to call it, so pointers towards avenues of research would be greatly appreciated. If ...
1
vote
0answers
168 views

How do you tell OpenGL ES 2.0 to use a texture as the depth buffer?

I want to render a scene with an outline post processing effect in OpenGL ES 2.0. First I render all the opaque objects. Then I use a post processing shader for silhouette detection that uses the ...
1
vote
1answer
266 views

Color grading, shaders and 3d textures

I'm trying to implement color correction with the 3d lookup table. The lookup table is actually just a 2d texture 256x16 and consists of 16 squares which one is 16x16. When it comes to rendering, I ...
12
votes
3answers
744 views

Recreating this flat-shaded look

I'll keep it short. How does one achieve the effect depicted in the image below? Is it feasible to do in realtime? It looks deceptively simple, but it probably isn't. Are there any keywords I can ...
3
votes
1answer
88 views

Symmetry preserving path simplification

I'm using the Douglas peucker (DP) algorithm to simplify some (2d) closed paths forming a shape. This works pretty good, but not so much for closed paths that have some symmetry. Take for example a ...
3
votes
1answer
264 views

Automatic shadow for isometric objects

I have like hunderd of isometric objects. One example: I'm trying to find a way to automate creation of shadow they're casting. I ended up with following transformation: matrix.Shear(-0.25f, ...
0
votes
1answer
109 views

Tangent basis calculation problem

I have the problem with seams with calculating a tangent basis in my application. I'm using a seems to be right algorithm, but it gives wrong result on the seams. What am I doing wrong? Is there a ...
-3
votes
1answer
344 views

OS X OpenGL 3.2 Core (Black Screen)

I want to render a Quad via VAO, IBO and VBO but nothing is drawn. I'm using glDrawRangeElements in OS X OpenGL 3.2 Core context. The screen is completely black without any error. GLFW3 is used to ...
2
votes
2answers
348 views

How can I actually understand Instanced Geometry Rendering - so that I can implement it the way I need it

I'm stuck trying to implement instanced mesh rendering in my project. Particularly because I am failing to understand how certain components actually function - and how the drawing routine is actually ...
1
vote
1answer
164 views

3D Reflection - Drawing Upside Down

After reading up on rendering reflections, it seems that the way to do it is the render the scene from underneath the plane of reflection, and then use projective texturing to map the reflected ...
7
votes
4answers
3k views

How are 3D models created in video games?

As the title says, how are 3D models in games designed and displayed? Is it all-code? Drawn on paper, then on a 3D graphics software, then... what? Of course, game programmers won't define every ...
5
votes
1answer
485 views

Efficient foliage rendering with OpenGL

Rendering foliage usually involves "hanging" triangles and textures that have completely transparent areas. I'm interested in knowing how are these usually handled by a 3D engine. The first thing ...
4
votes
1answer
313 views

How to optimize SpriteBatch usage?

From what I understand, SpriteBatch's purpose is to batch as many draw operations to send to the GPU. Each batch can handle one texture at a time, and changing SpriteBatch context/texture is ...
1
vote
2answers
154 views

SpriteBatch does not draw on graphicDevice

I'm using a control which is using XNA inside. But when I try to draw something, it doesn't appear. I already did a lot of tests but can't figure out what's wrong. Here is the test I set up: ...
-2
votes
2answers
464 views

Newbie game programmer - Where do I start? [closed]

Okay, so I have been really inclined towards game programming this past few weeks. I have primarily been a web programmer and know a fair number of lanugages like PHP, Java, javascript, python, etc. I ...
7
votes
1answer
1k views

Most efficient way to draw vertex with OpenGL

I am writing an OpenGL 3D game. There will be tons of triangles for terrain and objects in use. I am studying from the OpenGL official guide and the first presented method is to call a function ...
-1
votes
1answer
56 views

Reverting the view SDL

So in my SDL application, which I setup for OpenGL, if I were to do the following code: glBegin(GL_QUADS); glVertex2i(0, 0); glVertex2i(50, 0); glVertex2i(50, 50); glVertex2i(0, 50); glEnd(); The ...
3
votes
1answer
220 views

sprite animation individual framerate

When animating sprites I am taking the delta difference between frames and locking the rendering frame rate of the sprite animation to the delta time. float delay = 1000.0f / FPS; float now = ...
-2
votes
1answer
304 views

How to start graphics programming? [closed]

I'm trying to find a complete guide for OpenGL programming but all i can found is some blogs with non-finished lessons and old books. I don't want to just make a game, i want to develop my own game ...
1
vote
1answer
244 views

Damage indicator screen overlay

I want to make something already done by a lot of games , which is when I am taking so much hits from enemy red screen drawn like the following , using XNA 4.0: after it's drawn and I am still alive ...