Difference between revisions 1310 and 1311 on hiwikiversity

{{कंप्यूटर ग्राफिक्स -- 2013-2014 -- info.uvt.ro/पेज हैडर}}
== पूर्ण उदाहरण ==
दो उदाहरण टेम्पलेट्स यहां दिए गए हैं। एक ऑर्थोग्राफिक प्रोजेक्शन का उपयोग दृश्यों के लिए और एक पर्सपेक्टिव प्रोजेक्शन का उपयोग दृश्यों के लिए। उदाहरणों को भविष्य के जीओजीएल(JOGL) आधारित एप्लीकेशन के लिए टेम्पलेट्स के रूप मेंं इस्तेमाल किया जा सकता हैं।

=== ऑर्थोग्राफिक प्रोजेक्शन उदाहरण ===

<source lang="java">
import javax.media.opengl.GL;
(contracted; show full)		GLCapabilities capabilities = new GLCapabilities(glprofile);
		
		// Setting some OpenGL parameters.
		capabilities.setHardwareAccelerated(true);
		capabilities.setDoubleBuffered(true);

		// Try to enable 2x anti aliasing. It should be supported on most hardware.
	 
              capabilities.setNumSamples(2);
        	capabilities.setSampleBuffers(true);
		
		// Creating an OpenGL display widget -- canvas.
		this.canvas = new GLCanvas(capabilities);
		
		// Adding the canvas in the center of the frame.
		this.getContentPane().add(this.canvas);
(contracted; show full)		GLCapabilities capabilities = new GLCapabilities(glprofile);
		
		// Setting some OpenGL parameters.
		capabilities.setHardwareAccelerated(true);
		capabilities.setDoubleBuffered(true);

		// Try to enable 2x anti aliasing. It should be supported on most hardware.
	 
              capabilities.setNumSamples(2);
        	capabilities.setSampleBuffers(true);
		
		// Creating an OpenGL display widget -- canvas.
		this.canvas = new GLCanvas(capabilities);
		
		// Adding the canvas in the center of the frame.
		this.getContentPane().add(this.canvas);
(contracted; show full)}
</source>

{{कंप्यूटर ग्राफिक्स -- 2013-2014 -- info.uvt.ro/पेज फ़ुटर}}

[[Category:HI]]
[[Category:कंप्यूटर ग्राफिक्स]]
[[Category:प्रोग्रामिंग उदाहरण]]