Submit
0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Jul 03, 2003 at 17:10

the only problem is when to judge someone worthy of a blog. It can’t be post count only. The decision of apex perhaps?

F7a4a748ecf664f189bb704a660b3573
0
anubis 101 Jul 01, 2003 at 17:02

it’s actually quite simple. check out video for windows. it lets you stream in avi video files into your app easily. if you are not under windows i’d check out ogg.
vfw delivers you video frames as DIBs which you can simply load into opengl textures.

In response to Texture Loading
27340afba8e6bbd010c1e520a843e50f
0
moomin 101 Jul 01, 2003 at 12:39

Hmmmmm, I suppose this isn’t really an opengl issue, and is really a personal decision. BMP’s are fine(ish) just their lack of alpha (although you can “fix” this, and the comperatively large filesize). For testing/learning BMPs are fine

In response to Texture Loading
6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Jul 01, 2003 at 11:26

png has a lot of internal formats, lossy and lossless ones..

the “perfect” format is dds, direct draw surface. why? because it is optinonally lossless or lossy, with mipmaps or not, and can get directly load into system, as it uses the same compression algo as gpu’s have to decode.

i for myself just use bmp or so.. dunno..

the “best” thing i’ve seen is from maven.de (hope link is right), wavelet compression much like in jpg2000…

but for textures? dunno.. i haven’t mastered his sourcecode yet to load my own files:(

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!!

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