Tagged Questions

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

learn more… | top users | synonyms

0
votes
1answer
34 views

How to move object along circumference of another object?

I have following piece of code, now i want to move the "moon" object in the orbit around "earth". please help!! #include <stdio.h> #include <conio.h> #include <graphics.h> #include ...
3
votes
1answer
276 views

I want to render some surfaces in GLSL with normal maps, and some without

I have normal mapping working in my game, but I want to only use normal mapping for some surfaces, and not others. Right now, as far as I can tell, my shader is applying an incorrect normal of (0, 0, ...
0
votes
1answer
46 views

Ram usage , libGDX game development

I am developing android game using LibGDX . The game data (images , sounds etc.) are maximum 25mb . But when the game is running on Android device it places 110mb there (look at the image) 110mb is ...
0
votes
0answers
58 views

How to get drawing offsets for an isometric camera

I do have some semi-working code, but I'm really stuck on getting everything to align to the screen properly. Here's my current, broken solution in Javascript: //ts = tile size (i.e. 64), th = ts/2, ...
3
votes
1answer
118 views

Mixing Perspective and Orthographic Projections?

I'm going to start with some background, so jump to my question at the bottom for the TLDR version. Problem: In a Japanese 4gamer article (english translation via Chev on Polycount) explaining some ...
1
vote
1answer
65 views

Quick sprite contouring solutions?

I want to be able to quickly outline sprites(mainly with black, but other colours too) without doing it manually, as pictured. What would be a good program/solution to do so? Edit: I don't want it ...
5
votes
1answer
105 views

Why bother with a separate normal matrix, if there is never non-uniform scaling on the view matrix?

I am updating one of my shaders to a version of OpenGL/GLSL that doesn't automatically provide gl_NormalMatrix (for educational purposes; I'm not ripping out working code for the sake of it). ...
1
vote
1answer
59 views

how much memory does Adreno 320 GPU provide? [closed]

I wanted to know how much memory does Adreno 320 GPU provide ? I am using Nexus 4. I Googled about it and not able to find any details about it. Can anyone provide the details?
9
votes
1answer
353 views

In OpenGL, what is “zero state” rendering?

Recently at a job interview, I mentioned that I taught myself modern OpenGL and rendering with vertex buffer objects because my university only taught the fixed function pipeline with immediate mode ...
2
votes
2answers
50 views

In XNA 4, how can I access SpriteBatch's transformMatrix in my shader?

I would like to use a custom effect with a regular XNA SpriteBatch. I have a 2D camera which computes a transform matrix, so I need my shader to take this into account. I have put a world matrix ...
0
votes
1answer
68 views

Possible to create 3-D or accelerated graphics on Windows using your own library/API?

Say I want to come up with a way to replace what OpenGL and DirectX specifications do: communicate with GPU to get some functions done that help hardware-acceleration and rapid drawing of screen data. ...
0
votes
1answer
42 views

HDR and Alpha Blending

I've been reading a lot about HDR techniques and came across Alpha Blending compatibility. Searched even more and found this snippet from the Ogre Forums: With source alpha blending, it sometimes ...
2
votes
1answer
76 views

Real hardware acceleration of vector images?

Basically vector graphics have many advantages, especially that they scale very nicely. So there are many reasons to use them in 3D and 2D games. Is there any support for hardware accelerated vector ...
1
vote
2answers
115 views

Weird GLM perspective problems with my 2D Game

I am trying to create the graphics system of a 2D game using OpenGL 3.3. To help me in this task I am using the GLM math libraries. However I am having some trouble. When my objects (for now they ...
4
votes
2answers
255 views

How to implement color changing fragment shader?

I have a background of a given size and filled with a given color. I want to change it with an animation effect, starting from the center and spread out until it extends the whole background. The new ...
0
votes
0answers
79 views

Fixing/avoiding Z-fighting with decals OpenGL

I'm trying to draw animated flames as a decal in OpenGL (just a simple quad with an animated texture as a decal on another quad). Problem is as the camera moves away I get terrible Z-fighting in the ...
5
votes
1answer
288 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 ...
1
vote
3answers
114 views

Technique suggestion to render corroded pipes in 3D

We currently have a lot of data relating to cracks/corrosion/deformations in metal pipes which at present, can be viewed in a crude flat/2D application which makes the metal anomalies hard to spot. ...
0
votes
2answers
192 views

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

As an experiment I want to code a "Hello World" program for N64 using only assembly code, using no headers, tools, helper files, etc. I just want to write the assembly code bare bones from absolute ...
1
vote
2answers
261 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
447 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
284 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
282 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
293 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
80 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
231 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
115 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
295 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
946 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
192 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
257 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
257 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
116 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
90 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
76 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
137 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
143 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 = ...
18
votes
4answers
3k 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
260 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
137 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
103 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 ...
6
votes
2answers
834 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
128 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
312 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
382 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
1k 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
490 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
71 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
223 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 ...