Submit
In response to Language for new Game
6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Jul 01, 2003 at 04:16

oh, just for all your note. D can interface directly with C/C++.. well actually only with c, but as c++ does that most the time anways, too, as well with c++:D

thats great… i’m merely interested if i can setup one time the compiler to compile stuff for me at runtime, adding D as a scripting/plugin-language, as it is much more save..

In response to opengl lights
6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Jul 01, 2003 at 04:14

great!!

and to add to the screenshots: they are not only nice, but they where useful to detect the problem as well (if that really was the problem, of course:D)

In response to opengl lights
E05263ec846eb85da803f56e2917962d
0
Noor 101 Jun 30, 2003 at 22:21

Good. Congratulation!

[EDIT]
yes, very nice screenshots!
[/EDIT]

In response to Language for new Game
F699ebb187331fdf7f7875320e3e7e3e
0
starboarder2001 101 Jun 30, 2003 at 22:07

i vote c++… B)

In response to opengl lights
F699ebb187331fdf7f7875320e3e7e3e
0
starboarder2001 101 Jun 30, 2003 at 21:50

ok thanks i got it working :D

In response to opengl lights
Fdbdc4176840d77fe6a8deca457595ab
0
dk 158 Jun 30, 2003 at 21:42

Nice screenshots you have, btw :)

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Jun 30, 2003 at 21:37

i don’t suggest it as well (read it over on nutty.org, too:D)

use a modeler..

In response to opengl lights
6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Jun 30, 2003 at 21:32

use glLightfv(GL_LIGHT0,GL_POSITION,lightposition) as if you would draw a point.. means you possibly draw it at the moment it would just sit in front of your cam, without translation and rotation yet..

place the function where you draw the landscape..

In response to opengl lights
F699ebb187331fdf7f7875320e3e7e3e
0
starboarder2001 101 Jun 30, 2003 at 21:15

this is what i am doing now:

//example1
float ambientlight[4]; //ambient light
float diffuselight[4]; //diffuse light
float specularlight[4]; //specular light
float lightposition[4]; //light position

//i would setup the 4 variables above here//

glLightfv(GL_LIGHT0,GL_AMBIENT,ambientlight);
glLightfv(GL_LIGHT0,GL_DIFFUSE,diffuselight);
glLightfv(GL_LIGHT0,GL_SPECULAR,specularlight);
glLightfv(GL_LIGHT0,GL_POSITION,lightposition);

glLightf(GL_LIGHT0,GL_CONSTANT_ATTENUATION,0.9);
glLightf(GL_LIGHT0,GL_LINEAR_ATTENUATION,0.1);
glLightf(GL_LIGHT0,GL_QUADRATIC_ATTENUATION,0.1f);

glEnable(GL_LIGHT0);

this is what i tryed:

//example2
float ambientlight[4]; //ambient light
float diffuselight[4]; //diffuse light
float specularlight[4]; //specular light

//i would setup the 4 variables above here//

glPushMatrix();

glTranslatef(0,0,10);
glLightfv(GL_LIGHT0,GL_AMBIENT,ambientlight);
glLightfv(GL_LIGHT0,GL_DIFFUSE,diffuselight);
glLightfv(GL_LIGHT0,GL_SPECULAR,specularlight);
glLightf(GL_LIGHT0,GL_CONSTANT_ATTENUATION,0.9);
glLightf(GL_LIGHT0,GL_LINEAR_ATTENUATION,0.1);
glLightf(GL_LIGHT0,GL_QUADRATIC_ATTENUATION,0.1f);
glEnable(GL_LIGHT0);

glPopMatrix();

Example 2 didnt work.. :sigh: can you give me a small example of how to setup a light using glTranslate(..);? are you shure that is how you can set the lights position?

In response to opengl lights
E05263ec846eb85da803f56e2917962d
0
Noor 101 Jun 30, 2003 at 20:36

i believe you need to set the position of the light using the glTranslatef() function instead of changing the light position. Try that and see if that works. Let me know about the results.

In response to opengl lights
F699ebb187331fdf7f7875320e3e7e3e
0
starboarder2001 101 Jun 30, 2003 at 20:23

the lighting is working…and i calculated the normals for all the polygons. The problem is that when i move the camera with gluLookAt() the light seems to move with the camera? if i set the light position at 0,10,0 when i move the camera to 0,0,-20 the light is now at 0,10,-20.

screenshots:

(Link Is Down):sigh:

In response to opengl lights
E05263ec846eb85da803f56e2917962d
0
Noor 101 Jun 30, 2003 at 19:54

