Presentation is loading. Please wait.

Presentation is loading. Please wait.

Our Graphics Environment

Similar presentations


Presentation on theme: "Our Graphics Environment"— Presentation transcript:

1 Our Graphics Environment

2 Hardware CPU GPU—massively parallel, set up for high-speed graphics
Modern CPUs are multicore processors that support programs that can run at the same time as other programs The level of parallelism (as enabled by the number of CPU cores) is relatively low GPU—massively parallel, set up for high-speed graphics All modern high-performance graphics systems use massively parallel GPUs How do the CPU and GPU communicate? Slow data bus

3 Programing on the CPU We will use Java High-level language
Interpreter translates our Java code to object code (check) Java Run-time Environment (JRE) takes the object code and translates it to CPU readable machine language Need a graphic

4 Programming on the GPU We can only get to the GPU through the CPU
We will write programs in Java that run on the CPU that launch programs that run on the GPU We will call the CPU the ‘client side’ and the GPU the ‘server side’ Our client-side Java programs will contain character strings that represent relatively short OpenGL Shading Language (GLSL) programs The GLSL programs will be compiled and linked by built-in OpenGL tools on the client side but… They will run on the GPU (the server-side) Wait! Don’t run away screaming…

5 Our programming environment
Client side Java (language), Eclipse (IDE), JOGL (Java wrapper for OpenGL libraries) Server side GLSL (the OpenGL shading languages) Can you do this programming in other environments? Absolutely C and C++ are the most common client side programming languages (I use C++) HLSL (high-level shading language) is used extensively by programmers preferring to use the Microsoft DirectX graphics library over OpenGL

6 What if you don’t want to do graphics?
GPUs can be used for general purpose programming (like a CPU) Some languages that are good for this include CUDA (NVIDIA) OpenCL (from the folks who gave you OpenGL) Probably many others


Download ppt "Our Graphics Environment"

Similar presentations


Ads by Google