GAM666 – Introduction To Game Programming ● DirectX is implemented as a collection of COM objects ● To use a DirectX program, the user must have the correct.

Slides:



Advertisements
Similar presentations
Component Object Model
Advertisements

Using.NET Platform Note: Most of the material of these slides have been taken & extended from Nakov’s excellent overview for.NET framework, MSDN and wikipedia.
COM vs. CORBA.
Module 4.2 File management 1. Contents Introduction The file manager Files – the basic unit of storage The need to organise Glossary 2.
Lesson 6 Software and Hardware Interaction
Intro to COM What is it and how do I use it?. Objectives Teach the fundamentals of COM. Understand the reason for using it. Learn to make a simple in-process.
Oct 31, 2000Database Management -- Fall R. Larson Database Management: Introduction to Terms and Concepts University of California, Berkeley School.
Object Oriented System Development with VB .NET
Slide 19.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Part two. 3.2 operating system architecture  Software have two categories  Application software  System software  Application software: consists of.
Cambodia-India Entrepreneurship Development Centre - : :.... :-:-
Operating Systems.
 Contents 1.Introduction about operating system. 2. What is 32 bit and 64 bit operating system. 3. File systems. 4. Minimum requirement for Windows 7.
Installing software on personal computer
Database Management Systems (DBMS)
1 DirectX CIS 487/587 Bruce R. Maxim UM-Dearborn.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Microsoft Visual Basic 2005 CHAPTER 1 Introduction to Visual Basic 2005 Programming.
TC2-Computer Literacy Mr. Sencer February 8, 2010.
Operating system Part two Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas Faculty of Information.
Intro to COM What is it and what can it do for me?
1 Modular Software/ Component Software 2 Modular Software Code developed in modules. Modules can then be linked together to produce finished product/program.
WINDOWS SERVICES. Introduction You often need programs that run continuously in the background Examples: – servers –Print spooler You often need.
M1G Introduction to Programming 2 4. Enhancing a class:Room.
CHAPTER 3 The Component Object Model and DirectX © 2008 Cengage Learning EMEA.
How To Fix Common Computer Errors m.
Tutorial 11 Installing, Updating, and Configuring Software
PROGRAMMING IN VISUAL BASIC.NET INTRODUCTION TO VISUAL BASIC.NET Bilal Munir Mughal 1 Chapter-1.
Lesley Bross, August 29, 2010 ArcGIS 10 add-in glossary.
COM vs. CORBA Computer Science at Azusa Pacific University September 19, 2015 Azusa Pacific University, Azusa, CA 91702, Tel: (800) Department.
Computer basics Lesson 4 – Programs & S.O..
ANDROID Presented By Mastan Vali.SK. © artesis 2008 | 2 1. Introduction 2. Platform 3. Software development 4. Advantages Main topics.
Computer Architecture and Organization Introduction.
Threading Models in Visual Basic Language Student Name: Danyu Xu Student ID:98044.
Grob Systems, Inc., the customer, requires an industrial computer system that will have a function of acquiring raw data, processing the data, presenting.
Software Writer:-Rashedul Hasan Editor:- Jasim Uddin.
‘Tirgul’ # 7 Enterprise Development Using Visual Basic 6.0 Autumn 2002 Tirgul #7.
Microsoft’s Distributed Component Object Model (DCOM) Jim Ries Updated 10/5/1999 A semi-technical overview.
COM/DCOM Implementation Basics of: Object creation and access Object Reuse Interface referencing.
COM and DCOM CS 562 February 27, Motivation Data Analyzer Resource Monitor int compute (…) { } int compute (…) { } Data Analyzer int compute (…)
COMCOM omponent bject odel After this presentation, you will: Be Able To: Conceptual understanding of COM How it works, What it’s used for Decode Acronyms.
Component Object Model
A COM implementation of the KSpace A ‘Knowledge Space prototype’ by Santhosh CST
INTRODUCTION SOFTWARE HARDWARE DIFFERENCE BETWEEN THE S/W AND H/W.
Introduction to COM and ActiveX Controls. What is an object? In the Fayad sense of the word.
SE-02 COMPONENTS – WHY? Object-oriented source-level re-use of code requires same source code language. Object-oriented source-level re-use may require.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
GAM666 – Introduction To Game Programming You must use special libraries (aka APIs – application programming interfaces) to make something other than a.
Seminarium on Component-based Software Engineering Feraaz Imami LIACS – Leiden University Fall 2005 Component Object Model (COM)
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
GAM666 – Introduction To Game Programming ● Programmer's perspective of Game Industry ● Introduction to Windows Programming ● 2D animation using DirectX.
GAM666 – Introduction To Game Programming ● DirectDraw, the 2D component of DirectX, uses the term “surface” to mean an area of memory in which pixel data.
Microsoft Visual Basic 2015 CHAPTER ONE Introduction to Visual Basic 2015 Programming.
THE SOFTWARE Computers need clear-cut instructions to tell them what to do, how to do, and when to do. A set of instructions to carry out these functions.
What is DirectX? DirectX is built by Microsoft as a collection of API’s (Application Programming Interfaces) for the purpose of multimedia processing.
Topic 2: Hardware and Software
Component Object Model(COM)
Introduction to Visual Basic 2008 Programming
Microsoft’s Distributed Component Object Model (DCOM)
Out-of-Process Components
Chapter 6 Programming with Office 97
Introduction to Computers
Microsoft Windows Technical Support Setup,Install,Activate
Mobile Development Workshop
CIS16 Application Development – Programming with Visual Basic
Chapter 7 –Implementation Issues
Introduction to Computer Systems
COMPONENTS – WHY? Object-oriented source-level re-use of code requires same source code language. Object-oriented source-level re-use may require understanding.
Out-of-Process Components
Presented By Justas Raslanas
Presentation transcript:

