dev.gamez.lv Forum Index dev.gamez.lv
Latvian Game Developers Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 

Lāmeriski jautājumi par opengl
Goto page 1, 2  Next
 
dev.gamez.lv Forum Index -> OpenGL
View previous topic :: View next topic  
Author Message
Kristians



Joined: 06 Apr 2005
Posts: 99
Location: Ventspils

PostPosted: Fri Jul 22, 2005 1:08 pm    Post subject: Lāmeriski jautājumi par opengl

Kapēc šitas kods neiet?
Code:
   glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
      glLoadIdentity;
      glTranslatef(0.0, 0.0, -12.0);
      glBegin(GL_QUADS);
       glvertex3f(1.0,1.1,-0.5); glvertex3f(0.5,1.1,-0.5);
   glEnd;
   SwapBuffers(wglGetCurrentDC);

kā nomainīt krāsu?
un uzlikt tekstūru?
Nosauciet veel tos ziimejamo tipus (nezinu kaa tos sauc) jo zinu tik GL_QUADS un GL_TRIANGLES.
[/code]
Back to top
View user's profile Send e-mail
GiGa
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 25 Sep 2003
Posts: 887

PostPosted: Fri Jul 22, 2005 1:21 pm    Post subject:

Kaa to saprast neiet? Smile
Nokompileejas bet nekas uz ekraana neparaadas?

glBegin(GL_QUADS); - saak ziimeet chetrstuurus! Lai uzziimeeru chetrstuuri, jaatliek 4 punkti, bet tu atliec tikai divus: glvertex3f(1.0,1.1,-0.5); glvertex3f(0.5,1.1,-0.5); un uzreiz izsauc glEnd; kas beidz ziimeet chetrstuurus, liidz ar to nekas netiek uzziimeets.

Paareejie ziimeeshanas veidi:

GL_POINTS individual points
GL_LINES pairs of vertices interpreted as individual line segments
GL_POLYGON boundary of a simple, convex polygon
GL_TRIANGLES triples of vertices interpreted as triangles
GL_QUADS quadruples of vertices interpreted as four-sided polygons
GL_LINE_STRIP series of connected line segments
GL_LINE_LOOP same as above, with a segment added between last and first vertices
GL_TRIANGLE_STRIP linked strip of triangles
GL_TRIANGLE_FAN linked fan of triangles
GL_QUAD_STRIP linked strip of quadrilaterals

Siikaak te: http://fly.cc.fer.hr/~unreal/theredbook/chapter02.html

EDIT: par textuuru un kraasaam - palasi taksh kaadu tutoriaali, piemeeram Nehe Smile
_________________


Last edited by GiGa on Fri Jul 22, 2005 2:07 pm; edited 1 time in total
Back to top
View user's profile Send e-mail
Guest






PostPosted: Fri Jul 22, 2005 1:56 pm    Post subject:



Last edited by Guest on Wed Sep 14, 2005 11:46 am; edited 1 time in total
Back to top
Kamazs
Guru
Guru


Joined: 17 Jan 2003
Posts: 829
Location: The glorious ancient city of Loja

PostPosted: Sat Jul 23, 2005 10:27 pm    Post subject:

Plus, vai man tā rādās vai tur tiešām ir
Code:

glvertex3f(1.0,1.1,-0.5); glvertex3f(0.5,1.1,-0.5);

?

Ar mazo burtu? Tas ir case-sensitive vai nav?
_________________
...un es uzskatu, ka Fallout ir etalons
Back to top
View user's profile Send e-mail Visit poster's website
Kristians



Joined: 06 Apr 2005
Posts: 99
Location: Ventspils

PostPosted: Sat Jul 23, 2005 11:50 pm    Post subject:

Quote:
Ar mazo burtu? Tas ir case-sensitive vai nav?
es jau nekodēju uz c++ kur tas tik svariigi Razz
Back to top
View user's profile Send e-mail
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Sun Jul 24, 2005 12:08 pm    Post subject:

Code:
glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);

Izskatās pēc paskāla. Iekš C or vietrā būtu |.
Back to top
View user's profile Send e-mail
Kristians



Joined: 06 Apr 2005
Posts: 99
Location: Ventspils

PostPosted: Mon Jul 25, 2005 5:48 am    Post subject:

Piekēra gan Laughing
Back to top
View user's profile Send e-mail
Guest






PostPosted: Mon Jul 25, 2005 10:54 am    Post subject:



Last edited by Guest on Wed Sep 14, 2005 11:46 am; edited 1 time in total
Back to top
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Mon Jul 25, 2005 11:29 am    Post subject:

Nez, pēc koda to nevar pateikt. Tur nav nekādas Object Pascal koda specifiskās fīčas izmantotas..
Back to top
View user's profile Send e-mail
Guest






PostPosted: Mon Jul 25, 2005 12:43 pm    Post subject:



Last edited by Guest on Wed Sep 14, 2005 11:47 am; edited 1 time in total
Back to top
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Mon Jul 25, 2005 12:47 pm    Post subject:

Vai tik tu nejauc konkrētu kompilētāju ar vispārīgu valodas nosaukumu? (Delphi vs C/C++) C++ jau arī ir dažādi - MS VC++, GNU C++, u.t.t
Kas vainas rakstīt OpenGL aplikācijas ar FreePascal, GNU Pacsal?
OpenGL jau nav piesaistīts konkrētai valodai, bet gan konkrētām platformām. Ja valoda spēj veidot izpildāmos failus/skriptus šai platformai, tad tā spēj arī izmantot OpenGL piedāvāto API.
Back to top
View user's profile Send e-mail
Guest






PostPosted: Mon Jul 25, 2005 1:12 pm    Post subject:



Last edited by Guest on Wed Sep 14, 2005 11:48 am; edited 1 time in total
Back to top
Vecais_Dumais_Laacis
Guru
Guru


Joined: 29 Jan 2004
Posts: 800

PostPosted: Mon Jul 25, 2005 2:37 pm    Post subject:

emm.. kopsh kura laika Kylix ir valoda?
_________________
...un ja bites buutu laachi...
Back to top
View user's profile
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Mon Jul 25, 2005 3:47 pm    Post subject:

c++ + Delphi = Kylix? es ar kautkā šabos.. Arī par to, ka Delphi ir valoda. Object Pascal gan ir valoda!

Pēc manas izpratnes:
Kylix = Object Pascal + IDE + VCL (bāzēts uz QT) + libc API
Delphi = Object Pascal + IDE + VCL (bāzēts uz Win32 native kontrolēm) + Win32 API
Back to top
View user's profile Send e-mail
Vecais_Dumais_Laacis
Guru
Guru


Joined: 29 Jan 2004
Posts: 800

PostPosted: Mon Jul 25, 2005 4:37 pm    Post subject:

man domaat ka kylix ir IDE(crossplatform) kura supportee Delphi / C++.
+ CLX komponentes

Quote:
Kylix 3 delivers two separate IDEs—one for use with the Delphi language and one that supports
C/C++.

http://www.borland.com/resources/en/pdf/products/kylix/kyl3_faq.pdf
_________________
...un ja bites buutu laachi...
Back to top
View user's profile
Display posts from previous:   
dev.gamez.lv Forum Index -> OpenGL All times are GMT + 2 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group