Introduction to graphic standards

Graphics standards agreed specifications हैं जो graphics software को अलग-अलग hardware के across काम करने देती हैं: ये programmers को commands का एक common set देती हैं तो एक application कई devices पर same तरह draw कर सके, हर एक के लिए rewritten हुए बिना।

9 min read · 7 cards · 2 checks

Read in: English · हिन्दी · ગુજરાતી


Theory

एक Program, कई Devices

Imagine कीजिए एक graphics program लिखना जिसे कई अलग screens, printers, और graphics cards पर run होना है, हर एक की अपनी hardware के साथ। कुछ common ground के बिना, आपको हर device के लिए drawing code rewrite करना पड़ेगा। यह unworkable है।

Graphics standards इसे solve करते हैं। एक standard एक agreed specification है, graphics commands का एक common set, जिसे कई devices और systems support करते हैं। अपना program standard से लिखिए, और यह इन सब के across काम करता है। Unit का यह closing lesson explain करता है graphics standards क्या हैं और portability के लिए ये क्यों matter करते हैं।

Theory

एक Graphics Standard क्या Provide करता है

एक graphics standard एक common interface define करता है: functions और commands का set जो एक programmer graphics produce करने के लिए इस्तेमाल करता है, नीचे की specific hardware से independent। Program standard के commands call करता है ('एक line draw कीजिए', 'एक polygon fill कीजिए'), और standard का implementation उन्हें actual device को जो चाहिए उसमें translate करता है।

यह device independence और portability देता है: same graphics code अलग machines पर same results produce करता है, और एक programmer की skills systems के बीच transfer होती हैं। Standards hardware makers के लिए भी easier बनाते हैं (standard support कीजिए, और सारा conforming software run होता है) और teaching के लिए (standard सीखिए, सौ device quirks नहीं)।

At a glance

Standard / APINote
GKS (Graphical Kernel System)2D graphics के लिए एक early standard
PHIGSProgrammer's Hierarchical Interactive Graphics System, structured 3D के लिए
OpenGLएक widely used cross-platform graphics API
DirectXMicrosoft का graphics और multimedia API (Windows)

Formula

Point Portability और Independence है

कोई भी specific standard हो, core benefit same है: एक बार लिखिए, कई devices पर run करिए। एक particular hardware की बजाय एक standard के against programming करके, आपका graphics application portable बन जाता है और hardware interchangeable बन जाता है, जब तक हर device standard support करता है।

यह वही idea है जिससे आप computing के through मिले हैं: एक common interface पर agree कीजिए, और independent parts cooperate कर सकते हैं (networks के लिए TCP/IP की तरह, या OSI model)। Graphics standards इसे drawing पर apply करते हैं, software को किसी एक device की details से free करते हुए। Standard सीखिए, और आपका code, और आपका knowledge, travel करता है।

Quiz

OpenGL जैसे एक computer graphics standard का main purpose क्या है?

  1. Graphics files छोटी बनाना
  2. Graphics commands का एक common set provide करना तो एक program अलग hardware पर बिना rewritten हुए run कर सके (portability और device independence)
  3. एक graphics card की ज़रूरत replace करना
  4. Images को vectors की तरह store करना
Show the answer

Graphics commands का एक common set provide करना तो एक program अलग hardware पर बिना rewritten हुए run कर सके (portability और device independence)

एक graphics standard एक common interface provide करता है, graphics commands का एक agreed set, तो standard से लिखा गया एक program अलग devices पर बिना rewriting के run हो, portability और device independence देते हुए। Option A standards को file compression से confuse करता है; standards एक programming interface के बारे में हैं, files shrink करने के बारे में नहीं। Option C wrong है: एक standard graphics hardware के WITH काम करता है (commands को इसमें translate करते हुए), यह इसकी ज़रूरत remove नहीं करता। Option D एक file storage choice describe करता है (vector vs raster), एक अलग topic; एक standard एक API है, file format नहीं। Core value write-once, run-on-many-devices है।

Think first

Specific Hardware के लिए Programming से एक Standard के लिए Programming Better क्यों है?

एक particular device के लिए tuned graphics code क्यों न लिखें? Standard आपको क्या देता है? फिर tap कीजिए।

Show the answer

क्योंकि अपने code को specific hardware से tie करना इसे FRAGILE और UNPORTABLE बनाता है, जबकि एक standard के लिए programming करना इसे हर जगह काम करने लायक बनाता है जहाँ standard support होता है, और software और hardware दोनों को independently evolve करने देता है। अगर आपने graphics directly एक particular graphics card या screen के लिए लिखी होती, आपका program सिर्फ़ उसी exact hardware पर run होता; एक अलग device, एक newer card, या दूसरा platform drawing code rewrite करने की मांग करता, एक enormous, repeated effort, और आपके users specific machines पर locked होते। OpenGL जैसे एक STANDARD के लिए programming करके, आप commands का एक common set call करते हैं, और हर device अपना implementation (एक driver) provide करता है जो उन commands को इसकी hardware को जो चाहिए उसमें translate करता है। तो same graphics program कई अलग cards और systems पर unchanged run होता है, क्योंकि वे सब standard समझते हैं। यह आपके software को hardware से decouple करता है: hardware makers नई, faster devices build कर सकते हैं जो अभी भी सारा existing standard-based software run करती हैं (बस standard implement कीजिए), और software developers एक बार लिखकर devices की एक huge range को target कर सकते हैं। यह expertise भी concentrate करता है, driver writers अपनी hardware के लिए standard के commands optimise करते हैं, तो आपके app को वह performance मुफ्त में मिलती है। और यह knowledge को portable बनाता है: standard सीखिए और आप किसी भी conforming device के लिए graphics लिख सकते हैं। यह exactly वह interface-versus-implementation principle है जो computing के through चलता है (एक API की तरह, या एक network protocol): interface पर agree कीजिए, और दोनों तरफ के parts freely change हो सकते हैं। Standards 'सिर्फ़ इस एक device पर काम करता है' को 'हर जगह काम करता है' में बदल देते हैं, यही वजह है ये graphics programming के लिए foundational हैं। Standard को target कीजिए, metal को नहीं।

Summary

Key takeaways

  • एक graphics standard एक agreed specification है: devices के across supported graphics commands का एक common set।
  • यह device independence और portability देता है, same graphics code अलग hardware पर काम करता है।
  • Program standard के commands call करता है, और इसका implementation actual device के लिए इन्हें translate करता है।
  • Known standards और APIs: GKS, PHIGS, OpenGL (cross-platform), DirectX (Microsoft/Windows)।
  • Standards software की help करते हैं (एक बार लिखिए, कई पर run करिए), hardware makers की (standard support कीजिए, सारे conforming apps run करिए), और learners की।
  • यह interface-versus-implementation idea है graphics पर applied, networking के लिए network protocols की तरह।
  • Memory hook: standard के लिए program कीजिए, specific hardware के लिए नहीं, तो आपका code कई devices पर run हो।

Study this properly

This page is the lesson to read. In Gri-Learn the same topic is a graded deck: the self-checks are scored and your weak topics are tracked. Free to start.

Start this topic

Already have an account? Sign in

More from Introduction

Gri-Learn · syllabus-mapped B.C.A. lessons in English, Hindi and Gujarati

Introduction to graphic standards · Computer Graphics (Minor-6-03) · Gri-Learn