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

learn more… | top users | synonyms

1
vote
1answer
20 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
64 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
69 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
78 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
159 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
72 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
90 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
59 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
49 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
75 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
83 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 = ...
8
votes
3answers
665 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
126 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
110 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
71 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
477 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
107 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
189 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
129 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
500 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
380 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
58 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
29 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 ...
0
votes
0answers
221 views

Construct 2 JSON commands

I'm new to Construct 2 and trying to set up a connection with my own WebSocket server. I have communication both ways, but have not yet invoked action in response to input from the server. I currently ...
1
vote
0answers
113 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
234 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
680 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
234 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
106 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
275 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
270 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
148 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
2k 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 ...
4
votes
1answer
438 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
229 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
119 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
422 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
53 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
183 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
269 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
202 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 ...
1
vote
1answer
511 views

Jogl2 won't accept jogl 1.0 code - GL_LIGHTING and GL_LIGHT_MODEL_AMBIENT cannot be resolved or is not a field?

I'm trying to run my code on jogl 2.0 , for the first time (until now I worked with jogl 1.0) however Eclipse throws to almost every that I have a "cannot be resolved or is not a field" message . ...
3
votes
2answers
324 views

Screen effects and antialiasing

I have been working on a game for a while using glut for basic window creation. I was rendering to an offscreen buffer so that I could implement various effects like screen bulging, motion blur, ...
1
vote
1answer
371 views

Selecting and moving object in OpenGL Gameplay3D Engine

I'm using Gameplay3d as a game engine to develop a simple board game. PEG Solitaire I've come to the part where I've created a 2D grid for all the movable object, empty locations and also where it's ...
0
votes
2answers
270 views

Problem reseting device when using render target

How can I reset the device when I am rendering to a surface, and then stretching that surface to the back buffer. If i don't change the render target everything goes well, but when i change the render ...
3
votes
1answer
70 views

Matrix Translation Transformation Question

I've been reading a lot about computer graphics lately and because of it I'm building my own math library's for fun. I was reading about Matrix Translation and Homogeneous Coords, and was wondering ...
2
votes
2answers
575 views

Does my 2D OpenGL renderer need optimized?

I've started a game engine for learning purposes. I have successfully gotten an opengl renderer working and I can draw textures of varying sizes to the screen. The way I have done this is by creating ...
0
votes
2answers
182 views

Is it possible to push real-world, real-time data into Unity? [closed]

I'm pretty new to this, and I'm having trouble figuring out where to even look. If there's relevant terminology that'll be google-able, that would be a great help. Suppose I want to have a monitor ...