Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6071849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:05:39+00:00 2026-05-23T10:05:39+00:00

I am building a 3D-house in OpenGL. I decided to use GLObjViewer to load

  • 0

I am building a 3D-house in OpenGL. I decided to use GLObjViewer to load the models and textures. That works fine.
But GLObjViewer’s shading modules just support “a single fixed directional light source shining down the OpenGL default negative z-axis” as its documentation states.
So when I fix the light, some walls become dark;when I make the light move with the camera, the wall’s shades changes continuously.

What I want now is to make all the walls well illuminated and their shades do not change after moving camera. Please suggest me how to afford it? (How to use multiple lights in GLObjViewer or another solution).

You can find GLObjViewer documentation and source code here: http://www.dhpoware.com/demos/glObjViewer.html

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:05:40+00:00Added an answer on May 23, 2026 at 10:05 am

    OpenGL-2 light positioning is transformed by the modelview matrix. That means that you must set light position after placing the camera but before applying the object local transformations.

    OpenGL before version 3 supports at least 8 lights (GL_LIGHT0 … GL_LIGHT7). Which can be enabled and set independently. Later OpenGL versions are completely shader driven; lights are implemented through apropriate shaders, light parameters are passed through uniforms.

    OpenGL-3 compatibility and earlier versions have predefined uniforms like gl_LightPosition[], which is used in this application. You set those predefined uniforms through the appropriate OpenGL state setters. glLight… in your case.

    OpenGL-3.1 core and later abandon predefined light uniforms alltogether and place the burden on the programmer to implement it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are building an in house software package that will exclusively be used on
We're building a .NET software platform for test automation for in house use in
I am currently building a thin C++ wrapper around pthreads for in-house use. Windows
I am building an in-house application. My manager told that my app freezes time
I have this weird problem.. I'm building an in-house app that should register all
As our in-house app is growing so is the frontend that I'm building with
We were building out the next version of an in-house thick-client application using WPF/Prism
building a site using PHP and MySQL that needs to store a lot of
Building a website that has English & Japanese speaking users, with the Japanese users
Building an iPhone OS application that will allow users to anonymously post information to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.