GAM666 – Introduction To Game Programming ● DirectX is implemented as a collection of COM objects ● To use a DirectX program, the user must have the correct (or later) version of DirectX installed (e.g. by doing Windows Update) ● To program a DirectX program, the programmer must have the correct (or later) version of the DirectX SDK installed (from MSDN) in addition to the compiler DirectX Programming Introduction

GAM666 – Introduction To Game Programming ● COM (Component Object Model) is one of Microsoft's ways of making objects at the operating system level [the other way is.NET] ● COM builds on DLL (dynamically linked library) technology, which is a way to store precompiled functions for linking at runtime rather than compile time ● COM objects can be accessed from any language supporting COM COM Overview

GAM666 – Introduction To Game Programming ● Every COM object exposes one or more Interfaces (collection of methods to control the object) ● Usually, when a new version of a COM object is released, the old interfaces are retained, and new features are implemented by creating new interfaces ● This allows the object to be upgraded while still allowing programs that use the older versions to run correctly (assuming the new version doesn't break the old interfaces) COM Overview

GAM666 – Introduction To Game Programming Every COM interface implements at least the following three methods: ● QueryInterface() – allows you to get any of the other interfaces, using the interface's ID ● Release() – tells COM that you are finished using this instance of the interface so that it can be removed from memory if nothing else is using it (like C++ delete) ● AddRef() – tells COM that you have just made a copy of the interface instance (which will later be Released) COM Overview

GAM666 – Introduction To Game Programming ● Every COM object has an interface IUnknown with the three required methods [QueryInterface(), Release() and AddRef()] ● This allows the programmer a predictable way to get any interface the object has (presuming the programmer knows the interface ID), in case a specialized function to obtain the interface doesn't exist COM Overview

GAM666 – Introduction To Game Programming Libraries (such as parts of the DirectX SDK) often have functions to instantiate desired interfaces. Alternately: ● CoInitialize() can be used to initialize the generic COM access library ● Then, CoCreateInstance() can be used to instantiate a particular interface of a particular COM object ● If CoInitialize() is used, then CoUninitialize() must be called before the program ends COM Overview

GAM666 – Introduction To Game Programming ● When a COM object is installed on a computer, GUIDs (Globally Unique Ids) for the object (CLSID) and its interfaces (IID) are stored in the system registry ● A GUID (aka UUID – Universally Unique ID) is a 128-bit number ● There are utilities to create a GUID that will [probably, to a high degree of certainty] be unique ● GUIDs are used to identify much of the hardware and software installed on your PC COM Overview

GAM666 – Introduction To Game Programming ● DirectX 7 still often used for 2D games ● DirectDraw (2D graphics) was rolled into DirectX Graphics (mostly 3D graphics) starting with DirectX 8 to encourage developers to move to 3D ● DirectX 7 uses some techniques that were simplified starting with DirectX 8 but which you should be prepared to encounter if maintaining legacy code DirectX 7 Overview

GAM666 – Introduction To Game Programming ● Sample1 shows how to create a DirectDraw7 object and query it for available resolutions ● The user is presented with a choice of resolutions, after which the screen resolution is changed ● Technique of querying the DD7 object is a typical Windows “enumeration”, where the logic for handling one possibility is coded in a function whose address is given to Windows, and which Windows calls as many times as necesary DirectX 7 Overview