PDA

View Full Version : problem with line styles



Meatz0r
04-16-2011, 01:40 PM
Good night to all,
I'm new in OpenGL, and i already faced with problem
I Cant enable changing line styles
<div class="ubbcode-block"><div class="ubbcode-header">Click to reveal.. <input type="button" class="form-button" value="Show me!" onclick="toggle_spoiler(this, 'Yikes, my eyes!', 'Show me!')" />]<div style="display: none;">
#include <GL/glut.h>


void init(void){
glClearColor(0.0,0.0,0.0,0.0);
glShadeModel(GL_FLAT);


}


void display(void){
int i;
glClear(GL_COLOR_BUFFER_BIT);
//&amp;#1073;&amp;#1077;&amp;#1083;&amp;#1099;&amp;#1081; &amp;#1094;&amp;#1074;&amp;#1077;&amp;#1090; &amp;#1074;&amp;#1089;&amp;#1077;&amp;#1093; &amp;#1083;&amp;#1080;&amp;#1085;&amp;#1080;&amp;#1081;
glColor3f(1.0,1.0,1.0);
//3 &amp;#1083;&amp;#1080;&amp;#1085;&amp;#1080;&amp;#1080; &amp;#1088;&amp;#1072;&amp;#1079;&amp;#1085;&amp;#1086;&amp;#1075;&amp;#108 6; &amp;#1074;&amp;#1080;&amp;#1076;&amp;#1072;
glEnable(GL_LINE_STRIPPLE);
glLineStripple(1,0x3F07);
}

void reshape(int w, int h){
glViewport(0,0,(GLsizei)w,(GLsizei)h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity;
gluOrtho2D(0.0, (GLdouble) w, 0.0, (GLdouble) h);
}



main(int argc,char** argv)
{
glutInit(&amp;argc, argv);
glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB);
glutInitWindowSize(400,150);
glutInitWindowPosition(100,100);
glutCreateWindow(argv[0]);
init();
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutMainLoop;
return 0;

}
[/QUOTE]</div>

VC informs me,that
glEnable(GL_LINE_STRIPPLE);
glLineStripple(1,0x3F07);
is incorrect
GL_LINE_STRIPPLE
"ident. undefined"
i have same warning for
glLineStripple

I use GLUT and VC 10.
And sorry for my English

Alfonse Reinheart
04-16-2011, 04:42 PM
It's called "Stipple". No 'R'.

Meatz0r
04-17-2011, 02:34 AM
thank You =)