graphics

Why is SDL so slow and how can I get it to run faster?

I have the following test setup: 1024 * 768 screen surface created with SDL_HWSURFACE The main loop consists only of SDL_Flip() and a simple FPS counter The problem is: I am only getting around 1000 FPS with this. Which is really really low when you consider that you do not even draw anything! The FPS drop really fast when I contin...

OpenCV - cvExtractSURF is causing a memory leak?

Hello OpenCV'ers, I am using the OpenCV function: cvExtractSURF but I am finding a major memory leak. Has anyone successfully implemented this call? My code is as follows: IplImage *cvImage = [self CreateIplImageFromUIImage:image grayscale:YES]; CvMemStorage* storage = cvCreateMemStorage(0); CvSeq *objectKeypoints = 0; //CvSeq *objec...

Why is my animation flickering on iPhone?

I'm getting random flickers from the following animation -- it looks like the picture is centering itself for about 1 frame or so before continuing with what it's supposed to be doing, and I don't know why. -(void)generateWander{ //NSLog(@"generateWander"); if(targetChange==0) { targetChange=TARGET_LENGTH+1; float destinationAn...

can Android produce 2d image effects similar to those possible with Flash's DisplacementMapFilter class?

Hi all, I'm interested in reproducing the image effect seen in the iPhone app Wobble (where users could define circular regions on 2d images which would then have a displacement-like warp applied when the phone was tilted) for a game I am planning to deploy to Android. Does the Android API include 2d effects that could pull this off? ...

QT4 How to draw inside a widget ?

QT4, QTCreator I am trying to draw inside Widget: void Widget::on_pushButton_clicked() { QPainter painter; painter.begin(ui->label); QRectF rectangle(10.0, 20.0, 80.0, 60.0); int startAngle = 30 * 16; int spanAngle = 120 * 16; painter.drawArc(rectangle, startAngle, spanAngle); painter.end(); } But wh...

Merging pixels to minimize paint operations on Html canvas

Hi I'm painting an image onto a canvas (html5) and I want to reduce the number of fillRect calls I'm making in the hope of making the process more efficient. Note: I'm calling canvas.fillRect to paint individual pixels and pixels can be 1x1 or other size rectangle depending on resolution I'm painting in (So I know that they are not call...

Iphone Cocos2D - SpriteSheet Cocos2D (so confused...)

I have gotten 0 response from the Cocos2D board so thought Id try here. Ok. Im ripping out my hair over this. I did a complete re-haul of my code last night in hopes of fixing some iphone4 framerate issues. I created sprites in advance instead of doing some of the creation during the update methods. I only add them to the spritesheet no...

Picturebox draws artefacts when in RightToLeft mode

When PictureBox have parent ListView and ListView RightToLeft set to true/yes I received some artifacts on drawing. Why this happens and how remove this artifacts? Images http://i.imgur.com/kx0zQ.png http://i.imgur.com/E5il3.png public partial class Form1 : Form { public Form1() { InitializeComponent(); } void DrawOnPic...

Using awt with android

I have a Java Swing application which draws diagrams. It uses Graphics2D calls and awt objects such as Rectangle etc. At some point I might want to port this to Android. I understand that I can't use Graphics2D on Android, but can I still use the awt Rectangle, Font, Color (etc) classes. What I want to do is to isolate any code changes...

How to add tooltips to pchart php library?

Does someone knows an addon or tutorial to add tooltips to pChart classes? ...

Is it possible to inject a CIBumpDistortion filter to a specific area of the screen on Mac OS X (Snow Leopard)?

I want to temporarily distort the area under the mouse using a CIBumpDistortion to increase the visibility of the mouse pointer. At the moment, I have a transparent-background NSWindow that floats around under the pointer and shows a cross-hair that fades in when you move the mouse, and out when you stop. This is working okay, but a Bu...

What's "graphics software stack"?

Should be a pretty low level conception, would someone explain please? ...

DirectX alpha blending (deferred rendering)

I'm having a major issue which has been bugging me for a while now. My problem is my game uses a deferred rendering engine which makes it very difficult to do alpha blending. The only way I can think of solving this issue is to render the scene (including depth map, normal map and diffuse map) without any objects which have alphas. Th...

Android canvas.scale(-1,1)

So my aim is to flip an image horizontally then draw it on a canvas. Currently I'm using canvas.scale(-1,1) which effectively works and draws the image horizontally, however it also screws with the x axis values where before the scale the x position would be 150 and after I'd have to switch it to -150 to render in the same spot. My ques...

QT4 How to blur QPixmap image?

QT4 How to blur QPixmap image? I am looking for something like one of the following: Blur(pixmap); painter.Blur(); painter.Blur(rect); What is the best way to do this? ...

What does it mean to "translate" a graphics object?

Not a long question. Can anyone explain what the word "translation" means in the context of graphics? Thanks a lot. ...

Opinions on a 3D rendering environment for a project?

I have a term project coming up in grad school for a simple 3D image render (an intro to graphics class) and I was wondering if there are any opinions out there one which free 3D environment might be the best to use? I know this is a subjective question, but I want to hear people's opinions. Some of the ones recommended in class were...

OpenGL: Translate object to origin

I have a car model with different parts of the car described in vertex groups. I want to rotate the tires. The origin of the model is in the middle of the car. Want I'm thinking I need to do is translate the tires to the origin, rotate the tires, then translate them back to their original position. My problems if the translating to the ...

Finding a suitable 2D graphics API

We are in the first stages of making a 2D game at the moment, which will focus on destructible environments and objects. However, we have already encountered serious problems with the choice of the right graphics API At the moment, we use SDL - but the problem we see with it is that it isn't really performant, and has no hardware-accel...

[GENERAL] Suggestion for graphics library for 2D game (PC)

Hello. I'm trying to set base to a 2D game with destructible terrain and/or particle effects, scroll, zoom, characters, etc... I'd like to know if there is a graphics library that would support those things in both software and hardware acceleration .. (Need pixel access). I've tried SDL (even with directX backend), but it seems hardware...