GAM531 DPS931 – Week 1 Introduction. Professors Joseph Hughes Info: scs.senecac.on.ca/~jp.hughes T2104 Roles: Primary Lecturer.

Slides:



Advertisements
Similar presentations
Programming with OpenGL - Getting started - Hanyang University Han Jae-Hyek.
Advertisements

MVisio: a multi-device 2D/3D graphic engine for PDAs, PCs and CAVEs Achille Peternier, Ph. D. Student VRLab, EPFL, Switzerland 3D Mental Vision.
Chapter 2: Graphics Programming
COMPUTER GRAPHICS CS 482 – FALL 2014 NOVEMBER 10, 2014 GRAPHICS HARDWARE GRAPHICS PROCESSING UNITS PARALLELISM.
Status – Week 257 Victor Moya. Summary GPU interface. GPU interface. GPU state. GPU state. API/Driver State. API/Driver State. Driver/CPU Proxy. Driver/CPU.
GAM531 DPS931 – Week 11 Render State. The Render State Render State BuffersShadersSamplers Rasterizer State Blend State.
CP411 Computer Graphics, Wilfrid Laurier University Introduction # 1 Welcome to CP411 Computer Graphics 2012 Instructor: Dr. Hongbing Fan Introduction.
FSOSS Dr. Chris Szalwinski Professor School of Information and Communication Technology Seneca College, Toronto, Canada GPU Research Capabilities.
Introduction to Operating Systems CS-2301 B-term Introduction to Operating Systems CS-2301, System Programming for Non-majors (Slides include materials.
Operating Systems Concepts Professor Rick Han Department of Computer Science University of Colorado at Boulder.
Ch 1 Intro to Graphics page 1CS 367 First Day Agenda Best course you have ever had (survey) Info Cards Name, , Nickname C / C++ experience, EOS experience.
You can use 3D graphics to enhance and differentiate your Metro style app.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
VARIABLES, TYPES, INPUT/OUTPUT, ASSIGNMENT OPERATION Shieu-Hong Lin MATH/CS Department Chapel.
Operating Systems What do you have left on your computer after you strip away all of the games and application programs you bought and installed? Name.
GAM531 DPS931 – Week 9 OpenGL 4.3 and Direct X 11.
CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014.
COMP4070 Computer Graphics Dr. Amy Zhang. Welcome! 2  Introductions  Administrative Matters  Course Outline  What is Computer Graphics?
CHAPTER 4 Window Creation and Control © 2008 Cengage Learning EMEA.
Department of Electrical Engineering Electronics Computers Communications Technion Israel Institute of Technology High Speed Digital Systems Lab. High.
CSE 381 – Advanced Game Programming Basic 3D Graphics
Computer Graphics Graphics Hardware
Tim Madden ODG/XSD.  Graphics Processing Unit  Graphics card on your PC.  “Hardware accelerated graphics”  Video game industry is main driver.  More.
Getting Started. XNA Game Studio 4.0 To download XNA Game Studio 4.0 itself, go to XNA Game.
OpenGL Shading Language (Advanced Computer Graphics) Ernest Tatum.
GAM531 DPS931 – Week 5 The Scene. Reviewing the Engine Engine DX11 Device GL 4.3 Device ControllerManagerModel DX11 Object GL 4.3 Object DX 11 API GL.
Introduction to CUDA (1 of 2) Patrick Cozzi University of Pennsylvania CIS Spring 2012.
4/23/2017 4:23 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
1 ETC. 2 Sounds FX Sounds FX –WAV audio files –Load into memory and play it »Load »Play »Stop »Pause –2D or 3D »3D should be integrated into scene management.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
CS212: Object Oriented Analysis and Design Lecture 6: Friends, Constructor and destructors.
Programming Concept Chapter I Introduction to Java Programming.
Computer Science and Software Engineering University of Wisconsin - Platteville 2. Pointer Yan Shi CS/SE2630 Lecture Notes.
Computer Graphics Using Direct 3D Introduction. 2 What are we doing here? Simply, learning how to make the computer draw.
Fundamental Programming: Fundamental Programming K.Chinnasarn, Ph.D.
GRAPHICS PIPELINE & SHADERS SET09115 Intro to Graphics Programming.
GAM531 DPS931 – Week 2 Into the Engine. Last Time in GAM531… Engine Core Client Interface Operating System API Device API Engine DX11 Device GL 4.3 Device.
3D Programming and DirectX API. Content Mathematics Mathematics Prepare to Write a 3D program Prepare to Write a 3D program Program Structure Program.
Tim Madden ODG/XSD.  Graphics Processing Unit  Graphics card on your PC.  “Hardware accelerated graphics”  Video game industry is main driver.  More.
Object Oriented Analysis & Design Game Patterns. Contents  What patterns are  Delegation  Game Loop  Scene Graph  Double Buffering  Component 
More C++ Bryce Boe 2013/10/23 CS24, Fall Outline Project 1 Review Alignment and Padding Finish C++ Introduction.
Computer Graphics IN5I11 Nabil H. Mustafa
GAM666 – Introduction To Game Programming ● Programmer's perspective of Game Industry ● Introduction to Windows Programming ● 2D animation using DirectX.
What are Computer Graphics Basically anything that is on you Monitor – This includes the text that you will see Text isn’t Advanced Graphics But…. Understanding.
GPU Computing for GIS James Mower Department of Geography and Planning University at Albany.
Microsoft Visual Basic 2015 CHAPTER ONE Introduction to Visual Basic 2015 Programming.
2D Graphics Optimizations
Interactive Animation
What is DirectX? DirectX is built by Microsoft as a collection of API’s (Application Programming Interfaces) for the purpose of multimedia processing.
Computer Graphics Graphics Hardware
CMPT 201 Computer Science II for Engineers
Part 1- Computer Systems Part 2 – Computer Architecture Mr Belony
Chapter 1 An overview on Computer Graphics
Chapter 1: Introduction to computers and C++ Programming
Introduction to Visual Basic 2008 Programming
OpenCL 소개 류관희 충북대학교 소프트웨어학과.
Chapter 4 – Introduction to Operating System Concepts
C Basics.
CMPE419 Mobile Application Development
Unit 20 Software Part 2.
Unit 20 Software Part 2.
Lecture Topics: 11/1 General Operating System Concepts Processes
HW for Computer Graphics
Computer Graphics Graphics Hardware
Virtualization Charles Warren.
Computer Graphics Introduction to Shaders
02 | What DirectX Can Do and Creating the Main Game Loop
CMPE419 Mobile Application Development
CSC 241: Introduction to Computer Science I
CIS 6930: Chip Multiprocessor: GPU Architecture and Programming
Presentation transcript:

GAM531 DPS931 – Week 1 Introduction

Professors Joseph Hughes Info: scs.senecac.on.ca/~jp.hughes T2104 Roles: Primary Lecturer Modern API Wizard Chris Szalwinski Info: scs.senecac.on.ca/~chris.szalwinski T2093 Roles: Mathematical Genius DPS931 Overlord

So what does this course teach you?

So we will be making 3D games?

What is an game engine? Think of a car… Game Logic HP = 10; DMG = 20; Player.attack(); LoadLevel(10); Enemy.Spawn(); RenderScene(); Game Engine glEnable(GL_BLEND); glBindBuffer(bufferID); glBindTexture(textureID); glDrawElements(size, data); Game Output And now for some code…

Some Examples… ???Engine Game Logic

How is an engine structured? Engine Core Client Interface Operating System API Device API

Separation of concepts HARDWARE FIRMWARE OS APIDEVICE API APPLICATION CPU GPU CHIPSET DRIVERS Window Creation Console Write Input detection Your Program Open GL 4.3 DirectX 11

Why do we need Device APIs? OS APIs are slow Indirect, limited functionality Unable to harness true potential of hardware Device APIs are fast! Give nearly direct control over the device Specialized to fit to fit programmer’s needs

What devices are we using? We will be making use of the Graphics Processing Units (GPU) GPUs are highly parallelized processing units made for graphical processing GPUs can come as discrete Graphics Cards or Integrated Chips with your mother board or CPU (APUs)

To recap… ApplicationDevice APIsFirmwareHardware // Set up the description of the static index buffer. indexBufferDesc.Usage = D3D11_USAGE_DEFAULT; indexBufferDesc.ByteWidth = sizeof(unsigned long) * m_indexCount; indexBufferDesc.BindFlags = D3D11_BIND_INDEX_BUFFER; indexBufferDesc.CPUAccessFlags = 0; indexBufferDesc.MiscFlags = 0; indexBufferDesc.StructureByteStride = 0; // Give the subresource structure a pointer to the index data. indexData.pSysMem = indices; // Create the index buffer. result = device->CreateBuffer(&indexBufferDesc, &indexData, &m_indexBuffer); // Set the depth buffer to be entirely cleared to 1.0 values. glClearDepth(1.0f); // Enable depth testing. glEnable(GL_DEPTH_TEST); // Set the polygon winding to front facing for the left handed system. glFrontFace(GL_CW); // Enable back face culling. glEnable(GL_CULL_FACE); glCullFace(GL_BACK); // Initialize the world/model matrix to the identity matrix. BuildIdentityMatrix(m_worldMatrix); The ultimate goal – To render a 3D world to the screen

Engine recap Engine Core Client Interface Operating System API Device API

Into the Emperor Engine Engine DX11 Device GL 4.3 Device ControllerManagerModel DX11 Object GL 4.3 Object DX 11 API GL 4.3 API DX 11 API GL 4.3 API 1 m 1 1 or 1 1 or 1 1 iEngine iController iModel

Stepping into the Engine iEngine.hpp namespace Emperor { class iEngine {…}; } Engine.hpp namespace Emperor { template class Engine : public iEngine, public Singleton > {…}; }

Reviewing Namespaces struct Foo { int a; }; namespace Bar { struct Foo { ::Foo a; }; namespace Derp { struct Foo { Bar::Foo a; }; } int main() { Foo a; Bar::Foo b; Bar::Derp::Foo c; } or using namespace Bar; int main() { ::Foo a; Bar::Foo b; Derp::Foo c; }

Reviewing Pure Virtual Classes (Interfaces) virtual void doStuff() = 0; Interface virtual void doStuff() {…} Derived Class void doStuff() {…} Most Derived Class class iThing { virtual void doStuff() = 0; }; class Thing : public iThing { virtual void doStuff() { std::cin << “Thing”; } }; class BigThing : pulic Thing { void doStuff() { std::cin << “BigThing”; } }; int main() { Thing* a = new Thing(); a->doStuff(); }; int main() { Thing* a = new BigThing(); a->doStuff(); }; int main() { //iThing* a = new iThing(); iThing* a = new BigThing(); a->doStuff(); };

The Engine Interface class iEngine { private: friend iEngine* createEngine(RenderSystem); friend void releaseEngine(iEngine*); protected: virtual ~iEngine() {} public: virtual void initialize() = 0; virtual void release() = 0; virtual void setFullScreen(bool) = 0; virtual bool isFullScreen() = 0; virtual void activateDevice(iWindow*) = 0; virtual iResourceController* getResourceController() = 0; virtual iSceneController* getSceneController() = 0; virtual void render() = 0; }; Create & Destroy Engine (Friends for Dynamic Linking) Retrieve Controllers Activates Device for rendering Render a Single Frame Initialize and Release Engine Assets

Back to the Engine iEngine.hpp namespace Emperor { class iEngine {…}; } Engine.hpp namespace Emperor { template class Engine : public iEngine, public Singleton > {…}; }

Template Review template class Foo { T a; public: Foo() {a = 0;} void doStuff(); }; int main() { } Foo a; Foo b; Foo c; class Foo_of_int { int a; public: Foo() {a = 0;} void doStuff() { std::cout << “Foo”; } }; class Foo_of_float { float a; public: Foo() {a = 0;} void doStuff() { std::cout << “Foo”; } }; template <> void Foo ::doStuff() { std::cout << “Char* Foo”; }; template void Foo ::doStuff() { std::cout << “Foo”; }; class Foo_of_char_ptr { char* a; public: Foo() {a = 0;} void doStuff() { std::cout << “Char* Foo”; } };

Template Specialization Review… template class Device{}; template <> class Device { private: IDXGISwapChain* swap; ID3D11Device* dev; ID3D11DeviceContext* con; … }; template<> class Device { private: HGLRC context; HDC hdc; … }; int main() { } Device a; Device b; Device c;

Template Misc. Review template class Foo { T a[N]; }; int main() { } Foo a; Foo b; Foo<> c; All three are the same! file.hpp template class Foo { T a; public: void doStuff(); }; file.cpp template void Foo ::doStuff() { std::cout << “Foo”; }; Compiler does nothing! Linker can’t find function! template class Foo ; Compiles for int and float, can only be bound to those!

Finishing Recap This course is all about engine development! An engine is framework that enables programmers to accomplish complex tasks with relative ease A system API is an interface that exposes a set of functions to provide programmers with control and functionality that would otherwise be out of grasp Device APIs like DirectX 11 and OpenGL 4.3 allow a more direct and more efficient method interfacing with the firmware controlling the hardware The GPU is a highly parallelized processing unit designed for 3D graphic rendering You got a glimpse of the Emperor Engine’s design

Course Breakdown Please read the course outline on the ICT website! Mark breakdown: Labs are worth 2% each, if a lab is not complete by the end of the day the highest mark achievable on the lab is ½. You are expected to know how to use git and Visual Studio 2013, there will be a review of them next class A laptop or desktop computer with a modern GPU is highly recommended Labs (10)20% Assignment (1)30% Mid-term20% Exam30%

To Do Install Visual Studio 2013 on your personal computers Install most recent DirectX SDK on your personal computers Update the graphics drivers of you personal computer (must support OpenGL 4.3) Create a BitBucket account if you don’t already have one