Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-07-2009, 07:03 PM   #1 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 1
Default why GL_LINE_LOOP doesn't work

Hi, I wrote a simple function,
b2Vec2 vertices[vertexCount];
vertices[0].x = 100; vertices[0].y = 100;
vertices[1].x = 210; vertices[1].y = 100;
vertices[2].x = 210; vertices[2].y = 210;
vertices[3].x = 100; vertices[3].y = 210;
vertices[4].x = 100; vertices[4].y = 100;
vertexCount = 5;

glVertexPointer(2, GL_FLOAT, 0, vertices);
//glDrawArrays(GL_POINTS, 0, vertexCount);
glDrawArrays(GL_LINE_LOOP, 0, vertexCount);

if I use glDrawArrays(GL_POINTS, 0, vertexCount); 4 points are drawn, but if I use glDrawArrays(GL_LINE_LOOP, 0, vertexCount); nothing is displayed on screen. glGetError returns no error. Did I miss any simple stuff?

thanks!
wwzhdo is offline   Reply With Quote
Reply

Bookmarks

Tags
opengl es

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 262
16 members and 246 guests
@sandris, ADY, dacapo, Dani77, djohnson, HemiMG, JasonR, MarkC, mer10, nibeck, prchn4christ, ryandb2, spiderguy84, timle8n1, tomtom100
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,882
Threads: 89,229
Posts: 380,763
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jansan
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:03 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0