Questions tagged [graphics]

99 questions
41
votes
6 answers

I can't draw. How can I make polished applications?

I'm not a graphic designer. I'm pretty bad at drawing anything. I struggle to build things that look even as nice as "sample" applications bundled with development tools; primarily because I don't have squat in the way of art assets. What strategies…
Billy ONeal
  • 8,073
14
votes
1 answer

GLSL: defining PI as '3.14159265...' or just as 'radians(180)'

I see a lot of shader code on the internet where PI is simply defined as an approximate decimal near the top of the code. In general I try to let computers take care of doing math for me instead of approximating values with constants (i.e. (1./3.)…
florian
  • 151
8
votes
3 answers

How do you write unit tests when you need the implementation to come up with examples?

I'm implementing the view transformation part of a graphics pipeline (basically a matrix which translates coordinates from world coordinates to camera coordinates given a camera position and direction). Other than the simple case where the point has…
JonathanR
  • 295
7
votes
7 answers

From console to GUI applications

I'm a beginner programmer and all I've worked with so far are console applications in C++. Coding wise, how is the graphical side of programs created? I understand the logic that I am using from console apps will be the same, but how do programmers…
Matt
  • 1,067
7
votes
1 answer

What is zfreeze and what made it so hard to emulate?

I've been looking at the Dolphin 5.0 release trailer. They made a big deal about "zfreeze" fixes, and proceeded to show a few comparisons between the old and new versions. They keep mentioning how it was previously thought to be impossible to…
9a3eedi
  • 2,099
4
votes
4 answers

Learning basic graphics programming

After learning the basics of computing simple die throwing games and calendar applications, I want to explore simple graphics - drawing and moving around geometric objects is ok to start with, eventually adding pixel graphic of course. I've taken an…
3
votes
1 answer

What graphics engine is used in Photoshop

I am wondering what is the default graphics engine used in Photoshop? It's great tool. And I don't know how they make it? I mean, if I want to create a simple tool like it, I will use MFC/GDI+. So, what is core to make Photoshop being great tools?
vietean
  • 139
3
votes
3 answers

Filling a scene with cubes

I am trying to design a solution for simulating gaseous fluids in confined areas, I am using naiver-stokes equations for fluid dynamics but since it only covers incompressible fluids like liquid, i needed to find a way to simulate…
Hgeg
  • 131
  • 2
2
votes
4 answers

Specific reasons why a top left origin is better/worse than a bottom left origin for computer graphics

I have been researching why the origins for most graphic applications are located in the top left corner of the screen. From everything I have read, they are located there because that is where the electron gun on a cathode ray tube would start to…
1
vote
1 answer

Getting strokes and fill to align to pixel boundaries

While investigating ways to get the Cairo graphics API to draw a single-pixel line, I found this explanation in the FAQ. It explains why often a single-pixel line gets drawn as a half-intensity line two pixels wide. The reason that cairo does it…
Malvineous
  • 111
  • 3
0
votes
2 answers

Cairo Rotate Text : Transformation Matrix

http://www.cairographics.org/manual/cairo-Transformations.html I have been using Cairo Vector Graphics Library for some work, and I can't quite understand some parts: What is the default value of the transformation matrix? When do I need the…