did you do glEnable(GL_LIGHT0); ?
also, did you do: glEnable(GL_LIGHTING); ?

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Jun 30, 2003 at 17:20

I have three points:

  • It is possible to model anything, and to animate anything, simply using OpenGL commands because even if you do use Maya, 3DSMax etc, you still need to feed the data into OpenGL commands
  • It isn’t practical to draw more than a VERY simple object manually. You need to figure out all the co-ordinates and type them in. It’s hard to do and harder to maintain. Like writing your whole app in ASM.
  • Why a liver? why not a heart, spleen, stomach, small intestine…

that’s about it :)

3a28227e8f3c9837610adb0c0a76e654
0
like_gobeawan 101 Jun 30, 2003 at 15:52

yup, i would like some sample code on rendering irregular shape 3D object, eg. liver, phone, animal, etc. which is modeled using OpenGL basic command only, not relying on the available 3D modeler such as Maya/3DMax.
would it be feasible ? afterwards, i need to animate the objects modeled.
thx for the help !

:) :D :)

F7a4a748ecf664f189bb704a660b3573
0
anubis 101 Jun 30, 2003 at 14:21

what do you mean by sample code ? code that shows you how to render primitives using opengl ? i could provide you with that. i could mail it to you… let me know…

In response to stl problems
F7a4a748ecf664f189bb704a660b3573
0
anubis 101 Jun 25, 2003 at 15:04

windows
vs.net
my stl implementation was stlport…
i found out that the problems i have are related to stlport since the programm compiles with the ms stl. vs totally messes up the project settings when i create a new dll so i’ll just have to reinstall it. i never had such an error before. strangest thing i have seen so far.

In response to stl problems
E05263ec846eb85da803f56e2917962d
0
Noor 101 Jun 25, 2003 at 14:18

What kind of coding are you using?
what kind of OS are u using?

In response to stl problems
F7a4a748ecf664f189bb704a660b3573
0
anubis 101 Jun 25, 2003 at 13:58

ok, now nothing works again. i compiled when i linked to the non-debug libs but it throws an expection when i start it. i’m thinking about reinstalling visual studio…

In response to stl problems
F7a4a748ecf664f189bb704a660b3573
0
anubis 101 Jun 25, 2003 at 13:44

ok, the problem was somehow related to the crt. i told it to link to the non-debug libs even in debug build and after that everything worked fine. now i just need to find out what’s going wrong when i link to the debug libs…

E05263ec846eb85da803f56e2917962d
0
Noor 101 Jun 22, 2003 at 13:57

OPPS :eek:. Oh my God.. :huh: .. I did not even notice that… Ok sorry apex, I guess I’m ganna have to change mine…

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Jun 22, 2003 at 13:30

apex:

Welcome back Yau..long time no see.

nkharrat:

Welcome back Yau. Long time no see.

IT’S A CONSPIRACY!!

E05263ec846eb85da803f56e2917962d
0
Noor 101 Jun 22, 2003 at 12:51

Welcome back Yau. Long time no see.

[EDIT]
Welcome back yau. We haven’t seen you in our forum lately
[/EDIT]

Thanks baldurk ;) . Good one though! :yes:

Fdbdc4176840d77fe6a8deca457595ab
0
dk 158 Jun 21, 2003 at 19:38

Welcome back Yau..long time no see.

This is just an idea: if you’re considering making a multi-platfrom GUI application, you might want to check out the Qt Library. You won’t have to deal with Win32 or any other platforms. If you’re just interested in win32, then that’s another story.

590e8bdac8129bd87b188df15e62d0e5
0
CyraX 101 Jun 21, 2003 at 16:35

Create and Instance of CButton class.
And provide it with the pos.x and pos.y. Then “show” it. This step is very important because by default the windows (Even a button/text is a window) are created in hide mode.
Same is the case with text(CLabel)

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Jun 21, 2003 at 14:47

when I did it, you used CreateWindow. The parent window is the window you want the widget to be on, and the class was one of several pre-defined types. “Text” maybe being one of them, my memory isn’t very good. Then the x, y, width and height help you.

Also, welcome back! It’s been a long time

Welcome to DevMaster, a community-driven game development website of posts and resources!

Recent Tags

indie × 5
game-development × 5
ios × 3
android × 3
algorithm × 1
effects × 1
physics × 1
iphone × 1
c# × 1
mobile × 1
physics-engines × 1
native × 1
macos × 1
sound × 1
music × 1
networking × 1
testing × 1
multiplayer × 1
design-patterns × 1
game-programming × 1
3d-engine × 1
shaders × 1
cross-platform × 1
gaming × 1
game-industry × 1