Skip to main content
GameDev.net gamedev.net
🔒 Locked 🎯 Unreal

GLSL: Using textures

Started by ChristophR Aug 4, 2006 at 12:10 PM 2 replies 550+ views
Original Post
ChristophR
ChristophR
Hi! I am trying to use textures in my GLSL shader. I read that it is necessary to add a line of code to the vertex shader in order to define the texture coordinates for the fragement shader. Currently my vertex shader looks like that:

void main(){
	gl_Position = ftransform();
	gl_TexCoord[0]  = gl_MultiTexCoord0;
}
The second line causes a fatal error. When the shader is used, first the whole system blocks (I can't even move the cursor anymore). After a few seconds the screen gets black and my computer restarts. What could be the reason for this problem? EDIT: All tests of the tool "OpenGL Extensions Viewer" succeed, even the shader tests (which also use textures). rgds
hplus0603
hplus0603
Locking up the machine sounds like a driver bug.

First, make sure you're using the latest version of the drivers for your card.

Second, package up the application, with instructions on how to reproduce the problem, and mail to devrel@ati.com (if it's an ATI card), or devrel@nvidia.com (if it's an NVIDIA card).

My guess: it's an ATI card :-)
enum Bool { True, False, FileNotFound };
_the_phantom_
_the_phantom_
I wouldn't be shocked if it was an ATI card either, ATI's drivers are a lot less forgiving of programmer error than NVs (which is a good thing imo), the classic example being if you don't setup your data correctly and try to read from something which hasn't been setup right it'll crash the system out.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.