I want to use some glut features but I already make my own window, I dont want to use glut’s, is this possible? how can I do it? I tryed calling a glut teapot for example and it doesnt show up because glut crashes/ I get an error
I don’t think you can do this. You could grab the teapot code out of glut or find it online.
I think I have some teapot code some where message me your email and I can provide it for you.
It should very well be possible to use functions from the glut library within your program without using glut for window management, i.e., without initializing glut.
I personally program my OpenGL applications on Windows XP using Borland Delphi combined with the Delphi OpenGL Toolkit. This toolkit does not use glut for window management (the basic applications do not require glut.dll to run), but when I add the glut unit to my projects (in order to call glut drawing functions), make sure that glut.dll is available to my program, and subsequently call glutSolidTeapot(1.0) from my code, it all works fine.
Are you sure that the glut.dll library (Nate Robins - OpenGL - GLUT for Win32 in case you’re programming on Windows) is available to your program? The crash might be related to that.
to get the teapot just browse the start site’s topics (opengl.org) and look for some headline that says sh script for teapot or something otherwise the following code is the shell script that creates the teapot …
</font><blockquote><font size=“1” face=“Verdana, Arial”>code:</font><hr /><pre style=“font-size:x-small; font-family: monospace;”>#!/bin/sh
if touch 2>&1 | fgrep ‘[-amc]’ > /dev/null
if test ! -d ‘teapot’; then
echo “x - creating directory teapot”
echo “x - extracting teapot/TPOTBC.TEXT (Text)”
sed ‘s/^X//’ << ‘SHAR_EOF’ > teapot/TPOTBC.TEXT &&
X OUTLINE CURVE OF BODY OF TEAPOT
X SWEEP AROUND Y AXIS FOR WHOLE BODY
XPNT 1, 1.40000, 2.25000, 0.00000,
XPNT 2, 1.33750, 2.38125, 0.00000,
XPNT 3, 1.43750, 2.38125, 0.00000,
XPNT 4, 1.50000, 2.25000, 0.00000,
XPNT 5, 1.75000, 1.72500, 0.00000,
XPNT 6, 2.00000, 1.20000, 0.00000,
XPNT 7, 2.00000, 0.75000, 0.00000,
XPNT 8, 2.00000, 0.30000, 0.00000,
XPNT 9, 1.50000, 0.07500, 0.00000,
XPNT 10, 1.50000, 0.00000, 0.00000,
$TOUCH -am 0127120892 teapot/TPOTBC.TEXT &&
chmod 0644 teapot/TPOTBC.TEXT
of course you can use features of glut without using its window managment.
just #include <GL/glut.h>
I think you get the error because you don’t link glut32.lib