Game Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesGame Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old February 12th, 2007, 12:47 AM
|d|l34rn3r |d|l34rn3r is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 92 |d|l34rn3r User rank is Corporal (100 - 500 Reputation Level)|d|l34rn3r User rank is Corporal (100 - 500 Reputation Level)|d|l34rn3r User rank is Corporal (100 - 500 Reputation Level)|d|l34rn3r User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 6 h 47 m 7 sec
Reputation Power: 6
OpenGL and full screen

Hi,

I'm having issues with rendering a texture on an object in full screen mode. No problems occur in windowed mode, however in full screen the texture isn't rendered properly.

I am initializing GL as so:
PHP Code:
::glClearColor(0.0f0.0f0.0f0.5f);
    ::
glClearDepth(1.0f);
    ::
glDepthFunc(GL_LEQUAL);
    ::
glEnable(GL_DEPTH_TEST);
    ::
glEnable(GL_TEXTURE_2D);
    ::
glShadeModel(GL_SMOOTH);
    ::
glHint(GL_PERSPECTIVE_CORRECTION_HINTGL_NICEST);

    ::
glTexParameteri(GL_TEXTURE_2DGL_TEXTURE_WRAP_SGL_REPEAT);
    ::
glTexParameteri(GL_TEXTURE_2DGL_TEXTURE_WRAP_TGL_REPEAT);
    ::
glTexParameteri(GL_TEXTURE_2DGL_TEXTURE_MAG_FILTERGL_LINEAR);
    ::
glTexParameteri(GL_TEXTURE_2DGL_TEXTURE_MIN_FILTERGL_LINEAR);
    ::
glTexEnvf(GL_TEXTURE_ENVGL_TEXTURE_ENV_MODEGL_MODULATE); 


And I'm making the following calls before actually drawing the elements (by invoking glDrawElements):
PHP Code:
 glEnable(GL_LIGHT0);
    
glLightfv(GL_LIGHT0GL_DIFFUSEsamplelight);

    
// Set the current object transformation
    
glLoadIdentity();
    ::
glBindTexture(GL_TEXTURE_2Dm_pTexture->TextureID);
    
glTranslatef(m_fXm_fYm_fZ 200);
    
glRotatef(m_fAZ1.0f0.0f0.0f);
    
glRotatef(m_fAY0.0f1.0f0.0f);
    
glRotatef(m_fAZ0.0f0.0f1.0f);

    
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
    
glTexCoordPointer(2GL_FLOAT0m_TexCoordData);
    
glEnableClientState(GL_NORMAL_ARRAY);
    
glNormalPointer(GL_FLOAT0m_NormalData);
    
glEnableClientState(GL_VERTEX_ARRAY);
    
glVertexPointer(3GL_FLOAT0m_VertexData);

    
GLfloat glfModelSpecular[4];

    
// This causes the polygon's ambient & diffuse colors to be derived from the glColor() value.
    
glColorMaterial(GL_FRONT_AND_BACKGL_AMBIENT_AND_DIFFUSE);
    
glMaterialf(GL_FRONT_AND_BACKGL_SHININESSshininess);
    
/* Set the specular shading color. */
    
glfModelSpecular[0] = r_specularColor;
    
glfModelSpecular[1] = g_specularColor;
    
glfModelSpecular[2] = b_specularColor;
    
glMaterialfv(GL_FRONT_AND_BACKGL_SPECULARglfModelSpecular);
    
glColor3f(r_diffuseColorg_diffuseColorb_diffuseColor); 


What do you think this full-screen glitch might be? Are there any tests you could recommend me to try and identify what's causing this? I've tried googling this up but have had no luck...

I'd really appreciate some feedback!

Reply With Quote
  #2  
Old February 18th, 2007, 11:17 PM
Devorius Devorius is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 45 Devorius User rank is Corporal (100 - 500 Reputation Level)Devorius User rank is Corporal (100 - 500 Reputation Level)Devorius User rank is Corporal (100 - 500 Reputation Level)Devorius User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 7 h 20 m 59 sec
Reputation Power: 4
I haven't worked much with OpenGL at a programatic level, however a lot of video cards (especially ATI) have rendering problems with OpenGL, some of which only occur in a full screen mode.

That said, it may be useful to detail how exactly it is being rendered incorrectly.

In the mean time, while awaiting a better answer, you might check out the example/demo programs from OGRE or Irrlicht (two open source 3D engines), both of which allow you to choose between renderers (OpenGL, D3D, Software) so that you might determine if it is a problem with your video card/driver.

Reply With Quote
  #3  
Old February 19th, 2007, 03:54 AM
|d|l34rn3r |d|l34rn3r is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 92 |d|l34rn3r User rank is Corporal (100 - 500 Reputation Level)|d|l34rn3r User rank is Corporal (100 - 500 Reputation Level)|d|l34rn3r User rank is Corporal (100 - 500 Reputation Level)|d|l34rn3r User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 6 h 47 m 7 sec
Reputation Power: 6
Thanks for that. I've meanwhile sorted out what was causing the glitch and now it seems to be working just fine.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesGame Development > OpenGL and full screen


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway