MiniB3d for FreeBasic

External libraries (GTK, GSL, SDL, Allegro, OpenGL, etc) questions.
angros47
Posts: 1367
Joined: Jun 21, 2005 19:04

Re: MiniB3d for FreeBasic

Postby angros47 » Nov 27, 2017 22:11

In shadow.cpp, the line is supposed to be:

float ShadowObject::light_x, ShadowObject::light_y, ShadowObject::light_z;


where did you get that code? It looks like an attempt to expand the source code into the more verbose form, forgetting to change one character. But the code I have is not in that form, have you downloaded it from sourceforge? And are you sure you haven't replaced or modified any file?
D.J.Peters
Posts: 7362
Joined: May 28, 2005 3:28

Re: MiniB3d for FreeBasic

Postby D.J.Peters » Nov 28, 2017 2:08

Yes you are right isn't in the latest donload so must be modified by me.
Sorry for the mistake.

Joshy
angros47
Posts: 1367
Joined: Jun 21, 2005 19:04

Re: MiniB3d for FreeBasic

Postby angros47 » Apr 16, 2018 23:21

Ok, new version is online. In this version, some bugs have been fixed, and the code in the shader part has been cleaned a bit. Instead of adding further new features, this time I preferred to introduce a new helper library, named OB3D Plus. The reason is that most of the new features rely on shaders, and until now, I always tried to keep OpenB3D compatible even with older hardware that provided no shader support.

I didn't like to either have to drop support for some hardware, or to keep OpenB3D back, so I preferred to put the new features in a separate library, with different hardware requirements.

The features of OB3D Plus include: High Dynamic Range, Screen Space Ambient Occlusion, Material Capture, Fur Shading, simple Deferred Rendering, Interior Mapping, and more. Also, it allows to save videos of the rendering.
D.J.Peters
Posts: 7362
Joined: May 28, 2005 3:28

Re: MiniB3d for FreeBasic

Postby D.J.Peters » Apr 21, 2018 10:56

gluBuild2DMipmaps() supports GL_TEXTURE_2D but not GL_TEXTURE_CUBE_MAP_XYZ

Code: Select all

switch(i){
case 0:
  gluBuild2DMipmaps(GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_RGBA,tex->width, tex->height, GL_RGBA, GL_UNSIGNED_BYTE, dstbuffer);
  break;
case 1:
  gluBuild2DMipmaps(GL_TEXTURE_CUBE_MAP_POSITIVE_Z, GL_RGBA,tex->width, tex->height, GL_RGBA, GL_UNSIGNED_BYTE, dstbuffer);
  break;
case 2:
  gluBuild2DMipmaps(GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_RGBA,tex->width, tex->height, GL_RGBA, GL_UNSIGNED_BYTE, dstbuffer);
  break;
case 3:
  gluBuild2DMipmaps(GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, GL_RGBA,tex->width, tex->height, GL_RGBA, GL_UNSIGNED_BYTE, dstbuffer);
  break;
case 4:
  gluBuild2DMipmaps(GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_RGBA,tex->width, tex->height, GL_RGBA, GL_UNSIGNED_BYTE, dstbuffer);
  break;
case 5:
  gluBuild2DMipmaps(GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_RGBA,tex->width, tex->height, GL_RGBA, GL_UNSIGNED_BYTE, dstbuffer);
  break;
}
Do you mean this ?

Code: Select all

switch(i){
case 0:
  glTexImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 0,  GL_RGBA,tex->width, tex->height, 0,  GL_RGBA, GL_UNSIGNED_BYTE, dstbuffer);
  break;
case 1:
  glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 0,  GL_RGBA,tex->width, tex->height, 0,  GL_RGBA, GL_UNSIGNED_BYTE, dstbuffer);
  break;
case 2:
  glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0,  GL_RGBA,tex->width, tex->height,  0, GL_RGBA, GL_UNSIGNED_BYTE, dstbuffer);
  break;
case 3:
  glTexImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 0,  GL_RGBA,tex->width, tex->height, 0,  GL_RGBA, GL_UNSIGNED_BYTE, dstbuffer);
  break;
case 4:
  glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 0,  GL_RGBA,tex->width, tex->height, 0,  GL_RGBA, GL_UNSIGNED_BYTE, dstbuffer);
  break;
case 5:
  glTexImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,  0, GL_RGBA,tex->width, tex->height,  0, GL_RGBA, GL_UNSIGNED_BYTE, dstbuffer);
  break;
}

Return to “Libraries”

Who is online

Users browsing this forum: No registered users and 2 guests