graphics

OpenGL: Accurate textures possible?

This is for a 2D game with OpenGL: Is it with using OpenGL possible to display a texture absolutely unfiltered, not streched or blurred? So that when I have a BMP and convert it into an OpenGL texture, and then retrieve that texture and convert it back, I have no modifications or quality / data loss? ...

Howto make image generation scalable on Java?

I'm trying to improve performance of captcha image rendering in web app running on Linux. Looking at what is currently used, I found that the bottleneck is in the usage of Java2D and specifically Graphics2D class. The problem is not much with the speed of execution, but more with scalability. Basically it doesn't scale. Drawing of captc...

Internal workings of OpenGL

How does OpenGL work, internally? We will use OpenGL for our 2D game project, and think that it is important for us to first find out more about how OpenGL actually works before diving right into it. What we need isn't some getting-started tutorial, rather basic information on how OpenGL internally handles textures, draws, interacts wi...

Looking for fast C++ graphic's lib. and compatible GUI lib

Hi everyone! I looking for FAST library (the best with hardware acceleration) for manipulation on 2D graphic (load image, change value of pixels, change all R/G/B layer from one image to another, save, show effects). I work with Visual Studio 2008/2010 IDE, and programing in C++ so I need lib worked with that. I have experience with SD...

Simple 2D graphics C library for windows with the following requirements?

Hi All developers: I have come across a project where it is required to draw some 2D graphics on a form under Windows and to be able to perform the following tasks: read image formats jpg, GIF, png, with transparency monitor mouse and keyboard input to this form draw simple 2D shapes, eg. line, ellipse, rectangle, pixel set/clear, pol...

start iphone 3d game programming

Hi I am iphone developer, I already know iphone programming. I wrote couple of GPS based apps. Now I want to start learning 3D graphcis and game development. I want to make very simple games. ALso I want to learn how to make a solid object in Iphone. Any suggestions where to start from ? ANy books etc ? ...

Bitmap conversion using GPU

I don't know whether this is the right forum. Anyway here is the question. In one of our application we display medical images and on top of them some algorithm generated bitmap. The real bitmap is a 16bit gray scale bitmap. From this we generate a color bitmap based on a look up table for eg (0-100)->green (100-200)->blue (200>above)...

Help creating algorithm for making Ternary/Triangle Plot Graph

Hi I have a need to create a Ternary Plot graph from 3 different variables. http://en.wikipedia.org/wiki/Ternary_plot I basically need to come up with the x/y coordinates of the point within the triangle, from the ratio of the 3 variables. Is there any function / algorithm that anyone is using to create this? The language I am using b...

Paint on top of a UI element WPF

I am making a project that draw Numbers in multicolored random dots. If you type in a 1,000,000 the scree will slowly paint with 1M dots that look like the number. I'm migrating to WPF and wanted known if there is an easy wat to pain on top of a text block as that will save a lot of hit testing for me. ...

NPR GLSL examples

I'm looking for a few NPR (Non-Photorealistic Rendering) GLSL shader examples, mostly sketch or toon inspired. Does anyone have some links? :) ...

Choosing platform for a specific program

Today I started thinking about a new project, and I found one. The goal is to get a first version working in the first three months. I'm going to write a "laser/light-show simulator" program, that you can generate such lightshows as you see on big events nowadays. The problem is the platform/language I'm going to write it in. I'm lookin...

How to create a single image from an overlayed image and a picture taken with iPhone?

There are countless apps out there that do this ... but I'm curious as to what suggested way(s) exists for producing the highest quality image. Example of what I'm looking to do: Be able to overlay an image of a mustache on top of the iPhone's camera. Optional be able to resize/rotate that image. Take a picture and superimpose the ove...

Line clipping to arbitary 2D polygon

Hi, guys, If I get a line segment which was long enough to cross a given polygon, which could be concave or convex polygon. How did I find the all the intersected light segments which was contained in the polygon? If the target region is not polygon, but a implicit curve function or spline curve, how to do it? Thanks! ...

How do I associate a button with a control?

OR - How To Shave A Koala To Stop It Looking Squashed. (But I didn't think that would make a suitably techy title) The Problem: You have three preview images derived from a main image. The preview images are resized for standardised picture spaces on a company website, the main image can be any size image from anywhere. Example: The ma...

How to store CALayers for reuse?

I have a bunch of identical CALayers that I want to reuse. Often, a few of them should disappear, and then get reused in another position within the same superlayer (half a second or so later). What is the best way (performance-wise) to keep them while they have disappeared from the screen? setHidden:YES, or setOpacity:0, or removeFromS...

Sphere Mapping Non Spherical Objects

Hi, I am facing a problem more or less similar to the post http://stackoverflow.com/questions/1513383/texturing-error-on-a-sphere The difference is I am trying to sphere map non spherical objects.I will describe my problem in detail. I am writing an application which generates 3d models out of system fonts.I am using the gluTesselato...

Is there an easy way to force Windows to calculate text extents using a fixed DPI value, instead of the current DPI setting?

I am wondering if there is an easy way to calculate the text extent of a string (similar to GetTextExtentPoint32), but allows me to specify the DPI to use in the calcuation. In other words, is there a function that does exactly what TextGetExtentPoint32 does, but allows me to pass the DPI as a parameter, or a way to "trick" TextGetExtent...

Creating 'laserlights' with Java3D/other 3D API

Yesterday I decided to start my new simulator project with Java and Java3D. Since I already programmed Java before it was a big plus and I could directly start with the simulator. Now I was a bit thinking about how I was going to approach this, and I directly stumbled and the biggest part of my program: the laser in the simulators. I wa...

How to fade-in / fade-out a Java Graphics?

Hi all: Say if I have a Java Graphics object, and I want to draw a line or a rectangle on it. When I issue the command to draw, it appears on screen immediately. I just wonder how could I make this progress as a fade-in / fade-out effect, same as what you can achieve in Javascript. Any thoughts? Many thanks for the help and suggestio...

OpenGL MODELVIEW rotations manually

Hello, For my graphics class, our professor wants us to keep track of our current matrix on our own and apply rotations/translations/scaling matrices to it then load it using glMatrixMode(GL_MODELVIEW) and glLoadMatrix(current_matrix). All of this seems fine, but when I actually use it, I keep having an issue: if I apply a rotation to ...