الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

سؤال حول التحويل بين dx و gl

مغلق
بدأه Abdullah.Alshammeri في 14 فبراير 2006 · 2 رد · 596 مشاهدة · في قسم برمجة الألعاب و الرسوميات العام
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم :

عندي سؤالين :

1- اذكر في الدايركت اكس يوجد خياران للتصيير ..

اما باستخدام SoftWare .. او HardWare ..

السوفت وير .. مفيد اذا كان كرت الشاشة ضعيف .. وبالتالي يمكنني من مشاهدة أي مثال حتى ولو كان متقدم بصريّاً ,,

لكن في OpenGL حاولت أن أبحث عن شيء مشابه لكن لم أجد ,,

هل من طريقة لتحويل الرندر في opengl الى SoftWare ,

السؤال الثاني : أشاهد في بعض المحركات وبعض الالعاب ,,عند تشغيلها يعطيني خيارين ..

هل تريد استخدام مكتبة directx ,, او ,, OpenGL .

وبالتالي يكون الRender جيد بحسب المكتبة اللي اختارها ,

كيف استطاع مطوروا هذه اللعبة .. أن يجمعوا بين المكتبتين في تطبيق واحد .

انا احاول ان انتج تطبيق من خلال مكتبة opengl .. ولكن أريد استخدم الRender التابع لـ directx وبالتالي أتجاوز مشكلة كروت العرض والمسرعات .,,

كيف يمكنني ذلك ,,

لكن حسب ما أتوقع ان مبرمجي هذه اللعبة قاموا بتغليف دوال DXو GL في مكتبة واحدة مثلا

  MakeTexture()
{
if(Render==GL)
glCreateTexture()

else 
dxCreateTexture();

}

هل هذا صحيح ...

أتمنى أني وصلت السؤال صح ,, اذا مو واضح .. احاول اوضح زيادة ..

logo1.png تطبيق طمأنينة ، نسخة بيتا على أندرويد

عبدالله الشمّري - Al-Shammari

CodingAlone.com

twitter @abshammeri

abshammeri AT gmail.com

github : abshammeri

#2

السلام عليكم

1-In directX, not all the rendering is done in software, just the transform and lightinging operations can be done in software or hardware. All other operations are done in hardware only.

For OpenGL, the VGA driver decides whether to use software or hardware TnL, based on the specifications of the video card. If the video card and the driver support hardware TnL, then hardware TnL will be used automatically.If not, then software TnL will be used automatically.

2-You are right, games that can support both OpenGL and directX engines write code for both OpenGL and directX.

In My opinion, this is not a good Idea, because both open GL and DirectX have different architecture and performance characteristics.

For example, For directX it is preferred to draw many triangles with one DrawPrimitive() call, to decrease the calls to DrawPrimitive() as much as possible to decrease the number of CPU cycles consumed.In OpenGL the opposite is true, where it is prefered to draw one triangle each function call.

Many other performance and architecuture difference between OpenGL and directX exist, which makes it difficult to write a game engine that has a high perfromance both on directX and OpenGL. you have to focus on one only. Most high performance game engines such as DOOM, FEAR, Half Life focuses only on one of them.

#3

جواب واضح .. ومفهوم .

يعطيك العافية ..

logo1.png تطبيق طمأنينة ، نسخة بيتا على أندرويد

عبدالله الشمّري - Al-Shammari

CodingAlone.com

twitter @abshammeri

abshammeri AT gmail.com

github : abshammeri

هذا الموضوع مغلق.

مواضيع مشابهة